@Test public void testGetContextIDs() throws Exception { ValueFactory vf = SimpleValueFactory.getInstance(); Configuration cfg = HBaseServerTestInstance.getInstanceConfig(); HBaseSail sail = new HBaseSail(cfg, "whatevertablectx", true, 0, true, 0, null, null); sail.initialize(); sail.addStatement(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, vf.createIRI("http: sail.commit(); try (CloseableIteration<? extends Resource, SailException> ctxIt = sail.getContextIDs()) { assertTrue(ctxIt.hasNext()); assertEquals("http: } }
@Override public CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { final CloseableIteration<? extends Statement, SailException> scanner = getStatements(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, null, true, HALYARD.STATS_GRAPH_CONTEXT); return new CloseableIteration<Resource, SailException>() { @Override public void close() throws SailException { scanner.close(); } @Override public boolean hasNext() throws SailException { return scanner.hasNext(); } @Override public Resource next() throws SailException { return (IRI)scanner.next().getObject(); } @Override public void remove() throws SailException { throw new UnsupportedOperationException(); } }; }
HBaseSail implements Sail, SailConnection, FederatedServiceResolver, FederatedService { @Override public CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { final CloseableIteration<? extends Statement, SailException> scanner = getStatements(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, null, true, HALYARD.STATS_GRAPH_CONTEXT); return new CloseableIteration<Resource, SailException>() { @Override public void close() throws SailException { scanner.close(); } @Override public boolean hasNext() throws SailException { return scanner.hasNext(); } @Override public Resource next() throws SailException { return (IRI)scanner.next().getObject(); } @Override public void remove() throws SailException { throw new UnsupportedOperationException(); } }; } }
HBaseSail implements Sail, SailConnection, FederatedServiceResolver, FederatedService { @Override public CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { final CloseableIteration<? extends Statement, SailException> scanner = getStatements(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, null, true, HALYARD.STATS_GRAPH_CONTEXT); return new CloseableIteration<Resource, SailException>() { @Override public void close() throws SailException { scanner.close(); } @Override public boolean hasNext() throws SailException { return scanner.hasNext(); } @Override public Resource next() throws SailException { return (IRI)scanner.next().getObject(); } @Override public void remove() throws SailException { throw new UnsupportedOperationException(); } }; } HBaseSail(Configuration config, String tableName, boolean create, int splitBits, boolean pushStrategy, int evaluationTimeout, String elasticIndexURL, Ticker ticker); }
HBaseSail implements Sail, SailConnection, FederatedServiceResolver, FederatedService { @Override public CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { final CloseableIteration<? extends Statement, SailException> scanner = getStatements(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, null, true, HALYARD.STATS_GRAPH_CONTEXT); return new CloseableIteration<Resource, SailException>() { @Override public void close() throws SailException { scanner.close(); } @Override public boolean hasNext() throws SailException { return scanner.hasNext(); } @Override public Resource next() throws SailException { return (IRI)scanner.next().getObject(); } @Override public void remove() throws SailException { throw new UnsupportedOperationException(); } }; } HBaseSail(Configuration config, String tableName, boolean create, int splitBits, boolean pushStrategy, int evaluationTimeout, String elasticIndexURL, Ticker ticker); @Override void setDataDir(File dataDir); @Override File getDataDir(); @Override void initialize(); @Override FederatedService getService(String serviceUrl); @Override boolean ask(Service service, BindingSet bindings, String baseUri); @Override CloseableIteration<BindingSet, QueryEvaluationException> select(Service service, Set<String> projectionVars, BindingSet bindings, String baseUri); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Service service, CloseableIteration<BindingSet, QueryEvaluationException> bindings, String baseUri); @Override boolean isInitialized(); @Override void shutdown(); @Override void shutDown(); @Override boolean isWritable(); @Override SailConnection getConnection(); @Override ValueFactory getValueFactory(); @Override List<IsolationLevel> getSupportedIsolationLevels(); @Override IsolationLevel getDefaultIsolationLevel(); @Override boolean isOpen(); @Override void close(); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings, final boolean includeInferred); @Override CloseableIteration<? extends Resource, SailException> getContextIDs(); @Override CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts); @Override synchronized long size(Resource... contexts); @Override void begin(); @Override void begin(IsolationLevel level); @Override void flush(); @Override void prepare(); @Override void commit(); @Override void rollback(); @Override boolean isActive(); @Override void addStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts); @Override void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts); @Override void removeStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts); @Override void removeStatements(Resource subj, IRI pred, Value obj, Resource... contexts); @Override boolean pendingRemovals(); @Override void startUpdate(UpdateContext op); @Override void endUpdate(UpdateContext op); @Override void clear(Resource... contexts); @Override String getNamespace(String prefix); @Override CloseableIteration<? extends Namespace, SailException> getNamespaces(); @Override void setNamespace(String prefix, String name); @Override void removeNamespace(String prefix); @Override void clearNamespaces(); }
HBaseSail implements Sail, SailConnection, FederatedServiceResolver, FederatedService { @Override public CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { final CloseableIteration<? extends Statement, SailException> scanner = getStatements(HALYARD.STATS_ROOT_NODE, SD.NAMED_GRAPH_PROPERTY, null, true, HALYARD.STATS_GRAPH_CONTEXT); return new CloseableIteration<Resource, SailException>() { @Override public void close() throws SailException { scanner.close(); } @Override public boolean hasNext() throws SailException { return scanner.hasNext(); } @Override public Resource next() throws SailException { return (IRI)scanner.next().getObject(); } @Override public void remove() throws SailException { throw new UnsupportedOperationException(); } }; } HBaseSail(Configuration config, String tableName, boolean create, int splitBits, boolean pushStrategy, int evaluationTimeout, String elasticIndexURL, Ticker ticker); @Override void setDataDir(File dataDir); @Override File getDataDir(); @Override void initialize(); @Override FederatedService getService(String serviceUrl); @Override boolean ask(Service service, BindingSet bindings, String baseUri); @Override CloseableIteration<BindingSet, QueryEvaluationException> select(Service service, Set<String> projectionVars, BindingSet bindings, String baseUri); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(Service service, CloseableIteration<BindingSet, QueryEvaluationException> bindings, String baseUri); @Override boolean isInitialized(); @Override void shutdown(); @Override void shutDown(); @Override boolean isWritable(); @Override SailConnection getConnection(); @Override ValueFactory getValueFactory(); @Override List<IsolationLevel> getSupportedIsolationLevels(); @Override IsolationLevel getDefaultIsolationLevel(); @Override boolean isOpen(); @Override void close(); @Override CloseableIteration<BindingSet, QueryEvaluationException> evaluate(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings, final boolean includeInferred); @Override CloseableIteration<? extends Resource, SailException> getContextIDs(); @Override CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts); @Override synchronized long size(Resource... contexts); @Override void begin(); @Override void begin(IsolationLevel level); @Override void flush(); @Override void prepare(); @Override void commit(); @Override void rollback(); @Override boolean isActive(); @Override void addStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts); @Override void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts); @Override void removeStatement(UpdateContext op, Resource subj, IRI pred, Value obj, Resource... contexts); @Override void removeStatements(Resource subj, IRI pred, Value obj, Resource... contexts); @Override boolean pendingRemovals(); @Override void startUpdate(UpdateContext op); @Override void endUpdate(UpdateContext op); @Override void clear(Resource... contexts); @Override String getNamespace(String prefix); @Override CloseableIteration<? extends Namespace, SailException> getNamespaces(); @Override void setNamespace(String prefix, String name); @Override void removeNamespace(String prefix); @Override void clearNamespaces();  }