Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 In Your Component Source Code

...

There are two classes for the Metadata Mapper. The MetadataMapperFactory reads in the configuration during your initialize method and prepares for mapping. It is then used to produce MetadataMapper objects which can be used (one per thread) to map the fields for a single document.

...

   MetadataMapper mm = mmFactory.getNewMapper();
   /* loop through your metadata values */ {
     // Map each one (only stores it)
     mm.map(name, value);
   }
   
   // Now, compute the mappings and write them to the AspireDocument
   mm.writeMappingsToDocument(doc);

Default Mappings

If you want to have default mappings, these must be defined in your initialize() method:

...