org.apache.jena.riot.system
Class PrefixMapBase

java.lang.Object
  extended by org.apache.jena.riot.system.PrefixMapBase
All Implemented Interfaces:
PrefixMap
Direct Known Subclasses:
FastAbbreviatingPrefixMap, PrefixMapExtended, PrefixMapStd

public abstract class PrefixMapBase
extends Object
implements PrefixMap

Abstract base implementation of a PrefixMap which provides some useful helper methods


Constructor Summary
PrefixMapBase()
           
 
Method Summary
 void add(String prefix, String iriString)
          Add a prefix, overwrites any existing association
 String expand(String prefixedName)
          Expand a prefix named, return null if it can't be expanded
 Map<String,org.apache.jena.iri.IRI> getMappingCopy()
          Return a fresh copy of the underlying mapping, should be safe to modify unlike the mapping returned from PrefixMap.getMapping()
 Map<String,String> getMappingCopyStr()
          Gets a fresh copy of the mapping with the IRIs translated into their strings
 void putAll(Map<String,String> mapping)
          Add a prefix, overwrites any existing association
 void putAll(PrefixMap pmap)
          Add a prefix, overwrites any existing association
 void putAll(PrefixMapping pmap)
          Add a prefix, overwrites any existing association
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jena.riot.system.PrefixMap
abbrev, abbreviate, add, contains, delete, expand, getMapping, isEmpty, size
 

Constructor Detail

PrefixMapBase

public PrefixMapBase()
Method Detail

getMappingCopy

public Map<String,org.apache.jena.iri.IRI> getMappingCopy()
Description copied from interface: PrefixMap
Return a fresh copy of the underlying mapping, should be safe to modify unlike the mapping returned from PrefixMap.getMapping()

Specified by:
getMappingCopy in interface PrefixMap
Returns:
Copy of the mapping

getMappingCopyStr

public Map<String,String> getMappingCopyStr()
Description copied from interface: PrefixMap
Gets a fresh copy of the mapping with the IRIs translated into their strings

Specified by:
getMappingCopyStr in interface PrefixMap
Returns:
Copy of the mapping

add

public void add(String prefix,
                String iriString)
Description copied from interface: PrefixMap
Add a prefix, overwrites any existing association

Specified by:
add in interface PrefixMap
Parameters:
prefix - Prefix
iriString - Namespace IRI

putAll

public void putAll(PrefixMap pmap)
Description copied from interface: PrefixMap
Add a prefix, overwrites any existing association

Specified by:
putAll in interface PrefixMap
Parameters:
pmap - Prefix Map

putAll

public void putAll(PrefixMapping pmap)
Description copied from interface: PrefixMap
Add a prefix, overwrites any existing association

Specified by:
putAll in interface PrefixMap
Parameters:
pmap - Prefix Mapping

putAll

public void putAll(Map<String,String> mapping)
Description copied from interface: PrefixMap
Add a prefix, overwrites any existing association

Specified by:
putAll in interface PrefixMap
Parameters:
mapping - A Map of prefix name to IRI string

expand

public String expand(String prefixedName)
Description copied from interface: PrefixMap
Expand a prefix named, return null if it can't be expanded

Specified by:
expand in interface PrefixMap
Parameters:
prefixedName - Prefixed Name
Returns:
Expanded URI if possible, null otherwise

toString

public String toString()
Overrides:
toString in class Object


Licenced under the Apache License, Version 2.0