org.norvelle.textcite.gui.action.genref
Class CustomReferenceGenerator

java.lang.Object
  extended by org.norvelle.textcite.gui.action.genref.ReferenceGenerator
      extended by org.norvelle.textcite.gui.action.genref.CustomReferenceGenerator

public class CustomReferenceGenerator
extends ReferenceGenerator

CustomReferenceGenerator: Produces citations in a user-defined format.

Author:
Erik Norvelle

Field Summary
protected static java.lang.String AUTHOR_MARKER
           
protected static java.lang.String BOOK_MARKER
           
protected  java.lang.String customTemplate
           
protected static java.lang.String LASTNAME_MARKER
           
static java.lang.String name
           
protected static java.lang.String PAGE_MARKER
           
protected static java.lang.String REFID_MARKER
           
protected static java.lang.String YEAR_MARKER
           
 
Fields inherited from class org.norvelle.textcite.gui.action.genref.ReferenceGenerator
CUSTOM_REFERENCE_FORMAT_PROPERTY, endString, startString, USER_DEFAULT_REFERENCE_PROPERTY
 
Constructor Summary
CustomReferenceGenerator(java.lang.String c)
           
 
Method Summary
 java.lang.String getCopiableReference(Citation c)
           
 java.lang.String getCustomTemplate()
           
 java.lang.String getName()
           
 java.lang.String getPreview()
          Return a preview based on the current default custom template
 java.lang.String getPreview(java.lang.String template)
          Return a preview based on the string given as a template
 void setCustomTemplate(java.lang.String customTemplate)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AUTHOR_MARKER

protected static final java.lang.String AUTHOR_MARKER
See Also:
Constant Field Values

BOOK_MARKER

protected static final java.lang.String BOOK_MARKER
See Also:
Constant Field Values

REFID_MARKER

protected static final java.lang.String REFID_MARKER
See Also:
Constant Field Values

YEAR_MARKER

protected static final java.lang.String YEAR_MARKER
See Also:
Constant Field Values

PAGE_MARKER

protected static final java.lang.String PAGE_MARKER
See Also:
Constant Field Values

LASTNAME_MARKER

protected static final java.lang.String LASTNAME_MARKER
See Also:
Constant Field Values

customTemplate

protected java.lang.String customTemplate

name

public static final java.lang.String name
See Also:
Constant Field Values
Constructor Detail

CustomReferenceGenerator

public CustomReferenceGenerator(java.lang.String c)
Method Detail

getPreview

public java.lang.String getPreview()
Return a preview based on the current default custom template

Overrides:
getPreview in class ReferenceGenerator

getPreview

public java.lang.String getPreview(java.lang.String template)
Return a preview based on the string given as a template

Parameters:
template - The String to use as a template
Returns:
The formatted preview

getCopiableReference

public java.lang.String getCopiableReference(Citation c)
Overrides:
getCopiableReference in class ReferenceGenerator

toString

public java.lang.String toString()
Specified by:
toString in class ReferenceGenerator

getCustomTemplate

public java.lang.String getCustomTemplate()
Returns:
Returns the custom citation template.

setCustomTemplate

public void setCustomTemplate(java.lang.String customTemplate)
Parameters:
customTemplate - The custom citation template to set.

getName

public java.lang.String getName()
Specified by:
getName in class ReferenceGenerator