Package org.apache.xmlbeans
Class QNameSetBuilder
java.lang.Object
org.apache.xmlbeans.QNameSetBuilder
- All Implemented Interfaces:
 Serializable,QNameSetSpecification
public class QNameSetBuilder extends Object implements QNameSetSpecification, Serializable
Used to build 
QNameSets.- See Also:
 - Serialized Form
 
- 
Constructor Summary
Constructors Constructor Description QNameSetBuilder()Constructs an empty QNameSetBuilder.QNameSetBuilder(String str, String targetURI)Constructs a QNameSetBuilder whose initial contents are given as a list of namespace URIs, using the same format used by wildcards in XSD files.QNameSetBuilder(Set excludedURIs, Set includedURIs, Set excludedQNamesInIncludedURIs, Set includedQNamesInExcludedURIs)Constructs a QNameSetBuilder whose inital contents are given by the four sets.QNameSetBuilder(QNameSetSpecification set)Constructs a QNameSetBuilder whose initial contents are given by another QNameSetSpecification. - 
Method Summary
Modifier and Type Method Description voidadd(QName qname)Adds a single QName to this QNameSetBuilder.voidaddAll(QNameSetSpecification set)Adds the contents of another QNameSet to this QNameSetBuilder.voidaddNamespace(String uri)Adds an entire namespace URI of QNames to this QNameSetBuilder.voidclear()Clears this QNameSetBuilderbooleancontains(QName name)True if this ModelTransitionSet contains the given qname.booleancontainsAll(QNameSetSpecification set)True if the parameter is a subset of this set.SetexcludedQNamesInIncludedURIs()The finite set of QNames that are excluded from the set within namespaces that are otherwise included.SetexcludedURIs()The finite set of namespace URIs that are almost completely excluded from the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions).SetincludedQNamesInExcludedURIs()The finite set of QNames that are included in the set within namespaces that are otherwise excluded.SetincludedURIs()The finite set of namespace URIs that are almost completely included in the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions).QNameSetintersect(QNameSetSpecification set)Returns a new QNameSet that is the intersection of this one and another.QNameSetinverse()Returns a new QNameSet that is the inverse of this one.voidinvert()Inverts this QNameSetBuilder.booleanisAll()True if this ModelTransitionSet contains all QNames.booleanisDisjoint(QNameSetSpecification set)True if the given set is disjoint from this one.booleanisEmpty()True if this ModelTransitionSet contains no QNames.voidremove(QName qname)Removes the given qname from this QNameSetBuilder.voidremoveAll(QNameSetSpecification set)Removes all contents of a given QNameSet from this QNameSetBuilder.voidremoveNamespace(String uri)Removes an entire namespace URI from this QNameSetBuilder.voidrestrict(QNameSetSpecification set)Restricts the contents of this QNameSetBuilder to be a subset of the given QNameSet.QNameSettoQNameSet()Returns aQNameSetequivalent to the current state of this QNameSetBuilder.StringtoString()Returns a string representation useful for debugging, subject to change.QNameSetunion(QNameSetSpecification set)Returns a new QNameSet that is the union of this one and another. 
- 
Constructor Details
- 
QNameSetBuilder
public QNameSetBuilder()Constructs an empty QNameSetBuilder. - 
QNameSetBuilder
Constructs a QNameSetBuilder whose initial contents are given by another QNameSetSpecification.- Parameters:
 set- the QNameSetSpecificaiton to copy
 - 
QNameSetBuilder
public QNameSetBuilder(Set excludedURIs, Set includedURIs, Set excludedQNamesInIncludedURIs, Set includedQNamesInExcludedURIs)Constructs a QNameSetBuilder whose inital contents are given by the four sets. Exactly one of either excludedURIs or includedURIs must be non-null.- Parameters:
 excludedURIs- the finite set of namespace URI strings to exclude from the set, or null if this set is infiniteincludedURIs- the finite set of namespace URI strings to include in the set, or null if this set is infiniteexcludedQNamesInIncludedURIs- the finite set of exceptional QNames to exclude from the included namespacesexcludedQNamesInIncludedURIs- the finite set of exceptional QNames to include that are in the excluded namespaces
 - 
