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

int [] net::sf::jabref::oo::OOBibBase::findCitedEntryIndex ( String  citRefName,
List< String >  keys 
) [inline]

Resolve the bibtex key from a citation reference marker name, and look up the index of the key in a list of keys.

Parameters:
citRefName The name of the ReferenceMark representing the citation.
keys A List of bibtex keys representing the entries in the bibliography.
Returns:
the indices of the cited keys, -1 if a key is not found. Returns null if the ref name could not be resolved as a citation.

Definition at line 771 of file OOBibBase.java.

                                                                           {
        Matcher m = citePattern.matcher(citRefName);
        if (m.find()) {
            String[] keyStrings = m.group(2).split(",");
            int[] res = new int[keyStrings.length];
            for (int i=0; i<keyStrings.length; i++) {
                int ind = keys.indexOf(keyStrings[i]);
                res[i] = ind != -1 ? 1+ind : -1;
            }
            return res;
        }
        else
            return null;
    }


Generated by  Doxygen 1.6.0   Back to index