INRIA & UMontrŽal

fr.inrialpes.exmo.align.impl
Class BasicAlignment

java.lang.Object
  extended byfr.inrialpes.exmo.align.impl.BasicAlignment
All Implemented Interfaces:
Alignment
Direct Known Subclasses:
ClassNameEqAlignment, DistanceAlignment, NameEqAlignment

public class BasicAlignment
extends java.lang.Object
implements Alignment

Represents an OWL ontology alignment. An ontology comprises a number of collections. Each ontology has a number of classes, properties and individuals, along with a number of axioms asserting information about those objects.

Version:
$Id: BasicAlignment.java,v 1.10 2005/05/16 07:28:47 euzenat Exp $
Author:
Jérôme Euzenat, David Loup

Field Summary
protected  int debug
           
protected  java.util.Hashtable hash1
           
protected  java.util.Hashtable hash2
           
protected  java.lang.String level
           
protected  OWLOntology onto1
           
protected  OWLOntology onto2
           
protected  java.lang.String type
           
protected  java.net.URI uri1
          This is the URI of the place from which the ontology has been loaded! This is NOT the Ontology URI which can be obtained by onto1.getLogicalURI();
protected  java.net.URI uri2
           
 
Constructor Summary
BasicAlignment()
           
 
Method Summary
 void accept(AlignmentVisitor visitor)
          Alignment methods
 Cell addAlignCell(java.lang.Object ob1, java.lang.Object ob2)
           
 Cell addAlignCell(java.lang.Object ob1, java.lang.Object ob2, java.lang.String relation, double measure)
          Cell methods *
 Alignment compose(Alignment align)
          The second alignment is composed with the first one meaning that for any pair (o, o', n, r) in O and (o',o", n', r') in O' the resulting alignment will contain: ( o, o", join(n,n'), compose(r, r')) iff compose(r,r') exists.
 void cut(double threshold)
          Default cut implementation For compatibility with API until version 1.1
 void cut(java.lang.String method, double threshold)
          Cut refinement : - above n (hard) - above n under the best () - getting the n% better (perc) - getting the under n% of the best (prop) - getting the n best values
 void cut2(double threshold)
          The cut function suppresses from an alignment all the cell over a particulat threshold
 void dump(org.xml.sax.ContentHandler h)
          Housekeeping *
 Cell getAlignCell1(java.lang.Object ob)
           
 Cell getAlignCell2(java.lang.Object ob)
           
 java.lang.Object getAlignedObject1(java.lang.Object ob)
          Each part of the cell can be queried independently.
 java.lang.Object getAlignedObject2(java.lang.Object ob)
           
 Relation getAlignedRelation1(java.lang.Object ob)
           
 Relation getAlignedRelation2(java.lang.Object ob)
           
 double getAlignedStrength1(java.lang.Object ob)
           
 double getAlignedStrength2(java.lang.Object ob)
           
 java.util.Enumeration getElements()
           
 java.net.URI getFile1()
           
 java.net.URI getFile2()
           
 java.lang.String getLevel()
           
 java.lang.Object getOntology1()
          Alignment methods *
 java.lang.Object getOntology2()
           
 java.lang.String getType()
           
 void harden(double threshold)
          The harden function acts like threshold but put all weights to 1.
protected  void ingest(Alignment alignment)
          Incorporate the cell of the alignment into it own alignment.
protected  void init(OWLOntology onto1, OWLOntology onto2)
           
 void inverse()
          A new alignment is created such that for any pair (o, o', n, r) in O the resulting alignment will contain: ( o', o, n, inverse(r)) iff compose(r) exists.
 Alignment join(Alignment align)
          The second alignment is join with the first one meaning that for any pair (o, o', n, r) in O and (o, o', n', r) in O' the resulting alignment will contain: ( o, o", join(n,n'), r) any pair which is in only one alignment is discarded.
 Alignment meet(Alignment align)
          The second alignment is meet with the first one meaning that for any pair (o, o', n, r) in O and (o, o', n', r) in O' the resulting alignment will contain: ( o, o', meet(n,n'), r) any pair which is in only one alignment is preserved.
 int nbCells()
           
 void render(AlignmentVisitor renderer)
          This should be rewritten in order to generate the axiom ontology instead of printing it! And then use ontology serialization for getting it printed.
 void setFile1(java.net.URI u)
          Alignment type: Currently defined a sa String.
 void setFile2(java.net.URI u)
           
 void setLevel(java.lang.String level)
          Alignment type: Currently defined a sa String.
 void setOntology1(java.lang.Object ontology)
           
 void setOntology2(java.lang.Object ontology)
           
 void setType(java.lang.String type)
          Alignment type: Currently defined a sa String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected int debug

level

protected java.lang.String level

type

protected java.lang.String type

onto1

protected OWLOntology onto1

onto2

protected OWLOntology onto2

hash1

protected java.util.Hashtable hash1

hash2

protected java.util.Hashtable hash2

uri1

protected java.net.URI uri1
This is the URI of the place from which the ontology has been loaded! This is NOT the Ontology URI which can be obtained by onto1.getLogicalURI();


uri2

protected java.net.URI uri2
Constructor Detail

BasicAlignment

public BasicAlignment()
Method Detail

accept

public void accept(AlignmentVisitor visitor)
            throws AlignmentException
Description copied from interface: Alignment
Alignment methods

Specified by:
accept in interface Alignment
Throws:
AlignmentException

init

protected void init(OWLOntology onto1,
                    OWLOntology onto2)

nbCells

public int nbCells()
Specified by:
nbCells in interface Alignment

getOntology1

public java.lang.Object getOntology1()
Alignment methods *

Specified by:
getOntology1 in interface Alignment

getOntology2

public java.lang.Object getOntology2()
Specified by:
getOntology2 in interface Alignment

setOntology1

public void setOntology1(java.lang.Object ontology)
                  throws AlignmentException
Specified by:
setOntology1 in interface Alignment
Throws:
AlignmentException

setOntology2

public void setOntology2(java.lang.Object ontology)
                  throws AlignmentException
Specified by:
setOntology2 in interface Alignment
Throws:
AlignmentException

setType

public void setType(java.lang.String type)
Description copied from interface: Alignment
Alignment type: Currently defined a sa String. This string is supposed to contain two characters: among ?, 1, *, + Can be implemented otherwise

Specified by:
setType in interface Alignment

getType

public java.lang.String getType()
Specified by:
getType in interface Alignment

setLevel

public void setLevel(java.lang.String level)
Description copied from interface: Alignment
Alignment type: Currently defined a sa String. This string is supposed to contain two characters: among ?, 1, *, + Can be implemented otherwise

Specified by:
setLevel in interface Alignment

getLevel

public java.lang.String getLevel()
Specified by:
getLevel in interface Alignment

getFile1

public java.net.URI getFile1()
Specified by:
getFile1 in interface Alignment

setFile1

public void setFile1(java.net.URI u)
Description copied from interface: Alignment
Alignment type: Currently defined a sa String. This string is supposed to contain two characters: among ?, 1, *, + Can be implemented otherwise

Specified by:
setFile1 in interface Alignment

getFile2

public java.net.URI getFile2()
Specified by:
getFile2 in interface Alignment

setFile2

public void setFile2(java.net.URI u)
Specified by:
setFile2 in interface Alignment

getElements

public java.util.Enumeration getElements()
Specified by:
getElements in interface Alignment

addAlignCell

public Cell addAlignCell(java.lang.Object ob1,
                         java.lang.Object ob2,
                         java.lang.String relation,
                         double measure)
                  throws AlignmentException
Cell methods *

Specified by:
addAlignCell in interface Alignment
Throws:
AlignmentException

addAlignCell

public Cell addAlignCell(java.lang.Object ob1,
                         java.lang.Object ob2)
                  throws AlignmentException
Specified by:
addAlignCell in interface Alignment
Throws:
AlignmentException

getAlignCell1

public Cell getAlignCell1(java.lang.Object ob)
                   throws AlignmentException
Specified by:
getAlignCell1 in interface Alignment
Throws:
AlignmentException

getAlignCell2

public Cell getAlignCell2(java.lang.Object ob)
                   throws AlignmentException
Specified by:
getAlignCell2 in interface Alignment
Throws:
AlignmentException

getAlignedObject1

public java.lang.Object getAlignedObject1(java.lang.Object ob)
                                   throws AlignmentException
Description copied from interface: Alignment
Each part of the cell can be queried independently. There is not cell access out of the alignment objects.

Specified by:
getAlignedObject1 in interface Alignment
Throws:
AlignmentException

getAlignedObject2

public java.lang.Object getAlignedObject2(java.lang.Object ob)
                                   throws AlignmentException
Specified by:
getAlignedObject2 in interface Alignment
Throws:
AlignmentException

getAlignedRelation1

public Relation getAlignedRelation1(java.lang.Object ob)
                             throws AlignmentException
Specified by:
getAlignedRelation1 in interface Alignment
Throws:
AlignmentException

getAlignedRelation2

public Relation getAlignedRelation2(java.lang.Object ob)
                             throws AlignmentException
Specified by:
getAlignedRelation2 in interface Alignment
Throws:
AlignmentException

getAlignedStrength1

public double getAlignedStrength1(java.lang.Object ob)
                           throws AlignmentException
Specified by:
getAlignedStrength1 in interface Alignment
Throws:
AlignmentException

getAlignedStrength2

public double getAlignedStrength2(java.lang.Object ob)
                           throws AlignmentException
Specified by:
getAlignedStrength2 in interface Alignment
Throws:
AlignmentException

cut2

public void cut2(double threshold)
          throws AlignmentException
The cut function suppresses from an alignment all the cell over a particulat threshold

Throws:
AlignmentException

cut

public void cut(double threshold)
         throws AlignmentException
Default cut implementation For compatibility with API until version 1.1

Specified by:
cut in interface Alignment
Throws:
AlignmentException

cut

public void cut(java.lang.String method,
                double threshold)
         throws AlignmentException
Cut refinement : - above n (hard) - above n under the best () - getting the n% better (perc) - getting the under n% of the best (prop) - getting the n best values

Specified by:
cut in interface Alignment
Throws:
AlignmentException

harden

public void harden(double threshold)
            throws AlignmentException
The harden function acts like threshold but put all weights to 1.

Specified by:
harden in interface Alignment
Throws:
AlignmentException

meet

public Alignment meet(Alignment align)
               throws AlignmentException
The second alignment is meet with the first one meaning that for any pair (o, o', n, r) in O and (o, o', n', r) in O' the resulting alignment will contain: ( o, o', meet(n,n'), r) any pair which is in only one alignment is preserved.

Specified by:
meet in interface Alignment
Throws:
AlignmentException

join

public Alignment join(Alignment align)
               throws AlignmentException
The second alignment is join with the first one meaning that for any pair (o, o', n, r) in O and (o, o', n', r) in O' the resulting alignment will contain: ( o, o", join(n,n'), r) any pair which is in only one alignment is discarded.

Specified by:
join in interface Alignment
Throws:
AlignmentException

compose

public Alignment compose(Alignment align)
                  throws AlignmentException
The second alignment is composed with the first one meaning that for any pair (o, o', n, r) in O and (o',o", n', r') in O' the resulting alignment will contain: ( o, o", join(n,n'), compose(r, r')) iff compose(r,r') exists.

Specified by:
compose in interface Alignment
Throws:
AlignmentException

inverse

public void inverse()
A new alignment is created such that for any pair (o, o', n, r) in O the resulting alignment will contain: ( o', o, n, inverse(r)) iff compose(r) exists.

Specified by:
inverse in interface Alignment

dump

public void dump(org.xml.sax.ContentHandler h)
Housekeeping *

Specified by:
dump in interface Alignment

ingest

protected void ingest(Alignment alignment)
               throws AlignmentException
Incorporate the cell of the alignment into it own alignment. Note: for the moment, this does not copy but really incorporates. So, if hardening or cutting, are applied, then the ingested alignmment will be modified as well.

Throws:
AlignmentException

render

public void render(AlignmentVisitor renderer)
            throws AlignmentException
This should be rewritten in order to generate the axiom ontology instead of printing it! And then use ontology serialization for getting it printed.

Specified by:
render in interface Alignment
Throws:
AlignmentException

INRIA & UMontrŽal

..no bottom yet...