Class IdentityConstraint
- java.lang.Object
-
- org.smooks.engine.delivery.sax.ng.org.apache.xerces.impl.xs.identity.IdentityConstraint
-
- All Implemented Interfaces:
XSIDCDefinition
,XSObject
- Direct Known Subclasses:
KeyRef
,UniqueOrKey
public abstract class IdentityConstraint extends Object implements XSIDCDefinition
Base class of Schema identity constraint.- Version:
- $Id$
- Author:
- Andy Clark, IBM
-
-
Field Summary
Fields Modifier and Type Field Description protected XSAnnotationImpl[]
fAnnotations
protected String
fElementName
name of owning elementprotected int
fFieldCount
Field count.protected Field[]
fFields
Fields.protected String
fIdentityConstraintName
Identity constraint name.protected String
fNamespace
target namespaceprotected int
fNumAnnotations
protected Selector
fSelector
Selector.protected short
type
type-
Fields inherited from interface org.smooks.engine.delivery.sax.ng.org.apache.xerces.xs.XSIDCDefinition
IC_KEY, IC_KEYREF, IC_UNIQUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdentityConstraint(String namespace, String identityConstraintName, String elemName)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(XSAnnotationImpl annotation)
void
addField(Field field)
Adds a field.boolean
equals(IdentityConstraint id)
XSObjectList
getAnnotations()
Optional.short
getCategory()
{identity-constraint category} One of key, keyref or unique.String
getElementName()
Field
getFieldAt(int index)
Returns the field at the specified index.int
getFieldCount()
Returns the field count.StringList
getFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.String
getIdentityConstraintName()
Returns the identity constraint name.String
getName()
Thename
of thisXSObject
depending on theXSObject
type.String
getNamespace()
The namespace URI of this node, ornull
if it is unspecified.XSNamespaceItem
getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornull
otherwise.XSIDCDefinition
getRefKey()
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise.Selector
getSelector()
Returns the selector.String
getSelectorStr()
{selector} A restricted XPath ([XPath]) expressionshort
getType()
Get the type of the object, i.e ELEMENT_DECLARATION.void
setSelector(Selector selector)
Sets the selector.String
toString()
Returns a string representation of this object.
-
-
-
Field Detail
-
type
protected short type
type
-
fNamespace
protected final String fNamespace
target namespace
-
fIdentityConstraintName
protected final String fIdentityConstraintName
Identity constraint name.
-
fElementName
protected final String fElementName
name of owning element
-
fSelector
protected Selector fSelector
Selector.
-
fFieldCount
protected int fFieldCount
Field count.
-
fFields
protected Field[] fFields
Fields.
-
fAnnotations
protected XSAnnotationImpl[] fAnnotations
-
fNumAnnotations
protected int fNumAnnotations
-
-
Method Detail
-
getIdentityConstraintName
public String getIdentityConstraintName()
Returns the identity constraint name.
-
setSelector
public void setSelector(Selector selector)
Sets the selector.
-
getSelector
public Selector getSelector()
Returns the selector.
-
addField
public void addField(Field field)
Adds a field.
-
getFieldCount
public int getFieldCount()
Returns the field count.
-
getFieldAt
public Field getFieldAt(int index)
Returns the field at the specified index.
-
getElementName
public String getElementName()
-
toString
public String toString()
Returns a string representation of this object.
-
equals
public boolean equals(IdentityConstraint id)
-
getType
public short getType()
Get the type of the object, i.e ELEMENT_DECLARATION.
-
getName
public String getName()
Thename
of thisXSObject
depending on theXSObject
type.
-
getNamespace
public String getNamespace()
The namespace URI of this node, ornull
if it is unspecified. defines how a namespace URI is attached to schema components.- Specified by:
getNamespace
in interfaceXSObject
-
getCategory
public short getCategory()
{identity-constraint category} One of key, keyref or unique.- Specified by:
getCategory
in interfaceXSIDCDefinition
-
getSelectorStr
public String getSelectorStr()
{selector} A restricted XPath ([XPath]) expression- Specified by:
getSelectorStr
in interfaceXSIDCDefinition
-
getFieldStrs
public StringList getFieldStrs()
{fields} A non-empty list of restricted XPath ([XPath]) expressions.- Specified by:
getFieldStrs
in interfaceXSIDCDefinition
-
getRefKey
public XSIDCDefinition getRefKey()
{referenced key} Required if {identity-constraint category} is keyref, forbidden otherwise. An identity-constraint definition with {identity-constraint category} equal to key or unique.- Specified by:
getRefKey
in interfaceXSIDCDefinition
-
getAnnotations
public XSObjectList getAnnotations()
Optional. Annotation.- Specified by:
getAnnotations
in interfaceXSIDCDefinition
-
getNamespaceItem
public XSNamespaceItem getNamespaceItem()
Description copied from interface:XSObject
A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; ornull
otherwise.- Specified by:
getNamespaceItem
in interfaceXSObject
- See Also:
XSObject.getNamespaceItem()
-
addAnnotation
public void addAnnotation(XSAnnotationImpl annotation)
-
-