diff --git a/.gitignore b/.gitignore index 75ab2e6..a1caeaa 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ replay_pid* # Mac files .DS_Store + +# Maven output +target/ diff --git a/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFModel.java b/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFModel.java index e9a1cf3..c22c454 100644 --- a/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFModel.java +++ b/bundles/org.eclipse.epsilon.emc.rdf/src/org/eclipse/epsilon/emc/rdf/RDFModel.java @@ -263,7 +263,7 @@ protected Object getCacheKeyForType(String type) throws EolModelElementTypeNotFo } @Override - protected Collection getAllTypeNamesOf(Object instance) { + public Collection getAllTypeNamesOf(Object instance) { List types = new ArrayList<>(); if (instance instanceof RDFResource) { diff --git a/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelMultipleUriTest.java b/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelMultipleUriTest.java index f255c31..9a90fb4 100644 --- a/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelMultipleUriTest.java +++ b/tests/org.eclipse.epsilon.emc.rdf.tests/src/org/eclipse/epsilon/emc/rdf/RDFModelMultipleUriTest.java @@ -2,6 +2,8 @@ import static org.junit.Assert.assertEquals; +import java.io.File; + import org.junit.Test; public class RDFModelMultipleUriTest { @@ -12,12 +14,15 @@ public class RDFModelMultipleUriTest { @Test public void classIsAvailable() throws Exception { try (RDFModel model = new RDFModel()) { - model.getUris().add(SPIDERMAN_TTL); - model.getUris().add(FOAF_RDFXML); + model.getUris().add(getAbsoluteURI(SPIDERMAN_TTL)); + model.getUris().add(getAbsoluteURI(FOAF_RDFXML)); model.load(); assertEquals("The FOAF vocabulary has 13 classes", 13, model.getAllOfType("Class").size()); } } + private String getAbsoluteURI(String path) { + return new File(path).getAbsoluteFile().toURI().toString(); + } }