|
Alignment API and Server 4.2.${version.update} | |||||||||
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)
|
double |
avgConfidence()
|
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. |
Extensions |
convertExtension(String label,
String method)
|
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. |
double |
maxConfidence()
A few statistical primitives, undocumented |
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. |
double |
minConfidence()
|
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 |
double |
varianceConfidence()
|
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 Visitable
AlignmentException
public void init(Object onto1, Object onto2, Object cache) throws AlignmentException
init
in interface Alignment
AlignmentException
public void init(Object onto1, Object onto2) throws AlignmentException
Alignment
init
in interface Alignment
AlignmentException
public static Properties getParameters()
public int nbCells()
nbCells
in interface Alignment
public double maxConfidence()
public double minConfidence()
public double avgConfidence()
public double varianceConfidence()
public Object getOntology1()
getOntology1
in interface Alignment
public Object getOntology2()
getOntology2
in interface Alignment
public Ontology<Object> getOntologyObject1()
public Ontology<Object> getOntologyObject2()
public URI getOntology1URI()
getOntology1URI
in interface Alignment
public URI getOntology2URI()
getOntology2URI
in interface Alignment
public void setOntology1(Object ontology) throws AlignmentException
setOntology1
in interface Alignment
AlignmentException
public void setOntology2(Object ontology) throws AlignmentException
setOntology2
in interface Alignment
AlignmentException
public void setType(String type)
Alignment
setType
in interface Alignment
public String getType()
getType
in interface Alignment
public void setLevel(String level)
Alignment
setLevel
in interface Alignment
public String getLevel()
getLevel
in interface Alignment
public URI getFile1()
getFile1
in interface Alignment
public void setFile1(URI u)
Alignment
setFile1
in interface Alignment
public URI getFile2()
getFile2
in interface Alignment
public void setFile2(URI u)
setFile2
in interface Alignment
public Collection<String[]> getExtensions()
Alignment
getExtensions
in interface Alignment
public 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 Alignment
public BasicParameters getXNamespaces()
public void setXNamespace(String label, String uri)
public String getXNamespace(String label)
public Enumeration<Cell> getElements()
getElements
in interface Alignment
public Iterator<Cell> iterator()
iterator
in interface Iterable<Cell>
iterator
in interface Alignment
public 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 Alignment
AlignmentException
public Cell addAlignCell(Object ob1, Object ob2) throws AlignmentException
addAlignCell
in interface Alignment
AlignmentException
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 Alignment
AlignmentException
public Set<Cell> getAlignCells1(Object ob) throws AlignmentException
Alignment
getAlignCells1
in interface Alignment
AlignmentException
public Set<Cell> getAlignCells2(Object ob) throws AlignmentException
getAlignCells2
in interface Alignment
AlignmentException
public Cell getAlignCell1(Object ob) throws AlignmentException
Alignment
getAlignCell1
in interface Alignment
AlignmentException
public Cell getAlignCell2(Object ob) throws AlignmentException
Alignment
getAlignCell2
in interface Alignment
AlignmentException
public Object getAlignedObject1(Object ob) throws AlignmentException
Alignment
getAlignedObject1
in interface Alignment
AlignmentException
public Object getAlignedObject2(Object ob) throws AlignmentException
getAlignedObject2
in interface Alignment
AlignmentException
public Relation getAlignedRelation1(Object ob) throws AlignmentException
getAlignedRelation1
in interface Alignment
AlignmentException
public Relation getAlignedRelation2(Object ob) throws AlignmentException
getAlignedRelation2
in interface Alignment
AlignmentException
public double getAlignedStrength1(Object ob) throws AlignmentException
getAlignedStrength1
in interface Alignment
AlignmentException
public double getAlignedStrength2(Object ob) throws AlignmentException
getAlignedStrength2
in interface Alignment
AlignmentException
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 Alignment
AlignmentException
public void cut(String method, double threshold) throws AlignmentException
cut
in interface Alignment
AlignmentException
public URIAlignment toURIAlignment() throws AlignmentException
AlignmentException
public void harden(double threshold) throws AlignmentException
harden
in interface Alignment
AlignmentException
public BasicAlignment createNewAlignment(Object onto1, Object onto2) throws AlignmentException
AlignmentException
public Alignment diff(Alignment align) throws AlignmentException
diff
in interface Alignment
AlignmentException
public Alignment meet(Alignment align) throws AlignmentException
meet
in interface Alignment
AlignmentException
public Alignment join(Alignment align) throws AlignmentException
join
in interface Alignment
AlignmentException
public Alignment compose(Alignment align) throws AlignmentException
compose
in interface Alignment
AlignmentException
public Extensions convertExtension(String label, String method)
public Alignment inverse() throws AlignmentException
inverse
in interface Alignment
AlignmentException
public void dump(ContentHandler h)
dump
in interface Alignment
public void ingest(Alignment alignment) throws AlignmentException
AlignmentException
public Object clone()
clone
in interface Alignment
clone
in class Object
public void render(AlignmentVisitor renderer) throws AlignmentException
render
in interface Alignment
AlignmentException
public void cleanUp()
|
Alignment API and Server 4.2.${version.update} | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |