org.modeshape.graph.connector.map
Interface MapNode

All Known Implementing Classes:
DefaultMapNode, SimpleJpaRepository.JpaNode

public interface MapNode


Method Summary
 void addChild(int index, MapNode child)
          Inserts the specified child at the specified position in the list of children.
 void addChild(MapNode child)
          Adds the given child to the end of the list of children for this node
 void clearChildren()
          Removes all of the children for this node in a single operation.
 List<MapNode> getChildren()
           
 Path.Segment getName()
          Returns the name of this node along with its SNS index within its parent's children
 MapNode getParent()
          Returns the parent of this node or null if the node is the root node for its workspace.
 Map<Name,Property> getProperties()
          Returns a map of property names to the property for the given name
 Property getProperty(ExecutionContext context, String name)
          Returns the named property
 Property getProperty(Name name)
          Returns the named property
 Set<Name> getUniqueChildNames()
          Returns the set of child names for this node
 UUID getUuid()
          Returns the UUID for this node
 boolean removeChild(MapNode child)
          Removes the given child from the list of children
 MapNode removeProperty(Name propertyName)
          Removes the property with the given name
 void setName(Path.Segment name)
           
 void setParent(MapNode parent)
           
 MapNode setProperties(Iterable<Property> properties)
          Sets the given properties in a single operation, overwriting any previous properties for the same name This bulk mutator should be used when multiple properties are being set in order to allow underlying implementations to optimize their access to their respective persistent storage mechanism.
 MapNode setProperty(ExecutionContext context, String name, Object... values)
          Sets the property with the given name, overwriting any previous property for the given name
 MapNode setProperty(Property property)
          Sets the property with the given name, overwriting any previous property for the given name
 

Method Detail

getUuid

UUID getUuid()
Returns the UUID for this node

Returns:
the UUID for this node

getName

Path.Segment getName()
Returns the name of this node along with its SNS index within its parent's children

Returns:
the name of this node along with its SNS index within its parent's children

setName

void setName(Path.Segment name)
Parameters:
name - Sets name to the specified value.

getUniqueChildNames

Set<Name> getUniqueChildNames()
Returns the set of child names for this node

Returns:
the set of child names for this node

getParent

MapNode getParent()
Returns the parent of this node or null if the node is the root node for its workspace.

Returns:
the parent of this node; may be null if the node is the root node for its workspace

setParent

void setParent(MapNode parent)
Parameters:
parent - Sets parent to the specified value.

getChildren

List<MapNode> getChildren()
Returns:
children

clearChildren

void clearChildren()
Removes all of the children for this node in a single operation.


addChild

void addChild(MapNode child)
Adds the given child to the end of the list of children for this node

Parameters:
child - the child to add to this node

addChild

void addChild(int index,
              MapNode child)
Inserts the specified child at the specified position in the list of children. Shifts the child currently at that position (if any) and any subsequent children to the right (adds one to their indices).

Parameters:
index - index at which the specified child is to be inserted
child - the child to be inserted

removeChild

boolean removeChild(MapNode child)
Removes the given child from the list of children

Parameters:
child - the child to be removed
Returns:
true if the child was one of this node's children (and was removed); false otherwise

getProperties

Map<Name,Property> getProperties()
Returns a map of property names to the property for the given name

Returns:
a map of property names to the property for the given name

setProperties

MapNode setProperties(Iterable<Property> properties)
Sets the given properties in a single operation, overwriting any previous properties for the same name This bulk mutator should be used when multiple properties are being set in order to allow underlying implementations to optimize their access to their respective persistent storage mechanism.

Parameters:
properties - the properties to set
Returns:
this map node

setProperty

MapNode setProperty(Property property)
Sets the property with the given name, overwriting any previous property for the given name

Parameters:
property - the property to set
Returns:
this map node

setProperty

MapNode setProperty(ExecutionContext context,
                    String name,
                    Object... values)
Sets the property with the given name, overwriting any previous property for the given name

Parameters:
context - the current execution context, used to get a name factory and property factory.
name - the name of the property
values - the values for the property
Returns:
this map node

removeProperty

MapNode removeProperty(Name propertyName)
Removes the property with the given name

Parameters:
propertyName - the name of the property to remove
Returns:
this map node

getProperty

Property getProperty(ExecutionContext context,
                     String name)
Returns the named property

Parameters:
context - the current execution context, used to get a name factory
name - the name of the property to return
Returns:
the property for the given name

getProperty

Property getProperty(Name name)
Returns the named property

Parameters:
name - the name of the property to return
Returns:
the property for the given name


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.