|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the rule type. Can be instance of AttributeRule
or
NewElementRule
only.public interface INameList<T extends BaseRule>
Maintains list of all creatable elements/attributes.
Method Summary | |
---|---|
boolean |
acceptsNamespace(String namespaceURI)
Checks if the namelist accepts/contains at least one qname from given namespace. |
Set<QName> |
getForeignNames()
Returns set of all foreign names, that are in this namelist. |
Set<String> |
getLocalNames()
Returns set of all localnames, that are in this namelist. |
Set<String> |
getNamespaces()
Tries to obtain a list of namespaces of qnames that are contained in this name list. |
String |
getNamespaceUri()
Returns schema's namespace. |
T |
getRule(QName foreign)
Returns rule, that can be used to create node content. |
T |
getRule(QName qname,
boolean isElement)
Returns rule, that can be used to create node content. |
T |
getRule(String localName)
Returns rule, that can be used to create node content. |
boolean |
hasRule(QName qname,
boolean isElement)
Checks if this namelist contains given qname. |
boolean |
isEmpty()
Checks if this namelist is empty (it contains no rules). |
boolean |
isLocal(QName qname,
boolean isElement)
Checks if given qname is local. |
void |
refresh()
Refreshes the namelist to reflect the schema loading/unloading. |
Method Detail |
---|
Set<String> getLocalNames()
Set<QName> getForeignNames()
boolean isEmpty()
T getRule(String localName)
localName
- local name of node (element or attribute).
AttributeRule
,
else it is of type NewElementRule
.
IllegalArgumentException
- if given qname is not known.T getRule(QName foreign)
foreign
- full name of foreign (not from our namespace) node
(element or attribute).
AttributeRule
,
else it is of type NewElementRule
.
IllegalArgumentException
- if given qname is not known.T getRule(QName qname, boolean isElement)
qname
- full name of node (element or attribute).isElement
- true if the namelist represents element rules, false if
attribute rules.
AttributeRule
,
else it is of type NewElementRule
.
IllegalArgumentException
- if given qname is not known.boolean hasRule(QName qname, boolean isElement)
qname
- full name of node (element or attribute).isElement
- true if the namelist represents element rules, false if
attribute rules.
true
if given qname is known and there is a rule
for it, false
otherwise.boolean isLocal(QName qname, boolean isElement)
qname
- full name of node (element or attribute).isElement
- true if the namelist represents element rules, false if
attribute rules.
true
if given qname is local, false
otherwise. It should implement the following algorithm:
isElement ? DomTools.equalsURI(qname.getNamespaceURI(), getNamespaceUri()) : DomTools.equalsURI(
qname.getNamespaceURI(), null);
String getNamespaceUri()
Set<String> getNamespaces()
null
.
null
if it cannot be computed and/or represented.
null
namespace is represented as an empty string.boolean acceptsNamespace(String namespaceURI)
namespaceURI
- the namespace to check.
void refresh()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |