01: /*
02: * Created on 13-Jul-05
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.ontoware.semversion;
08:
09: import org.ontoware.rdf2go.Reasoning;
10: import org.ontoware.rdf2go.impl.jena24.ModelImplJena24;
11: import org.ontoware.rdf2go.model.Diff;
12: import org.ontoware.rdf2go.model.Model;
13: import org.ontoware.semversion.impl.SyntacticDiffEngine;
14:
15: /**
16: * @author careng, mvo
17: *
18: */
19: public class SemanticDiffEngine {
20:
21: /**
22: * Diff computation powered by Jena.
23: *
24: * @param a
25: * Model
26: * @param b
27: * Model
28: * @return the semantic diff, according to particular ontology language
29: * @throws Exception
30: */
31: public static Diff getSemanticDiff_RDFS(Model a, Model b)
32: throws Exception {
33: Model inf_a = new ModelImplJena24(Reasoning.rdfs);
34: inf_a.open();
35: inf_a.addAll(a.iterator());
36:
37: Model inf_b = new ModelImplJena24(Reasoning.rdfs);
38: inf_b.open();
39: inf_b.addAll(b.iterator());
40:
41: return SyntacticDiffEngine.getSyntacticDiff(inf_a, inf_b);
42: }
43:
44: }
|