[year]_[author]_[firstpage], using information from a provided BibEntry. The above-mentioned expression would yield
2017_Kitsune_123 when expanded using the BibTeX entry @Article{ authors = {O. Kitsune}, year = {2017},
pages={123-6}}.
The embedding in JabRef is explained at Customize the citation key generator.
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | CHARS_OF_FIRST
The maximum number of characters in the first author's last name. |
| private static final Pattern | DEPARTMENTS
Matches with "dep"/"dip", case-insensitive |
| private static final Pattern | INLINE_ABBREVIATION
Matches uppercase english letters between "({" and "})", which should be used to abbreviate the name of an institution |
| private static final Logger | |
| private static final int | MAX_ALPHA_AUTHORS
The maximum number of name abbreviations that can be used. |
| private static final Pattern | NOT_CAPITAL_CHARACTER
Matches everything that is not an uppercase ASCII letter. |
| private static final Pattern | NOT_DECIMAL_DIGIT
Matches everything that is not a unicode decimal digit. |
| private final String | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static String | Returns: the surname of all authors/editorsan authorList)AuthorListGets the last name of all authors/editors. |
| private static void | appendQuote(StringBuilder
the stringBuilder, StringTokenizer StringBuilder to which tokens will be appendedthe tokenizer producing the tokens tokenizer)Appends the content between, and including, two \" to the provided |
| pack-priv static String | Returns: The modified label.The generated label. label, final List<String> String array containing the modifiers. parts, final int The number of initial items in the modifiers array to skip. offset, Function<String, String> a function to expand the content in the parentheses. expandBracketContent)Applies modifiers to a label generated based on a field marker. |
| pack-priv static String | |
| pack-priv static String | |
| pack-priv static String | authIniN(AuthorList
The authors to format. authorList, int The maximum number of characters this string will be long. A negative number or zero will lead
to "" be returned. n)authIniN format |
| private static String | |
| private static String | authNofMth(AuthorList authorList, int n, int m)
The first N characters of the Mth author's or editor's last name. |
| pack-priv static String | Returns: the initials of all authors' namesan authorList)AuthorListReturns the authors according to the BibTeX-alpha-Style |
| pack-priv static String | |
| public static String | camelizeSignificantWordsInTitle(String title)
Capitalises the significant words of the "title" field in the given BibTeX entry |
| private static String | |
| private static String | |
| private static String | Returns: the content enclosed by bracketsthe tokenizer producing the tokens tokenizer, final String pattern used by pattern)expandBrackets, used for loggingReturns the content enclosed between brackets, including enclosed quotes, and excluding the paired enclosing brackets. |
| private static AuthorList | Returns: anAuthorList consisting of authors and institution keys with resolved latex.a string representation of authors or editors unparsedAuthors)Parses the provided string to an |
| public String | |
| public String | Returns: The expanded pattern. The empty string is returned, if it could not be expanded.The bibentry to expand. bibentry, BibDatabase The database to use for string-lookups and cross-refs. May be null. database)Expands the current pattern using the given bibentry and database. |
| public String | Returns: The expanded pattern. The empty string is returned, if it could not be expanded.The bibentry to expand. bibentry, Character The keyword delimiter to use. keywordDelimiter, BibDatabase The database to use for string-lookups and cross-refs. May be null. database)Expands the current pattern using the given bibentry, keyword delimiter, and database. |
| public static Function | Returns: a function accepting a bracketed expression and returning the result of expanding itThe keyword delimiter to use keywordDelimiter, BibEntry The entry, BibDatabase BibEntry to use for expansionThe database)BibDatabase for field resolving. May be null.Utility method creating a function taking the string representation of the content of a bracketed expression and expanding it. |
| public static String | Returns: The expanded pattern. Not null.The pattern to expand pattern, Character The keyword delimiter to use keywordDelimiter, BibEntry The bibentry to use for expansion entry, BibDatabase The database for field resolving. May be null. database)Expands a pattern |
| public static String | Returns: The expanded pattern. Not null.The pattern to expand pattern, Function<String, String> A function taking the string representation of the content of a bracketed pattern
and expanding it bracketContentHandler)Expands a pattern. |
| private static String | Returns: the surname of an author/editor or the von part if no lastname is prsent or "" if no author was found or both firstname+lastname are empty This method is guaranteed to never return null.an authorList)AuthorListGets the last name of the first author/editor |
| private static String | Returns: the first name initial of an author/editor or "" if no author was found This method is guaranteed to never return null.an authorList)AuthorListGets the first name initials of the first author/editor |
| private static String | Returns: the von part and surname of an author/editor or "" if no author was found. This method is guaranteed to never return null.an authorList)AuthorListGets the von part and the last name of the first author/editor. |
| public static String | |
| private static String | |
| private static String | Returns:
the institution to generate a Bibtex key for content)An author or editor may be and institution not a person. |
| public static String | getCamelizedTitle(String title)
Capitalises and concatenates the words out of the "title" field in the given BibTeX entry |
| public static String | getCamelizedTitle_N(String title, int number)
Capitalises and concatenates the words out of the "title" field in the given BibTeX entry, to a maximum of N words. |
| public static String | Returns: String containing the evaluation result. Empty string if the pattern cannot be resolved.The entry to get the field value from entry, String A pattern string (such as auth, pureauth, authorLast) pattern, Character The de keywordDelimiter, BibDatabase The database to use for field resolving. May be null. database)Evaluates the given pattern to the given bibentry and database |
| private static String | |
| public static String | getTitleWords(int number, String title)
Determines "number" words out of the "title" field in the given BibTeX entry |
| private static String | |
| private static List | |
| private static boolean | Returns: true if only the last name is present and it contains at least one whitespace character.the checked author author)Checks if an author is an institution which can get a citation key from |
| private static String | Returns: a string consisting of authors' last names separated by a `delimiter` and with any authors excess of `maxAuthors` replaced with `suffix`the list of authors authorList, int the maximum number of authors in the string maxAuthors, String delimiter separating the last names of the authors delimiter, final String to replace excess authors with. Also used to replace suffix)and others.Creates a string with all last names separated by a `delimiter`. |
| private static String | |
| private static String | Returns: the surname of an author/editoran authorList)AuthorListGets the last name of the last author/editor |
| private static String | Returns: the forename initial of an author/editor or "" if no author was found This method is guaranteed to never return null.an authorList)AuthorListGets the forename initials of the last author/editor |
| public static String | |
| private static String | Returns: Gets the surnames of the first N authors and appends EtAl if there are more than N authorsan authorList, int AuthorListthe number of desired authors n)Gets the surnames of the first N authors and appends EtAl if there are more than N authors |
| private static boolean | noOtherInstitutionKeyWord(String
to check word)Helper method for |
| pack-priv static String | Returns: the surname of all authors/editorsan < authorList)AuthorListGets the first part of the last name of the first author/editor, and appends the last name initial of the remaining authors/editors. |
| public static String | Returns: the non-digit prefix of pages (like "L" of L7) or "" if no non-digit prefix is found in the stringa pages string such as L42--111 or L7,41,73--97 or L43+ pages)Return the non-digit prefix of pages |
| protected static List | Returns: An array of strings representing the parts of the markerThe argument string. arg)Parse a field marker with modifiers, possibly containing a parenthesised modifier, as well as escaped colons and parentheses. |
| public static String | |
| public String |
| CHARS_OF_FIRST | back to summary |
|---|---|
| private static final int CHARS_OF_FIRST The maximum number of characters in the first author's last name. | |
| DEPARTMENTS | back to summary |
|---|---|
| private static final Pattern DEPARTMENTS Matches with "dep"/"dip", case-insensitive | |
| INLINE_ABBREVIATION | back to summary |
|---|---|
| private static final Pattern INLINE_ABBREVIATION Matches uppercase english letters between "({" and "})", which should be used to abbreviate the name of an institution | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| MAX_ALPHA_AUTHORS | back to summary |
|---|---|
| private static final int MAX_ALPHA_AUTHORS The maximum number of name abbreviations that can be used. If there are more authors, | |
| NOT_CAPITAL_CHARACTER | back to summary |
|---|---|
| private static final Pattern NOT_CAPITAL_CHARACTER Matches everything that is not an uppercase ASCII letter. The intended use is to remove all lowercase letters | |
| NOT_DECIMAL_DIGIT | back to summary |
|---|---|
| private static final Pattern NOT_DECIMAL_DIGIT Matches everything that is not a unicode decimal digit. | |
| pattern | back to summary |
|---|---|
| private final String pattern | |
| WHITESPACE | back to summary |
|---|---|
| private static final Pattern WHITESPACE | |
| BracketedPattern | back to summary |
|---|---|
| public BracketedPattern() | |
| BracketedPattern | back to summary |
|---|---|
| public BracketedPattern(String pattern) | |
| allAuthors | back to summary |
|---|---|
| pack-priv static String allAuthors(AuthorList authorList) Gets the last name of all authors/editors.
Pattern
| |
| appendQuote | back to summary |
|---|---|
| private static void appendQuote(StringBuilder stringBuilder, StringTokenizer tokenizer) Appends the content between, and including, two \" to the provided
| |
| applyModifiers | back to summary |
|---|---|
| pack-priv static String applyModifiers(final String label, final List<String> parts, final int offset, Function<String, String> expandBracketContent) Applies modifiers to a label generated based on a field marker.
| |
| authAuthEa | back to summary |
|---|---|
| pack-priv static String authAuthEa(AuthorList authorList) | |
| authEtal | back to summary |
|---|---|
| pack-priv static String authEtal(AuthorList authorList, String delim, String append) auth.etal, authEtAl, ... format | |
| authIniN | back to summary |
|---|---|
| pack-priv static String authIniN(AuthorList authorList, int n) authIniN format
| |
| authN | back to summary |
|---|---|
| private static String authN(AuthorList authorList, int num) First N chars of the first author's last name. | |
| authNofMth | back to summary |
|---|---|
| private static String authNofMth(AuthorList authorList, int n, int m) The first N characters of the Mth author's or editor's last name. M starts counting from 1.
In case the Mth author is | |
| authorsAlpha | back to summary |
|---|---|
| pack-priv static String authorsAlpha(AuthorList authorList) Returns the authors according to the BibTeX-alpha-Style
| |
| authShort | back to summary |
|---|---|
| pack-priv static String authShort(AuthorList authorList) authshort format | |
| camelizeSignificantWordsInTitle | back to summary |
|---|---|
| public static String camelizeSignificantWordsInTitle(String title) Capitalises the significant words of the "title" field in the given BibTeX entry | |
| camelizeTitle | back to summary |
|---|---|
| private static String camelizeTitle(String title) | |
| camelizeTitle_N | back to summary |
|---|---|
| private static String camelizeTitle_N(String title, int number) | |
| contentBetweenBrackets | back to summary |
|---|---|
| private static String contentBetweenBrackets(StringTokenizer tokenizer, final String pattern) Returns the content enclosed between brackets, including enclosed quotes, and excluding the paired enclosing brackets.
There may be brackets in it.
Intended to be used by
| |
| createAuthorList | back to summary |
|---|---|
| private static AuthorList createAuthorList(String unparsedAuthors) Parses the provided string to an
| |
| expand | back to summary |
|---|---|
| public String expand(BibEntry bibentry) | |
| expand | back to summary |
|---|---|
| public String expand(BibEntry bibentry, BibDatabase database) Expands the current pattern using the given bibentry and database. ";" is used as keyword delimiter.
| |
| expand | back to summary |
|---|---|
| public String expand(BibEntry bibentry, Character keywordDelimiter, BibDatabase database) Expands the current pattern using the given bibentry, keyword delimiter, and database.
| |
| expandBracketContent | back to summary |
|---|---|
| public static Function Utility method creating a function taking the string representation of the content of a bracketed expression and expanding it.
| |
| expandBrackets | back to summary |
|---|---|
| public static String expandBrackets(String pattern, Character keywordDelimiter, BibEntry entry, BibDatabase database) Expands a pattern
| |
| expandBrackets | back to summary |
|---|---|
| public static String expandBrackets(String pattern, Function<String, String> bracketContentHandler) Expands a pattern. | |
| firstAuthor | back to summary |
|---|---|
| private static String firstAuthor(AuthorList authorList) Gets the last name of the first author/editor
| |
| firstAuthorForenameInitials | back to summary |
|---|---|
| private static String firstAuthorForenameInitials(AuthorList authorList) Gets the first name initials of the first author/editor
| |
| firstAuthorVonAndLast | back to summary |
|---|---|
| private static String firstAuthorVonAndLast(AuthorList authorList) Gets the von part and the last name of the first author/editor. No spaces are returned.
| |
| firstPage | back to summary |
|---|---|
| public static String firstPage(String pages) Split the pages field into separate numbers and return the lowest
| |
| formatTitle | back to summary |
|---|---|
| private static String formatTitle(String title) Removes any '-', unnecessary whitespace and latex commands formatting | |
| generateInstitutionKey | back to summary |
|---|---|
| private static String generateInstitutionKey(String content) An author or editor may be and institution not a person. In that case the key generator builds very long keys, e.g.: for “The Attributed Graph Grammar System (AGG)” -> “TheAttributedGraphGrammarSystemAGG”.
An institution name should be inside If an institution includes its abbreviation, i.e. "...({XYZ})", first such abbreviation should be used as the key value part of such author. If an institution does not include its abbreviation the key should be generated from its name in the following way: The institution value can contain: institution name, part of the institution, address, etc. These values should be comma separated. Institution name and possible part of the institution should be in the beginning, while address and secondary information should be in the end. Each part is examined separately:
Parts are concatenated together in the following way:
Rest part is only the first part which do not match any other type. All other parts (address, ...) are ignored. | |
| getCamelizedTitle | back to summary |
|---|---|
| public static String getCamelizedTitle(String title) Capitalises and concatenates the words out of the "title" field in the given BibTeX entry | |
| getCamelizedTitle_N | back to summary |
|---|---|
| public static String getCamelizedTitle_N(String title, int number) Capitalises and concatenates the words out of the "title" field in the given BibTeX entry, to a maximum of N words. | |
| getFieldValue | back to summary |
|---|---|
| public static String getFieldValue(BibEntry entry, String pattern, Character keywordDelimiter, BibDatabase database) Evaluates the given pattern to the given bibentry and database
| |
| getSomeWords | back to summary |
|---|---|
| private static String getSomeWords(int number, String string) | |
| getTitleWords | back to summary |
|---|---|
| public static String getTitleWords(int number, String title) Determines "number" words out of the "title" field in the given BibTeX entry | |
| getTitleWordsWithSpaces | back to summary |
|---|---|
| private static String getTitleWordsWithSpaces(int number, String title) | |
| getValidInstitutionNameParts | back to summary |
|---|---|
| private static List | |
| isInstitution | back to summary |
|---|---|
| private static boolean isInstitution(Author author) Checks if an author is an institution which can get a citation key from
| |
| joinAuthorsOnLastName | back to summary |
|---|---|
| private static String joinAuthorsOnLastName(AuthorList authorList, int maxAuthors, String delimiter, final String suffix) Creates a string with all last names separated by a `delimiter`. If the number of authors are larger than `maxAuthors`, replace all excess authors with `suffix`.
| |
| keepLettersAndDigitsOnly | back to summary |
|---|---|
| private static String keepLettersAndDigitsOnly(String in) | |
| lastAuthor | back to summary |
|---|---|
| private static String lastAuthor(AuthorList authorList) Gets the last name of the last author/editor
| |
| lastAuthorForenameInitials | back to summary |
|---|---|
| private static String lastAuthorForenameInitials(AuthorList authorList) Gets the forename initials of the last author/editor
| |
| lastPage | back to summary |
|---|---|
| public static String lastPage(String pages) Split the pages field into separate numbers and return the highest
| |
| nAuthors | back to summary |
|---|---|
| private static String nAuthors(AuthorList authorList, int n) Gets the surnames of the first N authors and appends EtAl if there are more than N authors
| |
| noOtherInstitutionKeyWord | back to summary |
|---|---|
| private static boolean noOtherInstitutionKeyWord(String word) Helper method for
| |
| oneAuthorPlusInitials | back to summary |
|---|---|
| pack-priv static String oneAuthorPlusInitials(AuthorList authorList) Gets the first part of the last name of the first author/editor, and appends the last name initial of the remaining authors/editors. Maximum 5 characters
| |
| pagePrefix | back to summary |
|---|---|
| public static String pagePrefix(String pages) Return the non-digit prefix of pages
| |
| parseFieldAndModifiers | back to summary |
|---|---|
| protected static List Parse a field marker with modifiers, possibly containing a parenthesised modifier, as well as escaped colons and parentheses. | |
| removeSmallWords | back to summary |
|---|---|
| public static String removeSmallWords(String title) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| public static final BracketedPattern. | |
| private static final Pattern | DEPARTMENTS_OR_LABS
Matches with "dep"/"dip"/"lab", case insensitive |
| public static final BracketedPattern. | |
| private static final Pattern | TECHNOLOGICAL_INSTITUTES
Matches with "tech", case-insensitive |
| public static final BracketedPattern. | |
| private static final Pattern | UNIVERSITIES
Matches "uni" followed by "v" or "b", at the start of a string or after a space, case insensitive |
| public static final BracketedPattern. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static EnumSet | |
| public static BracketedPattern. | |
| public static BracketedPattern. |
| DEPARTMENT | back to summary |
|---|---|
| public static final BracketedPattern. | |
| DEPARTMENTS_OR_LABS | back to summary |
|---|---|
| private static final Pattern DEPARTMENTS_OR_LABS Matches with "dep"/"dip"/"lab", case insensitive | |
| SCHOOL | back to summary |
|---|---|
| public static final BracketedPattern. | |
| TECHNOLOGICAL_INSTITUTES | back to summary |
|---|---|
| private static final Pattern TECHNOLOGICAL_INSTITUTES Matches with "tech", case-insensitive | |
| TECHNOLOGY | back to summary |
|---|---|
| public static final BracketedPattern. | |
| UNIVERSITIES | back to summary |
|---|---|
| private static final Pattern UNIVERSITIES Matches "uni" followed by "v" or "b", at the start of a string or after a space, case insensitive | |
| UNIVERSITY | back to summary |
|---|---|
| public static final BracketedPattern. | |
| Institution | back to summary |
|---|---|
| private Institution() | |
| findTypes | back to summary |
|---|---|
| public static EnumSet Find which types of institutions have words in common with the given name parts.
| |
| valueOf | back to summary |
|---|---|
| public static BracketedPattern. | |
| values | back to summary |
|---|---|
| public static BracketedPattern. | |