org.omwg.mediation.language.objectModel
Class MappingDocument

java.lang.Object
  extended by org.omwg.mediation.language.objectModel.MappingDocument

public class MappingDocument
extends java.lang.Object

This is the main class to create a mapping document. A mapping document is constituted by an ID, a source and target ontologies and a collection of mapping rules


Constructor Summary
MappingDocument()
          Constructor for a new empty mapping Document object
MappingDocument(Id id, Id sourceOnto, Id targetOnto)
          Constructor for a new mapping Document object
 
Method Summary
 void addAnnotation(Annotation anno)
          Add the given annotation to the annotations list/collection
 void addRule(MappingRule rule)
          Used to add a rule to the mapping rule collection
 Annotation getAnnotation(int num)
          Returns the annotation specified by the reference number (int param)
 java.util.Collection getAnnotations()
          Returns the entire collection of annotations for a given mapping
 Id getId()
          Returns the id of the mapping when predefined
 int getNbAnnotations()
          Returns the total amount of annotations in a collection for a given mapping
 int getNbRules()
          Returns the total amount of mapping rules in a collection for a given mapping
 MappingRule getRule(int num)
          Returns the mapping rule specified by the reference number (int param)
 java.util.Collection getRules()
          Returns the entire collection of mapping rules for a given mapping
 Id getSource()
          Returns the id of the source ontology when predefined
 Id getTarget()
          Returns the id of the source ontology when predefined
 void setId(Id id)
          Sets the mapping id
 void setSource(Id source)
          Sets the id of the source ontology
 void setTarget(Id target)
          Sets the target ontology id
 java.lang.String toString()
          Returns a string describing the mapping: the mapping id, the source and target ontologies, the annotations, and the mapping rules
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappingDocument

public MappingDocument()

Constructor for a new empty mapping Document object


MappingDocument

public MappingDocument(Id id,
                       Id sourceOnto,
                       Id targetOnto)

Constructor for a new mapping Document object

Parameters:
id - (mapping id)
sourceOnto - (source ontology id)
targetOnto - (target ontology id)
Method Detail

addAnnotation

public void addAnnotation(Annotation anno)

Add the given annotation to the annotations list/collection

Parameters:
anno - (Annotation object)

addRule

public void addRule(MappingRule rule)

Used to add a rule to the mapping rule collection

Parameters:
rule - (MappingRule object)

toString

public java.lang.String toString()

Returns a string describing the mapping: the mapping id, the source and target ontologies, the annotations, and the mapping rules

Overrides:
toString in class java.lang.Object
Returns:
str (string of mapping description)

getId

public Id getId()

Returns the id of the mapping when predefined

Returns:
id (mapping id)

setId

public void setId(Id id)

Sets the mapping id

Parameters:
id - (mapping id)

getSource

public Id getSource()

Returns the id of the source ontology when predefined

Returns:
sourceOnto (id of source ontology)

setSource

public void setSource(Id source)

Sets the id of the source ontology

Parameters:
source - (source ontology id)

getTarget

public Id getTarget()

Returns the id of the source ontology when predefined

Returns:
targetOnto (target ontology id)

setTarget

public void setTarget(Id target)

Sets the target ontology id

Parameters:
target - (target ontology id)

getAnnotation

public Annotation getAnnotation(int num)

Returns the annotation specified by the reference number (int param)

Parameters:
num - (number referencing specific annotation in annotation list/collection)
Returns:
the referred annotation

getRule

public MappingRule getRule(int num)

Returns the mapping rule specified by the reference number (int param)

Parameters:
num - (number referencing specific mapping rule in mapping rule list/collection)
Returns:
the referred mapping rule

getNbAnnotations

public int getNbAnnotations()

Returns the total amount of annotations in a collection for a given mapping

Returns:
number of annotations in collection

getNbRules

public int getNbRules()

Returns the total amount of mapping rules in a collection for a given mapping

Returns:
number of mapping rules

getAnnotations

public java.util.Collection getAnnotations()

Returns the entire collection of annotations for a given mapping

Returns:
collection of annotations

getRules

public java.util.Collection getRules()

Returns the entire collection of mapping rules for a given mapping

Returns:
collection of mapping rules