MetaDataObject store meta data about entries in a CombineArchive.
All meta data in a CombineArchive is usually stored in files with names like
/metadata(-.+)?.rdf in the root of the archive.
These files contain RDF describing the entries available from the archive.
Go to http://co.mbine.org/documents/archive co.mbine.org to learn more about the meta data used in CombineArchives.
<rdf:Description rdf:about="/some/file"> <!-- some describing subtree --> </rdf:Description>
There are two main subclasses extending the
However, your able to retrieve the plain XML subtree in any case using the
getXmlDescription() (JavaDoc) method. This function will return the
rdf:Description element, so you can try to parse the subtree on your own.
If you’re developing a different kind of format to describe your files we’d like to encourage you to write your own subclass of the MetaDataObject. Just extend the class (see source) and add a function
tryToRead (Element element, ArchiveEntry about, String fragmentIdentifier) that takes the
rdf:Description element, the ArchiveEntry that is being described and an optional fragment identifier (which might be null).
To get an idea you may want to have a look at the sources of DefaultMetaDataObject and OmexMetaDataObject.
Afterwards add a small snippet to the Meta/DataFile reader to try to parse meta data given your format.
If you finished implementing support for your meta data format please send your code to one of us. We’ll be happy to support your format officially, so others may also benefit from the data that is stored in your descriptions.
Also, feel free to fork this project on GitHub :)