URL url = getClass().getResource("test-basics.xmp");
Metadata meta = XMPParser.parseXMP(url);
DublinCoreAdapter dcAdapter = DublinCoreSchema.getAdapter(meta);
XMPBasicAdapter basicAdapter = XMPBasicSchema.getAdapter(meta);
AdobePDFAdapter pdfAdapter = AdobePDFSchema.getAdapter(meta);
XMPProperty prop;
prop = meta.getProperty(XMPConstants.DUBLIN_CORE_NAMESPACE, "creator");
XMPArray array;
array = prop.getArrayValue();
assertEquals(1, array.getSize());
assertEquals("John Doe", array.getValue(0).toString());
assertEquals("John Doe", dcAdapter.getCreators()[0]);
prop = meta.getProperty(XMPConstants.DUBLIN_CORE_NAMESPACE, "title");
assertEquals("Example document", prop.getValue().toString());
assertEquals("Example document", dcAdapter.getTitle());
prop = meta.getProperty(XMPConstants.XMP_BASIC_NAMESPACE, "CreateDate");
//System.out.println("Creation Date: " + prop.getValue() + " " + prop.getClass().getName());
prop = meta.getProperty(XMPConstants.XMP_BASIC_NAMESPACE, "CreatorTool");
assertEquals("An XML editor", prop.getValue().toString());
assertEquals("An XML editor", basicAdapter.getCreatorTool());
prop = meta.getProperty(XMPConstants.ADOBE_PDF_NAMESPACE, "Producer");
assertEquals("Apache FOP Version SVN trunk", prop.getValue().toString());
assertEquals("Apache FOP Version SVN trunk", pdfAdapter.getProducer());
prop = meta.getProperty(XMPConstants.ADOBE_PDF_NAMESPACE, "PDFVersion");
assertEquals("1.4", prop.getValue().toString());
assertEquals("1.4", pdfAdapter.getPDFVersion());
}