ie.deri.wsmx.mediation.mapper
Class Mapper

java.lang.Object
  extended byie.deri.wsmx.mediation.mapper.Mapper

public class Mapper
extends java.lang.Object

(c) Copyright 2004, DERI - Digital Enterprise Research Institute, Ireland

Author:
Adrian Mediator.java, Mar 18, 2004, 3:25:51 PM

Field Summary
static int DECOMPOSITION_REQUIRED
           
static int LEFT_BALANCED
           
static int MAPPED
           
static int NOT_MAPPED
           
static int PRIMITIVE
           
static int RIGHT_BALANCED
           
 
Constructor Summary
Mapper()
           
Mapper(ConceptsManager srcConcepts, ConceptsManager tgtConcepts)
           
Mapper(ConceptsManager srcConcepts, ConceptsManager tgtConcepts, java.util.Hashtable mapper)
           
 
Method Summary
 boolean areEligible(AttributeDefinition sourceAttribute, AttributeDefinition targetAttribute)
          Checks if two given attribute are elibible for being mapped.
 boolean areEligible(java.lang.String sourceConcept, java.lang.String targetConcept)
          Checks if two given concepts are elibible for being mapped.
 boolean areMapped(ConceptAttributeDefinition sourceAttribute, ConceptAttributeDefinition targetAttribute)
          Checks if the given pair of cencept attribute (attribute plus owner) are mapped
 boolean areMapped(java.lang.String sourceConcept, java.lang.String targetConcept)
          Checks if the given pair of cencepts are mapped
 java.util.Hashtable getAttributeToAttributeMappings()
           
 java.util.Hashtable getConceptToConceptMappings()
           
 int getMapingState(java.lang.Object srcConcept, java.lang.Object tgtConcept)
           
 ConceptsManager getSrcConceptsManager()
           
 java.lang.Object getTargetAttributes(ConceptAttributeDefinition attribute)
           
 java.lang.String getTargetAttributesAsString(ConceptAttributeDefinition attribute)
           
 java.util.Vector getTargetConcepts(java.lang.Object concept)
           
 java.lang.String getTargetConceptsAsString(java.lang.Object concept)
           
 ConceptsManager getTgtConceptsManager()
           
 int internalStructuresRelations(java.lang.Object srcConcept, java.util.Vector tgtConcepts)
           
 void setAaMapper(java.util.Hashtable hashtable)
           
 void setCcMapper(java.util.Hashtable hashtable)
           
 void setSrcConceptsManager(ConceptsManager srcConcepts)
           
 void setTargetAttribute(ConceptAttributeDefinition attribute, ConceptAttributeDefinition targetAttribute)
           
 void setTargetConcept(java.lang.Object concept, java.lang.Object targetConcept)
           
 void setTargetConcepts(java.lang.Object concept, java.util.Vector targetConcepts)
           
 void setTgtConceptsManager(ConceptsManager tgtConcepts)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPED

public static final int MAPPED
See Also:
Constant Field Values

NOT_MAPPED

public static final int NOT_MAPPED
See Also:
Constant Field Values

PRIMITIVE

public static final int PRIMITIVE
See Also:
Constant Field Values

DECOMPOSITION_REQUIRED

public static final int DECOMPOSITION_REQUIRED
See Also:
Constant Field Values

LEFT_BALANCED

public static final int LEFT_BALANCED
See Also:
Constant Field Values

RIGHT_BALANCED

public static final int RIGHT_BALANCED
See Also:
Constant Field Values
Constructor Detail

Mapper

public Mapper()

Mapper

public Mapper(ConceptsManager srcConcepts,
              ConceptsManager tgtConcepts)

Mapper

public Mapper(ConceptsManager srcConcepts,
              ConceptsManager tgtConcepts,
              java.util.Hashtable mapper)
Method Detail

getTargetConcepts

public java.util.Vector getTargetConcepts(java.lang.Object concept)

getTargetConceptsAsString

public java.lang.String getTargetConceptsAsString(java.lang.Object concept)

getTargetAttributesAsString

public java.lang.String getTargetAttributesAsString(ConceptAttributeDefinition attribute)

getTargetAttributes

public java.lang.Object getTargetAttributes(ConceptAttributeDefinition attribute)

setTargetConcepts

public void setTargetConcepts(java.lang.Object concept,
                              java.util.Vector targetConcepts)

setTargetConcept

public void setTargetConcept(java.lang.Object concept,
                             java.lang.Object targetConcept)

setTargetAttribute

public void setTargetAttribute(ConceptAttributeDefinition attribute,
                               ConceptAttributeDefinition targetAttribute)

setSrcConceptsManager

public void setSrcConceptsManager(ConceptsManager srcConcepts)

getSrcConceptsManager

public ConceptsManager getSrcConceptsManager()

getTgtConceptsManager

public ConceptsManager getTgtConceptsManager()

setTgtConceptsManager

public void setTgtConceptsManager(ConceptsManager tgtConcepts)

getMapingState

public int getMapingState(java.lang.Object srcConcept,
                          java.lang.Object tgtConcept)

internalStructuresRelations

public int internalStructuresRelations(java.lang.Object srcConcept,
                                       java.util.Vector tgtConcepts)

getConceptToConceptMappings

public java.util.Hashtable getConceptToConceptMappings()

getAttributeToAttributeMappings

public java.util.Hashtable getAttributeToAttributeMappings()

areMapped

public boolean areMapped(java.lang.String sourceConcept,
                         java.lang.String targetConcept)
Checks if the given pair of cencepts are mapped

Parameters:
sourceConcept - the source concept name
targetConcept - the target concept name
Returns:
true if the given concepts are mapped and false otherwise

areMapped

public boolean areMapped(ConceptAttributeDefinition sourceAttribute,
                         ConceptAttributeDefinition targetAttribute)
Checks if the given pair of cencept attribute (attribute plus owner) are mapped

Parameters:
sourceAttribute - the source concept attribute
targetAttribute - the target concept attribute
Returns:
true if the given concept attributes are mapped and false otherwise

areEligible

public boolean areEligible(AttributeDefinition sourceAttribute,
                           AttributeDefinition targetAttribute)
Checks if two given attribute are elibible for being mapped. Two attributes are consider to be eligible for mapping if they have already their ranges mapped one with each-other or if their ranges are eligible for map

Parameters:
sourceAttribute - the attribute form the source
targetAttribute - the atribute form the target
Returns:
true if the ranges of the two given attributes are already mapped and false otherwise. Returns false if also one (or both) of the attributes is null.

areEligible

public boolean areEligible(java.lang.String sourceConcept,
                           java.lang.String targetConcept)
Checks if two given concepts are elibible for being mapped. Two concepts are consider to be eligible for mapping if at least one pair of their attributes are formed by eligible attributes

Parameters:
sourceConcept - the attribute form the source
targetConcept - the atribute form the target
Returns:
true if the concepts are already mapped or if at least one pair in the compound attributes is eligible and false otherwise. Returns false if also one (or both) of the concepts is null.

setAaMapper

public void setAaMapper(java.util.Hashtable hashtable)
Parameters:
hashtable -

setCcMapper

public void setCcMapper(java.util.Hashtable hashtable)
Parameters:
hashtable -