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
XSIdentityConstraint
implementation.- 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
ConstructorDescriptionIdentityConstraintImpl
(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, short category, String name, XPathImpl selector, List<XPathImpl> fields, Ref.IdentityConstraint refer) -
Method Summary
Modifier and TypeMethodDescription<T> T
apply
(XSFunction<T> function) Accepts a functor.get()
short
Returns the type of the identity constraint.Returns the list of field XPaths.getName()
Name of the identity constraint.Gets theXSElementDecl
that owns this identity constraint.If this isXSIdentityConstraint.KEYREF
, returns the keyXSIdentityConstraint
being referenced.Returns the selector XPath expression as string.Target namespace of the identity constraint.void
setParent
(ElementDecl parent) void
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 Details
-
IdentityConstraintImpl
public IdentityConstraintImpl(SchemaDocumentImpl _owner, AnnotationImpl _annon, Locator _loc, ForeignAttributesImpl fa, short category, String name, XPathImpl selector, List<XPathImpl> fields, Ref.IdentityConstraint refer)
-
-
Method Details
-
visit
Description copied from interface:XSComponent
Accepts a visitor.- Specified by:
visit
in interfaceXSComponent
-
apply
Description copied from interface:XSComponent
Accepts a functor.- Specified by:
apply
in interfaceXSComponent
-
setParent
-
getParent
Description copied from interface:XSIdentityConstraint
Gets theXSElementDecl
that owns this identity constraint.- Specified by:
getParent
in interfaceXSIdentityConstraint
- Returns:
- never null.
-
getName
Description copied from interface:XSIdentityConstraint
Name of the identity constraint. A name uniquely identifies thisXSIdentityConstraint
within the namespace.- Specified by:
getName
in interfaceXSIdentityConstraint
- Returns:
- never null.
-
getTargetNamespace
Description copied from interface:XSIdentityConstraint
Target namespace of the identity constraint. Just short forgetParent().getTargetNamespace()
.- Specified by:
getTargetNamespace
in interfaceXSIdentityConstraint
-
getCategory
public short getCategory()Description copied from interface:XSIdentityConstraint
Returns the type of the identity constraint.- Specified by:
getCategory
in interfaceXSIdentityConstraint
- Returns:
- either
XSIdentityConstraint.KEY
,XSIdentityConstraint.KEYREF
, orXSIdentityConstraint.UNIQUE
.
-
getSelector
Description copied from interface:XSIdentityConstraint
Returns the selector XPath expression as string.- Specified by:
getSelector
in interfaceXSIdentityConstraint
- Returns:
- never null.
-
getFields
Description copied from interface:XSIdentityConstraint
Returns the list of field XPaths.- Specified by:
getFields
in interfaceXSIdentityConstraint
- Returns:
- a non-empty read-only list of
String
s, each representing the XPath.
-
getReferencedKey
Description copied from interface:XSIdentityConstraint
If this isXSIdentityConstraint.KEYREF
, returns the keyXSIdentityConstraint
being referenced.- Specified by:
getReferencedKey
in interfaceXSIdentityConstraint
- Returns:
- always non-null (when
XSIdentityConstraint.getCategory()
==XSIdentityConstraint.KEYREF
).
-
get
- Specified by:
get
in interfaceRef.IdentityConstraint
-