Package com.sun.xml.xsom.impl
Class IdentityConstraintImpl
- java.lang.Object
-
- com.sun.xml.xsom.impl.ComponentImpl
-
- com.sun.xml.xsom.impl.IdentityConstraintImpl
-
- All Implemented Interfaces:
Ref.IdentityConstraint,XSComponent,XSIdentityConstraint
public class IdentityConstraintImpl extends ComponentImpl implements XSIdentityConstraint, Ref.IdentityConstraint
XSIdentityConstraintimplementation.- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
-
Fields inherited from class com.sun.xml.xsom.impl.ComponentImpl
ownerDocument
-
Fields inherited from interface com.sun.xml.xsom.XSIdentityConstraint
KEY, KEYREF, UNIQUE
-
-
Constructor Summary
Constructors Constructor Description IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, short category, String name, XPathImpl selector, List<XPathImpl> fields, Ref.IdentityConstraint refer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tapply(XSFunction<T> function)Accepts a functor.XSIdentityConstraintget()shortgetCategory()Returns the type of the identity constraint.List<XSXPath>getFields()Returns the list of field XPaths.StringgetName()Name of the identity constraint.XSElementDeclgetParent()Gets theXSElementDeclthat owns this identity constraint.XSIdentityConstraintgetReferencedKey()If this isXSIdentityConstraint.KEYREF, returns the keyXSIdentityConstraintbeing referenced.XSXPathgetSelector()Returns the selector XPath expression as string.StringgetTargetNamespace()Target namespace of the identity constraint.voidsetParent(ElementDecl parent)voidvisit(XSVisitor visitor)Accepts a visitor.-
Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.xml.xsom.XSComponent
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle
-
-
-
-
Constructor Detail
-
IdentityConstraintImpl
public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, short category, String name, XPathImpl selector, List<XPathImpl> fields, Ref.IdentityConstraint refer)
-
-
Method Detail
-
visit
public void visit(XSVisitor visitor)
Description copied from interface:XSComponentAccepts a visitor.- Specified by:
visitin interfaceXSComponent
-
apply
public <T> T apply(XSFunction<T> function)
Description copied from interface:XSComponentAccepts a functor.- Specified by:
applyin interfaceXSComponent
-
setParent
public void setParent(ElementDecl parent)
-
getParent
public XSElementDecl getParent()
Description copied from interface:XSIdentityConstraintGets theXSElementDeclthat owns this identity constraint.- Specified by:
getParentin interfaceXSIdentityConstraint- Returns:
- never null.
-
getName
public String getName()
Description copied from interface:XSIdentityConstraintName of the identity constraint. A name uniquely identifies thisXSIdentityConstraintwithin the namespace.- Specified by:
getNamein interfaceXSIdentityConstraint- Returns:
- never null.
-
getTargetNamespace
public String getTargetNamespace()
Description copied from interface:XSIdentityConstraintTarget namespace of the identity constraint. Just short forgetParent().getTargetNamespace().- Specified by:
getTargetNamespacein interfaceXSIdentityConstraint
-
getCategory
public short getCategory()
Description copied from interface:XSIdentityConstraintReturns the type of the identity constraint.- Specified by:
getCategoryin interfaceXSIdentityConstraint- Returns:
- either
XSIdentityConstraint.KEY,XSIdentityConstraint.KEYREF, orXSIdentityConstraint.UNIQUE.
-
getSelector
public XSXPath getSelector()
Description copied from interface:XSIdentityConstraintReturns the selector XPath expression as string.- Specified by:
getSelectorin interfaceXSIdentityConstraint- Returns:
- never null.
-
getFields
public List<XSXPath> getFields()
Description copied from interface:XSIdentityConstraintReturns the list of field XPaths.- Specified by:
getFieldsin interfaceXSIdentityConstraint- Returns:
- a non-empty read-only list of
Strings, each representing the XPath.
-
getReferencedKey
public XSIdentityConstraint getReferencedKey()
Description copied from interface:XSIdentityConstraintIf this isXSIdentityConstraint.KEYREF, returns the keyXSIdentityConstraintbeing referenced.- Specified by:
getReferencedKeyin interfaceXSIdentityConstraint- Returns:
- always non-null (when
XSIdentityConstraint.getCategory()==XSIdentityConstraint.KEYREF).
-
get
public XSIdentityConstraint get()
- Specified by:
getin interfaceRef.IdentityConstraint
-
-