XSRef
Keywords: com.fg.xmleditor.XSRef class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fg.xmleditor
Class XSRef

    java.lang.Object
      com.fg.xmleditor.XSRef

public class XSRef
extends java.lang.Object

XSRef objects are assiciated with `FToggleNode` nodes (see `FToggleNode.setAssociate(Object)` and `FToggleNode.getAssociate()`. An XSRef object keeps an integer identifier of the node type and an associated object of type, derived from org.apache.xerces.impl.xs.psvi.XSObject

Field Summary
`static int` | `ANY_ARRAY` ANY_ARRAY = `ARRAY_ELEMENTS` | `ARRAY_GROUPS`
`static int` | `ANY_ELEMENT` ANY_ELEMENT = `ELEMENT_COMPLEX` | `ELEMENT_SIMPLE` | `ELEMENT_EXT_SIMPLE` | `ELEMENT_EMPTY` | `ELEMENT_EXT_EMPTY`
`static int` | `ANY_ELEMENT_WITH_ATTRIBUTES` ANY_ELEMENT_WITH_ATTRIBUTES = `ELEMENT_EXT_SIMPLE` | `ELEMENT_EXT_EMPTY`
`static int` | `ANY_ELEMENT_WITH_CHILD_NODES` ANY_ELEMENT_WITH_CHILD_NODES = `ELEMENT_COMPLEX` | `ELEMENT_EXT_SIMPLE` | `ELEMENT_EXT_EMPTY`
`static int` | `ANY_GROUP` ANY_GROUP = `GROUP_SEQUENCE` | `GROUP_CHOICE` | `GROUP_ALL`
`static int` | `ANY_NODE_WITH_VALUE` ANY_NODE_WITH_VALUE = `ATTRIBUTE` | `ELEMENT_SIMPLE` | `ELEMENT_EXT_SIMPLE`
`static int` | `ARRAY_ELEMENTS` ARRAY_ELEMENTS = 1 << `Ord._ARRAY_ELEMENTS`
`static int` | `ARRAY_GROUPS` ARRAY_GROUPS = 1 << `Ord._ARRAY_GROUPS`
`static int` | `ATTRIBUTE` ATTRIBUTE = 1 << `Ord._ATTRIBUTE`
`static int` | `ELEMENT_COMPLEX` ELEMENT_COMPLEX = 1 << `Ord._ELEMENT_COMPLEX`
`static int` | `ELEMENT_EMPTY` ELEMENT_EMPTY = 1 << `Ord._ELEMENT_EMPTY`
`static int` | `ELEMENT_EXT_EMPTY` ELEMENT_EXT_EMPTY = 1 << `Ord._ELEMENT_EXT_EMPTY`
`static int` | `ELEMENT_EXT_SIMPLE` ELEMENT_EXT_SIMPLE = 1 << `Ord._ELEMENT_EXT_SIMPLE`
`static int` | `ELEMENT_SIMPLE` ELEMENT_SIMPLE = 1 << `Ord._ELEMENT_SIMPLE`
`static int` | `GROUP_ALL` GROUP_ALL = 1 << `Ord._GROUP_ALL`
`static int` | `GROUP_CHOICE` GROUP_CHOICE = 1 << `Ord._GROUP_CHOICE`
`static int` | `GROUP_SEQUENCE` GROUP_SEQUENCE = 1 << `Ord._GROUP_SEQUENCE`
`static int` | `SUBSTITUTION` SUBSTITUTION = 1 << `Ord._SUBSTITUTION`

Constructor Summary
`XSRef(int type, org.apache.xerces.impl.xs.psvi.XSObject xsNode)` Creates new XSRef object.

Method Summary
`org.apache.xerces.impl.xs.psvi.XSParticle` | `getParticle()` Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSParticle and returns it.
`int` | `getType()` Method returns one of the "basic" constants, declared in XSRef class (a constant which is not not a "bitwise OR" combination of other constants).
`org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration` | `getXSAttr()` Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration and returns it.
`org.apache.xerces.impl.xs.psvi.XSElementDeclaration` | `getXSElement()` Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSElementDeclaration and returns it.
`org.apache.xerces.impl.xs.psvi.XSModelGroup` | `getXSGroup()` Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSModelGroup and returns it.
`org.apache.xerces.impl.xs.psvi.XSObject` | `getXSNode()` Method returns an associated object of some type, derived from org.apache.xerces.impl.xs.psvi.XSObject
`boolean` | `hasValue()` Method returns result of `in(int)` method call with `ANY_NODE_WITH_VALUE` parameter passed.
`boolean` | `in(int types)` Method returns `true` when bitwise operation `getType()` & types > 0 and `false` otherwise.
`boolean` | `isArray()` Method returns result of `in(int)` method call with `ANY_ARRAY` parameter passed.
`boolean` | `isAttribute()` Method returns result of `in(int)` method call with `ATTRIBUTE` parameter passed.
`boolean` | `isElement()` Method returns result of `in(int)` method call with `ANY_ELEMENT` parameter passed.
`boolean` | `isElementWithAttributes()` Method returns result of `in(int)` method call with `ANY_ELEMENT_WITH_ATTRIBUTES` parameter passed.
`boolean` | `isElementWithChildNodes()` Method returns result of `in(int)` method call with `ANY_ELEMENT_WITH_CHILD_NODES` parameter passed.
`boolean` | `isGroup()` Method returns result of `in(int)` method call with `ANY_GROUP` parameter passed.
`java.lang.String` | `validate(java.lang.Object value)` Validates a value against restrictions retrieved from the associated object(see `getXSElement()` and `getXSAttr()`).

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ARRAY_ELEMENTS

    public static final int ARRAY_ELEMENTS

  ARRAY_ELEMENTS = 1 << `Ord._ARRAY_ELEMENTS`

  See Also:
    Constant Field Values

### ARRAY_GROUPS

    public static final int ARRAY_GROUPS

  ARRAY_GROUPS = 1 << `Ord._ARRAY_GROUPS`

  See Also:
    Constant Field Values

### GROUP_SEQUENCE

    public static final int GROUP_SEQUENCE

  GROUP_SEQUENCE = 1 << `Ord._GROUP_SEQUENCE`

  See Also:
    Constant Field Values

### GROUP_CHOICE

    public static final int GROUP_CHOICE

  GROUP_CHOICE = 1 << `Ord._GROUP_CHOICE`

  See Also:
    Constant Field Values

### GROUP_ALL

    public static final int GROUP_ALL

  GROUP_ALL = 1 << `Ord._GROUP_ALL`

  See Also:
    Constant Field Values

### SUBSTITUTION

    public static final int SUBSTITUTION

  SUBSTITUTION = 1 << `Ord._SUBSTITUTION`

  See Also:
    Constant Field Values

### ELEMENT_COMPLEX

    public static final int ELEMENT_COMPLEX

  ELEMENT_COMPLEX = 1 << `Ord._ELEMENT_COMPLEX`

  See Also:
    Constant Field Values

### ELEMENT_SIMPLE

    public static final int ELEMENT_SIMPLE

  ELEMENT_SIMPLE = 1 << `Ord._ELEMENT_SIMPLE`

  See Also:
    Constant Field Values

### ELEMENT_EXT_SIMPLE

    public static final int ELEMENT_EXT_SIMPLE

  ELEMENT_EXT_SIMPLE = 1 << `Ord._ELEMENT_EXT_SIMPLE`

  See Also:
    Constant Field Values

### ELEMENT_EMPTY

    public static final int ELEMENT_EMPTY

  ELEMENT_EMPTY = 1 << `Ord._ELEMENT_EMPTY`

  See Also:
    Constant Field Values

### ELEMENT_EXT_EMPTY

    public static final int ELEMENT_EXT_EMPTY

  ELEMENT_EXT_EMPTY = 1 << `Ord._ELEMENT_EXT_EMPTY`

  See Also:
    Constant Field Values

### ATTRIBUTE

    public static final int ATTRIBUTE

  ATTRIBUTE = 1 << `Ord._ATTRIBUTE`

  See Also:
    Constant Field Values

### ANY_ARRAY

    public static final int ANY_ARRAY

  ANY_ARRAY = `ARRAY_ELEMENTS` | `ARRAY_GROUPS`

  See Also:
    Constant Field Values

### ANY_ELEMENT

    public static final int ANY_ELEMENT

  ANY_ELEMENT = `ELEMENT_COMPLEX` | `ELEMENT_SIMPLE` | `ELEMENT_EXT_SIMPLE` | `ELEMENT_EMPTY` | `ELEMENT_EXT_EMPTY`

  See Also:
    Constant Field Values

### ANY_GROUP

    public static final int ANY_GROUP

  ANY_GROUP = `GROUP_SEQUENCE` | `GROUP_CHOICE` | `GROUP_ALL`

  See Also:
    Constant Field Values

### ANY_NODE_WITH_VALUE

    public static final int ANY_NODE_WITH_VALUE

  ANY_NODE_WITH_VALUE = `ATTRIBUTE` | `ELEMENT_SIMPLE` | `ELEMENT_EXT_SIMPLE`

  See Also:
    Constant Field Values

### ANY_ELEMENT_WITH_CHILD_NODES

    public static final int ANY_ELEMENT_WITH_CHILD_NODES

  ANY_ELEMENT_WITH_CHILD_NODES = `ELEMENT_COMPLEX` | `ELEMENT_EXT_SIMPLE` | `ELEMENT_EXT_EMPTY`

  See Also:
    Constant Field Values

### ANY_ELEMENT_WITH_ATTRIBUTES

    public static final int ANY_ELEMENT_WITH_ATTRIBUTES

  ANY_ELEMENT_WITH_ATTRIBUTES = `ELEMENT_EXT_SIMPLE` | `ELEMENT_EXT_EMPTY`

  See Also:
    Constant Field Values

Constructor Detail

### XSRef

    public XSRef(int type,
                 org.apache.xerces.impl.xs.psvi.XSObject xsNode)

  Creates new XSRef object.

Parameters:
  `type` - one of the "basic" constants, declared in XSRef class (a constant which is not not a bitwise OR combination of other constants).
  `xsNode` - an object of type, derived from org.apache.xerces.impl.xs.psvi.XSObject

Method Detail

### getType

    public int getType()

  Method returns one of the "basic" constants, declared in XSRef class (a constant which is not not a "bitwise OR" combination of other constants).

  Returns:
    one of the "basic" constants, declared in XSRef class (a constant which is not not a "bitwise OR" combination of other constants).

### in

    public boolean in(int types)

  Method returns `true` when bitwise operation `getType()` & types > 0 and `false` otherwise.

  Parameters:
    `types` - a value of a constant, declared in XSRef class or "bitwise OR" combination of some of these constants.
  Returns:
    `true` when bitwise operation `getType()` & types > 0 and `false` otherwise.

### getXSNode

    public org.apache.xerces.impl.xs.psvi.XSObject getXSNode()

  Method returns an associated object of some type, derived from org.apache.xerces.impl.xs.psvi.XSObject

  Returns:
    an associated object of type, derived from org.apache.xerces.impl.xs.psvi.XSObject

### getParticle

    public org.apache.xerces.impl.xs.psvi.XSParticle getParticle()

  Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSParticle and returns it. Method throws runtime exception unless `isArray()` method call returns `true`.

  ``
  Returns:
    an associated object typecast to org.apache.xerces.impl.xs.psvi.XSParticle

### getXSElement

    public org.apache.xerces.impl.xs.psvi.XSElementDeclaration getXSElement()

  Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSElementDeclaration and returns it. Method throws runtime exception unless `isElement()` method call returns `true`.

  ``
  Returns:
    an associated object typecast to org.apache.xerces.impl.xs.psvi.XSElementDeclaration

### getXSGroup

    public org.apache.xerces.impl.xs.psvi.XSModelGroup getXSGroup()

  Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSModelGroup and returns it. Method throws runtime exception unless `isGroup()` method call returns `true`.

  ``
  Returns:
    an associated object typecast to org.apache.xerces.impl.xs.psvi.XSModelGroup

### getXSAttr

    public org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration getXSAttr()

  Method typecasts an associated object to org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration and returns it. Method throws runtime exception unless `isAttribute()` method call returns `true`.

  ``
  Returns:
    an associated object typecast to org.apache.xerces.impl.xs.psvi.XSAttributeDeclaration

### isArray

    public boolean isArray()

  Method returns result of `in(int)` method call with `ANY_ARRAY` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_ARRAY` parameter passed.

### isGroup

    public boolean isGroup()

  Method returns result of `in(int)` method call with `ANY_GROUP` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_GROUP` parameter passed.

### isElement

    public boolean isElement()

  Method returns result of `in(int)` method call with `ANY_ELEMENT` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_ELEMENT` parameter passed.

### isElementWithChildNodes

    public boolean isElementWithChildNodes()

  Method returns result of `in(int)` method call with `ANY_ELEMENT_WITH_CHILD_NODES` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_ELEMENT_WITH_CHILD_NODES` parameter passed.

### isElementWithAttributes

    public boolean isElementWithAttributes()

  Method returns result of `in(int)` method call with `ANY_ELEMENT_WITH_ATTRIBUTES` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_ELEMENT_WITH_ATTRIBUTES` parameter passed.

### isAttribute

    public boolean isAttribute()

  Method returns result of `in(int)` method call with `ATTRIBUTE` parameter passed.

  Returns:
    result of `in(int)` method call with `ATTRIBUTE` parameter passed.

### hasValue

    public boolean hasValue()

  Method returns result of `in(int)` method call with `ANY_NODE_WITH_VALUE` parameter passed.

  Returns:
    result of `in(int)` method call with `ANY_NODE_WITH_VALUE` parameter passed.

### validate

    public java.lang.String validate(java.lang.Object value)

  Validates a value against restrictions retrieved from the associated object(see `getXSElement()` and `getXSAttr()`).

  Returns:
    `null` when value is valid and an error message oterwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD