de.hpi.fgis.dude.util.bibtex.data
Class BibtexPerson

java.lang.Object
  extended by de.hpi.fgis.dude.util.bibtex.data.BibtexNode
      extended by de.hpi.fgis.dude.util.bibtex.data.BibtexPerson

public final class BibtexPerson
extends BibtexNode

BibtexPerson objects are elements of BibtexPersonLists, which can be used in author or editor fields. E.g. Charles Louis Xavier Joseph de la Vall{'e}e Poussin Jr:

 first = "Charles Louis Xavier Joseph"
 preLast = "de la"
 last = "Vall{'e}e Poussin"
 lineage = "Jr"
 
Fields that are not used are set to null. If isAndOthers is true, all fields are ignored (should be null).

Author:
henkel

Constructor Summary
protected BibtexPerson(BibtexFile file, String first, String preLast, String last, String lineage, boolean isOthers)
          Instantiates a new BibtexPerson.
 
Method Summary
 String getFirst()
          Returns the first name of the person.
 String getLast()
          Returns the last name of the person.
 String getLineage()
          Returns the lineage of this person.
 String getPreLast()
          Returns the middle name or any middle initials of this persons.
 boolean isOthers()
          Returns true, if this instance represents the BibTex "Other authors" value; otherwise false.
 void printBibtex(PrintWriter writer)
          Prints the node to the passed PrintWriter.
 void setFirst(String first)
          Sets the first.
 void setLast(String last)
          Sets the last.
 void setLineage(String lineage)
          Sets the lineage.
 void setOthers(boolean isAndOthers)
          Sets the isAndOthers.
 void setPreLast(String preLast)
          Sets the preLast.
 
Methods inherited from class de.hpi.fgis.dude.util.bibtex.data.BibtexNode
getOwnerFile, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BibtexPerson

protected BibtexPerson(BibtexFile file,
                       String first,
                       String preLast,
                       String last,
                       String lineage,
                       boolean isOthers)
Instantiates a new BibtexPerson.

Parameters:
file - The file that includes this person.
first - The first name of the person.
preLast - The middle name or any initials of this person.
last - The last name of this person.
lineage - The lineage of this person.
isOthers - true, if the created BibTexPerson represents the BibTex "Other authors" value.
Method Detail

getFirst

public String getFirst()
Returns the first name of the person.

Returns:
The first name of the person or null if it is not set.

isOthers

public boolean isOthers()
Returns true, if this instance represents the BibTex "Other authors" value; otherwise false.

Returns:
true, if this instance represents the BibTex "Other authors" value; otherwise false.

getLast

public String getLast()
Returns the last name of the person.

Returns:
The last name of the person or null if it is not set.

getLineage

public String getLineage()
Returns the lineage of this person.

Returns:
The lineage of this person or null if it is not set.

getPreLast

public String getPreLast()
Returns the middle name or any middle initials of this persons.

Returns:
The middle name or any middle initials of this persons or null if it is not set.

setFirst

public void setFirst(String first)
Sets the first.

Parameters:
first - The first to set.

setOthers

public void setOthers(boolean isAndOthers)
Sets the isAndOthers.

Parameters:
isAndOthers - The isAndOthers to set.

setLast

public void setLast(String last)
Sets the last.

Parameters:
last - The last to set.

setLineage

public void setLineage(String lineage)
Sets the lineage.

Parameters:
lineage - The lineage to set.

setPreLast

public void setPreLast(String preLast)
Sets the preLast.

Parameters:
preLast - The preLast to set.

printBibtex

public void printBibtex(PrintWriter writer)
Description copied from class: BibtexNode
Prints the node to the passed PrintWriter. This method needs to be implemented by each sub-class.

Specified by:
printBibtex in class BibtexNode
Parameters:
writer - The writer that shall be used for writing the String representation of this node.


Copyright © 2011 Hasso Plattner Institute - Chair of Information Systems. All Rights Reserved.