Package org.eclipse.rdf4j.model.util
Class Namespaces
- java.lang.Object
-
- org.eclipse.rdf4j.model.util.Namespaces
-
public class Namespaces extends java.lang.Object
A utility class to perform operations onNamespace
s.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<Namespace>
DEFAULT_RDF4J
RDFa initial namespaces + additional set of prefixes for RDF4Jstatic java.util.Set<Namespace>
DEFAULT_RDFA11
Set of RDFa 1.1 "initial context" namespaces
-
Constructor Summary
Constructors Modifier Constructor Description private
Namespaces()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.String>
asMap(java.util.Set<Namespace> namespaces)
Converts a set ofNamespace
s into a map containing theNamespace.getPrefix()
strings as keys, with theNamespace.getName()
strings as values in the map for each namespace in the given set.static java.util.Map<java.lang.String,java.lang.String>
wrap(java.util.Set<Namespace> namespaces)
Wraps the givenSet
ofNamespace
s as aMap
of prefix to URI mappings, so that it can be used where aMap
is required by the API.
-
-
-
Field Detail
-
DEFAULT_RDFA11
public static final java.util.Set<Namespace> DEFAULT_RDFA11
Set of RDFa 1.1 "initial context" namespaces- See Also:
- RDFa 1.1 context, JDON-lD rdfa1 context
-
DEFAULT_RDF4J
public static final java.util.Set<Namespace> DEFAULT_RDF4J
RDFa initial namespaces + additional set of prefixes for RDF4J
-
-
Method Detail
-
asMap
public static java.util.Map<java.lang.String,java.lang.String> asMap(java.util.Set<Namespace> namespaces)
Converts a set ofNamespace
s into a map containing theNamespace.getPrefix()
strings as keys, with theNamespace.getName()
strings as values in the map for each namespace in the given set.
-
wrap
public static java.util.Map<java.lang.String,java.lang.String> wrap(java.util.Set<Namespace> namespaces)
Wraps the givenSet
ofNamespace
s as aMap
of prefix to URI mappings, so that it can be used where aMap
is required by the API.
NOTE: The Map returned by this method is not synchronized.- Parameters:
namespaces
- The Set to wrap.- Returns:
- A Map of prefix to URI mappings which is backed by the given Set of
Namespace
s.
-
-