Mentions légales du service

Skip to content
Snippets Groups Projects
Commit aa5b7eb7 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- dealt with cell extensions into import to OWLAPI

- added cell extentions in addAlignCell
parent 1fa7c1b2
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,12 @@ public class BasicAlignment implements Alignment {
}
/** Cell methods **/
public Cell addAlignCell( String id, Object ob1, Object ob2, Relation relation, double measure, Parameters extensions ) throws AlignmentException {
Cell cell = createCell( id, ob1, ob2, relation, measure);
cell.setExtensions( extensions );
addCell( cell );
return cell;
}
public Cell addAlignCell( String id, Object ob1, Object ob2, Relation relation, double measure ) throws AlignmentException {
Cell cell = createCell( id, ob1, ob2, relation, measure);
addCell( cell );
......
......@@ -140,6 +140,11 @@ public class OWLAPIAlignment extends BasicAlignment {
};
/** Cell methods **/
public Cell addAlignCell(String id, Object ob1, Object ob2, Relation relation, double measure, Parameters extensions ) throws AlignmentException {
if ( !( ob1 instanceof OWLEntity && ob2 instanceof OWLEntity ) )
throw new AlignmentException("arguments must be OWLEntities");
return super.addAlignCell( id, ob1, ob2, relation, measure, extensions);
};
public Cell addAlignCell(String id, Object ob1, Object ob2, Relation relation, double measure) throws AlignmentException {
if ( !( ob1 instanceof OWLEntity && ob2 instanceof OWLEntity ) )
throw new AlignmentException("arguments must be OWLEntities");
......@@ -274,7 +279,8 @@ public class OWLAPIAlignment extends BasicAlignment {
getEntity( onto1, c.getObject1AsURI() ),
getEntity( onto2, c.getObject2AsURI() ),
c.getRelation(),
c.getStrength() );
c.getStrength(),
c.getExtensions() );
};
return alignment;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment