Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

String net::sf::jabref::oo::OOBibStyle::getAuthorYearParenthesisMarker ( BibtexEntry[]  entries,
BibtexDatabase  database,
String  authorField,
String  yearField,
int  maxA,
String  authorSep,
String  andString,
String  etAlString,
String  yearSep,
String  startBrace,
String  endBrace,
String  citationSeparator,
String[]  uniquifiers,
int[]  unlimAuthors 
) [inline]

This method produces (Author, year) style citation strings in many different forms.

entries The array of BibtexEntry to get fields from.
authorField The bibtex field providing author names, e.g. "author" or "editor".
yearField The bibtex field providing the year, e.g. "year".
maxA The maximum number of authors to write out in full without using etal. Set to -1 to always write out all authors.
authorSep The String to add between author names except the last two, e.g. ", ".
andString The String to add between the two last author names, e.g. " & ".
etAlString The String to represent authors that are not mentioned, e.g. " et al."
yearSep The String to separate authors from year, e.g. "; ".
startBrace The opening parenthesis.
endBrace The closing parenthesis.
citationSeparator The String to separate citations from each other.
uniquifiers Optional parameter to separate similar citations. Elements can be null if not needed.
The formatted citation.

Definition at line 595 of file OOBibStyle.java.

References getAuthorLastName(), and getCitationMarkerField().

Referenced by getCitationMarker().


        StringBuffer sb = new StringBuffer(startBrace);
        for (int j=0; j<entries.length; j++) {

            int unlimA = (unlimAuthors != null ? unlimAuthors[j] : -1);
            int maxAuthors = unlimA > 0 ? unlimA : maxA;

            BibtexEntry entry = entries[j];

            // Check if this entry has been nulled due to grouping with the previous entry(ies):
            if (entry == null)

            if (j > 0)

            String author = getCitationMarkerField(entry, database, authorField);

            if (author != null) {
                AuthorList al = AuthorList.getAuthorList(author);
                sb.append(getAuthorLastName(al, 0));

                if ((al.size() > 1) && ((al.size() <= maxAuthors) || (maxAuthors < 0))) {
                    int i=1;
                    while (i < al.size()-1) {
                        sb.append(getAuthorLastName(al, i));
                    sb.append(getAuthorLastName(al, al.size()-1));
                } else if (al.size() > maxAuthors) {
            String year = getCitationMarkerField(entry, database, yearField);
            if (year != null)
            if ((uniquifiers != null) && (uniquifiers[j] != null))
        return sb.toString();


Generated by  Doxygen 1.6.0   Back to index