com.hammurapi.config.util
Class ConfigUtil

java.lang.Object
  extended by com.hammurapi.config.util.ConfigUtil

public class ConfigUtil
extends Object

Helper class.

Author:
Pavel Vlasov

Constructor Summary
ConfigUtil()
           
 
Method Summary
static void addScalarProperty(PropertySource target, String name, Object property, boolean runtime)
          Adds scalar property with type of property type and value of property.toString().
static void addScalarProperty(PropertySource target, String name, String type, String value, boolean runtime)
          Adds scalar (type, value) property.
static void pump(Factory source, Factory dest)
          Moves references/copy artifacts from one object to another.
static void pump(Named source, Named dest)
          Moves references/copy artifacts from one object to another.
static void pump(NamedObjectDefinition source, NamedObjectDefinition dest)
          Moves references/copy artifacts from one object to another.
static void pump(ObjectDefinition source, ObjectDefinition dest)
          Moves references/copy artifacts from one object to another.
static void pump(PropertySource source, PropertySource dest)
          Moves references/copy artifacts from one object to another.
static void save(org.eclipse.emf.ecore.EObject obj, File file)
          Saves EObject to file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigUtil

public ConfigUtil()
Method Detail

pump

public static void pump(Factory source,
                        Factory dest)
Moves references/copy artifacts from one object to another.

Parameters:
source -
dest -

pump

public static void pump(PropertySource source,
                        PropertySource dest)
Moves references/copy artifacts from one object to another.

Parameters:
source -
dest -

pump

public static void pump(ObjectDefinition source,
                        ObjectDefinition dest)
Moves references/copy artifacts from one object to another.

Parameters:
source -
dest -

pump

public static void pump(Named source,
                        Named dest)
Moves references/copy artifacts from one object to another.

Parameters:
source -
dest -

pump

public static void pump(NamedObjectDefinition source,
                        NamedObjectDefinition dest)
Moves references/copy artifacts from one object to another.

Parameters:
source -
dest -

addScalarProperty

public static void addScalarProperty(PropertySource target,
                                     String name,
                                     String type,
                                     String value,
                                     boolean runtime)
Adds scalar (type, value) property.

Parameters:
target -
name -
type -
value -
runtime -

addScalarProperty

public static void addScalarProperty(PropertySource target,
                                     String name,
                                     Object property,
                                     boolean runtime)
Adds scalar property with type of property type and value of property.toString().

Parameters:
target -
name -
property -
runtime -

save

public static void save(org.eclipse.emf.ecore.EObject obj,
                        File file)
                 throws IOException
Saves EObject to file.

Parameters:
obj - Object to save.
file - Output file.
Throws:
IOException