org.apache.jena.riot.system
Class PrefixMapNull

java.lang.Object
  extended by org.apache.jena.riot.system.PrefixMapNull
All Implemented Interfaces:
PrefixMap

public class PrefixMapNull
extends Object
implements PrefixMap

Always empty prefix map


Field Summary
static PrefixMap empty
           
 
Method Summary
 Pair<String,String> abbrev(String uriStr)
          Abbreviate an IRI and return a pair of prefix and local parts, or null.
 String abbreviate(String uriStr)
          Abbreviate an IRI or return null
 void add(String prefix, org.apache.jena.iri.IRI iri)
          Add a prefix, overwrites any existing association
 void add(String prefix, String iriString)
          Add a prefix, overwrites any existing association
 boolean contains(String prefix)
          Gets whether the map contains a given prefix
 void delete(String prefix)
          Delete a prefix
 String expand(String prefixedName)
          Expand a prefix named, return null if it can't be expanded
 String expand(String prefix, String localName)
          Expand a prefix, return null if it can't be expanded
 Map<String,org.apache.jena.iri.IRI> getMapping()
          Return the underlying mapping, this is generally unsafe to modify and implementations may opt to return an unmodifiable view of the mapping if they wish
 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
 boolean isEmpty()
          return whether the
 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
 int size()
          Return the number of entries in the prefix map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

empty

public static PrefixMap empty
Method Detail

getMapping

public Map<String,org.apache.jena.iri.IRI> getMapping()
Description copied from interface: PrefixMap
Return the underlying mapping, this is generally unsafe to modify and implementations may opt to return an unmodifiable view of the mapping if they wish

Specified by:
getMapping in interface PrefixMap
Returns:
Underlying mapping

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

add

public void add(String prefix,
                org.apache.jena.iri.IRI iri)
Description copied from interface: PrefixMap
Add a prefix, overwrites any existing association

Specified by:
add in interface PrefixMap
Parameters:
prefix - Prefix
iri - 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

delete

public void delete(String prefix)
Description copied from interface: PrefixMap
Delete a prefix

Specified by:
delete in interface PrefixMap
Parameters:
prefix - Prefix to delete

contains

public boolean contains(String prefix)
Description copied from interface: PrefixMap
Gets whether the map contains a given prefix

Specified by:
contains in interface PrefixMap
Parameters:
prefix - Prefix
Returns:
True if the prefix is contained in the map, false otherwise

abbreviate

public String abbreviate(String uriStr)
Description copied from interface: PrefixMap
Abbreviate an IRI or return null

Specified by:
abbreviate in interface PrefixMap
Parameters:
uriStr - URI to abbreviate
Returns:
URI in prefixed name form if possible, null otherwise

abbrev

public Pair<String,String> abbrev(String uriStr)
Description copied from interface: PrefixMap
Abbreviate an IRI and return a pair of prefix and local parts, or null.

Specified by:
abbrev in interface PrefixMap
Parameters:
uriStr - URI string to abbreviate
Returns:
Pair of prefix and local name
See Also:
PrefixMap.abbreviate(java.lang.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

expand

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

Specified by:
expand in interface PrefixMap
Parameters:
prefix - Prefix
localName - Local name
Returns:
Expanded URI if possible, null otherwise

isEmpty

public boolean isEmpty()
Description copied from interface: PrefixMap
return whether the

Specified by:
isEmpty in interface PrefixMap
Returns:
boolean

size

public int size()
Description copied from interface: PrefixMap
Return the number of entries in the prefix map.

Specified by:
size in interface PrefixMap
Returns:
Size of the prefix mapping


Licenced under the Apache License, Version 2.0