Alignment API and Server 4.0

fr.inrialpes.exmo.align.impl
Class BasicCell

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.BasicCell
All Implemented Interfaces:
Comparable<Cell>, Cell, Visitable
Direct Known Subclasses:
EDOALCell, ObjectCell, URICell

public class BasicCell
extends Object
implements Cell, Comparable<Cell>

Represents an ontology alignment correspondence.

Version:
$Id: BasicCell.java 1325 2010-03-10 11:47:07Z euzenat $
Author:
Jérôme Euzenat

Field Summary
protected  Extensions extensions
           
protected  String id
           
protected  Object object1
           
protected  Object object2
           
protected  Relation relation
           
protected  String semantics
           
protected  double strength
           
 
Constructor Summary
BasicCell(String id, Object ob1, Object ob2, Relation rel, double m)
          Creation
 
Method Summary
 void accept(AlignmentVisitor visitor)
           
 int compareTo(Cell c)
          Used to order the cells in an alignment: -- this > c iff this.getStrength() < c.getStrength() --
 Cell compose(Cell c)
           
 void dump(ContentHandler h)
          Housekeeping
 boolean equals(Cell c)
           
 boolean equals(Object c)
           
 String getExtension(String uri, String label)
           
 Collection<String[]> getExtensions()
          Extensions are a way to read and add other information (metadata) to the Cell structure itself.
 String getId()
          Creation
 Object getObject1()
           
 URI getObject1AsURI()
          Since version 3.3, the interpretation of objects (and thus finding their URI) depends on the Ontology API which is used.
 URI getObject1AsURI(Alignment al)
           
 Object getObject2()
           
 URI getObject2AsURI()
          Since version 3.3, the interpretation of objects (and thus finding their URI) depends on the Ontology API which is used.
 URI getObject2AsURI(Alignment al)
           
 Relation getRelation()
           
 String getSemantics()
           
 double getStrength()
           
 int hashCode()
           
 Cell inverse()
           
 void setExtension(String uri, String label, String value)
           
 void setExtensions(Extensions p)
           
 void setId(String id)
           
 void setObject1(Object ob)
           
 void setObject2(Object ob)
           
 void setRelation(Relation rel)
           
 void setSemantics(String sem)
           
 void setStrength(double m)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected String id

semantics

protected String semantics

object1

protected Object object1

object2

protected Object object2

relation

protected Relation relation

strength

protected double strength

extensions

protected Extensions extensions
Constructor Detail

BasicCell

public BasicCell(String id,
                 Object ob1,
                 Object ob2,
                 Relation rel,
                 double m)
          throws AlignmentException
Creation

Throws:
AlignmentException
Method Detail

accept

public void accept(AlignmentVisitor visitor)
            throws AlignmentException
Specified by:
accept in interface Visitable
Throws:
AlignmentException

equals

public boolean equals(Object c)
Overrides:
equals in class Object

equals

public boolean equals(Cell c)
Specified by:
equals in interface Cell

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Cell c)
Used to order the cells in an alignment: -- this > c iff this.getStrength() < c.getStrength() --

Specified by:
compareTo in interface Comparable<Cell>

getId

public String getId()
Description copied from interface: Cell
Creation

Specified by:
getId in interface Cell

setId

public void setId(String id)
Specified by:
setId in interface Cell

getSemantics

public String getSemantics()
Specified by:
getSemantics in interface Cell

setSemantics

public void setSemantics(String sem)
Specified by:
setSemantics in interface Cell

getObject1

public Object getObject1()
Specified by:
getObject1 in interface Cell

getObject2

public Object getObject2()
Specified by:
getObject2 in interface Cell

getObject1AsURI

public URI getObject1AsURI()
                    throws AlignmentException
Since version 3.3, the interpretation of objects (and thus finding their URI) depends on the Ontology API which is used. This information is not stored in the Cells (this would cost two pointers per cell) and thus, most of the time, this will raise an exception. Use Ontology.getEntityURI( this ) instead.

Specified by:
getObject1AsURI in interface Cell
Throws:
AlignmentException

getObject1AsURI

public URI getObject1AsURI(Alignment al)
                    throws AlignmentException
Specified by:
getObject1AsURI in interface Cell
Throws:
AlignmentException

getObject2AsURI

public URI getObject2AsURI()
                    throws AlignmentException
Since version 3.3, the interpretation of objects (and thus finding their URI) depends on the Ontology API which is used. This information is not stored in the Cells (this would cost two pointers per cell) and thus, most of the time, this will raise an exception. Use Ontology.getEntityURI( this ) instead.

Specified by:
getObject2AsURI in interface Cell
Throws:
AlignmentException

getObject2AsURI

public URI getObject2AsURI(Alignment al)
                    throws AlignmentException
Specified by:
getObject2AsURI in interface Cell
Throws:
AlignmentException

setObject1

public void setObject1(Object ob)
                throws AlignmentException
Specified by:
setObject1 in interface Cell
Throws:
AlignmentException

setObject2

public void setObject2(Object ob)
                throws AlignmentException
Specified by:
setObject2 in interface Cell
Throws:
AlignmentException

getRelation

public Relation getRelation()
Specified by:
getRelation in interface Cell

setRelation

public void setRelation(Relation rel)
Specified by:
setRelation in interface Cell

getStrength

public double getStrength()
Specified by:
getStrength in interface Cell

setStrength

public void setStrength(double m)
Specified by:
setStrength in interface Cell

getExtensions

public Collection<String[]> getExtensions()
Description copied from interface: Cell
Extensions are a way to read and add other information (metadata) to the Cell structure itself. getExtensions returns a set of tripes: uri*label*value all three being String

Specified by:
getExtensions in interface Cell

setExtensions

public void setExtensions(Extensions p)

setExtension

public void setExtension(String uri,
                         String label,
                         String value)
Specified by:
setExtension in interface Cell

getExtension

public String getExtension(String uri,
                           String label)
Specified by:
getExtension in interface Cell

inverse

public Cell inverse()
             throws AlignmentException
Specified by:
inverse in interface Cell
Throws:
AlignmentException

compose

public Cell compose(Cell c)
             throws AlignmentException
Specified by:
compose in interface Cell
Throws:
AlignmentException

dump

public void dump(ContentHandler h)
Housekeeping

Specified by:
dump in interface Cell

Alignment API and Server 4.0

(C) INRIA & friends, 2003-2010