public class RiotLib extends Object
Constructor and Description |
---|
RiotLib() |
Modifier and Type | Method and Description |
---|---|
static void |
accTriples(Collection<Triple> acc,
Graph graph,
Node s,
Node p,
Node o)
Collect all the matching triples
|
static WriterGraphRIOTBase |
adapter(WriterDatasetRIOT writer) |
static int |
calcWidth(PrefixMap prefixMap,
String baseURI,
Collection<Node> nodes,
int minWidth,
int maxWidth) |
static int |
calcWidth(PrefixMap prefixMap,
String baseURI,
Node p) |
static int |
calcWidthTriples(PrefixMap prefixMap,
String baseURI,
Collection<Triple> triples,
int minWidth,
int maxWidth) |
static long |
countTriples(DatasetGraph dsg,
Node s,
Node p,
Node o) |
static long |
countTriples(Graph graph,
Node s,
Node p,
Node o) |
static IndentedWriter |
create(Writer writer)
IndentedWriter over a jaav.io.Writer (better to use an IndentedWriter over an OutputStream)
|
static Node |
createIRIorBNode(String iri)
Implement <_:....> as a "Node IRI"
that is, use the given label as the BNode internal label.
|
static DatasetGraph |
dataset(Graph graph)
Returns dataset that wraps a graph
|
static boolean |
isBNodeIRI(String iri)
Test whether
|
static Node |
parse(String string)
Parse a string to get one Node (the first token in the string)
|
static PrefixMap |
prefixMap(DatasetGraph dsg) |
static PrefixMap |
prefixMap(Graph graph) |
static ParserProfile |
profile(Lang lang,
String baseIRI) |
static ParserProfile |
profile(Lang lang,
String baseIRI,
ErrorHandler handler) |
static ParserProfile |
profile(String baseIRI,
boolean resolveIRIs,
boolean checking,
ErrorHandler handler)
Create a parser profile for the given setup
|
static boolean |
strSafeFor(String str,
char ch) |
static Triple |
triple1(DatasetGraph dsg,
Node s,
Node p,
Node o)
Get exactly one triple, or null for none or more than one.
|
static Triple |
triple1(Graph graph,
Node s,
Node p,
Node o)
Get exactly one triple or null for none or more than one.
|
static List<Triple> |
triples(Graph graph,
Node s,
Node p,
Node o)
Get all the triples for the graph.find
|
static Collection<Triple> |
triplesOfSubject(Graph graph,
Node subj)
Get triples with the same subject
|
static void |
writeBase(IndentedWriter out,
String base) |
static void |
writePrefixes(IndentedWriter out,
PrefixMap prefixMap) |
public static Node createIRIorBNode(String iri)
public static boolean isBNodeIRI(String iri)
public static Node parse(String string)
public static ParserProfile profile(Lang lang, String baseIRI)
public static ParserProfile profile(Lang lang, String baseIRI, ErrorHandler handler)
public static ParserProfile profile(String baseIRI, boolean resolveIRIs, boolean checking, ErrorHandler handler)
baseIRI
- Base IRIresolveIRIs
- Whether to resolve IRIschecking
- Whether to checkhandler
- Error handlerfor per-language setup
public static Collection<Triple> triplesOfSubject(Graph graph, Node subj)
public static List<Triple> triples(Graph graph, Node s, Node p, Node o)
public static long countTriples(DatasetGraph dsg, Node s, Node p, Node o)
public static void accTriples(Collection<Triple> acc, Graph graph, Node s, Node p, Node o)
public static Triple triple1(Graph graph, Node s, Node p, Node o)
public static Triple triple1(DatasetGraph dsg, Node s, Node p, Node o)
public static boolean strSafeFor(String str, char ch)
public static void writeBase(IndentedWriter out, String base)
public static void writePrefixes(IndentedWriter out, PrefixMap prefixMap)
public static DatasetGraph dataset(Graph graph)
public static PrefixMap prefixMap(DatasetGraph dsg)
public static int calcWidth(PrefixMap prefixMap, String baseURI, Collection<Node> nodes, int minWidth, int maxWidth)
public static int calcWidthTriples(PrefixMap prefixMap, String baseURI, Collection<Triple> triples, int minWidth, int maxWidth)
public static IndentedWriter create(Writer writer)
public static WriterGraphRIOTBase adapter(WriterDatasetRIOT writer)
Licenced under the Apache License, Version 2.0