Package org.jempbox.xmp

Examples of org.jempbox.xmp.XMPMetadata


    super.tearDown();
  }

  public void testXMPSchemaBibtexXMPMetadata() throws IOException {

    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    assertNotNull(bibtex.getElement());
    assertEquals("rdf:Description", bibtex.getElement().getTagName());
View Full Code Here


    assertEquals(e, bibtex.getElement());
    assertEquals("rdf:Description", bibtex.getElement().getTagName());
  }

  public void testGetSetPersonList() throws IOException {
    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    bibtex.setPersonList("author", "Tom DeMarco and Kent Beck");

    Element e = bibtex.getElement();
View Full Code Here

    assertEquals("Tom DeMarco", authors.get(0));
    assertEquals("Kent Beck", authors.get(1));
  }

  public void testSetGetTextPropertyString() throws IOException {
    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    bibtex.setTextProperty("title",
      "The advanced Flux-Compensation for Delawney-Separation");
View Full Code Here

      bibtex.getTextProperty("abstract"));
  }

  public void testSetGetBagListString() throws IOException {

    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    bibtex.addBagValue("author", "Tom DeMarco");
    bibtex.addBagValue("author", "Kent Beck");
    {
View Full Code Here

    }
  }

  public void testGetSequenceListString() throws IOException {

    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    bibtex.addSequenceValue("author", "Tom DeMarco");
    bibtex.addSequenceValue("author", "Kent Beck");
    {
View Full Code Here

  public void testSetRemoveGetSequenceDateListString() {
    // We don't use this...
  }

  public void testGetAllProperties() throws IOException {
    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    bibtex.setTextProperty("title", "BlaBla Ta Ta\nHello World");
    bibtex.setTextProperty("abstract", "BlaBla Ta Ta\nHello World");
    bibtex.setTextProperty("review", "BlaBla Ta Ta\nHello World");
View Full Code Here

    assertEquals("Mickey Mouse and James Bond", s.get("author"));
  }

  public void testSetBibtexEntry() throws IOException {

    XMPMetadata xmp = new XMPMetadata();
    XMPSchemaBibtex bibtex = new XMPSchemaBibtex(xmp);

    BibtexEntry e = FileBasedTestCase.getBibtexEntry();
    bibtex.setBibtexEntry(e, null);
View Full Code Here

      if (metaRaw == null) {
        fail();
        return;
      }

      XMPMetadata meta = new XMPMetadata(XMLUtil.parse(metaRaw
          .createInputStream()));
      meta.addXMLNSMapping(XMPSchemaBibtex.NAMESPACE,
          XMPSchemaBibtex.class);

      // Check Dublin Core
      List<XMPSchema> schemas = meta
          .getSchemasByNamespaceURI("http://purl.org/dc/elements/1.1/");
      assertEquals(1, schemas.size());

      XMPSchemaDublinCore dcSchema = (XMPSchemaDublinCore) schemas
          .iterator().next();
View Full Code Here

      if (metaRaw == null) {
        fail();
      }

      XMPMetadata meta = new XMPMetadata(XMLUtil.parse(metaRaw
          .createInputStream()));
      meta.addXMLNSMapping(XMPSchemaBibtex.NAMESPACE,
          XMPSchemaBibtex.class);

      // Check Dublin Core
      List<XMPSchema> schemas = meta
          .getSchemasByNamespaceURI("http://purl.org/dc/elements/1.1/");

      assertEquals(1, schemas.size());

      XMPSchemaDublinCore dcSchema = (XMPSchemaDublinCore) schemas
View Full Code Here

    BibtexEntry e = (BibtexEntry) c.iterator().next();

    XMPUtil.writeXMP(pdfFile, e, null);

    XMPMetadata metadata = XMPUtil.readRawXMP(pdfFile);

    List<XMPSchema> schemas = metadata.getSchemas();
    assertEquals(2, schemas.size());
    schemas = metadata.getSchemasByNamespaceURI(XMPSchemaBibtex.NAMESPACE);
    assertEquals(1, schemas.size());
    XMPSchemaBibtex bib = (XMPSchemaBibtex) schemas.get(0);

    List<String> authors = bib.getSequenceList("author");
    assertEquals(4, authors.size());
View Full Code Here

TOP

Related Classes of org.jempbox.xmp.XMPMetadata

Copyright © 2018 www.massapicom. 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.