OMS (v3.0.25)

oms3
Class ComponentAccess

java.lang.Object
  extended by oms3.ComponentAccess

public class ComponentAccess
extends java.lang.Object

Component Access. This class manages reflective access to components internals for the purpose of teir integration into a model.

Version:
$Id: ComponentProxy.java 20 2008-07-25 22:31:07Z od $
Author:
od (odavid@colostate.edu)

Constructor Summary
ComponentAccess(java.lang.Object cmd)
           
 
Method Summary
static boolean adjustOutputPath(java.io.File outputDir, java.lang.Object comp, java.util.logging.Logger log)
          Adjust the output path.
static void callAnnotated(java.lang.Object o, java.lang.Class<? extends java.lang.annotation.Annotation> ann, boolean lazy)
          Call an method by Annotation.
static java.lang.Object conv(java.lang.Object inpValue, java.lang.Class<?> fieldType)
           
static java.util.Properties createDefault(java.lang.Object comp)
          Create a default parameter set
 java.lang.Object getComponent()
          Get the component that is wrapped in this access proxy
static java.lang.Class infoClass(java.lang.Class cmp)
          Get the info class for a component object
 Access input(java.lang.String field)
          Get a single input field.
 java.util.Collection<Access> inputs()
          Get the all the inputs.
 Access output(java.lang.String field)
          get a single output field.
 java.util.Collection<Access> outputs()
          Get the all the outputs.
static boolean setInputData(java.util.Map<java.lang.String,java.lang.Object> inp, java.lang.Object comp, java.util.logging.Logger log)
          Set the input data as map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentAccess

public ComponentAccess(java.lang.Object cmd)
Method Detail

getComponent

public java.lang.Object getComponent()
Get the component that is wrapped in this access proxy

Returns:
the component

inputs

public java.util.Collection<Access> inputs()
Get the all the inputs.

Returns:
list of input field access objects

outputs

public java.util.Collection<Access> outputs()
Get the all the outputs.

Returns:
list of output fleld assess objects

input

public Access input(java.lang.String field)
Get a single input field.

Parameters:
field - the name of the field
Returns:
the input access object

output

public Access output(java.lang.String field)
get a single output field.

Parameters:
field -
Returns:
the output Field access object

callAnnotated

public static void callAnnotated(java.lang.Object o,
                                 java.lang.Class<? extends java.lang.annotation.Annotation> ann,
                                 boolean lazy)
Call an method by Annotation.

Parameters:
o - the oject to call.
ann - the annotation
lazy - if true, the a missing annotation is OK. if false the annotation has to be present or a Runtime exception is thrown.

infoClass

public static final java.lang.Class infoClass(java.lang.Class cmp)
Get the info class for a component object

Parameters:
cmp -
Returns:
the class that contains the annotations.

adjustOutputPath

public static boolean adjustOutputPath(java.io.File outputDir,
                                       java.lang.Object comp,
                                       java.util.logging.Logger log)
Adjust the output path.

Parameters:
outputDir -
comp -
log -
Returns:
true is adjusted, false otherwise.

createDefault

public static java.util.Properties createDefault(java.lang.Object comp)
Create a default parameter set

Parameters:
comp -
Returns:
the default properties

conv

public static java.lang.Object conv(java.lang.Object inpValue,
                                    java.lang.Class<?> fieldType)

setInputData

public static boolean setInputData(java.util.Map<java.lang.String,java.lang.Object> inp,
                                   java.lang.Object comp,
                                   java.util.logging.Logger log)
                            throws java.io.IOException
Set the input data as map.

Parameters:
inp -
comp -
log -
Throws:
java.io.IOException

OMS (v3.0.25)

Generated 2010-08-11 08:44:20 MDT, USDA-ARS-ASRU/CSU, 2150 Center Ave, Fort Collins, CO 80526, U.S.A.