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

## org.apache.slide.structure
Class ObjectNode

    java.lang.Object
      org.apache.slide.structure.ObjectNode

All Implemented Interfaces:
  java.lang.Cloneable, java.io.Serializable

Direct Known Subclasses:
  ActionNode, GroupNode, LinkNode, SubjectNode

public abstract class ObjectNode
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Represents any kind of object node.

This includes actors, activities and collections.

Version:
  $Revision: 1.27.2.2 $
See Also:
  Serialized Form

Nested Class Summary
`static class` | `ObjectNode.Binding` Represents an binding bindingName -> UURI
`static class` | `ObjectNode.BindingList`
`static class` | `ObjectNode.ParentBinding` Represents an binding bindingName -> UURI
`static class` | `ObjectNode.ParentBindingList`

Field Summary
`protected java.lang.String` | `uri` Uniform ressource identifier (URI) of the object.

Constructor Summary
`ObjectNode()` Default constructor.
`ObjectNode(java.lang.String uri)` Default constructor.
`ObjectNode(java.lang.String uri, java.util.Vector children, java.util.Vector links)` Default constructor.
`ObjectNode(java.lang.String uuri, java.util.Vector bindings, java.util.Vector parentBindings, java.util.Vector links)` Contructor to be used by stores supporting binding.

