de.unima.alcomox.mapping
Class Correspondence
java.lang.Object
de.unima.alcomox.mapping.Correspondence
- All Implemented Interfaces:
- java.lang.Comparable<Correspondence>
public class Correspondence
- extends java.lang.Object
- implements java.lang.Comparable<Correspondence>
A correspondence represents a (simple) semantic relation between two
entities belonging to different ontologies. The enties are first only
referred to by their uris (unbound correspondence), when the container
mapping is bound to the ontologies the entities attributed are set to
the internal entity representation.
Constructor Summary |
Correspondence(java.lang.String sourceEntityUri,
java.lang.String targetEntityUri,
SemanticRelation relation)
Constructs an unbound correspondence with confidence value set to 1.0. |
Correspondence(java.lang.String sourceConcept,
java.lang.String targetConcept,
SemanticRelation relation,
double confidence)
Constructs an unbound correspondence with confidence value set to 1.0. |
Correspondence(java.lang.String sourceConcept,
java.lang.String targetConcept,
SemanticRelation relation,
double confidence,
java.lang.String expl)
|
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Correspondence
public Correspondence(java.lang.String sourceEntityUri,
java.lang.String targetEntityUri,
SemanticRelation relation)
throws CorrespondenceException
- Constructs an unbound correspondence with confidence value set to 1.0.
- Parameters:
sourceEntityUri
- Uri of the source entity.targetEntityUri
- Uri of the target entity.relation
- Semantic relation between two entities.
- Throws:
CorrespondenceException
- Thrown if the uris are not wellformed (in a weak sense).
Checking wether the uri reference can be resolved does not occur in this context.
Correspondence
public Correspondence(java.lang.String sourceConcept,
java.lang.String targetConcept,
SemanticRelation relation,
double confidence)
throws CorrespondenceException
- Constructs an unbound correspondence with confidence value set to 1.0.
- Parameters:
sourceEntityUri
- Uri of the source entity.targetEntityUri
- Uri of the target entity.relation
- Semantic relation between two entities.confidence
- Confidence value of this correspondence.
- Throws:
CorrespondenceException
- Thrown if the uris are not wellformed (in a weak sense) and
if the confidence value is not in the range from 0.0 to 1.0.
Checking wether the uri reference can be resolved does not occur in this context.
Correspondence
public Correspondence(java.lang.String sourceConcept,
java.lang.String targetConcept,
SemanticRelation relation,
double confidence,
java.lang.String expl)
throws CorrespondenceException
- Throws:
CorrespondenceException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- String representation of this correspondence.
toShortString
public java.lang.String toShortString()
- Returns:
- Short string representation of this correspondence.
equals
public boolean equals(java.lang.Object thatObject)
- Overrides:
equals
in class java.lang.Object
- Returns:
- True if uri of source entity, uri of target entity and semantic relation are the same,
false otherwise. Equality is not affected by the confidence value. This means that two
correspondences can be equal if they make the same statement with different trust in the statement.
Input mappings that contain such correspondences are regarded as incorrect.
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
compareTo
public int compareTo(Correspondence correspondence)
- Specified by:
compareTo
in interface java.lang.Comparable<Correspondence>
getSourceEntityUri
public java.lang.String getSourceEntityUri()
getTargetEntityUri
public java.lang.String getTargetEntityUri()
getRelation
public SemanticRelation getRelation()
getConfidence
public double getConfidence()
getSourceNamespace
public java.lang.String getSourceNamespace()
getTargetNamespace
public java.lang.String getTargetNamespace()
setSourceEntityUri
public void setSourceEntityUri(java.lang.String sourceEntity)
throws CorrespondenceException
- Throws:
CorrespondenceException
setTargetEntityUri
public void setTargetEntityUri(java.lang.String targetEntity)
throws CorrespondenceException
- Throws:
CorrespondenceException
setConfidence
public void setConfidence(double confidence)
throws CorrespondenceException
- Throws:
CorrespondenceException
setRelation
public void setRelation(SemanticRelation relation)
getExplanation
public java.lang.String getExplanation()
setExplanation
public void setExplanation(java.lang.String explanation)