java.lang.Object
org.apache.jena.riot.system.PrefixMapNull
- All Implemented Interfaces:
PrefixMap
- Direct Known Subclasses:
PrefixMapSink
,PrefixMapZero
Base of always empty prefix maps
PrefixMapSink
and PrefixMapZero
.-
Method Summary
Modifier and TypeMethodDescriptionAbbreviate an IRI and return a pair of prefix and local parts, or null.abbreviate
(String uriStr) Abbreviate an IRI or return nullvoid
Add a prefix, overwrites any existing associationvoid
clear()
Clear all prefixes.boolean
containsPrefix
(String prefix) Gets whether the map contains a given prefixvoid
Delete a prefixExpand a prefix named, return null if it can't be expandedExpand a prefix, return null if it can't be expandedvoid
forEach
(BiConsumer<String, String> action) Apply aBiConsumer
<String, String> to each entry in the PrefixMap.Return the URI for the prefix, or null if there is no entry for this prefix.Return the underlying mapping, this is generally unsafe to modify and implementations may opt to return an unmodifiable view of the mapping if they wish.Return a fresh copy of the underlying mapping, should be safe to modify unlike the mapping returned fromPrefixMap.getMapping()
boolean
isEmpty()
Return whether the prefix map is empty or not.void
Add a prefix, overwrites any existing associationvoid
Add a prefix, overwrites any existing associationvoid
putAll
(org.apache.jena.shared.PrefixMapping pmap) Add a prefix, overwrites any existing associationint
size()
Return the number of entries in the prefix map.stream()
Return a stream ofPrefixEntry
, pairs of prefix and URI.
-
Method Details
-
getMapping
Description copied from interface:PrefixMap
Return the underlying mapping, this is generally unsafe to modify and implementations may opt to return an unmodifiable view of the mapping if they wish.- Specified by:
getMapping
in interfacePrefixMap
- Returns:
- Underlying mapping
- See Also:
-
getMappingCopy
Description copied from interface:PrefixMap
Return a fresh copy of the underlying mapping, should be safe to modify unlike the mapping returned fromPrefixMap.getMapping()
- Specified by:
getMappingCopy
in interfacePrefixMap
- Returns:
- Copy of the mapping
-
forEach
Description copied from interface:PrefixMap
Apply aBiConsumer
<String, String> to each entry in the PrefixMap. -
stream
Description copied from interface:PrefixMap
Return a stream ofPrefixEntry
, pairs of prefix and URI. -
get
Description copied from interface:PrefixMap
Return the URI for the prefix, or null if there is no entry for this prefix. -
add
Description copied from interface:PrefixMap
Add a prefix, overwrites any existing association -
putAll
Description copied from interface:PrefixMap
Add a prefix, overwrites any existing association -
putAll
Description copied from interface:PrefixMap
Add a prefix, overwrites any existing association -
delete
Description copied from interface:PrefixMap
Delete a prefix -
clear
public void clear()Description copied from interface:PrefixMap
Clear all prefixes. -
containsPrefix
Description copied from interface:PrefixMap
Gets whether the map contains a given prefix- Specified by:
containsPrefix
in interfacePrefixMap
- Parameters:
prefix
- Prefix- Returns:
- True if the prefix is contained in the map, false otherwise
-
abbreviate
Description copied from interface:PrefixMap
Abbreviate an IRI or return null- Specified by:
abbreviate
in interfacePrefixMap
- Parameters:
uriStr
- URI to abbreviate- Returns:
- URI in prefixed name form if possible, null otherwise
-
abbrev
Description copied from interface:PrefixMap
Abbreviate an IRI and return a pair of prefix and local parts, or null. -
expand
Description copied from interface:PrefixMap
Expand a prefix named, return null if it can't be expanded -
expand
Description copied from interface:PrefixMap
Expand a prefix, return null if it can't be expanded -
isEmpty
public boolean isEmpty()Description copied from interface:PrefixMap
Return whether the prefix map is empty or not. -
size
public int size()Description copied from interface:PrefixMap
Return the number of entries in the prefix map.
-