From 47d835a34508a1c0b60d9ab9d63d21ba4a20c7b8 Mon Sep 17 00:00:00 2001 From: Antonio Garcia-Dominguez Date: Sun, 20 Oct 2024 14:22:27 -0700 Subject: [PATCH] Fix Tycho build --- .gitignore | 3 +++ .../src/org/eclipse/epsilon/emc/rdf/RDFModel.java | 2 +- .../eclipse/epsilon/emc/rdf/RDFModelMultipleUriTest.java | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) 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(); + } }