Examples of BibtexEntry


Examples of net.sf.jabref.BibtexEntry

    return c.iterator().next();
  }

  public String layout(String layoutFile, String entry) throws Exception {

    BibtexEntry be = bibtexString2BibtexEntry(entry);
    StringReader sr = new StringReader(layoutFile.replaceAll("__NEWLINE__", "\n"));
    Layout layout = new LayoutHelper(sr).getLayoutFromText(Globals.FORMATTER_PACKAGE);
    StringBuffer sb = new StringBuffer();
    sb.append(layout.doLayout(be, null));
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

     * Test for https://sourceforge.net/forum/message.php?msg_id=4498555
     * Test the Labelmaker and all kind of accents
     * Á á Ć ć É é Í í Ĺ ĺ Ń ń Ó ó Ŕ ŕ Ś ś Ú ú Ý ý Ź ź 
     */
    public void testMakeLabelAndCheckLegalKeys() {
      BibtexEntry entry0 = BibtexParser.singleFromString("@ARTICLE{kohn, author={Andreas Köning}, year={2000}}");
      assertEquals("Koen", net.sf.jabref.Util.checkLegalKey(LabelPatternUtil.makeLabel(entry0, "auth3")));
     
      entry0 = BibtexParser.singleFromString("@ARTICLE{kohn, author={Andreas Áöning}, year={2000}}");
      assertEquals("Aoen",net.sf.jabref.Util.checkLegalKey(LabelPatternUtil.makeLabel(entry0, "auth3")));
         
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

    /**
     * Test the Labelmaker and with accent grave
     * Chars to test: "ÀÈÌÒÙ";
     */
    public void testMakeLabelAndCheckLegalKeysAccentGrave() {
      BibtexEntry entry0 = BibtexParser.singleFromString("@ARTICLE{kohn, author={Andreas Àöning}, year={2000}}");
      assertEquals("Aoen", net.sf.jabref.Util.checkLegalKey(LabelPatternUtil.makeLabel(entry0, "auth3")));
   
      entry0 = BibtexParser.singleFromString("@ARTICLE{kohn, author={Andreas Èöning}, year={2000}}");
      assertEquals("Eoen", net.sf.jabref.Util.checkLegalKey(LabelPatternUtil.makeLabel(entry0, "auth3")));
     
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

*/
public class BasicSearchTest extends TestCase {

    public void testBasicSearchParsing() {

        BibtexEntry be = makeBibtexEntry();
        BasicSearch bsCaseSensitive = new BasicSearch(true, false);
        BasicSearch bsCaseInsensitive = new BasicSearch(false, false);
        BasicSearch bsCaseSensitiveRegexp = new BasicSearch(true, true);
        BasicSearch bsCaseInsensitiveRegexp = new BasicSearch(false, true);

View Full Code Here

Examples of net.sf.jabref.BibtexEntry

       
    }

    public BibtexEntry makeBibtexEntry() {
    BibtexEntry e = new BibtexEntry(Util.createNeutralId(), BibtexEntryType.INCOLLECTION);
    e.setField("title", "Marine finfish larviculture in Europe");
    e.setField("bibtexkey", "shields01");
    e.setField("year", "2001");
    e
      .setField(
        "author",
        "Kevin Shields");
    return e;
  }
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

  protected SAXParser saxParser;

  protected void setUp() throws Exception {
    parserFactory = SAXParserFactory.newInstance();
    saxParser = parserFactory.newSAXParser();
    be = new BibtexEntry(Util.createNeutralId(), BibtexEntryType.getType("article"));
    handler = new OAI2Handler(be);
  }
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

  }

  public void testEntryEditorForNameFieldAutoCompleter() {
    // construct an EntryEditor ...
    JabRef jabref = TestUtils.getInitializedJabRef();
    BibtexEntry bibtexEntry = new BibtexEntry();
    bibtexEntry.setField("author", "Brigitte Laurant");
    FieldEditor authorTextField = new FieldTextArea("author", "Hans Meiser");
    EntryEditor editor = new EntryEditor(jabref.jrf, jabref.jrf.basePanel(), bibtexEntry);
    // perform action ...
    editor.storeFieldAction.actionPerformed(new ActionEvent(authorTextField, 0, ""));
    // test content of stored words in autocompleter ...
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

  }

  public void testEntryEditorForFieldAnotherAutoCompleter() {
    // construct an EntryEditor ...
    JabRef jabref = TestUtils.getInitializedJabRef();
    BibtexEntry bibtexEntry = new BibtexEntry();
    bibtexEntry.setField("journal", "Testtext");
    FieldEditor authorTextField = new FieldTextArea("journal", "New Testtext");
    EntryEditor editor = new EntryEditor(jabref.jrf, jabref.jrf.basePanel(), bibtexEntry);
    // perform action ...
    editor.storeFieldAction.actionPerformed(new ActionEvent(authorTextField, 0, ""));
    // test content of stored words in autocompleter ...
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

      "@article{test,author={Ed von Test}}"));

    Collection<BibtexEntry> c = result.getDatabase().getEntries();
    assertEquals(1, c.size());

    BibtexEntry e = c.iterator().next();
    assertEquals("test", e.getCiteKey());
    assertEquals(2, e.getAllFields().size());
    Set<String> o = e.getAllFields();
    assertTrue(o.contains("author"));
    assertEquals("Ed von Test", e.getField("author"));
  }
View Full Code Here

Examples of net.sf.jabref.BibtexEntry

    { // Simple case
      Collection<BibtexEntry> c = BibtexParser.fromString("@article{test,author={Ed von Test}}");
      assertEquals(1, c.size());

      BibtexEntry e = c.iterator().next();
      assertEquals("test", e.getCiteKey());
      assertEquals(2, e.getAllFields().size());
      assertTrue(e.getAllFields().contains("author"));
      assertEquals("Ed von Test", e.getField("author"));
    }
    { // Empty String
      Collection<BibtexEntry> c = BibtexParser.fromString("");
      assertEquals(0, c.size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.