Package org.apache.jena.riot.system
Class Prefixes
- java.lang.Object
-
- org.apache.jena.riot.system.Prefixes
-
public class Prefixes extends java.lang.Object
Functions related toPrefixMap
.- See Also:
PrefixMapFactory
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
datasetPrefixSet
Name for dataset-wide prefixes.static java.lang.String
dftGraphPrefixSet
Special name for default graph prefixes.static Node
nodeDataset
Name for dataset prefixes.static Node
nodeDefaultGraph
Name assigned to the default graph.
-
Constructor Summary
Constructors Constructor Description Prefixes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PrefixMap
adapt(Graph graph)
static PrefixMapping
adapt(PrefixMap prefixMap)
Apply a wrapper to aPrefixMap
to provide thePrefixMapping
API.static PrefixMap
adapt(PrefixMapping prefixMapping)
Apply a wrapper to aPrefixMapping
to provide thePrefixMap
API.static java.lang.String
findByURI(PrefixMap pmap, java.lang.String uriStr)
Reverse lookup of URI to a prefix.static java.lang.String
prefix(java.lang.String prefix)
Canonical prefix - remove a trailing ":".static java.lang.String
toString(PrefixMap prefixMap)
Calculate a printable multi-line string.
-
-
-
Field Detail
-
dftGraphPrefixSet
public static final java.lang.String dftGraphPrefixSet
Special name for default graph prefixes. This is different to the datasetPrefixSet. Only used by (TDB1) GraphTxnTDB_Prefixes and (TDB2) GraphViewSwitchable_Prefixes which have separated dataset/default graph prefixes. For legacy migration reasons, TDB1 uses "" and TDB2 uses defaultGraphNodeGenerated for the dataset prefix set. See TDB1 ) TDB2StoragePrefixesView
- See Also:
- Constant Field Values
-
datasetPrefixSet
public static final java.lang.String datasetPrefixSet
Name for dataset-wide prefixes.- See Also:
- Constant Field Values
-
nodeDefaultGraph
public static Node nodeDefaultGraph
Name assigned to the default graph.
-
nodeDataset
public static Node nodeDataset
Name for dataset prefixes.
-
-
Method Detail
-
prefix
public static java.lang.String prefix(java.lang.String prefix)
Canonical prefix - remove a trailing ":". The return is not null.
-
findByURI
public static java.lang.String findByURI(PrefixMap pmap, java.lang.String uriStr)
Reverse lookup of URI to a prefix. General implementation by scanning thePrefixMap
. Returns a prefix if found or null. If several prefixes for the same URI, returns one at random.
-
adapt
public static PrefixMapping adapt(PrefixMap prefixMap)
Apply a wrapper to aPrefixMap
to provide thePrefixMapping
API.
-
adapt
public static PrefixMap adapt(PrefixMapping prefixMapping)
Apply a wrapper to aPrefixMapping
to provide thePrefixMap
API.
-
toString
public static java.lang.String toString(PrefixMap prefixMap)
Calculate a printable multi-line string.
-
-