org.apache.jena.riot.system
Class RiotLib

java.lang.Object
  extended by org.apache.jena.riot.system.RiotLib

public class RiotLib
extends Object

Misc RIOT code


Constructor Summary
RiotLib()
           
 
Method Summary
static void accTriples(Collection<Triple> acc, Graph graph, Node s, Node p, Node o)
           
static WriterGraphRIOTBase adapter(WriterDatasetRIOT writer)
           
static int calcWidth(PrefixMap prefixMap, String baseURI, Collection<Node> nodes, int minWidth, int maxWidth)
           
static int calcWidthTriples(PrefixMap prefixMap, String baseURI, Collection<Triple> triples, int minWidth, int maxWidth)
           
static long countTriples(Graph graph, Node s, Node p, Node o)
           
static IndentedWriter create(Writer writer)
           
static Node createIRIorBNode(String iri)
          Implement <_:....> as a 2bNode 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)
           
static boolean strSafeFor(String str, char ch)
           
static Triple triple1(Graph graph, Node s, Node p, Node o)
           
static List<Triple> triples(Graph graph, Node s, Node p, Node o)
           
static Collection<Triple> triplesOfSubject(Graph graph, Node subj)
           
static void writeBase(IndentedWriter out, String base)
           
static void writePrefixes(IndentedWriter out, PrefixMap prefixMap)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RiotLib

public RiotLib()
Method Detail

createIRIorBNode

public static Node createIRIorBNode(String iri)
Implement <_:....> as a 2bNode IRI" that is, use the given label as the BNode internal label. Use with care.


isBNodeIRI

public static boolean isBNodeIRI(String iri)
Test whether


parse

public static Node parse(String string)
Parse a string to get one Node (the first token in the string)


profile

public static ParserProfile profile(Lang lang,
                                    String baseIRI)

profile

public static ParserProfile profile(Lang lang,
                                    String baseIRI,
                                    ErrorHandler handler)

profile

public static ParserProfile profile(String baseIRI,
                                    boolean resolveIRIs,
                                    boolean checking,
                                    ErrorHandler handler)

triplesOfSubject

public static Collection<Triple> triplesOfSubject(Graph graph,
                                                  Node subj)

triples

public static List<Triple> triples(Graph graph,
                                   Node s,
                                   Node p,
                                   Node o)

countTriples

public static long countTriples(Graph graph,
                                Node s,
                                Node p,
                                Node o)

accTriples

public static void accTriples(Collection<Triple> acc,
                              Graph graph,
                              Node s,
                              Node p,
                              Node o)

triple1

public static Triple triple1(Graph graph,
                             Node s,
                             Node p,
                             Node o)

strSafeFor

public static boolean strSafeFor(String str,
                                 char ch)

writeBase

public static void writeBase(IndentedWriter out,
                             String base)

writePrefixes

public static void writePrefixes(IndentedWriter out,
                                 PrefixMap prefixMap)

dataset

public static DatasetGraph dataset(Graph graph)
Returns dataset that wraps a graph


prefixMap

public static PrefixMap prefixMap(DatasetGraph dsg)

calcWidth

public static int calcWidth(PrefixMap prefixMap,
                            String baseURI,
                            Collection<Node> nodes,
                            int minWidth,
                            int maxWidth)

calcWidthTriples

public static int calcWidthTriples(PrefixMap prefixMap,
                                   String baseURI,
                                   Collection<Triple> triples,
                                   int minWidth,
                                   int maxWidth)

create

public static IndentedWriter create(Writer writer)

prefixMap

public static PrefixMap prefixMap(Graph graph)

adapter

public static WriterGraphRIOTBase adapter(WriterDatasetRIOT writer)


Licenced under the Apache License, Version 2.0