QNameSetBuilder
Constructs a QNameSetBuilder whose initial contents are given as a list of namespace URIs, using the same format used by wildcards in XSD files.- Parameters:
 str- a wildcard namespace specification string such as "##any", "##other", "##local", "##targetNamespace", or a space-separated list of URIs.targetURI- the current targetNamespace
 
 - 
 - 
Method Details
- 
contains
True if this ModelTransitionSet contains the given qname.- Specified by:
 containsin interfaceQNameSetSpecification
 - 
isAll
public boolean isAll()True if this ModelTransitionSet contains all QNames.- Specified by:
 isAllin interfaceQNameSetSpecification
 - 
isEmpty
public boolean isEmpty()True if this ModelTransitionSet contains no QNames.- Specified by:
 isEmptyin interfaceQNameSetSpecification
 - 
intersect
Returns a new QNameSet that is the intersection of this one and another.- Specified by:
 intersectin interfaceQNameSetSpecification
 - 
union
Returns a new QNameSet that is the union of this one and another.- Specified by:
 unionin interfaceQNameSetSpecification
 - 
inverse
Returns a new QNameSet that is the inverse of this one.- Specified by:
 inversein interfaceQNameSetSpecification
 - 
containsAll
True if the parameter is a subset of this set.- Specified by:
 containsAllin interfaceQNameSetSpecification
 - 
isDisjoint
True if the given set is disjoint from this one.- Specified by:
 isDisjointin interfaceQNameSetSpecification
 - 
clear
public void clear()Clears this QNameSetBuilder - 
invert
public void invert()Inverts this QNameSetBuilder. - 
add
Adds a single QName to this QNameSetBuilder. - 
addNamespace
Adds an entire namespace URI of QNames to this QNameSetBuilder. The empty string is used to signifiy the (local) no-namespace. - 
addAll
Adds the contents of another QNameSet to this QNameSetBuilder. - 
remove
Removes the given qname from this QNameSetBuilder. - 
removeNamespace
Removes an entire namespace URI from this QNameSetBuilder. - 
removeAll
Removes all contents of a given QNameSet from this QNameSetBuilder. - 
restrict
Restricts the contents of this QNameSetBuilder to be a subset of the given QNameSet. In other words, computes an intersection. - 
excludedURIs
Description copied from interface:QNameSetSpecificationThe finite set of namespace URIs that are almost completely excluded from the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions). Null if the set of namespaceURIs that are almost completely included is infinite.Null (meaning almost all URIs excluded) if includedURIs() is non-null; non-null otherwise.
The same set as inverse().includedURIs().
- Specified by:
 excludedURIsin interfaceQNameSetSpecification
 - 
includedURIs
Description copied from interface:QNameSetSpecificationThe finite set of namespace URIs that are almost completely included in the set (that is, each namespace URI that included in the set with with a finite number of QName exceptions). Null if the set of namespaceURIs that are almost completely included is infinite.Null (meaning almost all URIs included) if excludedURIs() is non-null; non-null otherwise.
The same as inverse.excludedURIs().
- Specified by:
 includedURIsin interfaceQNameSetSpecification
 - 
excludedQNamesInIncludedURIs
Description copied from interface:QNameSetSpecificationThe finite set of QNames that are excluded from the set within namespaces that are otherwise included. Should only contain QNames within namespace that are within the set includedURIs() (or any URI, if includedURIs() is null, which means that all URIs are almost completely included).Never null.
The same set as inverse().includedQNames().
- Specified by:
 excludedQNamesInIncludedURIsin interfaceQNameSetSpecification
 - 
includedQNamesInExcludedURIs
Description copied from interface:QNameSetSpecificationThe finite set of QNames that are included in the set within namespaces that are otherwise excluded. Should only contain QNames within namespace that are within the set excludedURIs() (or any URI, if excludedURIs() is null, which means that all URIs are almost completely excluded).Never null.
The same as inverse().excludedQNames().
- Specified by:
 includedQNamesInExcludedURIsin interfaceQNameSetSpecification
 - 
toString
Returns a string representation useful for debugging, subject to change. - 
toQNameSet
Returns aQNameSetequivalent to the current state of this QNameSetBuilder. 
 -