scheiße
This commit is contained in:
parent
9113312549
commit
fac86a94fb
Binary file not shown.
@ -1,5 +1,10 @@
|
||||
package de.tudarmstadt.ke.sw.matching;
|
||||
|
||||
//TODO: luffŠhiges Programm (2 Pkt.)
|
||||
// ein strukturbasiertes Verfahren (1 Pkt.),
|
||||
// ein externes oder semantisches Verfahren (1 Pkt.)
|
||||
// -> Tests mit Benchmarks und Doku (1 Pkt.)
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
@ -14,9 +19,12 @@ import org.semanticweb.owl.align.AlignmentProcess;
|
||||
import org.semanticweb.owl.align.Cell;
|
||||
import org.semanticweb.owl.align.Evaluator;
|
||||
|
||||
import com.hp.hpl.jena.graph.Graph;
|
||||
import com.hp.hpl.jena.graph.Node;
|
||||
import com.hp.hpl.jena.ontology.OntClass;
|
||||
import com.hp.hpl.jena.ontology.OntModel;
|
||||
import com.hp.hpl.jena.rdf.model.ModelFactory;
|
||||
import com.hp.hpl.jena.rdf.model.ModelGraphInterface;
|
||||
import com.hp.hpl.jena.util.iterator.ExtendedIterator;
|
||||
|
||||
import fr.inrialpes.exmo.align.impl.BasicAlignment;
|
||||
@ -30,7 +38,7 @@ public class MyMatcher extends BasicAlignment implements AlignmentProcess {
|
||||
|
||||
private URI uri1;
|
||||
private URI uri2;
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Object arg0, Object arg1) throws AlignmentException {
|
||||
uri1 = (URI) arg0;
|
||||
@ -47,6 +55,18 @@ public class MyMatcher extends BasicAlignment implements AlignmentProcess {
|
||||
OntModel onto2 = ModelFactory.createOntologyModel();
|
||||
onto2.read(uri2.toString());
|
||||
|
||||
Graph graph1 = onto2.getGraph();
|
||||
Graph graph2 = onto2.getGraph();
|
||||
|
||||
|
||||
boolean iso = graph1.isIsomorphicWith(graph2);
|
||||
System.out.println(iso);
|
||||
|
||||
|
||||
int size1 = graph1.size();
|
||||
System.out.println(size1);
|
||||
|
||||
|
||||
// key: name
|
||||
// value: uri
|
||||
HashMap<String,String> classNames1 = new HashMap<String,String>();
|
||||
@ -68,6 +88,8 @@ public class MyMatcher extends BasicAlignment implements AlignmentProcess {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) throws AlignmentException {
|
||||
String testCase = "103";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user