org.apache.jackrabbit.base
Class BaseNode

java.lang.Object
  extended byorg.apache.jackrabbit.base.BaseItem
      extended byorg.apache.jackrabbit.base.BaseNode
All Implemented Interfaces:
Item, Node

public class BaseNode
extends BaseItem
implements Node

Node base class.


Constructor Summary
protected BaseNode()
          Protected constructor.
 
Method Summary
 void accept(ItemVisitor visitor)
          Implemented by calling visitor.visit(this).
 void addMixin(String mixinName)
          Not implemented.
 Node addNode(String relPath)
          Not implemented.
 Node addNode(String relPath, String primaryNodeTypeName)
          Implemented by calling addNode(relPath).setProperty(prefix + ":primaryType", primaryNodeTypeName) and returning the created node.
 boolean canAddMixin(String mixinName)
          Not implemented.
 void cancelMerge(Version version)
          Not implemented.
 Version checkin()
          Not implemented.
 void checkout()
          Not implemented.
 void doneMerge(Version version)
          Not implemented.
 Version getBaseVersion()
          Not implemented.
 String getCorrespondingNodePath(String workspaceName)
          Not implemented.
 NodeDefinition getDefinition()
          Not implemented.
 int getIndex()
          Always returns 1.
 Lock getLock()
          Not implemented.
 NodeType[] getMixinNodeTypes()
          Not implemented.
 Node getNode(String relPath)
          Implemented by calling Path.resolve(this, relPath) from the Path utility class.
 NodeIterator getNodes()
          Not implemented.
 NodeIterator getNodes(String namePattern)
          Not implemented.
 String getPath()
          Implemented by calling super.getPath() (see BaseItem.getPath() and appending "[" + getIndex() + "]" if getDefinition().allowsSameNameSiblings() returns true.
 Item getPrimaryItem()
          Not implemented.
 NodeType getPrimaryNodeType()
          Not implemented.
 PropertyIterator getProperties()
          Not implemented.
 PropertyIterator getProperties(String namePattern)
          Not implemented.
 Property getProperty(String relPath)
          Implemented by calling Path.resolve(this, relPath) from the Path utility class.
 PropertyIterator getReferences()
          Not implemented.
 String getUUID()
          Not implemented.
 VersionHistory getVersionHistory()
          Not implemented.
 boolean hasNode(String relPath)
          Implemented by calling getNode(relPath) and returning true unless a PathNotFoundException is thrown.
 boolean hasNodes()
          Implemented by calling getNodes().hasNext().
 boolean hasProperties()
          Implemented by calling getProperties().hasNext().
 boolean hasProperty(String relPath)
          Implemented by calling getProperty(relPath) and returning true unless a PathNotFoundException is thrown.
 boolean holdsLock()
          Not implemented.
 boolean isCheckedOut()
          Not implemented.
 boolean isLocked()
          Not implemented.
 boolean isNode()
          Always returns true.
 boolean isNodeType(String nodeTypeName)
          Implemented by calling type.isNodeType(nodeTypeName) for the primary type and all mixin types of this node.
 Lock lock(boolean isDeep, boolean isSessionScoped)
          Not implemented.
 NodeIterator merge(String srcWorkspace, boolean bestEffort)
          Not implemented.
 void orderBefore(String srcChildRelPath, String destChildRelPath)
          Not implemented.
 void removeMixin(String mixinName)
          Not implemented.
 void restore(String versionName, boolean removeExisting)
          Not implemented.
 void restore(Version version, boolean removeExisting)
          Not implemented.
 void restore(Version version, String relPath, boolean removeExisting)
          Not implemented.
 void restoreByLabel(String versionLabel, boolean removeExisting)
          Not implemented.
 Property setProperty(String name, boolean value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, Calendar value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, double value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, InputStream value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, long value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, Node value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, String value)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).
 Property setProperty(String name, String[] values)
          Implemented by calling setProperty(name, stringValues) with an array of values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).
 Property setProperty(String name, String[] values, int type)
          Implemented by calling setProperty(name, stringValues, type) with an array of Values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).
 Property setProperty(String name, String value, int type)
          Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value, type).
 Property setProperty(String name, Value value)
          Implemented by calling getProperty(name).setValue(value) and returning the retrieved property.
 Property setProperty(String name, Value[] values)
          Implemented by calling getProperty(name).setValue(values) and returning the retrieved property.
 Property setProperty(String name, Value[] values, int type)
          Implemented by calling setProperty(name, convertedValues) with an array of values that were converted from the given values to the given type.
 Property setProperty(String name, Value value, int type)
          Implemented by calling setProperty(name, value) after converting the given value to the given type.
 void unlock()
          Not implemented.
 void update(String srcWorkspaceName)
          Not implemented.
 
