public class AGModel extends ModelCom implements Model, Closeable
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException
Extended, Standard
Modifier and Type | Method and Description |
---|---|
AGModel |
add(Statement[] statements) |
Statement |
asStatement(Triple t) |
Resource |
createResource()
Returns a new blank node with an AG-allocated id.
|
Resource |
createResource(AnonId id)
Returns a new blank node with the given (a.k.a "external") id.
|
AGStatement |
createStatement(Resource r,
Property p,
RDFNode o) |
AGGraph |
getGraph() |
AGModel |
read(InputStream reader,
String base) |
AGModel |
read(InputStream reader,
String base,
String lang) |
AGModel |
remove(Statement[] statements) |
Model |
write(OutputStream out,
String lang)
Write a serialized representation of this model in a specified language.
|
Model |
write(OutputStream out,
String lang,
String base)
Write a serialized representation of a model in a specified language.
|
abort, adapt, add, add, add, add, add, add, add, add, add, add, addLiteral, 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, createLiteral, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, enterCriticalSection, executeInTransaction, executeInTxn, expandPrefix, findTriplesFrom, getAlt, getAlt, getAnyReifiedStatement, getBag, getBag, getDefaultModelPrefixes, getLock, getModelLock, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, getProperty, getProperty, getProperty, getProperty, getRDFNode, getReader, getReader, getRequiredProperty, getRequiredProperty, getResource, getResource, getSeq, getSeq, getWriter, getWriter, hasNoMappings, independent, intersect, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, leaveCriticalSection, listBySubject, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, lock, notifyEvent, numPrefixes, qnameFor, query, read, read, read, read, read, register, reifiedToString, remove, remove, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeNsPrefix, removeReader, removeReification, removeWriter, resetRDFReaderF, resetRDFWriterF, samePrefixMappingAs, setDefaultModelPrefixes, setNsPrefix, setNsPrefixes, setNsPrefixes, setReaderClassName, setWriterClassName, shortForm, size, supportsSetOperations, supportsTransactions, toString, union, unregister, withDefaultMappings, wrapAsResource, write, write, write, write
asGraph, equals, getNodeAs, hashCode, isIsomorphicWith, setNodeCache
abort, add, add, add, add, begin, calculateInTxn, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsResource, createList, createList, createList, createLiteral, createLiteral, createProperty, createReifiedStatement, createReifiedStatement, createResource, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, equals, executeInTransaction, executeInTxn, getAnyReifiedStatement, getLock, getProperty, getProperty, getProperty, getRequiredProperty, getRequiredProperty, getResource, independent, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, notifyEvent, query, read, read, read, read, read, register, remove, remove, removeAll, removeAll, removeAllReifications, removeReification, size, supportsSetOperations, supportsTransactions, union, unregister, write, write, write, write
add, add, add, add, add, addLiteral, 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, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, getAlt, getAlt, getBag, getBag, getProperty, getRDFNode, getResource, getSeq, getSeq, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove, remove
asRDFNode, wrapAsResource
getReader, getReader, removeReader, resetRDFReaderF, setReaderClassName
getWriter, getWriter, removeWriter, resetRDFWriterF, setWriterClassName
clearNsPrefixMap, expandPrefix, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, hasNoMappings, lock, numPrefixes, qnameFor, removeNsPrefix, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, withDefaultMappings
enterCriticalSection, leaveCriticalSection
public AGModel(AGGraph base)
public AGGraph getGraph()
getGraph
in interface ModelGraphInterface
getGraph
in class ModelCom
public AGModel read(InputStream reader, String base)
public AGModel read(InputStream reader, String base, String lang)
public Model write(OutputStream out, String lang)
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 by null
, is "RDF/XML".
public Model write(OutputStream out, String lang, String base)
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 by null
, is "RDF/XML".
write
in interface Model
write
in class ModelCom
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 of lang
, this value may be included in the output.lang
- The language in which the RDF should be writtenpublic Resource createResource()
See also the javadoc for allowing external blank nodes for more discussion.
createResource
in interface Model
createResource
in class ModelCom
AGHttpRepoClient.setAllowExternalBlankNodeIds(boolean)
,
AGRepositoryConnection.prepareHttpRepoClient()
public Resource createResource(AnonId 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.
createResource
in interface Model
createResource
in class ModelCom
AGHttpRepoClient.setAllowExternalBlankNodeIds(boolean)
,
AGRepositoryConnection.prepareHttpRepoClient()
public AGStatement createStatement(Resource r, Property p, RDFNode o)
createStatement
in interface Model
createStatement
in class ModelCom
public Statement asStatement(Triple t)
asStatement
in interface ModelGraphInterface
asStatement
in class ModelCom
Copyright © 2024 Franz Inc.. All rights reserved.