Java Doc for Node.java in  » ERP-CRM-Financial » sakai » org » apache » commons » jrcs » rcs » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.apache.commons.jrcs.rcs 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.jrcs.util.ToString
      org.apache.commons.jrcs.rcs.Node

All known Subclasses:   org.apache.commons.jrcs.rcs.TrunkNode,  org.apache.commons.jrcs.rcs.BranchNode,
Node
abstract public class Node extends ToString implements Comparable(Code)
Ancestor to all nodes in a version control Archive.

Nodes store the deltas between two revisions of the text.

This class is NOT thread safe.
See Also:   TrunkNode
See Also:   BranchNode
See Also:   Archive
author:
   Juanco Anez
version:
   $Id: Node.java 2967 2005-10-26 10:52:33Z ian@caret.cam.ac.uk $


Field Summary
protected  Stringauthor
    
protected  TreeMapbranches
    
protected  Nodechild
    
protected  Datedate
    
final protected static  DateFormatdateFormat
    
final protected static  DateFormatdateFormat2K
    
final protected static  FormatdateFormatter
    
protected  Stringlocker
    
protected  Stringlog
    
protected  Nodeparent
    
protected  Phrasesphrases
    
protected  Nodercsnext
    
protected  Stringstate
    
protected  Object[]text
    
final protected  Versionversion
     The version number for this node.

Constructor Summary
protected  Node(Node other)
     Creates a copy of a node.
protected  Node(Version vernum, Node rcsnext)
     Creates a node with the given version number.

Method Summary
public  voidaddBranch(BranchNode node)
     Adds a branch node to the current node.
public  intcompareTo(Object other)
     Compares the version number of this node to that of another node.
Parameters:
  other - The node to compare two.
abstract public  NodedeltaRevision()
     Returns the Node with the version number that corresponds to the revision to be obtained after the deltas in the current node are applied.
final public  StringgetAuthor()
    
public  BranchNodegetBranch(int no)
     Retrieve the branch node identified with the given numer.
Parameters:
  no - The branch number.
final public  TreeMapgetBranches()
    
final public  NodegetChild()
    
final public  DategetDate()
    
final public  StringgetLocker()
    
final public  StringgetLog()
    
final public  NodegetParent()
    
public  PhrasesgetPhrases()
    
public  NodegetRCSNext()
     Return the next node in the RCS logical hierarchy.
final public  StringgetState()
    
final public  Object[]getText()
    
public  ListgetTextLines()
     Return a list with the lines of the node's text.
public  ListgetTextLines(int from, int to)
     Return a list with a subset of the lines of the node's text.
Parameters:
  from - The offset of the first line to retrieve.
Parameters:
  to - The offset of the line after the last one to retrieve.
public  ListgetTextLines(List lines)
     Add a subset of the lines of the node's text to the given list.
public  ListgetTextLines(List lines, int from, int to)
     Add a subset of the lines of the node's text to the given list.
Parameters:
  from - The offset of the first line to retrieve.
Parameters:
  to - The offset of the line after the last one to retrieve.
final public  VersiongetVersion()
    
public  booleanisGhost()
     Returns true if the node is a "ghost" node. Ghost nodes have no associated text ot deltas.
public  VersionnewBranchVersion()
     Returns the version number that should correspond to a newly created branch of this node.
static  NodenewNode(Version vernum, Node rcsnext)
     Creates a new node of the adequate type for the given version number.
Parameters:
  vernum - The version number for the node.
Parameters:
  rcsnext - The next node in the RCS logical hierarchy.
static  NodenewNode(Version vernum)
     Creates a new node of the adequate type for the given version number.
Parameters:
  vernum - The version number for the node.
abstract public  NodenextInPathTo(Version vernum, boolean soft)
     Returns the next node in the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path.
Parameters:
  soft - If true, no error is thrown if a node with the givenversion doesn't exist.
public  VersionnextVersion()
     Returns the version number that should correspond to the revision folowing this node.
public  voidpatch(List original)
     Apply the deltas in the current node to the given text.
public  voidpatch(List original, boolean annotate)
     Apply the deltas in the current node to the given text.
public  PathpathTo(Version vernum)
     Returns the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path.
public  PathpathTo(Version vernum, boolean soft)
     Returns the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path.
Parameters:
  soft - If true, no error is thrown if a node with the givenversion doesn't exist.
public  Noderoot()
     Return the root node of the node hierarchy.
public  voidsetAuthor(String user)
     Set the author of the node's revision.
public  voidsetDate(int[] value)
     Set the date of the node's revision.
public  voidsetLocker(String user)
     Set the locker.
public  voidsetLog(String value)
     Sets the log message for the node's revision.
public  voidsetRCSNext(Node node)
     Sets the next node in the RCS logical hierarchy.
public  voidsetState(String value)
     Sets the state of the node's revision.
Parameters:
  value - A symbol that identifies the state.
public  voidsetText(String value)
     Sets the text for the node's revision.
public  voidsetText(Object[] value)
     Sets the text for the node's revision.
public  voidtoString(StringBuffer s)
     Conver the current node and all of its branches to their RCS string representation and add it to the given StringBuffer.
public  voidtoString(StringBuffer s, String EOL)
     Conver the current node and all of its branches to their RCS string representation and add it to the given StringBuffer using the given marker as line separator.
public  StringtoText()
     Conver the urrent node to its RCS string representation.
public  voidtoText(StringBuffer s, String EOL)
     Conver the urrent node to its RCS string representation and add it to the given StringBuffer using the given marker as line separator.

Field Detail
author
protected String author(Code)



branches
protected TreeMap branches(Code)



child
protected Node child(Code)



date
protected Date date(Code)



dateFormat
final protected static DateFormat dateFormat(Code)



dateFormat2K
final protected static DateFormat dateFormat2K(Code)



dateFormatter
final protected static Format dateFormatter(Code)



locker
protected String locker(Code)



log
protected String log(Code)



parent
protected Node parent(Code)



phrases
protected Phrases phrases(Code)



rcsnext
protected Node rcsnext(Code)



state
protected String state(Code)



text
protected Object[] text(Code)



version
final protected Version version(Code)
The version number for this node.




Constructor Detail
Node
protected Node(Node other)(Code)
Creates a copy of a node. Only used internally.
Parameters:
  other - The node to copy.



Node
protected Node(Version vernum, Node rcsnext)(Code)
Creates a node with the given version number.
Parameters:
  vernum - The version number for the node.
Parameters:
  rcsnext - The next node in the RCS logical hierarchy.




Method Detail
addBranch
public void addBranch(BranchNode node) throws InvalidVersionNumberException(Code)
Adds a branch node to the current node.
Parameters:
  node - The branch node.
throws:
  InvalidVersionNumberException - if the version numberis not a valid branch version number for the current node



compareTo
public int compareTo(Object other)(Code)
Compares the version number of this node to that of another node.
Parameters:
  other - The node to compare two. 0 if versions are equal, 1 if this version greather than the other,and -1 otherwise.



deltaRevision
abstract public Node deltaRevision()(Code)
Returns the Node with the version number that corresponds to the revision to be obtained after the deltas in the current node are applied.

For a BranchNode BranchNode the deltaRevision is the current revision; that is, after the deltas are applied, the text for the current revision is obtained.

For a TrunkNode TrunkNode the deltaRevision is the next revision; that is, after the deltas are applied, the text obtained corresponds to the next revision in the chain.

The node for the delta revision.



getAuthor
final public String getAuthor()(Code)



getBranch
public BranchNode getBranch(int no)(Code)
Retrieve the branch node identified with the given numer.
Parameters:
  no - The branch number. The branch node.
See Also:   BranchNode



getBranches
final public TreeMap getBranches()(Code)



getChild
final public Node getChild()(Code)



getDate
final public Date getDate()(Code)



getLocker
final public String getLocker()(Code)



getLog
final public String getLog()(Code)



getParent
final public Node getParent()(Code)



getPhrases
public Phrases getPhrases()(Code)



getRCSNext
public Node getRCSNext()(Code)
Return the next node in the RCS logical hierarchy. the next node



getState
final public String getState()(Code)



getText
final public Object[] getText()(Code)



getTextLines
public List getTextLines()(Code)
Return a list with the lines of the node's text. The list



getTextLines
public List getTextLines(int from, int to)(Code)
Return a list with a subset of the lines of the node's text.
Parameters:
  from - The offset of the first line to retrieve.
Parameters:
  to - The offset of the line after the last one to retrieve. The list



getTextLines
public List getTextLines(List lines)(Code)
Add a subset of the lines of the node's text to the given list. The given list after the additions have been made.



getTextLines
public List getTextLines(List lines, int from, int to)(Code)
Add a subset of the lines of the node's text to the given list.
Parameters:
  from - The offset of the first line to retrieve.
Parameters:
  to - The offset of the line after the last one to retrieve. The given list after the additions have been made.



getVersion
final public Version getVersion()(Code)



isGhost
public boolean isGhost()(Code)
Returns true if the node is a "ghost" node. Ghost nodes have no associated text ot deltas. CVS uses them to mark certain points in the node hierarchy.



newBranchVersion
public Version newBranchVersion()(Code)
Returns the version number that should correspond to a newly created branch of this node. the new branch's version number.



newNode
static Node newNode(Version vernum, Node rcsnext) throws InvalidVersionNumberException(Code)
Creates a new node of the adequate type for the given version number.
Parameters:
  vernum - The version number for the node.
Parameters:
  rcsnext - The next node in the RCS logical hierarchy. The newly created node.



newNode
static Node newNode(Version vernum) throws InvalidVersionNumberException(Code)
Creates a new node of the adequate type for the given version number.
Parameters:
  vernum - The version number for the node. The newly created node.



nextInPathTo
abstract public Node nextInPathTo(Version vernum, boolean soft) throws NodeNotFoundException(Code)
Returns the next node in the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path.
Parameters:
  soft - If true, no error is thrown if a node with the givenversion doesn't exist. Use soft=true to find a apth to where a newnode should be added. The path
