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 voidaccTriples(Collection<org.apache.jena.graph.Triple> acc, org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Collect all the matching triplesstatic WriterGraphRIOTBaseadapter(WriterDatasetRIOT writer) static org.apache.jena.graph.NodeblankNodeToIri(org.apache.jena.graph.Node node) "Skolemize" to a node.static StringblankNodeToIriString(org.apache.jena.graph.Node node) "Skolemize" to a string.static longcountTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) static longcountTriples(DatasetGraph dsg, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) static org.apache.jena.atlas.io.IndentedWriterIndentedWriter over a java.io.Writer (better to use an IndentedWriter over an OutputStream)static org.apache.jena.graph.NodecreateIRIorBNode(String str) Implement<_:....>as a "Node IRI" that is, use the given label as the BNode internal label.static ParserProfilecreateParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) Create aParserProfilewith default settings, and a specific error handler.static ParserProfilecreateParserProfile(FactoryRDF factory, ErrorHandler errorHandler, org.apache.jena.irix.IRIxResolver resolver, boolean checking) Create aParserProfile.static ParserProfileCreate aParserProfilewith default settings.static FactoryRDFCreate a new (not influenced by anything else)FactoryRDFusing the default label to blank node scheme.static FactoryRDFfactoryRDF(LabelToNode labelMapping) Create a new (not influenced by anything else)FactoryRDFusing the label to blank node scheme provided.static StringfixupPrefixIRI(String prefixedName) Convert an prefix name (qname) to an IRI, for when the prefix is not defined.static StringfixupPrefixIRI(String prefix, String localPart) Convert an prefix name (qname) to an IRI, for when the prefix is not defined.static org.apache.jena.graph.NodefromIRIorBNode(org.apache.jena.graph.Node node) Convert an ARQ-encoded blank node URI to a blank node, otherwise return the argument node unchanged.static booleanisBNodeIRI(String iri) Test whether a IRI is an ARQ-encoded blank node.static booleanisBNodeIRI(org.apache.jena.graph.Node node) Test whether a node is an ARQ-encoded blank node IRI.static booleanisPrefixIRI(String iri) Test whether a IRI is an ARQ-encoded blank node.static org.apache.jena.graph.NodeParse a string to get one Node (the first token in the string)static ParserProfileprofile(Lang lang, String baseIRI, ErrorHandler handler) static List<org.apache.jena.graph.Triple>triples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Get all the triples for the graph.findstatic Collection<org.apache.jena.graph.Triple>triplesOfSubject(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node subj) Get triples with the same subjectstatic voidstatic voidwriteBase(org.apache.jena.atlas.io.IndentedWriter out, String base, DirectiveStyle writeStyle) static voidwritePrefix(org.apache.jena.atlas.io.IndentedWriter out, String prefix, String uri, DirectiveStyle writeStyle) Write a prefix.static voidwritePrefixes(org.apache.jena.atlas.io.IndentedWriter out, PrefixMap prefixMap) static voidwritePrefixes(org.apache.jena.atlas.io.IndentedWriter out, PrefixMap prefixMap, DirectiveStyle writeStyle) Write prefixesstatic voidwriteVersion(org.apache.jena.atlas.io.IndentedWriter out, String version, DirectiveStyle writeStyle) Write a version.
-
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
public static org.apache.jena.graph.Node blankNodeToIri(org.apache.jena.graph.Node node) "Skolemize" to a node. Returns a Node_URI. -
blankNodeToIriString
"Skolemize" to a string. -
fromIRIorBNode
public static org.apache.jena.graph.Node fromIRIorBNode(org.apache.jena.graph.Node node) 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
public static boolean isBNodeIRI(org.apache.jena.graph.Node node) 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)FactoryRDFusing the label to blank node scheme provided. -
factoryRDF
Create a new (not influenced by anything else)FactoryRDFusing the default label to blank node scheme. -
dftProfile
Create aParserProfilewith default settings. -
createParserProfile
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) Create aParserProfilewith default settings, and a specific error handler. -
createParserProfile
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, org.apache.jena.irix.IRIxResolver resolver, boolean checking) Create aParserProfile. -
triplesOfSubject
public static Collection<org.apache.jena.graph.Triple> triplesOfSubject(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node subj) Get triples with the same subject -
triples
public static List<org.apache.jena.graph.Triple> triples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Get all the triples for the graph.find -
countTriples
public static long countTriples(org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) -
countTriples
public static long countTriples(DatasetGraph dsg, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) -
accTriples
public static void accTriples(Collection<org.apache.jena.graph.Triple> acc, org.apache.jena.graph.Graph graph, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o) Collect all the matching triples -
writeBase
-
writeBase
public static void writeBase(org.apache.jena.atlas.io.IndentedWriter out, String base, DirectiveStyle writeStyle) -
writePrefixes
-
writePrefixes
public static void writePrefixes(org.apache.jena.atlas.io.IndentedWriter out, PrefixMap prefixMap, DirectiveStyle writeStyle) Write prefixes -
writePrefix
public static void writePrefix(org.apache.jena.atlas.io.IndentedWriter out, String prefix, String uri, DirectiveStyle writeStyle) Write a prefix. Write using@prefixorPREFIX. -
writeVersion
public static void writeVersion(org.apache.jena.atlas.io.IndentedWriter out, String version, DirectiveStyle writeStyle) Write a version. Write usingversionorVERSION. -
create
IndentedWriter over a java.io.Writer (better to use an IndentedWriter over an OutputStream) -
adapter
-