de.fzi.kadmos.api
Interface Alignment

All Superinterfaces:
Cloneable, Evaluable, Iterable<Correspondence<? extends OWLEntity>>
All Known Implementing Classes:
ForwardingAlignment, SimpleAlignment

public interface Alignment
extends Iterable<Correspondence<? extends OWLEntity>>, Cloneable, Evaluable

Interface representing an alignment and basic operations on it. Various methods for accessing the contained correspondences are provided.

Since:
1.0.0
Version:
1.3.0
Author:
Juergen Bock
See Also:
AlignmentFactory

Method Summary
 void addCorrespondence(Correspondence<? extends OWLEntity> corr)
          Adds a correspondence to an alignment if possible.
 void attachListener(AlignmentListener listener)
          Registers an AlignmentListener.
 void clear()
          Clears the alignment.
 Alignment clone()
          Creates a clone of this alignment.
 boolean contains(Correspondence<? extends OWLEntity> corr)
          Checks if this alignment contains a correspondence with the same entities as the provided correspondence.
 boolean contains(IRI ent1, IRI ent2)
          Checks if a correspondence of two entities specified by their IRIs is part of this alignment.
<T extends OWLEntity>
boolean
contains(T ent1, T ent2)
          Checks if a correspondence of two specified entities is part of this alignment.
 boolean containsEntity1(IRI ent)
          Checks if this alignment contains a correspondence with a first entity specified by an IRI.
 boolean containsEntity1(OWLEntity ent)
          Checks if this alignment contains a correspondence with a specific first entity.
 boolean containsEntity2(IRI ent)
          Checks if this alignment contains a correspondence with a second entity specified by an IRI.
 boolean containsEntity2(OWLEntity ent)
          Checks if this alignment contains a correspondence with a specific second entity.
 void detachListener(AlignmentListener listener)
          Deregisters an AlignmentListener.
 Set<Correspondence<? extends OWLEntity>> getCorrespondences()
          Gets the set of correspondences of this alignment.
 Correspondence<? extends OWLEntity> getEntity1Corr(IRI ent)
          Gets the correspondence with a specific entity as entity 1.
<T extends OWLEntity>
Correspondence<T>
getEntity1Corr(T ent)
          Gets the correspondence with a specific entity as entity 1.
 Correspondence<? extends OWLEntity> getEntity2Corr(IRI ent)
          Gets the correspondence with a specific entity as entity 2.
<T extends OWLEntity>
Correspondence<T>
getEntity2Corr(T ent)
          Gets the correspondence with a specific entity as entity 2.
 Correspondence<? extends OWLEntity> getEntityCorr(IRI ent1, IRI ent2)
          Gets the correspondence with specific entities as entity 1 and entity2.
<T extends OWLEntity>
Correspondence<T>
getEntityCorr(T ent1, T ent2)
          Gets the correspondence with specific entities as entity 1 and entity 2.
 OWLOntology getOntology1()
          Gets the first ontology of this alignment.
 OWLOntology getOntology2()
          Gets the second ontology of this alignment.
 boolean isEmpty()
          Checks, whether this alignment is empty, i.e.
 void removeCorrespondence(Correspondence<? extends OWLEntity> corr)
          Removes a correspondence from this alignment if present.
 int size()
          Gets the size of this alignment.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getOntology1

OWLOntology getOntology1()
Gets the first ontology of this alignment.

Returns:
Ontology 1.
Since:
1.0.0

getOntology2

OWLOntology getOntology2()
Gets the second ontology of this alignment.

Returns:
Ontology 2.
Since:
1.0.0

getCorrespondences

Set<Correspondence<? extends OWLEntity>> getCorrespondences()
Gets the set of correspondences of this alignment. The method returns a defensive copy of the set of correspondences contained in this alignment. In other words, modifying this returned set does not modify the state of this alignment.

Returns:
Correspondences of this alignment.
Since:
1.0.0

contains

boolean contains(Correspondence<? extends OWLEntity> corr)
Checks if this alignment contains a correspondence with the same entities as the provided correspondence.

Parameters:
corr - The correspondence to be checked if it is contained by this alignment.
Returns:
true if this alignment contains a correspondence with the same entities as corr, false otherwise.
Since:
1.0.0

contains

<T extends OWLEntity> boolean contains(T ent1,
                                       T ent2)
Checks if a correspondence of two specified entities is part of this alignment.

Type Parameters:
T - Type of the entities of correspondence to be checked.
Parameters:
ent1 - Entity 1.
ent2 - Entity 2.
Returns:
true if a correspondence of ent1 and ent2 is part of this alignment, false otherwise.
Since:
1.0.0

contains

boolean contains(IRI ent1,
                 IRI ent2)
Checks if a correspondence of two entities specified by their IRIs is part of this alignment.

Parameters:
ent1 - IRI of entity 1.
ent2 - IRI of entity 2.
Returns:
true if a correspondence of ent1 and ent2 is part of this alignment, false otherwise.
Since:
1.0.0

containsEntity1

boolean containsEntity1(OWLEntity ent)
Checks if this alignment contains a correspondence with a specific first entity.

Parameters:
ent - Entity to be checked if present as entity 1 in a correspondence in this alignment.
Returns:
true if ent participates as entity 1 of a correspondence in this alignment, false otherwise.
Since:
1.0.0

containsEntity1

boolean containsEntity1(IRI ent)
Checks if this alignment contains a correspondence with a first entity specified by an IRI.

Parameters:
ent - IRI of entity to be checked if present as entity 1 in a correspondence in this alignment.
Returns:
true if ent participates as entity 1 of a correspondence in this alignment, false otherwise.
Since:
1.0.0