Method Summary
`void` | `addBinding(java.lang.String bindingName, ObjectNode source)` Add a new binding.
`void` | `addChild(ObjectNode child)` Add a child.
`void` | `addLink(LinkNode link)` Add a link.
`void` | `addParentBinding(java.lang.String bindingName, ObjectNode parent)`
`ObjectNode` | `cloneObject()` Clone.
`ObjectNode` | `copyObject()` Copy.
`java.util.Enumeration` | `enumerateBindings()` Return this object's bindings
`java.util.Enumeration` | `enumerateChildren()` Return this object's children
`java.util.Enumeration` | `enumerateLinks()` Return this object's inbound links
`java.util.Enumeration` | `enumerateParentBindings()` Return this object's binding parent-set
`boolean` | `equals(java.lang.Object obj)` Equals.
`java.lang.String` | `getBindingUuri(java.lang.String bindingName)` Return the UURI of the specified binding.
`java.util.Vector` | `getChildren()` Return this object's children
`UriPath` | `getPath()` Get the path of this object node.
`java.util.Set` | `getUpdatedBindings()`
`java.lang.String` | `getUri()` Get object's unique resource identifier.
`java.lang.String` | `getUuri()` Get the unique URI.
`boolean` | `hasBinding(ObjectNode child)` Test if this object has the specified binding.
`boolean` | `hasBinding(java.lang.String bindingName)` Test if this object has the specified binding.
`boolean` | `hasChild(ObjectNode child)` Test if this object has the specified child.
`boolean` | `hasChild(java.lang.String uri)` Test if object has the specified child.
`boolean` | `hasChildren()` Test if object has children.
`int` | `hashCode()`
`boolean` | `hasLinks()` Test if object has links.
`boolean` | `hasParentBinding(java.lang.String bindingName)` Test if this object has the specified parent binding.
`int` | `numberOfParentBindings()` Return the number of binding parents (i.e.
`void` | `removeChild(ObjectNode child)` Remove child.
`void` | `removeLink(LinkNode link)` Remove link.
`void` | `resetUpdatedBindings()`
`void` | `setUri(java.lang.String uri)` Set object's unique identifier.
`void` | `setUuri(java.lang.String uuri)` Set the unique URI.
`java.lang.String` | `toString()`
`void` | `validate(java.lang.String expectedUri)` Validate an ObjectNode.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### uri

    protected java.lang.String uri

  Uniform ressource identifier (URI) of the object.

Constructor Detail

### ObjectNode

    public ObjectNode()

  Default constructor.

### ObjectNode

    public ObjectNode(java.lang.String uri)

  Default constructor.

### ObjectNode

    public ObjectNode(java.lang.String uri,
                      java.util.Vector children,
                      java.util.Vector links)

  Default constructor. NOTE: this constructor should not be used if binding is enabled for the store associated to the specified URI.

### ObjectNode

    public ObjectNode(java.lang.String uuri,
                      java.util.Vector bindings,
                      java.util.Vector parentBindings,
                      java.util.Vector links)

  Contructor to be used by stores supporting binding.

Method Detail

### getUri

    public java.lang.String getUri()

  Get object's unique resource identifier.

  Returns:
    String Uri

### setUri

    public void setUri(java.lang.String uri)

  Set object's unique identifier.

  Parameters:
    `uri` - Object Uri

### getUuri

    public java.lang.String getUuri()

  Get the unique URI.

  Returns:
    an URI

### setUuri

    public void setUuri(java.lang.String uuri)

  Set the unique URI.

### getUpdatedBindings

    public java.util.Set getUpdatedBindings()

### resetUpdatedBindings

    public void resetUpdatedBindings()

### getChildren

    public java.util.Vector getChildren()

  Return this object's children

  Returns:
    Enumeration Children's uris

### enumerateChildren

    public java.util.Enumeration enumerateChildren()

  Return this object's children

  Returns:
    Enumeration Children's uris

### enumerateBindings

    public java.util.Enumeration enumerateBindings()

  Return this object's bindings

  Returns:
    Enumeration of the bindings (Binding instances)

### enumerateParentBindings

    public java.util.Enumeration enumerateParentBindings()

  Return this object's binding parent-set

  Returns:
    Enumeration of the binding parent-set (Binding instances)

### getBindingUuri

    public java.lang.String getBindingUuri(java.lang.String bindingName)

  Return the UURI of the specified binding.

  Parameters:
    `bindingName` - a String
  Returns:
    UURI of the bound member

### hasChild

    public boolean hasChild(java.lang.String uri)

  Test if object has the specified child.

  Parameters:
    `uri` - Child's uri
  Returns:
    boolean true if this object has the specified child, false otherwise

### hasChild

    public boolean hasChild(ObjectNode child)

  Test if this object has the specified child.

  Parameters:
    `child` - Child object
  Returns:
    boolean true if this object has the specified child, false otherwise

### hasBinding

    public boolean hasBinding(java.lang.String bindingName)

  Test if this object has the specified binding.

  Parameters:
    `bindingName` - the binding name
  Returns:
    boolean true if this object has the specified binding, false otherwise

### hasParentBinding

    public boolean hasParentBinding(java.lang.String bindingName)

  Test if this object has the specified parent binding.

  Parameters:
    `bindingName` - the binding name
  Returns:
    boolean true if this object has the specified binding, false otherwise

### hasBinding

    public boolean hasBinding(ObjectNode child)

  Test if this object has the specified binding.

  Parameters:
    `child` - an ObjectNode
  Returns:
    true if this object has the specified binding, false otherwise

### numberOfParentBindings

    public int numberOfParentBindings()

  Return the number of binding parents (i.e. of nodes having a binding to this node)

### hasChildren

    public boolean hasChildren()

  Test if object has children.

  Returns:
    boolean true if this object has children, false otherwise

### hasLinks

    public boolean hasLinks()

  Test if object has links.

  Returns:
    boolean true if this object has links, false otherwise

### enumerateLinks

    public java.util.Enumeration enumerateLinks()

  Return this object's inbound links

  Returns:
    Enumeration Inbound links uris

### equals

    public boolean equals(java.lang.Object obj)

  Equals.

  Parameters:
    `obj` - Object to test
  Returns:
    boolean True if the two object are equal :
    - obj is of type ObjectNode and is not null
    - The Uris are equal

### hashCode

    public int hashCode()

### cloneObject

    public ObjectNode cloneObject()

  Clone.

  Returns:
    Object clone

### copyObject

    public ObjectNode copyObject()

  Copy.

  Returns:
    Object copy

### validate

    public void validate(java.lang.String expectedUri)

  Validate an ObjectNode.

  Parameters:
    `expectedUri` - Uri

### addChild

    public void addChild(ObjectNode child)

  Add a child.

  Parameters:
    `child` - an ObjectNode

### addLink

    public void addLink(LinkNode link)

  Add a link.

  Parameters:
    `link` - an LinkNode

### addBinding

    public void addBinding(java.lang.String bindingName,
                           ObjectNode source)

  Add a new binding.

  Parameters:
    `bindingName` - a String
    `source` - the child ObjectNode

### removeChild

    public void removeChild(ObjectNode child)

  Remove child.

  Parameters:
    `child` - The child to remove

### removeLink

    public void removeLink(LinkNode link)

  Remove link.

  Parameters:
    `link` -

### getPath

    public UriPath getPath()

  Get the path of this object node.

  Returns:
    an UriPath

### addParentBinding

    public void addParentBinding(java.lang.String bindingName,
                                 ObjectNode parent)

### toString

    public java.lang.String toString()

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