org.gxml.xs
Class SmNamespaceConstraint<S>

java.lang.Object
  extended by org.gxml.xs.SmNamespaceConstraint<S>

public final class SmNamespaceConstraint<S>
extends java.lang.Object

Implementation for a {namespace constraint} property of a wildcard.

Objects of this class are immutable and can only be created via the static "include" and "exclude" methods.

The static constant "Any" represents the "##any" namespace constraint.


Nested Class Summary
static class SmNamespaceConstraint.Mode
           
 
Method Summary
 boolean allowsNamespaceName(S namespaceURI)
          Validation Rule: Wildcard allows Namespace Name.
static
<S> SmNamespaceConstraint<S>
Any(SmNameBridge<S> nameBridge)
          Singleton implementation of the namespace constraint allowing any namespaces.
 boolean equals(org.gxml.xs.Object obj)
           
static
<S> SmNamespaceConstraint<S>
exclude(S namespace, SmNameBridge<S> nameBridge)
          Constructs a namespace constraint equivalent to not and a namespace.
 SmNamespaceConstraint.Mode getMode()
          Returns the mode in which this namespace constraint is operating.
 java.lang.Iterable<S> getNamespaces()
          Returns the set of namespaces applicable in SmNamespaceConstraint.Mode.Include and SmNamespaceConstraint.Mode.Exclude.
static
<S> SmNamespaceConstraint<S>
include(java.util.Set<S> namespaces, SmNameBridge<S> nameBridge)
          Constructs a namespace constraint equivalent to allowing a set of namespaces.
 SmNamespaceConstraint<S> intersection(SmNamespaceConstraint<S> other)
          Calculates the intersection of this namespace constraint and another namespace constraint.
 boolean isSubset(SmNamespaceConstraint<S> superSet)
          Determines whether this namespace constraint is a subset of another namespace constraint.
static
<S> SmNamespaceConstraint<S>
NotAbsent(SmNameBridge<S> nameBridge)
          Internal Singleton for Not and Absent
 SmNamespaceConstraint<S> union(SmNamespaceConstraint<S> other)
          Calculates the union of this namespace constraint and another namespace constraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

Any

public static <S> SmNamespaceConstraint<S> Any(SmNameBridge<S> nameBridge)
Singleton implementation of the namespace constraint allowing any namespaces.

Parameters:
nameBridge -

exclude

public static <S> SmNamespaceConstraint<S> exclude(S namespace,
                                                   SmNameBridge<S> nameBridge)
Constructs a namespace constraint equivalent to not and a namespace.


include

public static <S> SmNamespaceConstraint<S> include(java.util.Set<S> namespaces,
                                                   SmNameBridge<S> nameBridge)
Constructs a namespace constraint equivalent to allowing a set of namespaces.


NotAbsent

public static <S> SmNamespaceConstraint<S> NotAbsent(SmNameBridge<S> nameBridge)
Internal Singleton for Not and Absent


allowsNamespaceName

public boolean allowsNamespaceName(S namespaceURI)
Validation Rule: Wildcard allows Namespace Name.


equals

public boolean equals(org.gxml.xs.Object obj)

getMode

public SmNamespaceConstraint.Mode getMode()
Returns the mode in which this namespace constraint is operating.


getNamespaces

public java.lang.Iterable<S> getNamespaces()
Returns the set of namespaces applicable in SmNamespaceConstraint.Mode.Include and SmNamespaceConstraint.Mode.Exclude.


intersection

public SmNamespaceConstraint<S> intersection(SmNamespaceConstraint<S> other)
                                      throws SmWildcardIntersectionException
Calculates the intersection of this namespace constraint and another namespace constraint.
This implements Schema Component Constraint: Wildcard Intersection.

Parameters:
other - The other namespace constraint.
Throws:
SmWildcardIntersectionException

isSubset

public boolean isSubset(SmNamespaceConstraint<S> superSet)
Determines whether this namespace constraint is a subset of another namespace constraint.
This implements Schema Component Constraint: Wildcard Subset.

Parameters:
superSet - The other namespace constraint.

union

public SmNamespaceConstraint<S> union(SmNamespaceConstraint<S> other)
                               throws SmWildcardUnionException
Calculates the union of this namespace constraint and another namespace constraint.
This implements Schema Component Constraint: Wildcard Union.

Parameters:
other - The other namespace constraint.
Throws:
SmWildcardUnionException


Copyright © 2009 TIBCO Software Inc. All Rights Reserved.