Interface StoragePrefixMap
-
- All Superinterfaces:
java.lang.Iterable<PrefixEntry>
- All Known Implementing Classes:
PrefixMapStorageSimple,StoragePrefixesView
public interface StoragePrefixMap extends java.lang.Iterable<PrefixEntry>
Storage-oriented abstraction for one set of prefix mappings. The API features, such as expanding prefix names. are provided elsewhere. This interface is just storage of the pairs (prefix, uri string)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclear()Clear the prefix mapping storage.booleancontainsPrefix(java.lang.String prefix)Return whether the mapping contains an entry for the given prefix.java.lang.Stringget(java.lang.String prefix)Get the URI string associated with a prefix, or return null if there is no association.booleanisEmpty()Return whether there are any prefix mappings or not.java.util.Iterator<PrefixEntry>iterator()Iterator over all prefix entries.default java.util.stream.Stream<java.lang.String>prefixes()Stream all prefixes.voidput(java.lang.String prefix, java.lang.String uriStr)Put a (prefix, uri) pair into the mapping.voidremove(java.lang.String prefix)Remove the mapping for a prefix.intsize()Return the number of prefix mappings.java.util.stream.Stream<PrefixEntry>stream()Stream of over all prefix entries.
-
-
-
Method Detail
-
put
void put(java.lang.String prefix, java.lang.String uriStr)Put a (prefix, uri) pair into the mapping. This replaces any previous mapping for the prefix.- Parameters:
prefix- Prefix string (without colon).uriStr- URI as a string.
-
get
java.lang.String get(java.lang.String prefix)
Get the URI string associated with a prefix, or return null if there is no association.- Parameters:
prefix-- Returns:
- String
-
remove
void remove(java.lang.String prefix)
Remove the mapping for a prefix.- Parameters:
prefix- The prefix of the mapping to be removed.
-
containsPrefix
boolean containsPrefix(java.lang.String prefix)
Return whether the mapping contains an entry for the given prefix.
-
clear
void clear()
Clear the prefix mapping storage.
-
isEmpty
boolean isEmpty()
Return whether there are any prefix mappings or not.
-
size
int size()
Return the number of prefix mappings.
-
iterator
java.util.Iterator<PrefixEntry> iterator()
Iterator over all prefix entries.- Specified by:
iteratorin interfacejava.lang.Iterable<PrefixEntry>
-
stream
java.util.stream.Stream<PrefixEntry> stream()
Stream of over all prefix entries.
-
prefixes
default java.util.stream.Stream<java.lang.String> prefixes()
Stream all prefixes.
-
-