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 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 MetaDataObject:
- The DefaultMetaDataObject is used to represent any kind of meta data that is not further known to the library
- The OmexMetaDataObject represents meta data supposed to be the default meta format for CombineArchives.
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.
Write your own MetaDataObject
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.
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 :)