Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.orient.internal
Class ONamespaceMap

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.orient.internal.ONamespaceMap

public abstract class ONamespaceMap
extends Object

Temporary static namespace map for storing OInstances/OGroups in a temporary database or using them inside this JVM.

Author:
Simon Templer

Constructor Summary
ONamespaceMap()
           
 
Method Summary
static QName decode(String name)
          Decode a name based on the runtime namespace map.
static String encode(QName org)
          Encode a QName for runtime use with OrientDB.
static QName map(QName org)
          Map the namespace of the given qualified name to a short identifier and return the adapted name.
static QName unmap(QName mapped)
          Determine the original namespace of the given qualified name with a namespace previously mapped with map(QName) and return the original name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ONamespaceMap

public ONamespaceMap()
Method Detail

map

public static QName map(QName org)
Map the namespace of the given qualified name to a short identifier and return the adapted name.

Parameters:
org - the original qualified name
Returns:
the adapted qualified name

encode

public static String encode(QName org)
Encode a QName for runtime use with OrientDB.

Parameters:
org - the qualified name
Returns:
the encoded name

unmap

public static QName unmap(QName mapped)
Determine the original namespace of the given qualified name with a namespace previously mapped with map(QName) and return the original name.

Parameters:
mapped - the adapted qualified name
Returns:
the original qualified name

decode

public static QName decode(String name)
                    throws org.apache.commons.codec.DecoderException
Decode a name based on the runtime namespace map.

Parameters:
name - the encoded name
Returns:
the decoded qualified name
Throws:
org.apache.commons.codec.DecoderException - of decoding the local part of the name fails

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d