de.hpi.fgis.voidgen.hadoop.datatypes
Class Description

java.lang.Object
  extended by org.apache.hadoop.conf.Configuration
      extended by de.hpi.fgis.voidgen.hadoop.datatypes.Description
All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<java.lang.String,java.lang.String>>, org.apache.hadoop.io.Writable

public class Description
extends org.apache.hadoop.conf.Configuration

Provides access to configuration data. Does not provide a constructor which automatically creates configuration data.

Author:
Johannes Gosda, Hasso Plattner Institute at University of Potsdam, Germany

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.conf.Configuration
org.apache.hadoop.conf.Configuration.IntegerRanges
 
Field Summary
static java.lang.String ENTITY_PATTER
          The generated approximated regular expression describing the entities belonging to the cluster.
static java.lang.String EXAMPLE_ENTITY
          An example entity of the cluster.
static java.lang.String ID
          The identifier of the cluster.
static java.lang.String SIGNIFICANT_PREDICATE
          The set of significant predicates of the cluster.
static java.lang.String SIZE
          The number of entities belonging to the cluster.
 
Constructor Summary
Description()
          Default constructor initializing the members.
Description(java.lang.String key, java.lang.String value)
          Creates a new description setting the given key to the given value.
 
Method Summary
static org.apache.hadoop.conf.Configuration getFilteredConfiguration(org.apache.hadoop.conf.Configuration other, java.lang.String regex, java.lang.String prefix, java.lang.String deletePrefix)
          Creates a new configuration from the given configuration where each property matches the given regular expression.
 void merge(org.apache.hadoop.conf.Configuration configuration)
          Merges the key-value pairs from the given configuration into this configuration.
 java.lang.String toString()
           
 java.lang.String toVoIDString()
          TODO Implement converting to a VoID entry.
 
Methods inherited from class org.apache.hadoop.conf.Configuration
addDefaultResource, addResource, addResource, addResource, addResource, clear, get, get, getBoolean, getClass, getClass, getClassByName, getClasses, getClassLoader, getConfResourceAsInputStream, getConfResourceAsReader, getFile, getFloat, getInt, getLocalPath, getLong, getRange, getRaw, getResource, getStringCollection, getStrings, getStrings, iterator, main, readFields, reloadConfiguration, set, setBoolean, setBooleanIfUnset, setClass, setClassLoader, setFloat, setIfUnset, setInt, setLong, setQuietMode, setStrings, size, write, writeXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
The identifier of the cluster. (may be automatically generated)

See Also:
Constant Field Values

SIZE

public static final java.lang.String SIZE
The number of entities belonging to the cluster.

See Also:
Constant Field Values

ENTITY_PATTER

public static final java.lang.String ENTITY_PATTER
The generated approximated regular expression describing the entities belonging to the cluster.

See Also:
Constant Field Values

EXAMPLE_ENTITY

public static final java.lang.String EXAMPLE_ENTITY
An example entity of the cluster.

See Also:
Constant Field Values

SIGNIFICANT_PREDICATE

public static final java.lang.String SIGNIFICANT_PREDICATE
The set of significant predicates of the cluster.

See Also:
Constant Field Values
Constructor Detail

Description

public Description()
Default constructor initializing the members.


Description

public Description(java.lang.String key,
                   java.lang.String value)
Creates a new description setting the given key to the given value.

Parameters:
key - the key to set.
value - the value of the key.
Method Detail

merge

public void merge(org.apache.hadoop.conf.Configuration configuration)
Merges the key-value pairs from the given configuration into this configuration. If the merge key is not present in this configuration, the pair will be added. If the merge key is present and the values are equal, the current value is kept. If the merge key is present and the values differ, the values will be concatenated and separated by ','.

Parameters:
configuration - The configuration to get the pairs to merge from.

toString

public java.lang.String toString()
Overrides:
toString in class org.apache.hadoop.conf.Configuration

toVoIDString

public java.lang.String toVoIDString()
TODO Implement converting to a VoID entry. Creates the void description from this data set description.
The prefix in each entry is substituted by the full URI.

Returns:
the String representation of a void description or null if no such description can be generated.

getFilteredConfiguration

public static org.apache.hadoop.conf.Configuration getFilteredConfiguration(org.apache.hadoop.conf.Configuration other,
                                                                            java.lang.String regex,
                                                                            java.lang.String prefix,
                                                                            java.lang.String deletePrefix)
Creates a new configuration from the given configuration where each property matches the given regular expression.

Parameters:
other - The configuration to get the properties from.
regex - The regular expression to match.
prefix - The prefix each kept property must have.
deletePrefix - The prefix to delete from each kept property name if it does start with this prefix.
Returns:
A configuration containing properties matching the given restrictions.