Top Description Inners Fields Constructors Methods
org.jabref.logic.openoffice.style

public Class OOBibStyle

extends Object
implements Comparable<OOBibStyle>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.io.IOException, .InputStream, .InputStreamReader, .Reader, .StringReader, java.nio.charset.StandardCharsets, java.nio.file.Files, .Path, java.util.Collections, .HashMap, .List, .Map, .Objects, .Optional, .Set, .SortedSet, .TreeSet, java.util.regex.Pattern, org.jabref.logic.journals.JournalAbbreviationRepository, org.jabref.logic.layout.Layout, .LayoutFormatter, .LayoutFormatterPreferences, .LayoutHelper, org.jabref.model.entry.field.FieldFactory, .OrFields, .StandardField, org.jabref.model.entry.types.EntryType, .EntryTypeFactory, org.jabref.model.openoffice.ootext.OOFormat, .OOText, org.jabref.model.openoffice.style.CitationMarkerEntry, .CitationMarkerNormEntry, .CitationMarkerNumericBibEntry, .CitationMarkerNumericEntry, .NonUniqueCitationMarker, org.slf4j.Logger, .LoggerFactory

This class embodies a bibliography formatting for OpenOffice, which is composed of the following elements:

1) Each OO BIB entry type must have a formatting. A formatting is an array of elements, each of which is either a piece of constant text, an entry field value, or a tab. Each element has a character format associated with it.

2) Many field values (e.g. author) need to be formatted before input to OpenOffice. The style has the responsibility of formatting all field values. Formatting is handled by 0-n JabRef LayoutFormatter classes.

3) If the entries are not numbered, a citation marker must be produced for each entry. This operation is performed for each JabRef BibEntry.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final JournalAbbreviationRepository
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private final Map<EntryType, Layout>
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private final Map<String, Object>
private static final String
private Layout
public static final String
private final LayoutFormatter
private static final String
private final boolean
private static final String
private static final String
private static final String
private static final String
private boolean
private static final String
public static final String
private final SortedSet<String>
private static final String
private static final String
private final LayoutFormatterPreferences
private String
private static final Logger
private static final String
public static final String
public static final String
public static final String
private String
private static final String
private static final Pattern
private static final String
private static final String
private final String
private final Map<String, Object>
private static final String
private static final Pattern
public static final String
public static final String
private static final String
private static final String
private Path
private long
private static final String
private static final String
public static final String
public static final String
private static final String
private boolean
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
public
OOBibStyle(Path styleFile, LayoutFormatterPreferences layoutPreferences, JournalAbbreviationRepository abbreviationRepository)

public
OOBibStyle(String resourcePath, LayoutFormatterPreferences layoutPreferences, JournalAbbreviationRepository abbreviationRepository)

Method Summary

Modifier and TypeMethod and Description
protected void
addJournal(String journalName)

