java.lang.Object
org.apache.jena.riot.system.RiotLib
Misc RIOT code
-
Field Summary
FieldsModifier and TypeFieldDescriptionFunction applied to undefined prefixes to convert to a URI stringFunction to test for undefined prefix URIs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
accTriples
(Collection<Triple> acc, Graph graph, Node s, Node p, Node o) Collect all the matching triplesstatic WriterGraphRIOTBase
adapter
(WriterDatasetRIOT writer) static Node
blankNodeToIri
(Node node) "Skolemize" to a node.static String
blankNodeToIriString
(Node node) "Skolemize" to a string.static long
countTriples
(Graph graph, Node s, Node p, Node o) static long
countTriples
(DatasetGraph dsg, Node s, Node p, Node o) static org.apache.jena.atlas.io.IndentedWriter
IndentedWriter over a java.io.Writer (better to use an IndentedWriter over an OutputStream)static Node
createIRIorBNode
(String str) Implement<_:....>
as a "Node IRI" that is, use the given label as the BNode internal label.static ParserProfile
createParserProfile
(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) Create aParserProfile
with default settings, and a specific error handler.static ParserProfile
createParserProfile
(FactoryRDF factory, ErrorHandler errorHandler, IRIxResolver resolver, boolean checking) Create aParserProfile
.static ParserProfile
Create aParserProfile
with default settings.static FactoryRDF
Create a new (not influenced by anything else)FactoryRDF
using the default label to blank node scheme.static FactoryRDF
factoryRDF
(LabelToNode labelMapping) Create a new (not influenced by anything else)FactoryRDF
using the label to blank node scheme provided.static String
fixupPrefixIRI
(String prefixedName) Convert an prefix name (qname) to an IRI, for when the prefix is not defined.static String
fixupPrefixIRI
(String prefix, String localPart) Convert an prefix name (qname) to an IRI, for when the prefix is not defined.static Node
fromIRIorBNode
(Node node) Convert an ARQ-encoded blank node URI to a blank node, otherwise return the argument node unchanged.static boolean
isBNodeIRI
(String iri) Test whether a IRI is an ARQ-encoded blank node.static boolean
isBNodeIRI
(Node node) Test whether a node is an ARQ-encoded blank node IRI.static boolean
isPrefixIRI
(String iri) Test whether a IRI is an ARQ-encoded blank node.static Node
Parse a string to get one Node (the first token in the string)static PrefixMap
Deprecated.static PrefixMap
prefixMap
(DatasetGraph dsg) Deprecated.static ParserProfile
profile
(Lang lang, String baseIRI, ErrorHandler handler) Get all the triples for the graph.findstatic Collection<Triple>
triplesOfSubject
(Graph graph, Node subj) Get triples with the same subjectstatic void
static void
writePrefix
(org.apache.jena.atlas.io.IndentedWriter out, String prefix, String uri, boolean newStyle) Write a prefix.static void
writePrefixes
(org.apache.jena.atlas.io.IndentedWriter out, PrefixMap prefixMap, boolean newStyle) Write prefixes
-
Field Details
-
fixupPrefixes
Function applied to undefined prefixes to convert to a URI string -
testFixupedPrefixURI
Function to test for undefined prefix URIs
-
-
Constructor Details
-
RiotLib
public RiotLib()
-
-
Method Details
-
blankNodeToIri
"Skolemize" to a node. Returns a Node_URI. -
blankNodeToIriString
"Skolemize" to a string. -
fromIRIorBNode
Convert an ARQ-encoded blank node URI to a blank node, otherwise return the argument node unchanged. -
createIRIorBNode
Implement<_:....>
as a "Node IRI" that is, use the given label as the BNode internal label. Use with care. Returns a Node_URI. -
isBNodeIRI
Test whether a IRI is an ARQ-encoded blank node. -
isBNodeIRI
Test whether a node is an ARQ-encoded blank node IRI. -
isPrefixIRI
Test whether a IRI is an ARQ-encoded blank node. -
fixupPrefixIRI
Convert an prefix name (qname) to an IRI, for when the prefix is not defined.- See Also:
-
fixupPrefixIRI
Convert an prefix name (qname) to an IRI, for when the prefix is not defined.- See Also:
-
parse
Parse a string to get one Node (the first token in the string) -
profile
-
factoryRDF
Create a new (not influenced by anything else)FactoryRDF
using the label to blank node scheme provided. -
factoryRDF
Create a new (not influenced by anything else)FactoryRDF
using the default label to blank node scheme. -
dftProfile
Create aParserProfile
with default settings. -
createParserProfile
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) Create aParserProfile
with default settings, and a specific error handler. -
createParserProfile
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, IRIxResolver resolver, boolean checking) Create aParserProfile
. -
triplesOfSubject
Get triples with the same subject -
triples
Get all the triples for the graph.find -
countTriples
-
countTriples
-
accTriples
Collect all the matching triples -
writeBase
public static void writeBase(org.apache.jena.atlas.io.IndentedWriter out, String base, boolean newStyle) -
writePrefixes
public static void writePrefixes(org.apache.jena.atlas.io.IndentedWriter out, PrefixMap prefixMap, boolean newStyle) Write prefixes -
writePrefix
public static void writePrefix(org.apache.jena.atlas.io.IndentedWriter out, String prefix, String uri, boolean newStyle) Write a prefix. Write using@prefix
orPREFIX
. -
prefixMap
Deprecated. -
create
IndentedWriter over a java.io.Writer (better to use an IndentedWriter over an OutputStream) -
prefixMap
Deprecated. -
adapter
-
Prefixes.adapt(PrefixMapping)