public class PrefixMappingUtils extends Object
Constructor and Description |
---|
PrefixMappingUtils() |
Modifier and Type | Method and Description |
---|---|
static PrefixMapping |
calcInUsePrefixMapping(Graph graph)
Analyse the graph to see which prefixes of the graph are in use.
|
static PrefixMapping |
calcInUsePrefixMapping(Graph graph,
PrefixMapping prefixMapping)
Analyse the graph to see which prefixes of the given
PrefixMapping are in
use. |
static PrefixMapping |
calcInUsePrefixMappingTTL(Graph graph)
Analyse the graph to see which prefixes of the graph are in use.
|
static PrefixMapping |
calcInUsePrefixMappingTTL(Graph graph,
PrefixMapping prefixMapping)
Analyse the graph to see which prefixes of the given
PrefixMapping are used
by the graph triples. |
static Graph |
graphInUsePrefixMapping(Graph graph)
Return a read-only graph that has the same data (RDF triples) as the one given, but has a
prefix mapping that only includes "in use" prefixes as calculated by
calcInUsePrefixMapping(Graph, PrefixMapping) . |
public static Graph graphInUsePrefixMapping(Graph graph)
calcInUsePrefixMapping(Graph, PrefixMapping)
.
The prefix mappings of the two graphs are not connected. Later changes to the prefix mapping of the original graph are not reflected in the returned graph. Modifications to the triples contained in the underlying graph are reflected.
public static PrefixMapping calcInUsePrefixMapping(Graph graph)
In the case of overlapping prefixes (where one prefix declaration is has an initial URI string which matches another prefix declaration), all are included, though they may not be used when printing (that depends on the output process). In effect, this process has "false positives".
This function does not calculate new prefixes.
calcInUsePrefixMappingTTL(Graph)
public static PrefixMapping calcInUsePrefixMapping(Graph graph, PrefixMapping prefixMapping)
PrefixMapping
are in
use.
In the case of overlapping prefixes (where one prefix declaration is has an initial URI string which matches another prefix declaration), all are included, though they may not be used when printing (that depends on the output process). In effect, this process has "false positives".
This function does not calculate new prefixes.
public static PrefixMapping calcInUsePrefixMappingTTL(Graph graph)
This function attempts to process each URI in the graph as if it were to be printed
in Turtle. Only prefixes that lead to valid output strings are returned. This is
more expensive than calcInUsePrefixMapping(Graph)
.
This function does not calculate new prefixes.
calcInUsePrefixMappingTTL(Graph)
public static PrefixMapping calcInUsePrefixMappingTTL(Graph graph, PrefixMapping prefixMapping)
PrefixMapping
are used
by the graph triples.
This function attempts to process each URI in the graph as if it were to be printed
in Turtle. Only prefixes that lead to valid output strings are returned. This is
more expensive than calcInUsePrefixMapping(Graph, PrefixMapping)
.
This function does not calculate new prefixes.
Licenced under the Apache License, Version 2.0