Class PrefixMapTrie

java.lang.Object
org.apache.jena.riot.system.PrefixMapBase
org.aksw.jenax.arq.util.prefix.PrefixMapTrie
All Implemented Interfaces:
org.apache.jena.riot.system.PrefixMap

public class PrefixMapTrie extends org.apache.jena.riot.system.PrefixMapBase
A PrefixMap implemented as a pair of in-memory maps. In addition, internal longest prefix lookups are cached. Prefixes are stored in a synchronized linked hash map such that their iteration order is predictable.
  • Constructor Details

    • PrefixMapTrie

      public PrefixMapTrie()
    • PrefixMapTrie

      public PrefixMapTrie(long longestMatchCacheSize)
  • Method Details

    • findMapping

      public Optional<String> findMapping(String iri, boolean partial)
    • add

      public void add(String prefix, String iri)
    • delete

      public void delete(String prefix)
      See notes on reverse mappings in PrefixMappingBase. This is a complete implementation.

      Test AbstractTestPrefixMapping.testSecondPrefixDeletedUncoversPreviousMap.

    • abbrev

      public org.apache.jena.atlas.lib.Pair<String,String> abbrev(String iriStr)
      Specified by:
      abbrev in interface org.apache.jena.riot.system.PrefixMap
      Overrides:
      abbrev in class org.apache.jena.riot.system.PrefixMapBase
    • abbreviate

      public String abbreviate(String iriStr)
      Specified by:
      abbreviate in interface org.apache.jena.riot.system.PrefixMap
      Overrides:
      abbreviate in class org.apache.jena.riot.system.PrefixMapBase
    • get

      public String get(String prefix)
    • getMapping

      public Map<String,String> getMapping()
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • size

      public int size()
    • containsPrefix

      public boolean containsPrefix(String prefix)
    • getPossibleKey

      protected static String getPossibleKey(String iriString)