|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.uniba.euromath.document.schema.impl.export.NewElementRuleImpl
public final class NewElementRuleImpl
Implementor of NewElementRuleP interface. Not thread-safe.
| Field Summary | |
|---|---|
Set<com.sun.msv.grammar.ElementExp> |
exps
Set of ElementExps, that may generate content of context
element. |
| Method Summary | |
|---|---|
boolean |
accepts(String namespaceURI,
String localName)
Check whether the acceptor accepts given pair. |
boolean |
acceptsForeign()
Checks whether this rule can generate elements from foreign namespace. |
boolean |
acceptsNamespace(String namespaceURI)
Checks if the namelist accepts/contains at least one qname from given namespace. |
boolean |
equals(Object obj)
|
EnumSet<AcceptsEnum> |
getAccepts()
Returns type of qnames, that this rule accepts. |
List<IAttributeListRuleP> |
getLists()
For each expression returns one list of attributes, that can be created by this rule. |
Set<String> |
getNamespaces()
Tries to obtain a list of namespaces of qnames that are contained in this name list. |
String |
getNamespaceUri()
Returns base namespace (the namespace of local elements). |
IElementSequenceRuleP |
getNewContent(Element e)
Computes all possibilities of content, that can be generated by this rule and inserted into context element. |
IValueRule |
getNewTextRule(Element e)
Computes and returns value rule, that can be inserted into context element. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final Set<com.sun.msv.grammar.ElementExp> exps
ElementExps, that may generate content of context
element.
| Method Detail |
|---|
public boolean accepts(String namespaceURI,
String localName)
IQNameAcceptorCheck whether the acceptor accepts given pair.
accepts in interface IQNameAcceptornamespaceURI - the namespace part of the qname. Acceptor must take
both empty-string and null values as a null namespace.
If the acceptor accepts the attribute qnames also, then local attributes
should have null as their namespace, regardless of the
value of getNamespaceUri() function.
localName - the local name part.
public EnumSet<AcceptsEnum> getAccepts()
IQNameAcceptorEnumSet with both
flags.
getAccepts in interface IQNameAcceptorACCEPTS_* constants.public String getNamespaceUri()
IQNameAcceptor
getNamespaceUri in interface IQNameAcceptorpublic List<IAttributeListRuleP> getLists()
INewElementRulePFor each expression returns one list of attributes, that can be created by this rule. Only required attributes must be included in result set. Special care must be taken: there must not be two equal list rules (with equal rules). If all lists being returned are zero-length then a zero-length sequence must be returned instead.
Should be computed only once, when this function is called for first time.
getLists in interface INewElementRulePpublic boolean acceptsForeign()
public String toString()
toString in class Objectpublic IElementSequenceRuleP getNewContent(Element e)
INewElementRulePComputes all possibilities of content, that can be generated by this rule and inserted into context element. There must be only such insertlists, that doesn't contain optional elements. All InsertLists with length equal to 1 should be grouped together in one InsertList.
This content must be computed with existing attributes in mind. Expressions, whose contents violates given attribute set, must not be used.
It must NOT be computed when instance of this object is created.
getNewContent in interface INewElementRulePe - element with already created attributes. It can be assumed that
element has no content.
null.public IValueRule getNewTextRule(Element e)
INewElementRuleP
getNewTextRule in interface INewElementRulePe - element with already created attributes. It can be assumed that
element has no content. It may not be inserted in the document.
null, then no text content is required.public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean acceptsNamespace(String namespaceURI)
IForeignNodeP
acceptsNamespace in interface IForeignNodePnamespaceURI - the namespace to check.
public Set<String> getNamespaces()
IForeignNodePnull.
getNamespaces in interface IForeignNodePnull if it cannot be computed and/or represented.
null namespace is represented as an empty string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||