containsEntity2

boolean containsEntity2(OWLEntity ent)
Checks if this alignment contains a correspondence with a specific second entity.

Parameters:
ent - Entity to be checked if present as entity 2 in a correspondence in this alignment.
Returns:
true if ent participates as entity 2 of a correspondence in this alignment, false otherwise.
Since:
1.0.0

containsEntity2

boolean containsEntity2(IRI ent)
Checks if this alignment contains a correspondence with a second entity specified by an IRI.

Parameters:
ent - IRI of entity to be checked if present as entity 2 in a correspondence in this alignment.
Returns:
true if ent participates as entity 2 of a correspondence in this alignment, false otherwise.
Since:
1.0.0

getEntity1Corr

<T extends OWLEntity> Correspondence<T> getEntity1Corr(T ent)
Gets the correspondence with a specific entity as entity 1. If there is no correspondence with the specified entity as entity 1, null will be returned.

Type Parameters:
T - Entity type.
Parameters:
ent - Entity 1 of the requested correspondence.
Returns:
Correspondence with ent as entity 1, or null if no such correspondence exists.
Since:
1.0.0

getEntity1Corr

Correspondence<? extends OWLEntity> getEntity1Corr(IRI ent)
Gets the correspondence with a specific entity as entity 1. The entity is specified by its IRI. If there is no correspondence with the specified entity as entity 1, null will be returned.

Parameters:
ent - IRI of entity 1 of the requested correspondence.
Returns:
Correspondence with ent as entity 1, or null if no such correspondence exists.
Since:
1.0.0

getEntity2Corr

<T extends OWLEntity> Correspondence<T> getEntity2Corr(T ent)
Gets the correspondence with a specific entity as entity 2. If no correspondence with the specified entity as entity 2, null will be returned.

Type Parameters:
T - Entity type.
Parameters:
ent - Entity 2 of the requested correspondence.
Returns:
Correspondence with ent as entity 2, or null if no such correspondence exists.
Since:
1.0.0

getEntity2Corr

Correspondence<? extends OWLEntity> getEntity2Corr(IRI ent)
Gets the correspondence with a specific entity as entity 2. The entity is specified by its IRI. If there is no correspondence with the specified entity as entity 2, null will be returned.

Parameters:
ent - IRI of entity 2 of the requested correspondence.
Returns:
Correspondence with ent as entity 2, or null if no such correspondence exists.
Since:
1.0.0

getEntityCorr

<T extends OWLEntity> Correspondence<T> getEntityCorr(T ent1,
                                                      T ent2)
Gets the correspondence with specific entities as entity 1 and entity 2. If no correspondence with the specified entities as entity 1 and entity 2, null will be returned.

Type Parameters:
T - Entity type.
Parameters:
ent1 - Entity 1 of the requested correspondence.
ent2 - Entity 2 of the requested correspondence.
Returns:
Correspondence with ent as entity 1 and ent as entity 2, or null if no such correspondence exists.
Since:
1.0.0

getEntityCorr

Correspondence<? extends OWLEntity> getEntityCorr(IRI ent1,
                                                  IRI ent2)
Gets the correspondence with specific entities as entity 1 and entity2. The entities are specified by its IRI. If there is no correspondence with the specified entities as entity 1 and entity2, null will be returned.

Parameters:
ent1 - IRI of entity 1 of the requested correspondence.
ent2 - IRI of entity 2 of the requested correspondence.
Returns:
Correspondence with ent1 as entity 1 and ent2 as entity 2 or null if no such correspondence exists.
Since:
1.0.0

addCorrespondence

void addCorrespondence(Correspondence<? extends OWLEntity> corr)
                       throws MultiplicityException,
                              IllegalArgumentException,
                              IncompatibleOntologyException
Adds a correspondence to an alignment if possible. Multiplicity of correspondences in an alignment will be assured.

Parameters:
corr - The correspondence to be added.
Throws:
MultiplicityException - if multiplicity of correspondence is violated.
IncompatibleOntologyException - if either of the corresponding entities is not contained in the signature of the according aligned ontology.
IllegalArgumentException - if the argument is null
Since:
1.0.0

removeCorrespondence

void removeCorrespondence(Correspondence<? extends OWLEntity> corr)
Removes a correspondence from this alignment if present.

Parameters:
corr - The correspondence to be removed.
Since:
1.0.0

clear

void clear()
Clears the alignment. All correspondence references are deleted. References to ontologies are preserved.

Since:
1.0.0

size

int size()
Gets the size of this alignment. The size of the alignment is the number of correspondences it contains.

Returns:
The number of correspondences held by this alignment.
Since:
1.0.0

isEmpty

boolean isEmpty()
Checks, whether this alignment is empty, i.e. has no correspondences.

Returns:
true iff this alignment contains no correspondences, false otherwise.
Since:
1.0.0

clone

Alignment clone()
Creates a clone of this alignment.

Returns:
Clone of this alignment.
Since:
1.0.0

attachListener

void attachListener(AlignmentListener listener)
Registers an AlignmentListener. The AlignmentListener gets notified when the alignment changes. Calling this method with an AlignmentListener that is already registered is a no-op.

Parameters:
listener - AlignmentListener to register.
Since:
1.3.0

detachListener

void detachListener(AlignmentListener listener)
Deregisters an AlignmentListener. The AlignmentListener will be no longer notified when the alignment changes. Calling this method with an AlignmentListener that is not registered is a no-op.

Parameters:
listener - AlignmentListener to deregister.
Since:
1.3.0


Copyright © 2012. All Rights Reserved.