
Constructor Summary

Method Summary
Modifier and TypeMethodDescriptionstatic 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 givenPrefixMapping
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 givenPrefixMapping
are used by the graph triples.static Graph
graphInUsePrefixMapping
(Graph graph) Return a readonly 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 bycalcInUsePrefixMapping(Graph, PrefixMapping)
.

Constructor Details

PrefixMappingUtils
public PrefixMappingUtils()


Method Details

graphInUsePrefixMapping
Return a readonly 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 bycalcInUsePrefixMapping(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.

calcInUsePrefixMapping
Analyse the graph to see which prefixes of the graph 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.
 See Also:

calcInUsePrefixMappingTTL
Analyse the graph to see which prefixes of the graph are in use.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.
 See Also:
