net.ultrametrics.rcs
Class Header
java.lang.Object
|
+--net.ultrametrics.rcs.ControlInformation
|
+--net.ultrametrics.rcs.Header
- public class Header
- extends ControlInformation
Encapsulation of a header for an RCS controlled object.
Field Summary |
static java.lang.String |
_rcsId
|
protected static java.lang.String |
ACCESS
|
protected static java.lang.String |
COMMENT
|
protected static java.lang.String |
HEAD
|
protected static java.lang.String |
LOCKS
|
protected static java.lang.String |
POLICY
|
protected static java.lang.String |
STRICT
|
protected static java.lang.String |
SYMBOLS
|
Constructor Summary |
Header(java.io.BufferedReader reader)
Create a new header. |
Method Summary |
void |
dump()
Similar to toString(), but more verbose and dumps directly to stderr. |
java.lang.String |
getAccess()
Retrieve the access tag. |
protected java.util.Collection |
getAllowedKeys()
|
java.lang.String |
getComment()
Retrieve the comment. |
java.lang.String |
getHead()
Retrieve the head version. |
java.lang.String |
getLocks()
Retrieve the locks. |
java.lang.String |
getPolicy()
Retrieve the policy. |
java.lang.String |
getSymbols()
Retrieve the symbols. |
protected boolean |
isKeyAllowed(java.lang.String key)
|
static void |
main(java.lang.String[] args)
Tester. |
boolean |
parse()
Parse a header block. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
HEAD
protected static final java.lang.String HEAD
ACCESS
protected static final java.lang.String ACCESS
SYMBOLS
protected static final java.lang.String SYMBOLS
LOCKS
protected static final java.lang.String LOCKS
STRICT
protected static final java.lang.String STRICT
COMMENT
protected static final java.lang.String COMMENT
POLICY
protected static final java.lang.String POLICY
_rcsId
public static final java.lang.String _rcsId
Header
public Header(java.io.BufferedReader reader)
- Create a new header.
- Parameters:
reader
- the buffered reader from which the header will be
subsequently parsed.
getHead
public java.lang.String getHead()
- Retrieve the head version.
- Returns:
- the RCS version number of the head revision.
getAccess
public java.lang.String getAccess()
- Retrieve the access tag.
- Returns:
- the RCS access tag.
getSymbols
public java.lang.String getSymbols()
- Retrieve the symbols.
- Returns:
- the RCS symbolic tags.
getLocks
public java.lang.String getLocks()
- Retrieve the locks.
- Returns:
- the RCS locks.
getComment
public java.lang.String getComment()
- Retrieve the comment.
- Returns:
- the RCS comment.
getPolicy
public java.lang.String getPolicy()
- Retrieve the policy.
- Returns:
- the RCS policy.
parse
public boolean parse()
throws ParserException
- Parse a header block.
- Returns:
- whether this is the last header in the reader. It should
always be since rcs files have only one header.
- Overrides:
- parse in class ControlInformation
- See Also:
ControlInformation.parse()
isKeyAllowed
protected boolean isKeyAllowed(java.lang.String key)
- Overrides:
- isKeyAllowed in class ControlInformation
getAllowedKeys
protected java.util.Collection getAllowedKeys()
- Overrides:
- getAllowedKeys in class ControlInformation
dump
public void dump()
- Similar to toString(), but more verbose and dumps directly to stderr.
- Overrides:
- dump in class ControlInformation
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
main
public static void main(java.lang.String[] args)
throws ParserException,
java.io.FileNotFoundException
- Tester.