Wiki

Clone wiki

XLIFF Toolkit / Metadata

Metadata

<Table of Content>

The library implements the Metadata module. From a unit, you can call hasMetadata() to see if the unit holds some metadata entry. A call to getMetadata() will return a Metadata object (even if there are currently no entries). That object holds a list of MetaGroup objects which contains Meta objects or nested MetaGroup objects.

For example the following code adds a meta-group to the metadata for a given unit, and adds a meta entry in that group:

#!java
Metadata metadata = unit.getMetadata();
MetaGroup group = metadata.add(new MetaGroup());
group.add(new Meta("myType", "myData"));

Updated