|
||||||||||
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.tools.NameClassTools
public final class NameClassTools
Serves as helper for SchemaImpl
object. Introduces several
useful methods, which works with com.sun.msv.grammar.NameClass
classes. Intended to work only with org.w3c.dom.Document
XML
representation and com.sun.msv.grammar.NameClass
expressions
of Sun MSV
package. Thread safe.
Field Summary | |
---|---|
static com.sun.msv.grammar.NameClass |
ANY_ATTRIBUTE_NAMECLASS
This nameclass accepts all attributes except attributes from these namespaces: EM_URI and Const.EM_URI_SELECT namespace. |
static com.sun.msv.grammar.NameClass |
ANY_ELEMENT_NAMECLASS
This nameclass accepts all elements except elements from these namespaces: Const.EM_URI . |
com.sun.msv.grammar.NameClass |
localAttributeNames
Contains nameclass, that accepts all names from our namespace, and also all names with empty namespace. |
com.sun.msv.grammar.NameClass |
localElementNames
Contains nameclass, that accepts all names from our namespace. |
com.sun.msv.grammar.NameClass |
localNamespaceNames
Contains nameclass, that accepts all names from our namespace. |
String |
namespaceURI
Namespace URI for which this instance works. |
static com.sun.msv.grammar.NameClass |
NULL_NAMESPACE_NAMECLASS
Accepts names with no (empty) namespace only. |
Constructor Summary | |
---|---|
NameClassTools(String namespaceURI)
Constructor. |
Method Summary | |
---|---|
boolean |
acceptsForeign(com.sun.msv.grammar.NameClass nc,
boolean isElement)
Checks, whether this nameclass accepts some foreign qnames. |
static boolean |
acceptsFromNamespace(com.sun.msv.grammar.NameClass nc,
String namespaceURI)
Checks, whether the nameclass accepts some qnames from given namespace. |
boolean |
acceptsLocal(com.sun.msv.grammar.NameClass nc,
boolean isElement)
Checks, whether this nameclass accepts some local qnames. |
Set<String> |
getAcceptedLocalnames(com.sun.msv.grammar.NameClass nc,
boolean isElement)
Returns all local localnames that the nc accepts. |
String |
getLocalNamespace(boolean isElement)
Returns local namespace for this schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final String namespaceURI
public static final com.sun.msv.grammar.NameClass NULL_NAMESPACE_NAMECLASS
public static final com.sun.msv.grammar.NameClass ANY_ELEMENT_NAMECLASS
Const.EM_URI
.
public static final com.sun.msv.grammar.NameClass ANY_ATTRIBUTE_NAMECLASS
public final com.sun.msv.grammar.NameClass localElementNames
public final com.sun.msv.grammar.NameClass localAttributeNames
public final com.sun.msv.grammar.NameClass localNamespaceNames
Constructor Detail |
---|
public NameClassTools(String namespaceURI)
namespaceURI
- Namespace URI for which this instance works. The 'local' namespace.Method Detail |
---|
public Set<String> getAcceptedLocalnames(com.sun.msv.grammar.NameClass nc, boolean isElement)
nc
accepts.
nc
- NameClass that accepts elements names.isElement
- if given nameclass is element's nameclass.
String
s, representing valid local
localname parts. Namespaces can be get via the
getLocalNamespace()
function.
IllegalStateException
- if given nameclass accepts infinite number
of local localnames.public boolean acceptsForeign(com.sun.msv.grammar.NameClass nc, boolean isElement)
nc
- nameclass to check.isElement
- whether this nameclass is element's nameclass or
attribute's nameclass.
public static boolean acceptsFromNamespace(com.sun.msv.grammar.NameClass nc, String namespaceURI)
nc
- nameclass to check.namespaceURI
- the namespace
public boolean acceptsLocal(com.sun.msv.grammar.NameClass nc, boolean isElement)
nc
- nameclass to check.isElement
- whether this nameclass is element's nameclass or
attribute's nameclass.
public String getLocalNamespace(boolean isElement)
isElement
- if return namespace for local element, or local
attribute.
namespaceURI
for element, or ""
for
attribute.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |