Class PrefixMapping2

java.lang.Object
org.apache.jena.sparql.util.PrefixMapping2
All Implemented Interfaces:
org.apache.jena.shared.PrefixMapping

public class PrefixMapping2 extends Object implements org.apache.jena.shared.PrefixMapping
A prefix mapping based on global and local mappings. Updates go to the local (second) copy only. Lookup looks in the local copy before the global copy.
  • Constructor Details

    • PrefixMapping2

      public PrefixMapping2(org.apache.jena.shared.PrefixMapping globalMapping, org.apache.jena.shared.PrefixMapping localMapping)
    • PrefixMapping2

      public PrefixMapping2(org.apache.jena.shared.PrefixMapping globalMapping)
  • Method Details

    • getLocalPrefixMapping

      public org.apache.jena.shared.PrefixMapping getLocalPrefixMapping()
    • getGlobalPrefixMapping

      public org.apache.jena.shared.PrefixMapping getGlobalPrefixMapping()
    • setLocalPrefixMapping

      public void setLocalPrefixMapping(org.apache.jena.shared.PrefixMapping x)
    • setGlobalPrefixMapping

      public void setGlobalPrefixMapping(org.apache.jena.shared.PrefixMapping x)
    • setNsPrefix

      public org.apache.jena.shared.PrefixMapping setNsPrefix(String prefix, String uri)
      Specified by:
      setNsPrefix in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.setNsPrefix(java.lang.String, java.lang.String)
    • removeNsPrefix

      public org.apache.jena.shared.PrefixMapping removeNsPrefix(String prefix)
      Specified by:
      removeNsPrefix in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.removeNsPrefix(java.lang.String)
    • clearNsPrefixMap

      public org.apache.jena.shared.PrefixMapping clearNsPrefixMap()
      Clear the local prefix map, but leave the immutable global one alone
      Specified by:
      clearNsPrefixMap in interface org.apache.jena.shared.PrefixMapping
    • setNsPrefixes

      public org.apache.jena.shared.PrefixMapping setNsPrefixes(org.apache.jena.shared.PrefixMapping other)
      Specified by:
      setNsPrefixes in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.setNsPrefixes(org.apache.jena.shared.PrefixMapping)
    • setNsPrefixes

      public org.apache.jena.shared.PrefixMapping setNsPrefixes(Map<String,String> map)
      Specified by:
      setNsPrefixes in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.setNsPrefixes(java.util.Map)
    • getNsPrefixURI

      public String getNsPrefixURI(String prefix)
      Specified by:
      getNsPrefixURI in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.getNsPrefixURI(java.lang.String)
    • getNsURIPrefix

      public String getNsURIPrefix(String uri)
      Specified by:
      getNsURIPrefix in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.getNsURIPrefix(java.lang.String)
    • getNsPrefixMap

      public Map<String,String> getNsPrefixMap()
      Specified by:
      getNsPrefixMap in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.getNsPrefixMap()
    • getNsPrefixMap

      public Map<String,String> getNsPrefixMap(boolean includeGlobalMap)
    • expandPrefix

      public String expandPrefix(String prefixed)
      Specified by:
      expandPrefix in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.expandPrefix(java.lang.String)
    • shortForm

      public String shortForm(String uri)
      Specified by:
      shortForm in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.shortForm(java.lang.String)
    • qnameFor

      public String qnameFor(String uri)
      Specified by:
      qnameFor in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.qnameFor(java.lang.String)
    • hasNoMappings

      public boolean hasNoMappings()
      Specified by:
      hasNoMappings in interface org.apache.jena.shared.PrefixMapping
    • numPrefixes

      public int numPrefixes()
      Specified by:
      numPrefixes in interface org.apache.jena.shared.PrefixMapping
    • lock

      public org.apache.jena.shared.PrefixMapping lock()
      Specified by:
      lock in interface org.apache.jena.shared.PrefixMapping
      See Also:
      • PrefixMapping.lock()
    • withDefaultMappings

      public org.apache.jena.shared.PrefixMapping withDefaultMappings(org.apache.jena.shared.PrefixMapping map)
      Specified by:
      withDefaultMappings in interface org.apache.jena.shared.PrefixMapping
    • samePrefixMappingAs

      public boolean samePrefixMappingAs(org.apache.jena.shared.PrefixMapping other)
      Specified by:
      samePrefixMappingAs in interface org.apache.jena.shared.PrefixMapping