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
ownerDocumentFields inherited from interface com.sun.xml.xsom.XSIdentityConstraint
KEY, KEYREF, UNIQUE -
Constructor Summary
ConstructorsConstructorDescriptionIdentityConstraintImpl(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> Tapply(XSFunction<T> function) Accepts a functor.get()shortReturns the type of the identity constraint.Returns the list of field XPaths.getName()Name of the identity constraint.Gets theXSElementDeclthat owns this identity constraint.If this isXSIdentityConstraint.KEYREF, returns the keyXSIdentityConstraintbeing referenced.Returns the selector XPath expression as string.Target namespace of the identity constraint.voidsetParent(ElementDecl parent) voidAccepts a visitor.Methods inherited from class com.sun.xml.xsom.impl.ComponentImpl
getAnnotation, getAnnotation, getForeignAttribute, getForeignAttributes, getLocator, getOwnerSchema, getRoot, getSourceDocument, select, selectSingle, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:XSComponentAccepts a visitor.- Specified by:
visitin interfaceXSComponent
-
apply
Description copied from interface:XSComponentAccepts a functor.- Specified by:
applyin interfaceXSComponent
-
setParent
-
getParent
Description copied from interface:XSIdentityConstraintGets theXSElementDeclthat owns this identity constraint.- Specified by:
getParentin interfaceXSIdentityConstraint- Returns:
- never null.
-
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
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
Description copied from interface:XSIdentityConstraintReturns the selector XPath expression as string.- Specified by:
getSelectorin interfaceXSIdentityConstraint- Returns:
- never null.
-
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
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
- Specified by:
getin interfaceRef.IdentityConstraint
-