org.apache.jackrabbit.spi.commons.identifier
Class AbstractIdFactory

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.identifier.AbstractIdFactory
All Implemented Interfaces:
IdFactory
Direct Known Subclasses:
IdFactoryImpl

public abstract class AbstractIdFactory
extends Object
implements IdFactory

AbstractIdFactory...


Constructor Summary
AbstractIdFactory()
           
 
Method Summary
 NodeId createNodeId(NodeId parentId, Path path)
          Creates a new NodeId from the given parent id and the given Path object.
 NodeId createNodeId(String uniqueID)
          Creates a new NodeId from the given unique id.
 NodeId createNodeId(String uniqueID, Path path)
          Creates a new NodeId from the given unique id (which identifies an ancestor Node) and the given Path object.
 PropertyId createPropertyId(NodeId parentId, Name propertyName)
          Creates a new PropertyId from the given parent id and property name.
 NodeId fromJcrIdentifier(String jcrIdentifier)
          Create a new NodeId from the given JCR string representation.
protected abstract  PathFactory getPathFactory()
          Subclassed need to define a PathFactory used to create IDs
 String toJcrIdentifier(NodeId nodeId)
          Returns the JCR string representation of the given nodeId.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIdFactory

public AbstractIdFactory()
Method Detail

createNodeId

public NodeId createNodeId(NodeId parentId,
                           Path path)
Creates a new NodeId from the given parent id and the given Path object.

Specified by:
createNodeId in interface IdFactory
Returns:
a new NodeId.
See Also:
IdFactory.createNodeId(NodeId, Path)

createNodeId

public NodeId createNodeId(String uniqueID,
                           Path path)
Creates a new NodeId from the given unique id (which identifies an ancestor Node) and the given Path object.

Specified by:
createNodeId in interface IdFactory
Returns:
a new NodeId.
See Also:
IdFactory.createNodeId(String, Path)

createNodeId

public NodeId createNodeId(String uniqueID)
Creates a new NodeId from the given unique id.

Specified by:
createNodeId in interface IdFactory
Returns:
a new NodeId.
See Also:
IdFactory.createNodeId(String)

createPropertyId

public PropertyId createPropertyId(NodeId parentId,
                                   Name propertyName)
Creates a new PropertyId from the given parent id and property name.

Specified by:
createPropertyId in interface IdFactory
Returns:
a new PropertyId.
See Also:
IdFactory.createPropertyId(NodeId,Name)

toJcrIdentifier

public String toJcrIdentifier(NodeId nodeId)
Description copied from interface: IdFactory
Returns the JCR string representation of the given nodeId.

Specified by:
toJcrIdentifier in interface IdFactory
Returns:
a JCR node identifier string.
See Also:
IdFactory.toJcrIdentifier(NodeId)

fromJcrIdentifier

public NodeId fromJcrIdentifier(String jcrIdentifier)
Description copied from interface: IdFactory
Create a new NodeId from the given JCR string representation.

Specified by:
fromJcrIdentifier in interface IdFactory
Returns:
a new NodeId.
See Also:
IdFactory.fromJcrIdentifier(String)

getPathFactory

protected abstract PathFactory getPathFactory()
Subclassed need to define a PathFactory used to create IDs

Returns:
a implementation of PathFactory.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.