de.hedenus.rdfschema
Class Mapping

java.lang.Object
  extended by de.hedenus.rdfschema.Mapping

public class Mapping
extends java.lang.Object

Key - value mapping.

Author:
Michael Hedenus

Constructor Summary
Mapping()
           
 
Method Summary
 void add(java.lang.String key, java.lang.String value)
          Adds a new key-value mapping.
 void add(java.net.URL url)
          Adds a mapping from an URL.
 void dump()
           
 java.lang.String get(java.lang.String key)
          Get the value of of the mapping for the specified key.
 void write(java.io.PrintStream ps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()
Method Detail

get

public java.lang.String get(java.lang.String key)
Get the value of of the mapping for the specified key.

Parameters:
key -
Returns:
the value of the mapping or null if no value is found

add

public void add(java.lang.String key,
                java.lang.String value)
Adds a new key-value mapping. If there is already a mapping with the same key, the first mapping takes precedence.

Parameters:
key -
value -

write

public void write(java.io.PrintStream ps)

dump

public void dump()

add

public void add(java.net.URL url)
         throws java.io.IOException
Adds a mapping from an URL. File format is a list key-value pairs separeted by whitespace. There is one mapping per line. Use ';' to mark a line as a comment line.

Parameters:
url -
Throws:
java.io.IOException