SMILA 1.0 API documentation

org.eclipse.smila.datamodel.util
Class MetadataUtils

java.lang.Object
  extended by org.eclipse.smila.datamodel.util.MetadataUtils

public final class MetadataUtils
extends java.lang.Object

Author:
tmenzel

Nested Class Summary
static class MetadataUtils.Mode
          controls the behavior of methods.
 
Method Summary
static Any getAny(Any metadata, MetadataUtils.Mode mode, java.lang.String... path)
          returns the requested Any object.
static AnyMap getMap(AnyMap metadata, boolean createAll, java.lang.String... path)
          Deprecated. as of 1.1, use getMap(AnyMap, Mode, String...)
static AnyMap getMap(AnyMap metadata, MetadataUtils.Mode mode, java.lang.String... path)
          Gets the map.
static AnySeq getSeq(AnyMap metadata, MetadataUtils.Mode mode, java.lang.String... path)
          Gets the Seq.
static Value getValue(AnyMap metadata, MetadataUtils.Mode mode, java.lang.String... path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAny

public static Any getAny(Any metadata,
                         MetadataUtils.Mode mode,
                         java.lang.String... path)
returns the requested Any object.

Parameters:
metadata - the metadata, must be either a SEQ or MAP
mode - the create parents
path - the path. may be distinct elements or whole segments. elements are separated by a /. an element is used as an index into either a map or sequence. in the latter case it must evaluate to a number, otherwise a IllegalArgumentException is thrown

getMap

public static AnyMap getMap(AnyMap metadata,
                            boolean createAll,
                            java.lang.String... path)
Deprecated. as of 1.1, use getMap(AnyMap, Mode, String...)

Gets the map.

Parameters:
createAll - false -> NONE, true -> ALL

getMap

public static AnyMap getMap(AnyMap metadata,
                            MetadataUtils.Mode mode,
                            java.lang.String... path)
Gets the map.


getSeq

public static AnySeq getSeq(AnyMap metadata,
                            MetadataUtils.Mode mode,
                            java.lang.String... path)
Gets the Seq.


getValue

public static Value getValue(AnyMap metadata,
                             MetadataUtils.Mode mode,
                             java.lang.String... path)

SMILA 1.0 API documentation