Interface StoragePrefixMap

All Superinterfaces:
Iterable<org.apache.jena.riot.system.PrefixEntry>
All Known Implementing Classes:
PrefixMapStorageSimple, StoragePrefixesView

public interface StoragePrefixMap extends Iterable<org.apache.jena.riot.system.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

    Modifier and Type
    Method
    Description
    void
    Clear the prefix mapping storage.
    boolean
    Return whether the mapping contains an entry for the given prefix.
    get(String prefix)
    Get the URI string associated with a prefix, or return null if there is no association.
    boolean
    Return whether there are any prefix mappings or not.
    Iterator<org.apache.jena.riot.system.PrefixEntry>
    Iterator over all prefix entries.
    default Stream<String>
    Stream all prefixes.
    void
    put(String prefix, String uriStr)
    Put a (prefix, uri) pair into the mapping.
    void
    remove(String prefix)
    Remove the mapping for a prefix.
    int
    Return the number of prefix mappings.
    Stream<org.apache.jena.riot.system.PrefixEntry>
    Stream of over all prefix entries.

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Method Details

    • put

      void put(String prefix, 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

      String get(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(String prefix)
      Remove the mapping for a prefix.
      Parameters:
      prefix - The prefix of the mapping to be removed.
    • containsPrefix

      boolean containsPrefix(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

      Iterator<org.apache.jena.riot.system.PrefixEntry> iterator()
      Iterator over all prefix entries.
      Specified by:
      iterator in interface Iterable<org.apache.jena.riot.system.PrefixEntry>
    • stream

      Stream<org.apache.jena.riot.system.PrefixEntry> stream()
      Stream of over all prefix entries.
    • prefixes

      default Stream<String> prefixes()
      Stream all prefixes.