Methods inherited from class org.apache.jackrabbit.base.BaseItem
getAncestor, getDepth, getName, getParent, getSession, isModified, isNew, isSame, refresh, remove, save
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.Item
getAncestor, getDepth, getName, getParent, getSession, isModified, isNew, isSame, refresh, remove, save
 

Constructor Detail

BaseNode

protected BaseNode()
Protected constructor. This class is only useful when extended.

Method Detail

getPath

public String getPath()
               throws RepositoryException
Implemented by calling super.getPath() (see BaseItem.getPath() and appending "[" + getIndex() + "]" if getDefinition().allowsSameNameSiblings() returns true. Implemented by calling getParent().getPath() and appending getName() to the returned parent path. Returns the root path / if an ItemNotFoundException is thrown by getParent() (indicating that this is the root node).

Specified by:
getPath in interface Item
Overrides:
getPath in class BaseItem
Throws:
RepositoryException

accept

public void accept(ItemVisitor visitor)
            throws RepositoryException
Implemented by calling visitor.visit(this). Does nothing.

Specified by:
accept in interface Item
Overrides:
accept in class BaseItem
Throws:
RepositoryException

isNode

public boolean isNode()
Always returns true. Always returns false.

Specified by:
isNode in interface Item
Overrides:
isNode in class BaseItem

addNode

public Node addNode(String relPath)
             throws ItemExistsException,
                    PathNotFoundException,
                    VersionException,
                    ConstraintViolationException,
                    LockException,
                    RepositoryException
Not implemented.

Specified by:
addNode in interface Node
Throws:
ItemExistsException
PathNotFoundException
VersionException
ConstraintViolationException
LockException
RepositoryException

addNode

public Node addNode(String relPath,
                    String primaryNodeTypeName)
             throws ItemExistsException,
                    PathNotFoundException,
                    NoSuchNodeTypeException,
                    LockException,
                    VersionException,
                    ConstraintViolationException,
                    RepositoryException
Implemented by calling addNode(relPath).setProperty(prefix + ":primaryType", primaryNodeTypeName) and returning the created node. The prefix is acquired by calling getSession().getNamespacePrefix("http://www.jcp.org/jcr/1.0").

Specified by:
addNode in interface Node
Throws:
ItemExistsException
PathNotFoundException
NoSuchNodeTypeException
LockException
VersionException
ConstraintViolationException
RepositoryException

orderBefore

public void orderBefore(String srcChildRelPath,
                        String destChildRelPath)
                 throws UnsupportedRepositoryOperationException,
                        VersionException,
                        ConstraintViolationException,
                        ItemNotFoundException,
                        LockException,
                        RepositoryException
Not implemented.

Specified by:
orderBefore in interface Node
Throws:
UnsupportedRepositoryOperationException
VersionException
ConstraintViolationException
ItemNotFoundException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Value value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling getProperty(name).setValue(value) and returning the retrieved property. Adding new properties is not implemented.

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Value value,
                            int type)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, value) after converting the given value to the given type.

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Value[] values)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling getProperty(name).setValue(values) and returning the retrieved property. Adding new properties is not implemented.

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Value[] values,
                            int type)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, convertedValues) with an array of values that were converted from the given values to the given type.

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            String[] values)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, stringValues) with an array of values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            String[] values,
                            int type)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, stringValues, type) with an array of Values that were created from the given strings by getSession().getValueFactory().createValue(values[i])).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            String value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            String value,
                            int type)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value, type).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            InputStream value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            boolean value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            double value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            long value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Calendar value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

