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

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

public class BibtexString
extends BibtexAbstractValue

A String - this class is used for numbers as well - if there's a number wrapped in here, the toString() method will be smart enough to leave out the braces, and thus print {1979} as 1979.

Author:
henkel

Constructor Summary
protected BibtexString(BibtexFile file, String content)
          Creates a new BibTexString.
 
Method Summary
 String getContent()
          Returns the content String of this instance (without surrounding quotes or curly braces!).
 void printBibtex(PrintWriter writer)
          Prints the node to the passed PrintWriter.
 void setContent(String content)
          Sets the content.
 
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

BibtexString

protected BibtexString(BibtexFile file,
                       String content)
Creates a new BibTexString. The passed String should not be surround be the quotes or curly braces already.

Parameters:
file - The file that includes this String.
content - The content of this BibtexString instance.
Method Detail

getContent

public String getContent()
Returns the content String of this instance (without surrounding quotes or curly braces!).

Returns:
The content String of this instance.

setContent

public void setContent(String content)
Sets the content. The passed String should not be surround be the quotes or curly braces already.

Parameters:
content - The content to set.

printBibtex

public void printBibtex(PrintWriter writer)
Prints the node to the passed PrintWriter. This method needs to be implemented by each sub-class. Within this method surrounding curly braces will be printed.

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.