org.apache.slide.content
Class NodeRevisionDescriptors

java.lang.Object
  extended byorg.apache.slide.content.NodeRevisionDescriptors
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public final class NodeRevisionDescriptors
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Node Revision Descriptors class.

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

Field Summary
protected static NodeRevisionNumber initialRevision
           
static java.lang.String MAIN_BRANCH
           
 
Constructor Summary
NodeRevisionDescriptors()
          Client side constructor.
NodeRevisionDescriptors(boolean isVersioned)
          Client side constructor.
NodeRevisionDescriptors(java.lang.String uri, NodeRevisionNumber initialRevision, java.util.Hashtable workingRevisions, java.util.Hashtable latestRevisionNumbers, java.util.Hashtable branches, boolean isVersioned)
          Store Constructor.
 
Method Summary
(package private)  void addSuccessor(NodeRevisionNumber number, NodeRevisionNumber successor)
          Add relation.
 NodeRevisionDescriptors cloneObject()
          Clone.
 java.util.Enumeration enumerateBranchNames()
          Enumerate all branch names.
 java.util.Enumeration enumerateRevisionNumbers()
          Enumerate all revision numbers in all branches.
 boolean equals(java.lang.Object obj)
          Equals.
 NodeRevisionNumber getInitialRevision()
          Get initial revision.
 NodeRevisionNumber getLatestRevision()
          Get latest revision from main branch.
 NodeRevisionNumber getLatestRevision(java.lang.String branchName)
          Get latest revision from a branch.
 java.lang.String getOriginalUri()
          OriginalUri accessor.
 java.util.Enumeration getSuccessors(NodeRevisionNumber number)
          Get relations.
 java.lang.String getUri()
          Uri accessor.
 boolean hasRevisions()
          Has revision ?
 boolean isAncestorDescendant(NodeRevisionNumber ancNrn, NodeRevisionNumber descNrn)
          Return true, if ancNrn and descNrn are in an ancestor-descendant relationship in this history.
 boolean isRedirected()
          Returns true, if and only if uri != originalUri
 boolean isVersioned()
          Use versioning accessor.
(package private)  void removeSuccessor(NodeRevisionNumber number, NodeRevisionNumber successor)
          Remove relation.
(package private)  void setLatestRevision(NodeRevisionNumber number)
          Latest revision mutator.
(package private)  void setLatestRevision(java.lang.String branch, NodeRevisionNumber number)
          Latest revision mutator.
(package private)  void setOriginalUri(java.lang.String originalUri)
          OriginalUri mutator.
(package private)  void setSuccessors(NodeRevisionNumber number, NodeRevisionNumber successor)
          Add relation.
(package private)  void setSuccessors(NodeRevisionNumber number, java.util.Vector successors)
          Add relation.
 void setUri(java.lang.String uri)
          Uri mutator.
(package private)  void setVersioned(boolean useVersioning)
          Use versioning mutator.
 void validate(java.lang.String expectedUri)
          Validate.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIN_BRANCH

public static final java.lang.String MAIN_BRANCH
See Also:
Constant Field Values

initialRevision

protected static final NodeRevisionNumber initialRevision
Constructor Detail

NodeRevisionDescriptors

public NodeRevisionDescriptors()
Client side constructor.


NodeRevisionDescriptors

public NodeRevisionDescriptors(boolean isVersioned)
Client side constructor.


NodeRevisionDescriptors

public NodeRevisionDescriptors(java.lang.String uri,
                               NodeRevisionNumber initialRevision,
                               java.util.Hashtable workingRevisions,
                               java.util.Hashtable latestRevisionNumbers,
                               java.util.Hashtable branches,
                               boolean isVersioned)
Store Constructor.

Method Detail

isVersioned

public boolean isVersioned()
Use versioning accessor.


setVersioned

void setVersioned(boolean useVersioning)
Use versioning mutator.


hasRevisions

public boolean hasRevisions()
Has revision ?


getUri

public java.lang.String getUri()
Uri accessor.


getOriginalUri

public java.lang.String getOriginalUri()
OriginalUri accessor.


setOriginalUri

void setOriginalUri(java.lang.String originalUri)
OriginalUri mutator.


setUri

public void setUri(java.lang.String uri)
Uri mutator.


getInitialRevision

public NodeRevisionNumber getInitialRevision()
Get initial revision.


getLatestRevision

public NodeRevisionNumber getLatestRevision()
Get latest revision from main branch.


getLatestRevision

public NodeRevisionNumber getLatestRevision(java.lang.String branchName)
Get latest revision from a branch.


setLatestRevision

void setLatestRevision(NodeRevisionNumber number)
Latest revision mutator.


setLatestRevision

void setLatestRevision(java.lang.String branch,
                       NodeRevisionNumber number)
Latest revision mutator.


getSuccessors

public java.util.Enumeration getSuccessors(NodeRevisionNumber number)
Get relations.


isAncestorDescendant

public boolean isAncestorDescendant(NodeRevisionNumber ancNrn,
                                    NodeRevisionNumber descNrn)
Return true, if ancNrn and descNrn are in an ancestor-descendant relationship in this history.


isRedirected

public boolean isRedirected()
Returns true, if and only if uri != originalUri


setSuccessors

void setSuccessors(NodeRevisionNumber number,
                   NodeRevisionNumber successor)
Add relation.


setSuccessors

void setSuccessors(NodeRevisionNumber number,
                   java.util.Vector successors)
Add relation.


addSuccessor

void addSuccessor(NodeRevisionNumber number,
                  NodeRevisionNumber successor)
Add relation.


removeSuccessor

void removeSuccessor(NodeRevisionNumber number,
                     NodeRevisionNumber successor)
Remove relation.


enumerateRevisionNumbers

public java.util.Enumeration enumerateRevisionNumbers()
Enumerate all revision numbers in all branches.


enumerateBranchNames

public java.util.Enumeration enumerateBranchNames()
Enumerate all branch names.


cloneObject

public NodeRevisionDescriptors cloneObject()
Clone.

Returns:
Object clone

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 NodeRevisionDescriptors and is not null
  • it has the same Uri

  • validate

    public void validate(java.lang.String expectedUri)
    Validate.