throws:
  NodeNotFoundException - if a node with the given version numberis not reachable following the RCS-next chain from this node.If soft=false the exception is also thrown if a node with the givenversion number doesn't exist.
See Also:   Path



nextVersion
public Version nextVersion()(Code)
Returns the version number that should correspond to the revision folowing this node. The next version number.



patch
public void patch(List original) throws InvalidFileFormatException, PatchFailedException(Code)
Apply the deltas in the current node to the given text.
Parameters:
  original - the text to be patched
throws:
  InvalidFileFormatException - if the deltas cannot be parsed.
throws:
  PatchFailedException - if the diff engine determines thatthe deltas cannot apply to the given text.



patch
public void patch(List original, boolean annotate) throws InvalidFileFormatException, org.apache.commons.jrcs.diff.PatchFailedException(Code)
Apply the deltas in the current node to the given text.
Parameters:
  original - the text to be patched
Parameters:
  annotate - set to true to have each text line be aLine Line object that identifies the revision in whichthe line was changed or added.
throws:
  InvalidFileFormatException - if the deltas cannot be parsed.
throws:
  PatchFailedException - if the diff engine determines thatthe deltas cannot apply to the given text.



pathTo
public Path pathTo(Version vernum) throws NodeNotFoundException(Code)
Returns the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path. The path
throws:
  NodeNotFoundException - if a node with the given version numberdoesn't exist, or is not reachable following the RCS-next chainfrom this node.
See Also:   Path



pathTo
public Path pathTo(Version vernum, boolean soft) throws NodeNotFoundException(Code)
Returns the path from the current node to the node identified by the given version.
Parameters:
  vernum - The version number of the last node in the path.
Parameters:
  soft - If true, no error is thrown if a node with the givenversion doesn't exist. Use soft=true to find a apth to where a newnode should be added. The path
throws:
  NodeNotFoundException - if a node with the given version numberis not reachable following the RCS-next chain from this node.If soft=false the exception is also thrown if a node with the givenversion number doesn't exist.
See Also:   Path



root
public Node root()(Code)
Return the root node of the node hierarchy. The root node.



setAuthor
public void setAuthor(String user)(Code)
Set the author of the node's revision.
Parameters:
  user - A symbol that identifies the author.



setDate
public void setDate(int[] value)(Code)
Set the date of the node's revision.
Parameters:
  value - an array of 6 integers, corresponding to theyear, month, day, hour, minute, and second of this revision.
If the year has two digits, it is interpreted as belonging to the 20thcentury.
The month is a number from 1 to 12.



setLocker
public void setLocker(String user)(Code)
Set the locker.
Parameters:
  user - A symbol that identifies the locker.



setLog
public void setLog(String value)(Code)
Sets the log message for the node's revision. The log message is usually used to explain why the revision took place.
Parameters:
  value - The message.



setRCSNext
public void setRCSNext(Node node)(Code)
Sets the next node in the RCS logical hierarchy. In the RCS hierarchy, a TrunkNode TrunkNode points to the previous revision, while a BranchNode BranchNode points to the next revision.
Parameters:
  node - The next node in the RCS logical hierarchy.



setState
public void setState(String value)(Code)
Sets the state of the node's revision.
Parameters:
  value - A symbol that identifies the state. The most commonlyused value is Exp.



setText
public void setText(String value)(Code)
Sets the text for the node's revision.

For archives containing binary information, the text is an image of the revision contents.

For ASCII archives, the text contains the delta between the current revision and the next revision in the RCS logical hierarchy. The deltas are codified in a format similar to the one used by Unix diff.

The passed string is converted to an array of objects befored being stored as the revision's text


Parameters:
  value - The revision's text.
See Also:   ArchiveParser



setText
public void setText(Object[] value)(Code)
Sets the text for the node's revision.

For archives containing binary information, the text is an image of the revision contents.

For ASCII archives, the text contains the delta between the current revision and the next revision in the RCS logical hierarchy. The deltas are codified in a format similar to the one used by Unix diff.
Parameters:
  value - The revision's text.
See Also:   ArchiveParser




toString
public void toString(StringBuffer s)(Code)
Conver the current node and all of its branches to their RCS string representation and add it to the given StringBuffer.
Parameters:
  s - The string buffer to add the node's image to.



toString
public void toString(StringBuffer s, String EOL)(Code)
Conver the current node and all of its branches to their RCS string representation and add it to the given StringBuffer using the given marker as line separator.
Parameters:
  s - The string buffer to add the node's image to.
Parameters:
  EOL - The line separator to use.



toText
public String toText()(Code)
Conver the urrent node to its RCS string representation. The string representation



toText
public void toText(StringBuffer s, String EOL)(Code)
Conver the urrent node to its RCS string representation and add it to the given StringBuffer using the given marker as line separator.
Parameters:
  s - The string buffer to add the node's image to.
Parameters:
  EOL - The line separator to use.



Methods inherited from org.apache.commons.jrcs.util.ToString
public static String arrayToString(Object[] o)(Code)(Java Doc)
public static String arrayToString(Object[] o, String EOL)(Code)(Java Doc)
public static String[] stringToArray(String value)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void toString(StringBuffer s)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.