odml.util
Class Mapper

java.lang.Object
  extended by odml.util.Mapper

public class Mapper
extends java.lang.Object

The Mapper controls the mapping procedure. Mapping information can be given for Property and Section elements and is used to transform from one, custom, organization of the metadata structure, to another, the odml standard or any else, structure. Rough sketch of the mapping algorithm: 1: recursively cycle through all sections and apply section mappings. 2a: recursively cycle through all sections, starting at root, and try apply property mappings. 2b: if no mapping provided for a property, just add to the section the property's parent section was mapped into. 2c: if mapping provided check for destination section type. if provided and matching the parent section's destination, just add. 2d: if property maps to a different type of section than the parent section's destination, check if


Constructor Summary
Mapper(Section original)
          Constructor.
 
Method Summary
 Section map()
          Apply the mapping information and return a converted tree.
 void mapProperty(Property p)
          Maps a certain property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapper

public Mapper(Section original)
Constructor.

Parameters:
original - A Section that contains mapping information.
Method Detail

map

public Section map()
Apply the mapping information and return a converted tree.

Returns:
Section the converted tree.

mapProperty

public void mapProperty(Property p)
Maps a certain property.

Parameters:
p - Property the Property.