setProperty

public Property setProperty(String name,
                            Node value)
                     throws ValueFormatException,
                            VersionException,
                            LockException,
                            RepositoryException
Implemented by calling setProperty(name, getSession().getValueFactory().createValue(value).

Specified by:
setProperty in interface Node
Throws:
ValueFormatException
VersionException
LockException
RepositoryException

getNode

public Node getNode(String relPath)
             throws PathNotFoundException,
                    RepositoryException
Implemented by calling Path.resolve(this, relPath) from the Path utility class. If the given path resolves to a property, then a PathNotFoundException is thrown.

Specified by:
getNode in interface Node
Throws:
PathNotFoundException
RepositoryException

getNodes

public NodeIterator getNodes()
                      throws RepositoryException
Not implemented.

Specified by:
getNodes in interface Node
Throws:
RepositoryException

getNodes

public NodeIterator getNodes(String namePattern)
                      throws RepositoryException
Not implemented.

Specified by:
getNodes in interface Node
Throws:
RepositoryException

getProperty

public Property getProperty(String relPath)
                     throws PathNotFoundException,
                            RepositoryException
Implemented by calling Path.resolve(this, relPath) from the Path utility class. If the given path resolves to a node, then a PathNotFoundException is thrown.

Specified by:
getProperty in interface Node
Throws:
PathNotFoundException
RepositoryException

getProperties

public PropertyIterator getProperties()
                               throws RepositoryException
Not implemented.

Specified by:
getProperties in interface Node
Throws:
RepositoryException

getProperties

public PropertyIterator getProperties(String namePattern)
                               throws RepositoryException
Not implemented.

Specified by:
getProperties in interface Node
Throws:
RepositoryException

getPrimaryItem

public Item getPrimaryItem()
                    throws ItemNotFoundException,
                           RepositoryException
Not implemented.

Specified by:
getPrimaryItem in interface Node
Throws:
ItemNotFoundException
RepositoryException

getUUID

public String getUUID()
               throws UnsupportedRepositoryOperationException,
                      RepositoryException
Not implemented.

Specified by:
getUUID in interface Node
Throws:
UnsupportedRepositoryOperationException
RepositoryException

getIndex

public int getIndex()
             throws RepositoryException
Always returns 1.

Specified by:
getIndex in interface Node
Throws:
RepositoryException

getReferences

public PropertyIterator getReferences()
                               throws RepositoryException
Not implemented.

Specified by:
getReferences in interface Node
Throws:
RepositoryException

hasNode

public boolean hasNode(String relPath)
                throws RepositoryException
Implemented by calling getNode(relPath) and returning true unless a PathNotFoundException is thrown.

Specified by:
hasNode in interface Node
Throws:
RepositoryException

hasProperty

public boolean hasProperty(String relPath)
                    throws RepositoryException
Implemented by calling getProperty(relPath) and returning true unless a PathNotFoundException is thrown.

Specified by:
hasProperty in interface Node
Throws:
RepositoryException

hasNodes

public boolean hasNodes()
                 throws RepositoryException
Implemented by calling getNodes().hasNext().

Specified by:
hasNodes in interface Node
Throws:
RepositoryException

hasProperties

public boolean hasProperties()
                      throws RepositoryException
Implemented by calling getProperties().hasNext().

Specified by:
hasProperties in interface Node
Throws:
RepositoryException

getPrimaryNodeType

public NodeType getPrimaryNodeType()
                            throws RepositoryException
Not implemented.

Specified by:
getPrimaryNodeType in interface Node
Throws:
RepositoryException

getMixinNodeTypes

public NodeType[] getMixinNodeTypes()
                             throws RepositoryException
Not implemented.

Specified by:
getMixinNodeTypes in interface Node
Throws:
RepositoryException

isNodeType

public boolean isNodeType(String nodeTypeName)
                   throws RepositoryException
Implemented by calling type.isNodeType(nodeTypeName) for the primary type and all mixin types of this node. Returns true if any of these calls return true. Returns false otherwise.

Specified by:
isNodeType in interface Node
Throws:
RepositoryException

addMixin

public void addMixin(String mixinName)
              throws NoSuchNodeTypeException,
                     VersionException,
                     ConstraintViolationException,
                     LockException,
                     RepositoryException
Not implemented.

Specified by:
addMixin in interface Node
Throws:
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException

removeMixin

public void removeMixin(String mixinName)
                 throws NoSuchNodeTypeException,
                        VersionException,
                        ConstraintViolationException,
                        LockException,
                        RepositoryException
Not implemented.

Specified by:
removeMixin in interface Node
Throws:
NoSuchNodeTypeException
VersionException
ConstraintViolationException
LockException
RepositoryException

canAddMixin

public boolean canAddMixin(String mixinName)
                    throws RepositoryException
Not implemented.

Specified by:
canAddMixin in interface Node
Throws:
RepositoryException

getDefinition

public NodeDefinition getDefinition()
                             throws RepositoryException
Not implemented.

Specified by:
getDefinition in interface Node
Throws:
RepositoryException

checkin

public Version checkin()
                throws VersionException,
                       UnsupportedRepositoryOperationException,
                       InvalidItemStateException,
                       LockException,
                       RepositoryException
Not implemented.

Specified by:
checkin in interface Node
Throws:
VersionException
UnsupportedRepositoryOperationException
InvalidItemStateException
LockException
RepositoryException

checkout

public void checkout()
              throws UnsupportedRepositoryOperationException,
                     LockException,
                     RepositoryException
Not implemented.

Specified by:
checkout in interface Node
Throws:
UnsupportedRepositoryOperationException
LockException
RepositoryException

doneMerge

public void doneMerge(Version version)
               throws VersionException,
                      InvalidItemStateException,
                      UnsupportedRepositoryOperationException,
                      RepositoryException
Not implemented.

Specified by:
doneMerge in interface Node
Throws:
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException

cancelMerge

public void cancelMerge(Version version)
                 throws VersionException,
                        InvalidItemStateException,
                        UnsupportedRepositoryOperationException,
                        RepositoryException
Not implemented.

Specified by:
cancelMerge in interface Node
Throws:
VersionException
InvalidItemStateException
UnsupportedRepositoryOperationException
RepositoryException

update

public void update(String srcWorkspaceName)
            throws NoSuchWorkspaceException,
                   AccessDeniedException,
                   LockException,
                   InvalidItemStateException,
                   RepositoryException
Not implemented.

Specified by:
update in interface Node
Throws:
NoSuchWorkspaceException
AccessDeniedException
LockException
InvalidItemStateException
RepositoryException

merge

public NodeIterator merge(String srcWorkspace,
                          boolean bestEffort)
                   throws UnsupportedRepositoryOperationException,
                          NoSuchWorkspaceException,
                          AccessDeniedException,
                          VersionException,
                          LockException,
                          InvalidItemStateException,
                          RepositoryException
Not implemented.

Specified by:
merge in interface Node
Throws:
UnsupportedRepositoryOperationException
NoSuchWorkspaceException
AccessDeniedException
VersionException
LockException
InvalidItemStateException
RepositoryException

getCorrespondingNodePath

public String getCorrespondingNodePath(String workspaceName)
                                throws ItemNotFoundException,
                                       NoSuchWorkspaceException,
                                       AccessDeniedException,
                                       RepositoryException
Not implemented.

Specified by:
getCorrespondingNodePath in interface Node
Throws:
ItemNotFoundException
NoSuchWorkspaceException
AccessDeniedException
RepositoryException

isCheckedOut

public boolean isCheckedOut()
                     throws RepositoryException
Not implemented.

Specified by:
isCheckedOut in interface Node
Throws:
RepositoryException

restore

public void restore(String versionName,
                    boolean removeExisting)
             throws VersionException,
                    ItemExistsException,
                    UnsupportedRepositoryOperationException,
                    LockException,
                    InvalidItemStateException,
                    RepositoryException
Not implemented.

Specified by:
restore in interface Node
Throws:
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException

restore

public void restore(Version version,
                    boolean removeExisting)
             throws VersionException,
                    ItemExistsException,
                    UnsupportedRepositoryOperationException,
                    LockException,
                    RepositoryException
Not implemented.

Specified by:
restore in interface Node
Throws:
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
RepositoryException

restore

public void restore(Version version,
                    String relPath,
                    boolean removeExisting)
             throws PathNotFoundException,
                    ItemExistsException,
                    VersionException,
                    ConstraintViolationException,
                    UnsupportedRepositoryOperationException,
                    LockException,
                    InvalidItemStateException,
                    RepositoryException
Not implemented.

Specified by:
restore in interface Node
Throws:
PathNotFoundException
ItemExistsException
VersionException
ConstraintViolationException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException

restoreByLabel

public void restoreByLabel(String versionLabel,
                           boolean removeExisting)
                    throws VersionException,
                           ItemExistsException,
                           UnsupportedRepositoryOperationException,
                           LockException,
                           InvalidItemStateException,
                           RepositoryException
Not implemented.

Specified by:
restoreByLabel in interface Node
Throws:
VersionException
ItemExistsException
UnsupportedRepositoryOperationException
LockException
InvalidItemStateException
RepositoryException

getVersionHistory

public VersionHistory getVersionHistory()
                                 throws UnsupportedRepositoryOperationException,
                                        RepositoryException
Not implemented.

Specified by:
getVersionHistory in interface Node
Throws:
UnsupportedRepositoryOperationException
RepositoryException

getBaseVersion

public Version getBaseVersion()
                       throws UnsupportedRepositoryOperationException,
                              RepositoryException
Not implemented.

Specified by:
getBaseVersion in interface Node
Throws:
UnsupportedRepositoryOperationException
RepositoryException

lock

public Lock lock(boolean isDeep,
                 boolean isSessionScoped)
          throws UnsupportedRepositoryOperationException,
                 LockException,
                 AccessDeniedException,
                 InvalidItemStateException,
                 RepositoryException
Not implemented.

Specified by:
lock in interface Node
Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException

getLock

public Lock getLock()
             throws UnsupportedRepositoryOperationException,
                    LockException,
                    AccessDeniedException,
                    RepositoryException
Not implemented.

Specified by:
getLock in interface Node
Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
RepositoryException

unlock

public void unlock()
            throws UnsupportedRepositoryOperationException,
                   LockException,
                   AccessDeniedException,
                   InvalidItemStateException,
                   RepositoryException
Not implemented.

Specified by:
unlock in interface Node
Throws:
UnsupportedRepositoryOperationException
LockException
AccessDeniedException
InvalidItemStateException
RepositoryException

holdsLock

public boolean holdsLock()
                  throws RepositoryException
Not implemented.

Specified by:
holdsLock in interface Node
Throws:
RepositoryException

isLocked

public boolean isLocked()
                 throws RepositoryException
Not implemented.

Specified by:
isLocked in interface Node
Throws:
RepositoryException


Copyright © 2004-2005 . All Rights Reserved.