|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.document.schema.impl.export.AttributeRuleImpl
public final class AttributeRuleImpl
Implements the AttributeRule
interface. Because instances are
pooled in RulePool
, Object's equals and hashCode works fine.
Method Summary | |
---|---|
boolean |
accepts(String namespaceURI,
String localName)
Check whether the acceptor accepts given pair. |
boolean |
acceptsForeign()
Checks whether this rule can generate attributes from foreign namespace. |
boolean |
acceptsNamespace(String namespaceURI)
Checks if the namelist accepts/contains at least one qname from given namespace. |
boolean |
acceptsSomething()
Checks, whether this value rule accepts any non-empty string. |
boolean |
acceptsValue(String value)
Checks whether this textual rule can contain given value. |
boolean |
equals(Object obj)
|
EnumSet<AcceptsEnum> |
getAccepts()
Returns type of qnames, that this rule accepts. |
String |
getDatatypeName()
Returns human-readable name for the datatype, that is represented by this instance. |
String |
getErrorMessage(String value)
Compose and return an error message, why given value was not accepted. |
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). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean accepts(String namespaceURI, String localName)
IQNameAcceptor
Check whether the acceptor accepts given pair.
accepts
in interface IQNameAcceptor
namespaceURI
- 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 boolean acceptsForeign()
public boolean acceptsValue(String value)
IValueRule
acceptsValue
in interface IValueRule
value
- value to check.
public String getDatatypeName()
IValueRule
getDatatypeName
in interface IValueRule
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public boolean acceptsSomething()
IValueRule
acceptsSomething
in interface IValueRule
public String getErrorMessage(String value)
IValueRule
getErrorMessage
in interface IValueRule
value
- the value
null
.public boolean acceptsNamespace(String namespaceURI)
IForeignNodeP
acceptsNamespace
in interface IForeignNodeP
namespaceURI
- the namespace to check.
public Set<String> getNamespaces()
IForeignNodeP
null
.
getNamespaces
in interface IForeignNodeP
null
if it cannot be computed and/or represented.
null
namespace is represented as an empty string.public EnumSet<AcceptsEnum> getAccepts()
IQNameAcceptor
EnumSet
with both
flags.
getAccepts
in interface IQNameAcceptor
ACCEPTS_*
constants.public String getNamespaceUri()
IQNameAcceptor
getNamespaceUri
in interface IQNameAcceptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |