public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityConstraint, Ref.IdentityConstraint
XSIdentityConstraint
implementation.Modifier and Type | Field and Description |
---|---|
private short |
category |
private java.util.List<XSXPath> |
fields |
private java.lang.String |
name |
private XSElementDecl |
parent |
private Ref.IdentityConstraint |
refer |
private XSXPath |
selector |
ownerDocument
KEY, KEYREF, UNIQUE
Constructor and Description |
---|
IdentityConstraintImpl(SchemaDocumentImpl _owner,
AnnotationImpl _annon,
org.xml.sax.Locator _loc,
ForeignAttributesImpl fa,
short category,
java.lang.String name,
XPathImpl selector,
java.util.List<XPathImpl> fields,
Ref.IdentityConstraint refer) |
Modifier and Type | Method and Description |
---|---|
<T> T |
apply(XSFunction<T> function)
Accepts a functor.
|
XSIdentityConstraint |
get() |
short |
getCategory()
Returns the type of the identity constraint.
|
java.util.List<XSXPath> |
getFields()
Returns the list of field XPaths.
|
java.lang.String |
getName()
Name of the identity constraint.
|
XSElementDecl |
getParent()
Gets the
XSElementDecl that owns this identity constraint. |
XSIdentityConstraint |
getReferencedKey()
If this is
XSIdentityConstraint.KEYREF , returns the key XSIdentityConstraint
being referenced. |
XSXPath |
getSelector()
Returns the selector XPath expression as string.
|
java.lang.String |
getTargetNamespace()
Target namespace of the identity constraint.
|
void |
setParent(ElementDecl parent) |
void |
visit(XSVisitor visitor)
Accepts a visitor.
|
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle
private XSElementDecl parent
private final short category
private final java.lang.String name
private final XSXPath selector
private final java.util.List<XSXPath> fields
private final Ref.IdentityConstraint refer
public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, org.xml.sax.Locator _loc, ForeignAttributesImpl fa, short category, java.lang.String name, XPathImpl selector, java.util.List<XPathImpl> fields, Ref.IdentityConstraint refer)
public void visit(XSVisitor visitor)
XSComponent
visit
in interface XSComponent
public <T> T apply(XSFunction<T> function)
XSComponent
apply
in interface XSComponent
public void setParent(ElementDecl parent)
public XSElementDecl getParent()
XSIdentityConstraint
XSElementDecl
that owns this identity constraint.getParent
in interface XSIdentityConstraint
public java.lang.String getName()
XSIdentityConstraint
XSIdentityConstraint
within
the namespace.getName
in interface XSIdentityConstraint
public java.lang.String getTargetNamespace()
XSIdentityConstraint
getParent().getTargetNamespace()
.getTargetNamespace
in interface XSIdentityConstraint
public short getCategory()
XSIdentityConstraint
getCategory
in interface XSIdentityConstraint
XSIdentityConstraint.KEY
,XSIdentityConstraint.KEYREF
, or XSIdentityConstraint.UNIQUE
.public XSXPath getSelector()
XSIdentityConstraint
getSelector
in interface XSIdentityConstraint
public java.util.List<XSXPath> getFields()
XSIdentityConstraint
getFields
in interface XSIdentityConstraint
String
s,
each representing the XPath.public XSIdentityConstraint getReferencedKey()
XSIdentityConstraint
XSIdentityConstraint.KEYREF
, returns the key XSIdentityConstraint
being referenced.getReferencedKey
in interface XSIdentityConstraint
XSIdentityConstraint.getCategory()
==XSIdentityConstraint.KEYREF
).public XSIdentityConstraint get()
get
in interface Ref.IdentityConstraint