@Test public void testSingleMatchingContext() throws IOException { Dataset ds = Utils.createTestDataset("/atommodel/atom8.trig"); AtomModelWrapper atomModelWrapper = new AtomModelWrapper(ds); Assert.assertEquals(1, atomModelWrapper.getMatchingContexts().size()); Assert.assertTrue("expected matching context 'TU_Wien'", atomModelWrapper.getMatchingContexts().contains("TU_Wien")); }
public Collection<String> getMatchingContexts() { Collection<String> matchingContexts = new LinkedList<>(); NodeIterator iter = getAtomModel().listObjectsOfProperty(getAtomContentNode(), WONMATCH.matchingContext); while (iter.hasNext()) { matchingContexts.add(iter.next().asLiteral().getString()); } return matchingContexts; }
AtomModelWrapper { public Collection<String> getMatchingContexts() { Collection<String> matchingContexts = new LinkedList<>(); NodeIterator iter = getAtomModel().listObjectsOfProperty(getAtomContentNode(), WONMATCH.matchingContext); while (iter.hasNext()) { matchingContexts.add(iter.next().asLiteral().getString()); } return matchingContexts; } }
AtomModelWrapper { public Collection<String> getMatchingContexts() { Collection<String> matchingContexts = new LinkedList<>(); NodeIterator iter = getAtomModel().listObjectsOfProperty(getAtomContentNode(), WONMATCH.matchingContext); while (iter.hasNext()) { matchingContexts.add(iter.next().asLiteral().getString()); } return matchingContexts; } AtomModelWrapper(URI atomUri);  AtomModelWrapper(String atomUri);  AtomModelWrapper(Dataset ds);  AtomModelWrapper(Dataset ds, boolean addDefaultGraphs);  AtomModelWrapper(Model atomModel, Model sysInfoModel); }
AtomModelWrapper { public Collection<String> getMatchingContexts() { Collection<String> matchingContexts = new LinkedList<>(); NodeIterator iter = getAtomModel().listObjectsOfProperty(getAtomContentNode(), WONMATCH.matchingContext); while (iter.hasNext()) { matchingContexts.add(iter.next().asLiteral().getString()); } return matchingContexts; } AtomModelWrapper(URI atomUri);  AtomModelWrapper(String atomUri);  AtomModelWrapper(Dataset ds);  AtomModelWrapper(Dataset ds, boolean addDefaultGraphs);  AtomModelWrapper(Model atomModel, Model sysInfoModel); Dataset getDataset(); static boolean isAAtom(Dataset ds); Model getAtomModel(); Model getSysInfoModel(); boolean hasDerivedModel(); Optional<Model> getDerivedModel(); Model copyAtomModel(AtomGraphType graph); Dataset copyDataset(); Dataset copyDatasetWithoutSysinfo(); Resource getAtomContentNode(); String getAtomUri(); void addFlag(Resource flag); boolean flag(Resource flag); Calendar getDoNotMatchBefore(); Calendar getDoNotMatchAfter(); void renameResourceWithPrefix(String prefix, String replacement); void setAtomURI(URI newAtomURI); void setAtomURI(String newAtomURI); void addMatchingContext(String context); boolean matchingContext(String context); void addQuery(String query); void setQuery(String query); void removeQuery(); Optional<String> getQuery(); boolean sparqlQuery(); Collection<String> getMatchingContexts(); void addSocket(String socketUri, String socketTypeUri); @Deprecated void setDefaultSocket(String socketUri); @Deprecated Optional<String> getDefaultSocket(); Collection<String> getSocketUris(); Map<URI, URI> getSocketTypeUriMap(); Optional<String> getSocketType(String socketUri); Optional<URI> getSocketTypeUri(String socketUri); Collection<Resource> getGoals(); Resource getGoal(String uri); Model getShapesGraph(Resource goalNode); String getShapesGraphName(Resource goalNode); Model getDataGraph(Resource goalNode); String getDataGraphName(Resource goalNode); void setAtomState(AtomState state); AtomState getAtomState(); ZonedDateTime getCreationDate(); ZonedDateTime getModifiedDate(); void setConnectionContainerUri(String containerUri); String getConnectionContainerUri(); void setWonNodeUri(String nodeUri); String getWonNodeUri(); Resource createGoalNode(String uri); Resource createSeeksNode(String uri); Collection<Resource> getGoalNodes(); Collection<Resource> getSeeksNodes(); Collection<Resource> getAllContentNodes(); Collection<Resource> getSeeksSeeksNodes(); void setContentPropertyStringValue(Property p, String value); void setSeeksPropertyStringValue(Property p, String value); void addPropertyStringValue(Property p, String value); void addSeeksPropertyStringValue(Property p, String value); String getContentPropertyStringValue(Resource contentNode, Property p); String getContentPropertyStringValue(Property p); String getContentPropertyStringValue(String propertyPath); Collection<String> getContentPropertyStringValues(Resource contentNode, Property p, String language); Collection<RDFNode> getContentPropertyObjects(Resource contentNode, Property p); Collection<String> getAllContentPropertyStringValues(Property p, String language); Collection<String> getContentPropertyStringValues(Property p, String language); Collection<String> getSeeksPropertyStringValues(Property p); Collection<String> getSeeksPropertyStringValues(Property p, String language); Collection<RDFNode> getSeeksPropertyObjects(Property p); String getSomeContentPropertyStringValue(Resource contentNode, Property p); String getSomeContentPropertyStringValue(Resource contentNode, Property p, String... preferredLanguages); String getSomeContentPropertyStringValue(Property p, String... preferredLanguages); String getAtomContentPropertyStringValue(Property p, String... preferredLanguages); Collection<RDFNode> getContentPropertyObjects(Property p); Model normalizeAtomModel(); }
AtomModelWrapper { public Collection<String> getMatchingContexts() { Collection<String> matchingContexts = new LinkedList<>(); NodeIterator iter = getAtomModel().listObjectsOfProperty(getAtomContentNode(), WONMATCH.matchingContext); while (iter.hasNext()) { matchingContexts.add(iter.next().asLiteral().getString()); } return matchingContexts; } AtomModelWrapper(URI atomUri);  AtomModelWrapper(String atomUri);  AtomModelWrapper(Dataset ds);  AtomModelWrapper(Dataset ds, boolean addDefaultGraphs);  AtomModelWrapper(Model atomModel, Model sysInfoModel); Dataset getDataset(); static boolean isAAtom(Dataset ds); Model getAtomModel(); Model getSysInfoModel(); boolean hasDerivedModel(); Optional<Model> getDerivedModel(); Model copyAtomModel(AtomGraphType graph); Dataset copyDataset(); Dataset copyDatasetWithoutSysinfo(); Resource getAtomContentNode(); String getAtomUri(); void addFlag(Resource flag); boolean flag(Resource flag); Calendar getDoNotMatchBefore(); Calendar getDoNotMatchAfter(); void renameResourceWithPrefix(String prefix, String replacement); void setAtomURI(URI newAtomURI); void setAtomURI(String newAtomURI); void addMatchingContext(String context); boolean matchingContext(String context); void addQuery(String query); void setQuery(String query); void removeQuery(); Optional<String> getQuery(); boolean sparqlQuery(); Collection<String> getMatchingContexts(); void addSocket(String socketUri, String socketTypeUri); @Deprecated void setDefaultSocket(String socketUri); @Deprecated Optional<String> getDefaultSocket(); Collection<String> getSocketUris(); Map<URI, URI> getSocketTypeUriMap(); Optional<String> getSocketType(String socketUri); Optional<URI> getSocketTypeUri(String socketUri); Collection<Resource> getGoals(); Resource getGoal(String uri); Model getShapesGraph(Resource goalNode); String getShapesGraphName(Resource goalNode); Model getDataGraph(Resource goalNode); String getDataGraphName(Resource goalNode); void setAtomState(AtomState state); AtomState getAtomState(); ZonedDateTime getCreationDate(); ZonedDateTime getModifiedDate(); void setConnectionContainerUri(String containerUri); String getConnectionContainerUri(); void setWonNodeUri(String nodeUri); String getWonNodeUri(); Resource createGoalNode(String uri); Resource createSeeksNode(String uri); Collection<Resource> getGoalNodes(); Collection<Resource> getSeeksNodes(); Collection<Resource> getAllContentNodes(); Collection<Resource> getSeeksSeeksNodes(); void setContentPropertyStringValue(Property p, String value); void setSeeksPropertyStringValue(Property p, String value); void addPropertyStringValue(Property p, String value); void addSeeksPropertyStringValue(Property p, String value); String getContentPropertyStringValue(Resource contentNode, Property p); String getContentPropertyStringValue(Property p); String getContentPropertyStringValue(String propertyPath); Collection<String> getContentPropertyStringValues(Resource contentNode, Property p, String language); Collection<RDFNode> getContentPropertyObjects(Resource contentNode, Property p); Collection<String> getAllContentPropertyStringValues(Property p, String language); Collection<String> getContentPropertyStringValues(Property p, String language); Collection<String> getSeeksPropertyStringValues(Property p); Collection<String> getSeeksPropertyStringValues(Property p, String language); Collection<RDFNode> getSeeksPropertyObjects(Property p); String getSomeContentPropertyStringValue(Resource contentNode, Property p); String getSomeContentPropertyStringValue(Resource contentNode, Property p, String... preferredLanguages); String getSomeContentPropertyStringValue(Property p, String... preferredLanguages); String getAtomContentPropertyStringValue(Property p, String... preferredLanguages); Collection<RDFNode> getContentPropertyObjects(Property p); Model normalizeAtomModel();  }