java.lang.Object
org.apache.jena.riot.system.PrefixMapBase
org.apache.jena.system.buffering.BufferingPrefixMap
- All Implemented Interfaces:
PrefixMap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a prefix, overwrites any existing associationbase()
void
clear()
Clear all prefixes.boolean
containsPrefix
(String prefix) Gets whether the map contains a given prefixvoid
Delete a prefixvoid
flush()
void
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.int
size()
Return the number of entries in the prefix map.state()
stream()
Return a stream ofPrefixEntry
, pairs of prefix and URI.Methods inherited from class org.apache.jena.riot.system.PrefixMapBase
abbrev, abbreviate, expand, expand, putAll, putAll, putAll, toString
-
Constructor Details
-
BufferingPrefixMap
-
-
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.- 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
- Overrides:
getMappingCopy
in classPrefixMapBase
- Returns:
- Copy of the mapping
-
forEach
Description copied from interface:PrefixMap
Apply aBiConsumer
<String, String> to each entry in the PrefixMap.- Specified by:
forEach
in interfacePrefixMap
- Overrides:
forEach
in classPrefixMapBase
-
stream
Description copied from interface:PrefixMap
Return a stream ofPrefixEntry
, pairs of prefix and URI.- Specified by:
stream
in interfacePrefixMap
- Overrides:
stream
in classPrefixMapBase
-
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- Parameters:
prefix
- PrefixiriString
- Namespace IRI
-
delete
Description copied from interface:PrefixMap
Delete a prefix- Parameters:
prefix
- Prefix to delete
-
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- Parameters:
prefix
- Prefix- Returns:
- True if the prefix is contained in the map, false otherwise
-
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. -
base
-
flush
public void flush() -
state
-