org.apache.jackrabbit.core.version
Class InternalVersionImpl

java.lang.Object
  extended byorg.apache.jackrabbit.core.version.InternalVersionItemImpl
      extended byorg.apache.jackrabbit.core.version.InternalVersionImpl
All Implemented Interfaces:
InternalVersion, InternalVersionItem

public class InternalVersionImpl
extends org.apache.jackrabbit.core.version.InternalVersionItemImpl
implements InternalVersion

Implements a InternalVersion


Constructor Summary
InternalVersionImpl(InternalVersionHistoryImpl vh, org.apache.jackrabbit.core.version.NodeStateEx node, QName name)
          Creates a new internal version with the given version history and persistance node.
 
Method Summary
 Calendar getCreated()
          Equivalent to Version.getCreated()
 InternalFrozenNode getFrozenNode()
          Returns the frozen node of this version or null if this is the root version.
 String getId()
          Returns the external id of this item
 QName[] getLabels()
          returns the labels that are assigned to this version
 QName getName()
          Returns the name of this version.
 InternalVersionItem getParent()
          returns the parent version item or null
 InternalVersion[] getPredecessors()
          Equivalent to Version.getPredecessors()}
 InternalVersion[] getSuccessors()
          Equivalent to Version.getSuccessors()}
 InternalVersionHistory getVersionHistory()
          returns the internal version history in wich this version lifes in.
protected  VersionManagerImpl getVersionManager()
          Returns the persistent version manager for this item
 boolean hasLabel(QName label)
          Checks, if this version has the given label assosiated
 boolean isMoreRecent(InternalVersion v)
          Checks if this version is more recent than the given version v. A version is more recent if and only if it is a successor (or a successor of a successor, etc., to any degree of separation) of the compared one.
 boolean isRootVersion()
          checks if this is the root version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalVersionImpl

public InternalVersionImpl(InternalVersionHistoryImpl vh,
                           org.apache.jackrabbit.core.version.NodeStateEx node,
                           QName name)
Creates a new internal version with the given version history and persistance node. please note, that versions must be created by the version history.

Parameters:
node -
Method Detail

getId

public String getId()
Returns the external id of this item

Specified by:
getId in interface InternalVersionItem
Returns:

getParent

public InternalVersionItem getParent()
returns the parent version item or null

Specified by:
getParent in interface InternalVersionItem
Returns:

getName

public QName getName()
Returns the name of this version.

Specified by:
getName in interface InternalVersion
Returns:
the name of this version.

getFrozenNode

public InternalFrozenNode getFrozenNode()
Returns the frozen node of this version or null if this is the root version.

Specified by:
getFrozenNode in interface InternalVersion
Returns:
the frozen node.

getCreated

public Calendar getCreated()
Equivalent to Version.getCreated()

Specified by:
getCreated in interface InternalVersion
See Also:
Version.getCreated()

getSuccessors

public InternalVersion[] getSuccessors()
Equivalent to Version.getSuccessors()}

Specified by:
getSuccessors in interface InternalVersion
See Also:
Version.getSuccessors()

getPredecessors

public InternalVersion[] getPredecessors()
Equivalent to Version.getPredecessors()}

Specified by:
getPredecessors in interface InternalVersion
See Also:
Version.getPredecessors()

isMoreRecent

public boolean isMoreRecent(InternalVersion v)
Checks if this version is more recent than the given version v. A version is more recent if and only if it is a successor (or a successor of a successor, etc., to any degree of separation) of the compared one.

Specified by:
isMoreRecent in interface InternalVersion
Parameters:
v - the version to check
Returns:
true if the version is more recent; false otherwise.

getVersionHistory

public InternalVersionHistory getVersionHistory()
returns the internal version history in wich this version lifes in.

Specified by:
getVersionHistory in interface InternalVersion
Returns:
the version history for this version.

hasLabel

public boolean hasLabel(QName label)
Checks, if this version has the given label assosiated

Specified by:
hasLabel in interface InternalVersion
Parameters:
label - the label to check.
Returns:
true if the label is assigned to this version; false otherwise.

getLabels

public QName[] getLabels()
returns the labels that are assigned to this version

Specified by:
getLabels in interface InternalVersion
Returns:
a string array of labels.

isRootVersion

public boolean isRootVersion()
checks if this is the root version.

Specified by:
isRootVersion in interface InternalVersion
Returns:
true if this version is the root version; false otherwise.

getVersionManager

protected VersionManagerImpl getVersionManager()
Returns the persistent version manager for this item

Returns:


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