public int
compareTo(OOBibStyle
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public OOText

Returns:

The formatted citation. The result does not include the standard wrappers: OOFormat.setLocaleNone() and OOFormat.setCharStyle(). These are added by decorateCitationMarker()
createCitationMarker
(List<CitationMarkerEntry>
The list of entries providing the data.
citationMarkerEntries
,
boolean
Signals whether a parenthesized citation or an in-text citation is wanted.
inParenthesis
,
NonUniqueCitationMarker
THROWS : Should throw if finds that uniqueLetters provided do not make the entries unique. FORGIVEN : is needed to allow preliminary markers for freshly inserted citations without going throw the uniquefication process.
nonUniqueCitationMarkerHandling
)

Format the marker for the in-text citation according to this BIB style.

public OOText
decorateCitationMarker(OOText citationText)

Add setLocaleNone and optionally setCharStyle(CitationCharacterFormat) around citationText.

public void
ensureUpToDate()

If this style was initialized from a file on disk, reload the style if the file has been modified since it was read.

public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

protected OrFields

Returns:

Names of fields containing authors: the first non-empty field will be used.
getAuthorFieldNames
()

protected String
protected String
public String
public String
public String
public String
getAuthorNamesListMarkupBefore()

Author list, excluding " et al."

protected String
getAuthorSeparator()

The String to add between author names except the last two: "[Smith{, }Jones and Brown]"

public String
public String
getAuthorsPartMarkupBefore()

Author list, including " et al."

protected Map<EntryType, Layout>
public boolean

Returns:

the value
getBooleanCitProperty
(String
The property key
key
)

Get boolean property.

protected String
getBracketAfter()

Closing parenthesis after citation

private String
getBracketAfterInList()

Closing parenthesis after citation marker in the bibliography

pack-priv String
protected String
getBracketBefore()

Opening parenthesis before citation (or year, for in-text)

private String
getBracketBeforeInList()

Opening parenthesis before citation marker in the bibliography.

public String
public String
public String
public String
getCitationGroupMarkupBefore()

Should citation markers be italicized?

protected String
protected Map<String, Object>
public Layout
public String
getEtAlString()

The String to represent authors that are not mentioned, e.g. " et al."

protected LayoutFormatter
public Path
public OOText
public String
getGroupedNumbersSeparator()

Used in number ranges like "10-13" in numbered citations.

public int
protected boolean
public boolean
public Set<String>
protected LayoutFormatterPreferences
public String
protected int
getMaxAuthors()

The maximum number of authors to write out in full without using "et al." Set to -1 to always write out all authors.

public int
public int
getMinimumGroupingCount()

Minimal number of consecutive citation numbers needed to start replacing with an range like "10-13".

public boolean
public String
public OOText
public OOText

Returns:

The text for the citation.
getNumCitationMarker2
(List<CitationMarkerNumericEntry> entries)

Format a number-based citation marker for the given entries.

public OOText
getNumCitationMarker2(List<CitationMarkerNumericEntry> entries, int minGroupingCount)

For some tests we need to override minGroupingCount.

public OOText
getNumCitationMarkerForBibliography(CitationMarkerNumericBibEntry entry)

Format a number-based bibliography label for the given number.

protected String
getOxfordComma()

The String to put after the second to last author in case of three or more authors: (A, B{,} and C)

protected String
public String
protected Map<String, Object>
public Object

Returns:

The property value, or null if it doesn't exist.
getProperty
(String
The property name.
propName
)

Get a style property.

public Layout
public String
getReferenceHeaderParagraphFormat()

Name of paragraph format (within OO/LO) to be used for the title of the bibliography.

public OOText
getReferenceHeaderText()

Title for the bibliography.

public String
getReferenceParagraphFormat()

Name of paragraph format (within OO/LO) to be used for the entries in the bibliography.

public String
private String
protected String
protected OrFields

Returns:

Field containing year, with fallback fields.
getYearFieldNames
()

protected String
protected String
private void
handleJournalsLine(String line)

Parse a line providing a journal name for which this style is valid.

private void
handlePropertiesLine(String
The line containing the formatter names.
line
,
Map<String, Object> map)

Parse a line providing a property name and value.

private void
handleStructureLine(String
The string containing the structure description.
line
)

Parse a line providing bibliography structure information for an entry type.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private void
public boolean

Returns:

true to indicate that citations should be in bold.
isBoldCitations
()

Convenience method for checking whether citation markers should be bold.

public boolean
public boolean

Returns:

true to indicate that citations should be in italics.
isFormatCitations
()

Convenience method for checking whether citation markers formatted according to the results of the isItalicCitations() and isBoldCitations() methods.

public boolean

Returns:

True if an internal style
isInternalStyle
()

Indicate if it is an internal style

public boolean

Returns:

true to indicate that citations should be in italics.
isItalicCitations
()

Convenience method for checking whether citation markers should be italicized.

public boolean

Returns:

true if we use numbered citations, false otherwise.
isNumberEntries
()

Convenience method for checking the property for whether we use number citations or author-year citations.

public boolean

Returns:

true to sort by appearance, false to sort alphabetically.
isSortByPosition
()

Convenience method for checking the property for whether we sort the bibliography according to their order of appearance in the text.

private boolean

Returns:

true if the file has not been modified, false otherwise.
isUpToDate
()

If this style was initialized from a file on disk, check whether the file is unmodified since initialization.

public boolean

Returns:

true if the file could be parsed as a style file, false otherwise.
isValid
()

After initializing this style from a file, this method can be used to check whether the file appeared to be a proper style file.

private void
private void
reload()

If this style was initialized from a file on disk, reload the style information.

protected void
private void
protected void
setIsDefaultLayoutPresent(boolean isPresent)

protected void
setLocalCopy(String contentsOfJstyleFile)

protected void
setName(String nameOfTheStyle)

protected void
setValid(boolean isValid)

public boolean
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

abbreviationRepositoryback to summary
private final JournalAbbreviationRepository abbreviationRepository
AUTHOR_FIELDback to summary
private static final String AUTHOR_FIELD
AUTHOR_LAST_SEPARATORback to summary
private static final String AUTHOR_LAST_SEPARATOR
AUTHOR_LAST_SEPARATOR_IN_TEXTback to summary
private static final String AUTHOR_LAST_SEPARATOR_IN_TEXT
AUTHOR_NAME_MARKUP_AFTERback to summary
private static final String AUTHOR_NAME_MARKUP_AFTER
AUTHOR_NAME_MARKUP_BEFOREback to summary
private static final String AUTHOR_NAME_MARKUP_BEFORE
AUTHOR_NAMES_LIST_MARKUP_AFTERback to summary
private static final String AUTHOR_NAMES_LIST_MARKUP_AFTER
AUTHOR_NAMES_LIST_MARKUP_BEFOREback to summary
private static final String AUTHOR_NAMES_LIST_MARKUP_BEFORE
AUTHOR_SEPARATORback to summary
private static final String AUTHOR_SEPARATOR
AUTHORS_PART_MARKUP_AFTERback to summary
private static final String AUTHORS_PART_MARKUP_AFTER
AUTHORS_PART_MARKUP_BEFOREback to summary
private static final String AUTHORS_PART_MARKUP_BEFORE
bibLayoutback to summary
private final Map<EntryType, Layout> bibLayout
BOLD_CITATIONSback to summary
private static final String BOLD_CITATIONS
BRACKET_AFTERback to summary
private static final String BRACKET_AFTER
BRACKET_AFTER_IN_LISTback to summary
private static final String BRACKET_AFTER_IN_LIST
BRACKET_BEFOREback to summary
private static final String BRACKET_BEFORE
BRACKET_BEFORE_IN_LISTback to summary
private static final String BRACKET_BEFORE_IN_LIST
CITATION_CHARACTER_FORMATback to summary
private static final String CITATION_CHARACTER_FORMAT
CITATION_GROUP_MARKUP_AFTERback to summary
private static final String CITATION_GROUP_MARKUP_AFTER
CITATION_GROUP_MARKUP_BEFOREback to summary
private static final String CITATION_GROUP_MARKUP_BEFORE
CITATION_KEY_CITATIONSback to summary
private static final String CITATION_KEY_CITATIONS
CITATION_MARKback to summary
private static final String CITATION_MARK
CITATION_SEPARATORback to summary
private static final String CITATION_SEPARATOR
citPropertiesback to summary
private final Map<String, Object> citProperties
DEFAULT_MARKback to summary
private static final String DEFAULT_MARK
defaultBibLayoutback to summary
private Layout defaultBibLayout
ET_AL_STRINGback to summary
public static final String ET_AL_STRING
fieldFormatterback to summary
private final LayoutFormatter fieldFormatter
FORMAT_CITATIONSback to summary
private static final String FORMAT_CITATIONS
fromResourceback to summary
private final boolean fromResource
GROUPED_NUMBERS_SEPARATORback to summary
private static final String GROUPED_NUMBERS_SEPARATOR
IN_TEXT_YEAR_SEPARATORback to summary
private static final String IN_TEXT_YEAR_SEPARATOR
IS_NUMBER_ENTRIESback to summary
private static final String IS_NUMBER_ENTRIES
IS_SORT_BY_POSITIONback to summary
private static final String IS_SORT_BY_POSITION
isDefaultLayoutPresentback to summary
private boolean isDefaultLayoutPresent
ITALIC_CITATIONSback to summary
private static final String ITALIC_CITATIONS
ITALIC_ET_ALback to summary
public static final String ITALIC_ET_AL
journalsback to summary
private final SortedSet<String> journals
JOURNALS_MARKback to summary
private static final String JOURNALS_MARK
LAYOUT_MRKback to summary
private static final String LAYOUT_MRK
layoutPreferencesback to summary
private final LayoutFormatterPreferences layoutPreferences
localCopyback to summary
private String localCopy
LOGGERback to summary
private static final Logger LOGGER
MAX_AUTHORSback to summary
private static final String MAX_AUTHORS
MAX_AUTHORS_FIRSTback to summary
public static final String MAX_AUTHORS_FIRST
MINIMUM_GROUPING_COUNTback to summary
public static final String MINIMUM_GROUPING_COUNT
MULTI_CITE_CHRONOLOGICALback to summary
public static final String MULTI_CITE_CHRONOLOGICAL
nameback to summary
private String name
NAME_MARKback to summary
private static final String NAME_MARK
NUM_PATTERNback to summary
private static final Pattern NUM_PATTERN
OXFORD_COMMAback to summary
private static final String OXFORD_COMMA
PAGE_INFO_SEPARATORback to summary
private static final String PAGE_INFO_SEPARATOR
pathback to summary
private final String path
propertiesback to summary
private final Map<String, Object> properties
PROPERTIES_MARKback to summary
private static final String PROPERTIES_MARK
QUOTEDback to summary
private static final Pattern QUOTED
REFERENCE_HEADER_PARAGRAPH_FORMATback to summary
public static final String REFERENCE_HEADER_PARAGRAPH_FORMAT
REFERENCE_PARAGRAPH_FORMATback to summary
public static final String REFERENCE_PARAGRAPH_FORMAT
SORT_ALGORITHMback to summary
private static final String SORT_ALGORITHM
SPACE_BEFOREback to summary
private static final String SPACE_BEFORE
styleFileback to summary
private Path styleFile
styleFileModificationTimeback to summary
private long styleFileModificationTime
SUBSCRIPT_CITATIONSback to summary
private static final String SUBSCRIPT_CITATIONS
SUPERSCRIPT_CITATIONSback to summary
private static final String SUPERSCRIPT_CITATIONS
TITLEback to summary
public static final String TITLE
UNDEFINED_CITATION_MARKERback to summary
public static final String UNDEFINED_CITATION_MARKER
UNIQUEFIER_SEPARATORback to summary
private static final String UNIQUEFIER_SEPARATOR
validback to summary
private boolean valid
YEAR_FIELDback to summary
private static final String YEAR_FIELD
YEAR_SEPARATORback to summary
private static final String YEAR_SEPARATOR

Constructor Detail

OOBibStyleback to summary
public OOBibStyle(Path styleFile, LayoutFormatterPreferences layoutPreferences, JournalAbbreviationRepository abbreviationRepository) throws IOException
OOBibStyleback to summary
public OOBibStyle(String resourcePath, LayoutFormatterPreferences layoutPreferences, JournalAbbreviationRepository abbreviationRepository) throws IOException

Method Detail

addJournalback to summary
protected void addJournal(String journalName)
compareToback to summary
public int compareTo(OOBibStyle other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:OOBibStyle

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
createCitationMarkerback to summary
public OOText createCitationMarker(List<CitationMarkerEntry> citationMarkerEntries, boolean inParenthesis, NonUniqueCitationMarker nonUniqueCitationMarkerHandling)

Format the marker for the in-text citation according to this BIB style. Uniquefier letters are added as provided by the citationMarkerEntries argument. If successive entries within the citation are uniquefied from each other, this method will perform a grouping of these entries. If successive entries within the citation are uniquefied from each other, this method will perform a grouping of these entries.

Parameters
citationMarkerEntries:List<CitationMarkerEntry>

The list of entries providing the data.

inParenthesis:boolean

Signals whether a parenthesized citation or an in-text citation is wanted.

nonUniqueCitationMarkerHandling:NonUniqueCitationMarker

THROWS : Should throw if finds that uniqueLetters provided do not make the entries unique. FORGIVEN : is needed to allow preliminary markers for freshly inserted citations without going throw the uniquefication process.

Returns:OOText

The formatted citation. The result does not include the standard wrappers: OOFormat.setLocaleNone() and OOFormat.setCharStyle(). These are added by decorateCitationMarker()

decorateCitationMarkerback to summary
public OOText decorateCitationMarker(OOText citationText)

Add setLocaleNone and optionally setCharStyle(CitationCharacterFormat) around citationText. Called in fillCitationMarkInCursor, so these are also applied to "Unresolved()" entries and numeric styles.

ensureUpToDateback to summary
public void ensureUpToDate() throws IOException

If this style was initialized from a file on disk, reload the style if the file has been modified since it was read.

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
object:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getAuthorFieldNamesback to summary
protected OrFields getAuthorFieldNames()
Returns:OrFields

Names of fields containing authors: the first non-empty field will be used.

getAuthorLastSeparatorback to summary
protected String getAuthorLastSeparator()
getAuthorLastSeparatorInTextWithFallBackback to summary
protected String getAuthorLastSeparatorInTextWithFallBack()
getAuthorNameMarkupAfterback to summary
public String getAuthorNameMarkupAfter()
getAuthorNameMarkupBeforeback to summary
public String getAuthorNameMarkupBefore()

Author names. Excludes Author separators

getAuthorNamesListMarkupAfterback to summary
public String getAuthorNamesListMarkupAfter()
getAuthorNamesListMarkupBeforeback to summary
public String getAuthorNamesListMarkupBefore()

Author list, excluding " et al."

getAuthorSeparatorback to summary
protected String getAuthorSeparator()

The String to add between author names except the last two: "[Smith{, }Jones and Brown]"

getAuthorsPartMarkupAfterback to summary
public String getAuthorsPartMarkupAfter()
getAuthorsPartMarkupBeforeback to summary
public String getAuthorsPartMarkupBefore()

Author list, including " et al."

getBibLayoutback to summary
protected Map<EntryType, Layout> getBibLayout()
getBooleanCitPropertyback to summary
public boolean getBooleanCitProperty(String key)

Get boolean property.

Parameters
key:String

The property key

Returns:boolean

the value

getBracketAfterback to summary
protected String getBracketAfter()

Closing parenthesis after citation

getBracketAfterInListback to summary
private String getBracketAfterInList()

Closing parenthesis after citation marker in the bibliography

getBracketAfterInListWithFallBackback to summary
pack-priv String getBracketAfterInListWithFallBack()
getBracketBeforeback to summary
protected String getBracketBefore()

Opening parenthesis before citation (or year, for in-text)

getBracketBeforeInListback to summary
private String getBracketBeforeInList()

Opening parenthesis before citation marker in the bibliography.

getBracketBeforeInListWithFallBackback to summary
public String getBracketBeforeInListWithFallBack()
getCitationCharacterFormatback to summary
public String getCitationCharacterFormat()
getCitationGroupMarkupAfterback to summary
public String getCitationGroupMarkupAfter()
getCitationGroupMarkupBeforeback to summary
public String getCitationGroupMarkupBefore()

Should citation markers be italicized?

getCitationSeparatorback to summary
protected String getCitationSeparator()
getCitPropertiesback to summary
protected Map<String, Object> getCitProperties()
getDefaultBibLayoutback to summary
public Layout getDefaultBibLayout()
getEtAlStringback to summary
public String getEtAlString()

The String to represent authors that are not mentioned, e.g. " et al."

getFieldFormatterback to summary
protected LayoutFormatter getFieldFormatter()
getFileback to summary
public Path getFile()
getFormattedBibliographyTitleback to summary
public OOText getFormattedBibliographyTitle()
getGroupedNumbersSeparatorback to summary
public String getGroupedNumbersSeparator()

Used in number ranges like "10-13" in numbered citations.

getIntCitPropertyback to summary
public int getIntCitProperty(String key)
getIsDefaultLayoutPresentback to summary
protected boolean getIsDefaultLayoutPresent()
getItalicEtAlback to summary
public boolean getItalicEtAl()
getJournalsback to summary
public Set<String> getJournals()
getLayoutPreferencesback to summary
protected LayoutFormatterPreferences getLayoutPreferences()
getLocalCopyback to summary
public String getLocalCopy()
getMaxAuthorsback to summary
protected int getMaxAuthors()

The maximum number of authors to write out in full without using "et al." Set to -1 to always write out all authors.

getMaxAuthorsFirstback to summary
public int getMaxAuthorsFirst()
getMinimumGroupingCountback to summary
public int getMinimumGroupingCount()

Minimal number of consecutive citation numbers needed to start replacing with an range like "10-13".

getMultiCiteChronologicalback to summary
public boolean getMultiCiteChronological()
getNameback to summary
public String getName()
getNormalizedCitationMarkerback to summary
public OOText getNormalizedCitationMarker(CitationMarkerNormEntry entry)
getNumCitationMarker2back to summary
public OOText getNumCitationMarker2(List<CitationMarkerNumericEntry> entries)

Format a number-based citation marker for the given entries.

Returns:OOText

The text for the citation.

getNumCitationMarker2back to summary
public OOText getNumCitationMarker2(List<CitationMarkerNumericEntry> entries, int minGroupingCount)

For some tests we need to override minGroupingCount.

getNumCitationMarkerForBibliographyback to summary
public OOText getNumCitationMarkerForBibliography(CitationMarkerNumericBibEntry entry)

Format a number-based bibliography label for the given number.

getOxfordCommaback to summary
protected String getOxfordComma()

The String to put after the second to last author in case of three or more authors: (A, B{,} and C)

getPageInfoSeparatorback to summary
protected String getPageInfoSeparator()
getPathback to summary
public String getPath()
getPropertiesback to summary
protected Map<String, Object> getProperties()
getPropertyback to summary
public Object getProperty(String propName)

Get a style property.

Parameters
propName:String

The property name.

Returns:Object

The property value, or null if it doesn't exist.

getReferenceFormatback to summary
public Layout getReferenceFormat(EntryType type)
getReferenceHeaderParagraphFormatback to summary
public String getReferenceHeaderParagraphFormat()

Name of paragraph format (within OO/LO) to be used for the title of the bibliography.

getReferenceHeaderTextback to summary
public OOText getReferenceHeaderText()

Title for the bibliography.

getReferenceParagraphFormatback to summary
public String getReferenceParagraphFormat()

Name of paragraph format (within OO/LO) to be used for the entries in the bibliography.

getStringCitPropertyback to summary
public String getStringCitProperty(String key)
getStringPropertyback to summary
private String getStringProperty(String propName)
getUniquefierSeparatorback to summary
protected String getUniquefierSeparator()
getYearFieldNamesback to summary
protected OrFields getYearFieldNames()
Returns:OrFields

Field containing year, with fallback fields.

getYearSeparatorback to summary
protected String getYearSeparator()
getYearSeparatorInTextback to summary
protected String getYearSeparatorInText()
handleJournalsLineback to summary
private void handleJournalsLine(String line)

Parse a line providing a journal name for which this style is valid.

handlePropertiesLineback to summary
private void handlePropertiesLine(String line, Map<String, Object> map)

Parse a line providing a property name and value.

Parameters
line:String

The line containing the formatter names.

handleStructureLineback to summary
private void handleStructureLine(String line)

Parse a line providing bibliography structure information for an entry type.

Parameters
line:String

The string containing the structure description.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
initializeback to summary
private void initialize(InputStream stream) throws IOException
isBoldCitationsback to summary
public boolean isBoldCitations()

Convenience method for checking whether citation markers should be bold. Will only be relevant if isFormatCitations() returns true.

Returns:boolean

true to indicate that citations should be in bold.

isCitationKeyCiteMarkersback to summary
public boolean isCitationKeyCiteMarkers()
isFormatCitationsback to summary
public boolean isFormatCitations()

Convenience method for checking whether citation markers formatted according to the results of the isItalicCitations() and isBoldCitations() methods.

Returns:boolean

true to indicate that citations should be in italics.

isInternalStyleback to summary
public boolean isInternalStyle()

Indicate if it is an internal style

Returns:boolean

True if an internal style

isItalicCitationsback to summary
public boolean isItalicCitations()

Convenience method for checking whether citation markers should be italicized. Will only be relevant if isFormatCitations() returns true.

Returns:boolean

true to indicate that citations should be in italics.

isNumberEntriesback to summary
public boolean isNumberEntries()

Convenience method for checking the property for whether we use number citations or author-year citations.

Returns:boolean

true if we use numbered citations, false otherwise.

isSortByPositionback to summary
public boolean isSortByPosition()

Convenience method for checking the property for whether we sort the bibliography according to their order of appearance in the text.

Returns:boolean

true to sort by appearance, false to sort alphabetically.

isUpToDateback to summary
private boolean isUpToDate()

If this style was initialized from a file on disk, check whether the file is unmodified since initialization.

Returns:boolean

true if the file has not been modified, false otherwise.

isValidback to summary
public boolean isValid()

After initializing this style from a file, this method can be used to check whether the file appeared to be a proper style file.

Returns:boolean

true if the file could be parsed as a style file, false otherwise.

readFormatFileback to summary
private void readFormatFile(Reader input) throws IOException
reloadback to summary
private void reload() throws IOException

If this style was initialized from a file on disk, reload the style information.

setDefaultBibLayoutback to summary
protected void setDefaultBibLayout(Layout layout)
setDefaultPropertiesback to summary
private void setDefaultProperties()
setIsDefaultLayoutPresentback to summary
protected void setIsDefaultLayoutPresent(boolean isPresent)
setLocalCopyback to summary
protected void setLocalCopy(String contentsOfJstyleFile)
setNameback to summary
protected void setName(String nameOfTheStyle)
setValidback to summary
protected void setValid(boolean isValid)
spaceBeforeCitationback to summary
public boolean spaceBeforeCitation()
org.jabref.logic.openoffice.style back to summary

pack-priv final Enum OOBibStyle.BibStyleMode

extends Enum<OOBibStyle.BibStyleMode>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final OOBibStyle.BibStyleMode
public static final OOBibStyle.BibStyleMode
public static final OOBibStyle.BibStyleMode
public static final OOBibStyle.BibStyleMode
public static final OOBibStyle.BibStyleMode
public static final OOBibStyle.BibStyleMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static OOBibStyle.BibStyleMode
public static OOBibStyle.BibStyleMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CITATIONback to summary
public static final OOBibStyle.BibStyleMode CITATION
JOURNALSback to summary
public static final OOBibStyle.BibStyleMode JOURNALS
LAYOUTback to summary
public static final OOBibStyle.BibStyleMode LAYOUT
NAMEback to summary
public static final OOBibStyle.BibStyleMode NAME
NONEback to summary
public static final OOBibStyle.BibStyleMode NONE
PROPERTIESback to summary
public static final OOBibStyle.BibStyleMode PROPERTIES

Constructor Detail

BibStyleModeback to summary
private BibStyleMode()

Method Detail

valueOfback to summary
public static OOBibStyle.BibStyleMode valueOf(String name)
valuesback to summary
public static OOBibStyle.BibStyleMode[] values()