java.lang.Object
org.apache.jena.graph.impl.WrappedGraph
- All Implemented Interfaces:
Graph,GraphWithPerform
- Direct Known Subclasses:
GraphPlain,MonitorGraph,SafeGraph
A wrapper class which simply defers all operations to its base.
-
Field Summary
Fields inherited from interface org.apache.jena.graph.Graph
emptyGraph -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the triple t (if possible) to the set belonging to this graphvoidclear()Remove all the statements from this graph.voidclose()Free all resources, any further use of this Graph is an error.booleanAnswer true iff the graph contains a triple matching (s, p, o).booleanAnswer true iff the graph contains a triple that t matches; t may be fluid.voidDelete the triple t (if possible) from the set belonging to this graphbooleantrue if this graph's content depends on the other graph.Returns an iterator over Triples matching a pattern.Returns an iterator over all the Triples that match the triple pattern.Deprecated, for removal: This API element is subject to removal in a future version.Answer this Graph's event manager.returns this Graph's prefix mapping.returns this Graph's transaction handlerbooleanisClosed()Answer true iff .close() has been called on this Graph.booleanisEmpty()Answer true iff this graph is empty.booleanCompare this graph with another using the method described in http://www.w3.org/TR/rdf-concepts#section-Graph-syntax Note: this implementation does not handle correctly blank nodes in quoted triples (RDF-star).voidperformAdd(Triple t) addtto this graph, but do not generate any eventvoidremovetfrom this graph, but do not generate any eventvoidRemove all triples that match by find(s, p, o)intsize()For a concrete graph, this returns the number of triples in the graph.
-
Constructor Details
-
WrappedGraph
-
-
Method Details
-
getWrapped
-
dependsOn
Description copied from interface:Graphtrue if this graph's content depends on the other graph. May be pessimistic (i.e. return true if it's not sure). Typically true when a graph is a composition of other graphs, eg union. -
getTransactionHandler
Description copied from interface:Graphreturns this Graph's transaction handler- Specified by:
getTransactionHandlerin interfaceGraph
-
getCapabilities
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Graphreturns this Graph's capabilities- Specified by:
getCapabilitiesin interfaceGraph
-
getEventManager
Description copied from interface:GraphAnswer this Graph's event manager.- Specified by:
getEventManagerin interfaceGraph
-
getPrefixMapping
Description copied from interface:Graphreturns this Graph's prefix mapping. Each call on a given Graph gets the same PrefixMapping object, which is the one used by the Graph.- Specified by:
getPrefixMappingin interfaceGraph
-
add
Description copied from interface:GraphAdd the triple t (if possible) to the set belonging to this graph -
delete
Description copied from interface:GraphDelete the triple t (if possible) from the set belonging to this graph -
clear
public void clear()Description copied from interface:GraphRemove all the statements from this graph. -
remove
Description copied from interface:GraphRemove all triples that match by find(s, p, o) -
find
Description copied from interface:GraphReturns an iterator over all the Triples that match the triple pattern. -
find
Description copied from interface:GraphReturns an iterator over Triples matching a pattern. -
isIsomorphicWith
Description copied from interface:GraphCompare this graph with another using the method described in http://www.w3.org/TR/rdf-concepts#section-Graph-syntax Note: this implementation does not handle correctly blank nodes in quoted triples (RDF-star). If you need to work with RDF-star, use the slower implementation inorg.apache.jena.sparql.util.IsoMatcher.- Specified by:
isIsomorphicWithin interfaceGraph- Parameters:
g- Compare against this.- Returns:
- boolean True if the two graphs are isomorphic.
-
contains
Description copied from interface:GraphAnswer true iff the graph contains a triple matching (s, p, o). s/p/o may be concrete or fluid. Equivalent to find(s,p,o).hasNext, but an implementation is expected to optimise this in easy cases. -
contains
Description copied from interface:GraphAnswer true iff the graph contains a triple that t matches; t may be fluid. -
close
public void close()Description copied from interface:GraphFree all resources, any further use of this Graph is an error. -
isClosed
public boolean isClosed()Description copied from interface:GraphAnswer true iff .close() has been called on this Graph. -
isEmpty
public boolean isEmpty()Description copied from interface:GraphAnswer true iff this graph is empty. "Empty" means "has as few triples as it can manage", because an inference graph may have irremovable axioms and their consequences. -
size
public int size()Description copied from interface:GraphFor a concrete graph, this returns the number of triples in the graph. For graphs which might infer additional triples it results an estimated lower bound of the number of triples. For example, an inference graph might return the number of triples in the raw data graph. -
performAdd
Description copied from interface:GraphWithPerformaddtto this graph, but do not generate any event- Specified by:
performAddin interfaceGraphWithPerform
-
performDelete
Description copied from interface:GraphWithPerformremovetfrom this graph, but do not generate any event- Specified by:
performDeletein interfaceGraphWithPerform
-