public class TechnicalInformation extends java.lang.Object implements RevisionHandler
TechnicalInformationHandler
Modifier and Type | Class and Description |
---|---|
static class |
TechnicalInformation.Field
the possible fields
|
static class |
TechnicalInformation.Type
the different types of information
|
Constructor and Description |
---|
TechnicalInformation(TechnicalInformation.Type type)
Initializes the information with the given type
|
TechnicalInformation(TechnicalInformation.Type type,
java.lang.String id)
Initializes the information with the given type
|
Modifier and Type | Method and Description |
---|---|
TechnicalInformation |
add(TechnicalInformation.Type type)
Adds an empty technical information with the given type to the list of
additional informations and returns the instance.
|
void |
add(TechnicalInformation value)
adds the given information to the list of additional technical informations
|
java.util.Enumeration<TechnicalInformation> |
additional()
returns an enumeration of all the additional technical informations (if
there are any)
|
boolean |
exists(TechnicalInformation.Field field)
returns TRUE if the field is stored and has a value different from the
empty string.
|
java.util.Enumeration<TechnicalInformation.Field> |
fields()
returns an enumeration over all the stored fields
|
java.lang.String |
getID()
returns the unique ID (either the one used in creating this instance or the
automatically generated one)
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation.Type |
getType()
returns the type of this technical information
|
java.lang.String |
getValue(TechnicalInformation.Field field)
returns the value associated with the given field, or empty if field is not
currently stored.
|
boolean |
hasAdditional()
returns true if there are further technical informations stored in this
|
static void |
main(java.lang.String[] args)
Prints some examples of technical informations if there are no commandline
options given.
|
void |
setValue(TechnicalInformation.Field field,
java.lang.String value)
sets the value for the given field, overwrites any previously existing one.
|
java.lang.String |
toBibTex()
Returns a BibTex string representing this technical information.
|
java.lang.String |
toString()
Returns a plain-text string representing this technical information.
|
public TechnicalInformation(TechnicalInformation.Type type)
type
- the type of this informationTechnicalInformation.Type
public TechnicalInformation(TechnicalInformation.Type type, java.lang.String id)
type
- the type of this informationid
- the unique ID (for BibTex), can be emptyTechnicalInformation.Type
public TechnicalInformation.Type getType()
public java.lang.String getID()
public void setValue(TechnicalInformation.Field field, java.lang.String value)
field
- the field to set the value forvalue
- the value of the fieldpublic java.lang.String getValue(TechnicalInformation.Field field)
field
- the field to retrieve the value forpublic boolean exists(TechnicalInformation.Field field)
field
- the field to checkpublic java.util.Enumeration<TechnicalInformation.Field> fields()
public boolean hasAdditional()
public java.util.Enumeration<TechnicalInformation> additional()
public void add(TechnicalInformation value)
value
- the information to addpublic TechnicalInformation add(TechnicalInformation.Type type)
type
- the type of the new information to addpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toBibTex()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- the commandline optionsjava.lang.Exception
- if the option parsing fails