Class AGModel
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Model
,ModelCon
,ModelGraphInterface
,RDFReaderF
,RDFWriterF
,Lock
,PrefixMapping
- Direct Known Subclasses:
AGInfModel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.shared.PrefixMapping
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException
-
Field Summary
Fields inherited from interface org.apache.jena.shared.PrefixMapping
Extended, Standard
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a new blank node with an AG-allocated id.createResource
(AnonId id) Returns a new blank node with the given (a.k.a "external") id.createStatement
(Resource r, Property p, RDFNode o) getGraph()
read
(InputStream reader, String base) read
(InputStream reader, String base, String lang) write
(OutputStream out, String lang) Write a serialized representation of this model in a specified language.write
(OutputStream out, String lang, String base) Write a serialized representation of a model in a specified language.Methods inherited from class org.apache.jena.rdf.model.impl.ModelCom
abort, adapt, add, add, add, add, add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addNamespaces, asModel, asNode, asRDFNode, asStatements, asStatements, asStatements, begin, calculateInTxn, clearNsPrefixMap, close, commit, contains, contains, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsResource, createAlt, createAlt, createBag, createBag, createList, createList, createList, createLiteral, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, enterCriticalSection, executeInTxn, expandPrefix, getAlt, getAlt, getBag, getBag, getList, getList, getLock, getModelLock, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, getProperty, getProperty, getProperty, getProperty, getRDFNode, getReader, getRequiredProperty, getRequiredProperty, getResource, getResource, getSeq, getSeq, getWriter, hasNoMappings, independent, intersect, intersection, isClosed, isEmpty, isIsomorphicWith, leaveCriticalSection, listBySubject, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, lock, notifyEvent, numPrefixes, qnameFor, read, read, read, read, read, register, reifiedToString, remove, remove, remove, remove, remove, removeAll, removeAll, removeNsPrefix, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, size, supportsSetOperations, supportsTransactions, toString, union, unregister, withDefaultMappings, wrapAsResource, write, write, write, write
Methods inherited from class org.apache.jena.enhanced.EnhGraph
asGraph, equals, getNodeAs, hashCode, isIsomorphicWith
Methods inherited from interface org.apache.jena.shared.Lock
enterCriticalSection, leaveCriticalSection
Methods inherited from interface org.apache.jena.rdf.model.Model
abort, add, add, add, add, begin, calculateInTxn, clearNsPrefixMap, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsResource, createList, createList, createList, createLiteral, createProperty, createResource, createResource, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, equals, executeInTxn, getLock, getProperty, getProperty, getProperty, getReader, getRequiredProperty, getRequiredProperty, getResource, getResource, getWriter, independent, intersection, isClosed, isEmpty, isIsomorphicWith, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, notifyEvent, read, read, read, read, read, register, remove, remove, removeAll, removeAll, removeNsPrefix, setNsPrefix, setNsPrefixes, setNsPrefixes, size, supportsSetOperations, supportsTransactions, union, unregister, withDefaultMappings, write, write, write, write
Methods inherited from interface org.apache.jena.rdf.model.ModelCon
add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, contains, contains, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, createAlt, createAlt, createBag, createBag, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, getAlt, getAlt, getBag, getBag, getList, getList, getProperty, getRDFNode, getSeq, getSeq, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove, remove
Methods inherited from interface org.apache.jena.rdf.model.ModelGraphInterface
asRDFNode, wrapAsResource
Methods inherited from interface org.apache.jena.shared.PrefixMapping
expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, hasNoMappings, lock, numPrefixes, qnameFor, samePrefixMappingAs, shortForm
-
Constructor Details
-
AGModel
-
-
Method Details
-
getGraph
- Specified by:
getGraph
in interfaceModelGraphInterface
- Overrides:
getGraph
in classModelCom
-
read
-
read
-
write
Write a serialized representation of this model in a specified language.
The language in which to write the model is specified by the
lang
argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "N-QUADS", "TURTLE", (and "TTL") and "N3". The default value, represented bynull
, is "RDF/XML". -
write
Write a serialized representation of a model in a specified language.
The language in which to write the model is specified by the
lang
argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "N-QUADS", "TURTLE", (and "TTL") and "N3". The default value, represented bynull
, is "RDF/XML".- Specified by:
write
in interfaceModel
- Overrides:
write
in classModelCom
- Parameters:
out
- The output stream to which the RDF is writtenbase
- The base uri to use when writing relative URI's.null
means use only absolute URI's. This is used for relative URIs that would be resolved against the document retrieval URL. For some values oflang
, this value may be included in the output.lang
- The language in which the RDF should be written- Returns:
- This model
-
createResource
Returns a new blank node with an AG-allocated id.See also the javadoc for allowing external blank nodes for more discussion.
- Specified by:
createResource
in interfaceModel
- Overrides:
createResource
in classModelCom
- See Also:
-
createResource
Returns a new blank node with the given (a.k.a "external") id.Consider using createResource() instead to get an AG-allocated blank node id, as it is safer (avoids unintended blank node conflicts) and can be stored more efficiently in AllegroGraph.
See also the javadoc for allowing external blank nodes for more discussion.
- Specified by:
createResource
in interfaceModel
- Overrides:
createResource
in classModelCom
- See Also:
-
add
-
remove
-
createStatement
- Specified by:
createStatement
in interfaceModel
- Overrides:
createStatement
in classModelCom
-
asStatement
- Specified by:
asStatement
in interfaceModelGraphInterface
- Overrides:
asStatement
in classModelCom
-