1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package sk.uniba.euromath.document.schema;
18 import java.util.EnumSet;
19 /***
20 * Acceptor of the qname.
21 * @author Martin Vysny
22 */
23 public interface IQNameAcceptor {
24 /***
25 * <p>
26 * Check whether the acceptor accepts given pair.
27 * @param namespaceUri the namespace part of the qname. Acceptor must take
28 * both empty-string and <code>null</code> values as a null namespace.
29 * </p>
30 * <p>
31 * If the acceptor accepts the attribute qnames also, then local attributes
32 * should have <code>null</code> as their namespace, regardless of the
33 * value of <code>getNamespaceUri()</code> function.
34 * </p>
35 * @param local the local name part.
36 * @return true if it accepts given qname, false otherwise.
37 */
38 public boolean accepts(String namespaceUri, String local);
39 /***
40 * Returns type of qnames, that this rule accepts. If the information is not
41 * known then the function should return <code>EnumSet</code> with both
42 * flags.
43 * @return one of <code>ACCEPTS_*</code> constants.
44 */
45 public EnumSet<AcceptsEnum> getAccepts();
46 /***
47 * Returns base namespace (the namespace of local elements).
48 * @return base namespace of schema, that created this object.
49 */
50 public String getNamespaceUri();
51 }