|
Alignment API and Server 4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.inrialpes.exmo.align.impl.BasicAlignment
public class BasicAlignment
Represents a basic ontology alignment, i.e., a fully functionnal alignment for wich the type of aligned objects is not known. In version 3.0 this class is virtually abstract. But it cannot be declared abstract because it uses its own constructor.
| Field Summary | |
|---|---|
protected int |
debug
|
protected Extensions |
extensions
|
protected Hashtable<Object,Set<Cell>> |
hash1
|
protected Hashtable<Object,Set<Cell>> |
hash2
|
protected String |
level
|
protected BasicParameters |
namespaces
|
protected Ontology<Object> |
onto1
|
protected Ontology<Object> |
onto2
|
protected long |
time
|
protected String |
type
|
| Constructor Summary | |
|---|---|
BasicAlignment()
|
|
| Method Summary | |
|---|---|
void |
accept(AlignmentVisitor visitor)
|
Cell |
addAlignCell(Object ob1,
Object ob2)
|
Cell |
addAlignCell(Object ob1,
Object ob2,
String relation,
double measure)
Cells are created and indexed at once |
Cell |
addAlignCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure)
|
Cell |
addAlignCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure,
Extensions extensions)
Cell methods |
protected void |
addCell(Cell c)
|
void |
cleanUp()
Can be used for reducing the amount of memory taken by an alignment Does nothing in BasicAlignment. |
Object |
clone()
Generate a copy of this alignment object It has the same content but a different id (no id indeed) |
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. |
Cell |
createCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure)
|
BasicAlignment |
createNewAlignment(Object onto1,
Object onto2)
Algebraic part This is to be improved by (TODO): - improving cell equivalence (maybe not dependent on the confidence... |
void |
cut(double threshold)
Default cut implementation For compatibility with API until version 1.1 |
void |
cut(String method,
double threshold)
Cut refinement : - getting those cells with strength above n (hard) - getting the n best cells (best) - getting those cells with strength at worse n under the best (span) - getting the n% best cells (perc) - getting those cells with strength at worse n% of the best (prop) - getting all cells until a gap of n (hardgap) - getting all cells until a gap of n% of the last (propgap) Rule: threshold is betweew 1 and 0 |
void |
cut2(double threshold)
The cut function suppresses from an alignment all the cell over a particular threshold |
Alignment |
diff(Alignment align)
The second alignment is suppresed from 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', diff(n,n'), r) any pair which is only in the first alignment is preserved. |
void |
dump(ContentHandler h)
Housekeeping |
Cell |
getAlignCell1(Object ob)
Cells are retrieved These primitives are deprecated. |
Cell |
getAlignCell2(Object ob)
//@deprecated There is more than one cell about one object |
Set<Cell> |
getAlignCells1(Object ob)
Cells are retrieved These primitives are deprecated. |
Set<Cell> |
getAlignCells2(Object ob)
|
Object |
getAlignedObject1(Object ob)
Each part of the cell can be queried independently. |
Object |
getAlignedObject2(Object ob)
|
Relation |
getAlignedRelation1(Object ob)
|
Relation |
getAlignedRelation2(Object ob)
|
double |
getAlignedStrength1(Object ob)
|
double |
getAlignedStrength2(Object ob)
|
ArrayList<Cell> |
getArrayElements()
|
Enumeration<Cell> |
getElements()
|
String |
getExtension(String uri,
String label)
|
Collection<String[]> |
getExtensions()
Extensions are a way to read and add other information (metadata) to the alignment structure itself. |
URI |
getFile1()
|
URI |
getFile2()
|
String |
getLevel()
|
Object |
getOntology1()
Alignment methods * |
URI |
getOntology1URI()
|
Object |
getOntology2()
|
URI |
getOntology2URI()
|
Ontology<Object> |
getOntologyObject1()
|
Ontology<Object> |
getOntologyObject2()
|
static Properties |
getParameters()
|
String |
getType()
|
String |
getXNamespace(String label)
|
BasicParameters |
getXNamespaces()
|
void |
harden(double threshold)
The harden function acts like threshold but put all weights to 1. |
void |
ingest(Alignment alignment)
Incorporate the cells of the alignment into its own alignment. |
void |
init(Object onto1,
Object onto2)
Initialize the alignement before using it |
void |
init(Object onto1,
Object onto2,
Object cache)
Initialises the Alignment object with two ontologies. |
Alignment |
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. |
Iterator<Cell> |
iterator()
|
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 |
remCell(Cell c)
|
void |
removeAlignCell(Cell c)
|
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 |
setExtension(String uri,
String label,
String value)
|
void |
setExtensions(Extensions ext)
|
void |
setFile1(URI u)
Alignment type: Currently defined a sa String. |
void |
setFile2(URI u)
|
void |
setLevel(String level)
Alignment type: Currently defined a sa String. |
void |
setOntology1(Object ontology)
|
void |
setOntology2(Object ontology)
|
void |
setType(String type)
Alignment type: Currently defined a sa String. |
void |
setXNamespace(String label,
String uri)
|
URIAlignment |
toURIAlignment()
Returns default exception for conversion to URIAlignments |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Ontology<Object> onto1
protected Ontology<Object> onto2
protected int debug
protected String level
protected String type
protected Hashtable<Object,Set<Cell>> hash1
protected Hashtable<Object,Set<Cell>> hash2
protected long time
protected Extensions extensions
protected BasicParameters namespaces
| Constructor Detail |
|---|
public BasicAlignment()
| Method Detail |
|---|
public void accept(AlignmentVisitor visitor)
throws AlignmentException
accept in interface VisitableAlignmentException
public void init(Object onto1,
Object onto2,
Object cache)
throws AlignmentException
init in interface AlignmentAlignmentException
public void init(Object onto1,
Object onto2)
throws AlignmentException
Alignment
init in interface AlignmentAlignmentExceptionpublic static Properties getParameters()
public int nbCells()
nbCells in interface Alignmentpublic Object getOntology1()
getOntology1 in interface Alignmentpublic Object getOntology2()
getOntology2 in interface Alignmentpublic Ontology<Object> getOntologyObject1()
public Ontology<Object> getOntologyObject2()
public URI getOntology1URI()
getOntology1URI in interface Alignmentpublic URI getOntology2URI()
getOntology2URI in interface Alignment
public void setOntology1(Object ontology)
throws AlignmentException
setOntology1 in interface AlignmentAlignmentException
public void setOntology2(Object ontology)
throws AlignmentException
setOntology2 in interface AlignmentAlignmentExceptionpublic void setType(String type)
Alignment
setType in interface Alignmentpublic String getType()
getType in interface Alignmentpublic void setLevel(String level)
Alignment
setLevel in interface Alignmentpublic String getLevel()
getLevel in interface Alignmentpublic URI getFile1()
getFile1 in interface Alignmentpublic void setFile1(URI u)
Alignment
setFile1 in interface Alignmentpublic URI getFile2()
getFile2 in interface Alignmentpublic void setFile2(URI u)
setFile2 in interface Alignmentpublic Collection<String[]> getExtensions()
Alignment
getExtensions in interface Alignmentpublic void setExtensions(Extensions ext)
public void setExtension(String uri,
String label,
String value)
setExtension in interface Alignment
public String getExtension(String uri,
String label)
getExtension in interface Alignmentpublic BasicParameters getXNamespaces()
public void setXNamespace(String label,
String uri)
public String getXNamespace(String label)
public Enumeration<Cell> getElements()
getElements in interface Alignmentpublic Iterator<Cell> iterator()
iterator in interface Iterable<Cell>iterator in interface Alignmentpublic ArrayList<Cell> getArrayElements()
public Cell addAlignCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure,
Extensions extensions)
throws AlignmentException
AlignmentException
public Cell addAlignCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure)
throws AlignmentException
AlignmentException
public Cell addAlignCell(Object ob1,
Object ob2,
String relation,
double measure)
throws AlignmentException
Alignment
addAlignCell in interface AlignmentAlignmentException
public Cell addAlignCell(Object ob1,
Object ob2)
throws AlignmentException
addAlignCell in interface AlignmentAlignmentException
public Cell createCell(String id,
Object ob1,
Object ob2,
Relation relation,
double measure)
throws AlignmentException
AlignmentException
protected void addCell(Cell c)
throws AlignmentException
AlignmentException
public void remCell(Cell c)
throws AlignmentException
remCell in interface AlignmentAlignmentException
public Set<Cell> getAlignCells1(Object ob)
throws AlignmentException
Alignment
getAlignCells1 in interface AlignmentAlignmentException
public Set<Cell> getAlignCells2(Object ob)
throws AlignmentException
getAlignCells2 in interface AlignmentAlignmentException
public Cell getAlignCell1(Object ob)
throws AlignmentException
Alignment
getAlignCell1 in interface AlignmentAlignmentException
public Cell getAlignCell2(Object ob)
throws AlignmentException
Alignment
getAlignCell2 in interface AlignmentAlignmentException
public Object getAlignedObject1(Object ob)
throws AlignmentException
Alignment
getAlignedObject1 in interface AlignmentAlignmentException
public Object getAlignedObject2(Object ob)
throws AlignmentException
getAlignedObject2 in interface AlignmentAlignmentException
public Relation getAlignedRelation1(Object ob)
throws AlignmentException
getAlignedRelation1 in interface AlignmentAlignmentException
public Relation getAlignedRelation2(Object ob)
throws AlignmentException
getAlignedRelation2 in interface AlignmentAlignmentException
public double getAlignedStrength1(Object ob)
throws AlignmentException
getAlignedStrength1 in interface AlignmentAlignmentException
public double getAlignedStrength2(Object ob)
throws AlignmentException
getAlignedStrength2 in interface AlignmentAlignmentException
public void removeAlignCell(Cell c)
throws AlignmentException
AlignmentException
public void cut2(double threshold)
throws AlignmentException
AlignmentException
public void cut(double threshold)
throws AlignmentException
cut in interface AlignmentAlignmentException
public void cut(String method,
double threshold)
throws AlignmentException
cut in interface AlignmentAlignmentException
public URIAlignment toURIAlignment()
throws AlignmentException
AlignmentException
public void harden(double threshold)
throws AlignmentException
harden in interface AlignmentAlignmentException
public BasicAlignment createNewAlignment(Object onto1,
Object onto2)
throws AlignmentException
AlignmentException
public Alignment diff(Alignment align)
throws AlignmentException
diff in interface AlignmentAlignmentException
public Alignment meet(Alignment align)
throws AlignmentException
meet in interface AlignmentAlignmentException
public Alignment join(Alignment align)
throws AlignmentException
join in interface AlignmentAlignmentException
public Alignment compose(Alignment align)
throws AlignmentException
compose in interface AlignmentAlignmentException
public Alignment inverse()
throws AlignmentException
inverse in interface AlignmentAlignmentExceptionpublic void dump(ContentHandler h)
dump in interface Alignment
public void ingest(Alignment alignment)
throws AlignmentException
AlignmentExceptionpublic Object clone()
clone in interface Alignmentclone in class Object
public void render(AlignmentVisitor renderer)
throws AlignmentException
render in interface AlignmentAlignmentExceptionpublic void cleanUp()
|
Alignment API and Server 4.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||