QNameSet Class
- public final class QNameSet
extends Object
implements QNameSetSpecification
, Serializable
This interface represents a lattice of finite and infinite sets of QNames.
The lattice the minimal one that is closed under union, intersection, and
inverse, and contains individual QNames as well as entire namespaces.
Here is a summary of the two kinds of QNameSets:
- A QNameSet can cover a finite set of namespaces, additionally including a finite
set of QNames outside those namespaces, and with the exception of
a finite set of QNames excluded from those namespaes:
- excludedQNamesInIncludedURIs == the set of excluded QNames from coveredURIs namespaces
- excludedURIs == null
- includedURIs == the set of covered namespace URIs
- includedQNamesInExcludedURIs == set of additional QNames outside coveredURIs namespaces
- A QNameSet can cover all namespaces except for a finite number of excluded ones,
additionally including a finite set of QNames within the excluded namespaces,
and with the exception of a finite set of QNames outside the excluded namespaces:
- excludedQNamesInIncludedURIs == the set of excluded QNames outside uncoveredURIs namespaces
- excludedURIs == the set of uncovered namespace URIs
- includedURIs == null
- includedQNamesInExcludedURIs == set of additional QNames from uncoveredURIs namespaces
Notice that a finite set of QNames is a degenerate case of the first
category outlined above:
- A QnameSet can contain a finite number of QNames:
- excludedQNamesInIncludedURIs == null
- excludedURIs == null
- includedURIs == empty set
- includedQNamesInExcludedURIs == set of included QNames
-
Hierarchy
-
Object
QNameSet
-
All Implemented Interfaces
-
QNameSetSpecification
, Serializable
public static final QNameSet |
-
ALL
- The QNameSet containing all QNames.
|
public static final QNameSet |
-
EMPTY
- The empty QNameSet.
|
public static final QNameSet |
-
LOCAL
- The QNameSet containing all QNames in the local (no-)namespace.
|
public static final QNameSet |
-
NONLOCAL
- The QNameSet containing all QNames except for those in the local (no-)namespace.
|
public boolean |
-
contains (QName name)
- True if this ModelTransitionSet contains the given qname.
|
public boolean |
-
containsAll (QNameSetSpecification set)
- True if the given set is a subset of this one.
|
public Set |
-
excludedQNamesInIncludedURIs ()
- The set of QNames excluded from the set even though they are within
a namespace that is otherwise fully included in the set.
|
public Set |
-
excludedURIs ()
- Namespaces that are fully excluded from the set except for a finite
number of individual QName exceptions.
|
public static QNameSet |
-
forArray (QName [] includedQNames)
- Returns a QNameSet based on the given array of included QNames
|
public static QNameSet |
-
forSets (Set excludedURIs, Set includedURIs, Set excludedQNamesInIncludedURIs, Set includedQNamesInExcludedURIs)
- Returns a QNameSet based on the given sets of excluded URIs,
included URIs, excluded QNames in included namespaces, and included
QNames in excluded namespaces.
|
public static QNameSet |
-
forSpecification (QNameSetSpecification spec)
- Returns a QNameSet with the same contents as the given
QNameSetSpecification.
|
public static QNameSet |
-
forWildcardNamespaceString (String wildcard, String targetURI)
- Returns a QNameSet corresponding to the given wildcard namespace string.
|
public Set |
-
includedQNamesInExcludedURIs ()
- The set of QNames included in the set even though they are within
a namespace that is otherwise fully included in the set.
|
public Set |
-
includedURIs ()
- Namespaces that are fully included in set except for a finite
number of individual QName exceptions.
|
public QNameSet |
-
intersect (QNameSetSpecification set)
- Returns a new QNameSet that is the intersection of this one and another.
|
public QNameSet |
-
inverse ()
- Returns a new QNameSet that is the inverse of this one.
|
public boolean |
-
isAll ()
- True if this ModelTransitionSet contains all QNames.
|
public boolean |
-
isDisjoint (QNameSetSpecification set)
- True if the given set is disjoint from this one.
|
public boolean |
-
isEmpty ()
- True if this ModelTransitionSet contains no QNames.
|
public static QNameSet |
-
singleton (QName name)
- Returns a QNameSet containing only the given QName.
|
public String |
-
toString ()
- Returns a string representation useful for debugging, subject to change.
|
public QNameSet |
-
union (QNameSetSpecification set)
- Returns a new QNameSet that is the union of this one and another.
|
Methods from interface com.bea.xml.QNameSetSpecification |
contains , containsAll , excludedQNamesInIncludedURIs , excludedURIs , includedQNamesInExcludedURIs , includedURIs , intersect , inverse , isAll , isDisjoint , isEmpty , union
|
ALL
public static final QNameSet
ALL
- The QNameSet containing all QNames.
EMPTY
public static final QNameSet
EMPTY
- The empty QNameSet.
LOCAL
public static final QNameSet
LOCAL
- The QNameSet containing all QNames in the local (no-)namespace.
NONLOCAL
public static final QNameSet
NONLOCAL
- The QNameSet containing all QNames except for those in the local (no-)namespace.
contains(QName) Method
public boolean contains(QName
name)
True if this ModelTransitionSet contains the given qname.
containsAll(QNameSetSpecification) Method
public boolean containsAll(QNameSetSpecification
set)
True if the given set is a subset of this one.
Parameters
-
set
- the set to test
Returns
- true if this contains all QNames contained by the given set
excludedQNamesInIncludedURIs() Method
public Set
excludedQNamesInIncludedURIs()
The set of QNames excluded from the set even though they are within
a namespace that is otherwise fully included in the set.
Returns
- the set of excluded QNames from within includedURI namespaces
excludedURIs() Method
public Set
excludedURIs()
Namespaces that are fully excluded from the set except for a finite
number of individual QName exceptions. Returns null if this set is infinite.
Returns
- the set of excluded namespace URI strings
forArray(QName[]) Method
public static QNameSet
forArray(QName
[] includedQNames)
Returns a QNameSet based on the given array of included QNames
Parameters
-
includedQNames
- the array of included QNames
forSets(Set, Set, Set, Set) Method
public static QNameSet
forSets(Set
excludedURIs,
Set
includedURIs,
Set
excludedQNamesInIncludedURIs,
Set
includedQNamesInExcludedURIs)
Returns a QNameSet based on the given sets of excluded URIs,
included URIs, excluded QNames in included namespaces, and included
QNames in excluded namespaces.
Parameters
-
excludedURIs
- the finite set of namespace URI strings to exclude from the set, or null if this set is infinite
-
includedURIs
- the finite set of namespace URI strings to include in the set, or null if this set is infinite
-
excludedQNamesInIncludedURIs
- the finite set of exceptional QNames to exclude from the included namespaces
-
includedQNamesInExcludedURIs
- the finite set of exceptional QNames to include that are in the excluded namespaces
Returns
- the constructed QNameSet
forSpecification(QNameSetSpecification) Method
public static QNameSet
forSpecification(QNameSetSpecification
spec)
Returns a QNameSet with the same contents as the given
QNameSetSpecification.
Returns
- the copied QNameSet
forWildcardNamespaceString(String, String) Method
public static QNameSet
forWildcardNamespaceString(String
wildcard,
String
targetURI)
Returns a QNameSet corresponding to the given wildcard namespace string.
This is a space-separated list of URIs, plus special tokens as specified
in the XML Schema specification (##any, ##other, ##targetNamespace, ##local).
Returns
- the constructed QNameSet
includedQNamesInExcludedURIs() Method
public Set
includedQNamesInExcludedURIs()
The set of QNames included in the set even though they are within
a namespace that is otherwise fully included in the set.
Returns
- the set of included QNames from within excludedURI namespaces
includedURIs() Method
public Set
includedURIs()
Namespaces that are fully included in set except for a finite
number of individual QName exceptions. Returns null if this set is infinite.
Returns
- the set of included namespace URI strings
intersect(QNameSetSpecification) Method
public QNameSet
intersect(QNameSetSpecification
set)
Returns a new QNameSet that is the intersection of this one and another.
Parameters
-
set
- the set to insersect with
Returns
- the intersection
inverse() Method
public QNameSet
inverse()
Returns a new QNameSet that is the inverse of this one.
isAll() Method
public boolean isAll()
True if this ModelTransitionSet contains all QNames.
isDisjoint(QNameSetSpecification) Method
public boolean isDisjoint(QNameSetSpecification
set)
True if the given set is disjoint from this one.
Parameters
-
set
- the set to test
Returns
- true if the set is disjoint from this set
isEmpty() Method
public boolean isEmpty()
True if this ModelTransitionSet contains no QNames.
singleton(QName) Method
public static QNameSet
singleton(QName
name)
Returns a QNameSet containing only the given QName.
Returns
- the constructed QNameSet
toString() Method
public String
toString()
Returns a string representation useful for debugging, subject to change.
-
Overrides
-
Object.toString()
union(QNameSetSpecification) Method
public QNameSet
union(QNameSetSpecification
set)
Returns a new QNameSet that is the union of this one and another.
Parameters
-
set
- the set to union with
Returns
- the union