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


com.saxonica.schema
Class IdentityField

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

public class IdentityField
extends SchemaElement

A class which represents the field 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
IdentityField(java.lang.String xpath)
          Creates a new IdentityField.
 
Method Summary
 java.lang.String getId()
          Returns the Id of this IdentityField, or null if no Id has been set.
 Selection getSelection()
          Get the compiled XPath expression
 short getStructureType()
          Returns the type of this Schema Structure
 java.lang.String getXPath()
          Returns the XPath of this IdentityField.
 void setId(java.lang.String id)
          Sets the Id for this IdentityField.
 void setSelection(Selection selection)
          Set the compiled XPath expression
 void setXPath(java.lang.String xpath)
          Sets the XPath expression for this Field.
 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

IdentityField

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

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

getId

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

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

getXPath

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

Returns:
the XPath of this IdentityField.

getSelection

public Selection getSelection()
Get the compiled XPath expression

Returns:
the compiled XPath expression, as a Selector object

setId

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

Parameters:
id - the Id for this IdentityField.

setXPath

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

Parameters:
xpath - the XPath expression for this IdentityField. Must not be 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.