Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class IdentitySelector

java.lang.Object
  |
  +--com.saxonica.schema.SchemaElement
        |
        +--com.saxonica.schema.IdentitySelector
All Implemented Interfaces:
java.io.Serializable, javax.xml.transform.SourceLocator

public class IdentitySelector
extends SchemaElement

A class which represents the selector for an IdentityConstraint

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.saxonica.schema.SchemaElement
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT
 
Constructor Summary
IdentitySelector(java.lang.String xpath)
          Creates a new IdentitySelector.
 
Method Summary
 java.lang.String getId()
          Returns the Id of this IdentitySelector, or null if no Id has been set.
 Selection getSelection()
          Return the compiled XPath expression
 short getStructureType()
          Returns the type of this Schema Structure
 java.lang.String getXPath()
          Returns the XPath of this IdentitySelector.
 void setId(java.lang.String id)
          Sets the Id for this IdentitySelector.
 void setSelection(Selection selection)
          Set the compiled XPath expression
 void setXPath(java.lang.String xpath)
          Sets the XPath expression for this Selector.
 boolean validate(javax.xml.transform.ErrorListener errorListener)
          Checks the validity of this Schema defintion.
 
Methods inherited from class com.saxonica.schema.SchemaElement
getColumnNumber, getLineNumber, getPublicId, getSystemId, setLocator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentitySelector

public IdentitySelector(java.lang.String xpath)
                 throws SchemaException
Creates a new IdentitySelector.

Parameters:
xpath - the xpath for the IdentitySelector. Must not be null.
Throws:
SchemaException - if xpath is null.
Method Detail

getId

public java.lang.String getId()
Returns the Id of this IdentitySelector, or null if no Id has been set.

Returns:
the Id of this IdentitySelector, or null if no Id has been set.

getXPath

public java.lang.String getXPath()
Returns the XPath of this IdentitySelector. This value will never be null.

Returns:
the XPath of this IdentitySelector.

getSelection

public Selection getSelection()
Return the compiled XPath expression

Returns:
the expression as a Selector object

setId

public void setId(java.lang.String id)
Sets the Id for this IdentitySelector.

Parameters:
id - the Id for this IdentitySelector.

setXPath

public void setXPath(java.lang.String xpath)
              throws SchemaException
Sets the XPath expression for this Selector.

Parameters:
xpath - the XPath expression for this IdentitySelector. Must not be null.
Throws:
SchemaException - if xpath is null.

setSelection

public void setSelection(Selection selection)
Set the compiled XPath expression

Parameters:
selection -

getStructureType

public short getStructureType()
Returns the type of this Schema Structure

Specified by:
getStructureType in class SchemaElement
Returns:
the type of this Schema Structure

validate

public boolean validate(javax.xml.transform.ErrorListener errorListener)
                 throws SchemaException
Checks the validity of this Schema defintion.

Throws:
SchemaException - when this Schema definition is invalid.


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.