|
Bibi 19 Oct 2005 21:04 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectujap.bibi.SingleField
this class represents a single field in a bibtex entry, e.g. the field with the name "year" and the value "2000". this class helps avoiding different names for fields with the same semantics, e.g. "Author" and "author".
Field Summary | |
private String |
name
|
private String |
noWhiteValue
|
private String |
value
|
Constructor Summary | |
SingleField()
|
|
SingleField(String name,
String value)
|
|
SingleField(String author,
String[][] names)
|
Method Summary | |
boolean |
equals(Object o)
two SingleFields are equal if the field names are equal - note that the values may still be different! |
String |
getName()
|
String |
getValue()
|
int |
hashCode()
the hashCode of the name, or 0 if name==null |
boolean |
nearlyEqual(SingleField o)
if names are equal and values more or less equal |
static String |
noWhitespace(String s)
remove whitepsace from string (not only at the ends, but overall) |
boolean |
reallyEqual(SingleField o)
if names and values are equal |
void |
setName(String name)
makes the name lowercase |
private void |
setRealValue(String value)
|
void |
setValue(String value)
do not call setValue before name has been set! |
private void |
setValue(String[][] a)
a special setValue method for author names |
private String |
toAuthorString(String[][] a)
Convert author names array into string in bibtex format. |
String |
toString()
|
static String |
trim(String s)
remove superfluous whitespace: multiple spaces, newlines, ... |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private String name
private String value
private String noWhiteValue
Constructor Detail |
public SingleField()
public SingleField(String author, String[][] names)
public SingleField(String name, String value) throws ParseException
Method Detail |
public void setName(String name)
public String getName()
public void setValue(String value) throws ParseException
ParseException
private String toAuthorString(String[][] a)
private void setValue(String[][] a)
private void setRealValue(String value)
public String getValue()
public boolean equals(Object o)
public int hashCode()
public boolean reallyEqual(SingleField o)
public boolean nearlyEqual(SingleField o)
public static String noWhitespace(String s)
public static String trim(String s)
public String toString()
|
Bibi 19 Oct 2005 21:04 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |