Location: PHPKode > projects > Non-Point Source Model Development Tool > src/who_xmlobjects.php
<?php

$who_xmlobjects = array();
#print("Creating Serializer Object<br>");
$serializer = new XML_Serializer();
#print("Creating Object<br>");
$obj = new USGSGageObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['USGSGageObject']['xml'] = $xml;
   $who_xmlobjects['USGSGageObject']['type'] = '4'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['USGSGageObject']['name'] = 'USGS Gage Time Series';
   # properties to return to child object for use in select lists, etc.
   $who_xmlobjects['USGSGageObject']['description'] = 'Historical stream flow, groundwater, or reservoir data, including quantity and quality, retrieved from the USGS NWIS systems.';
}

# NOAADataObject
$obj = new NOAADataObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['NOAADataObject']['xml'] = $xml;
   $who_xmlobjects['NOAADataObject']['type'] = '4'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['NOAADataObject']['name'] = 'NOAA Data Object';
   # properties to return to child object for use in select lists, etc.
   $who_xmlobjects['NOAADataObject']['description'] = 'Generic component for retrieving NOAA data for predicted meteorological values, stream predictions, and historical meteorological data.';
}


#print("Creating Object<br>");
$obj = new timeSeriesInput;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['timeSeriesInput']['xml'] = $xml;
   $who_xmlobjects['timeSeriesInput']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['timeSeriesInput']['name'] = 'Time Series File';
   $who_xmlobjects['timeSeriesInput']['description'] = 'Generic File-based Time Series Input.';
}


#print("Creating Object<br>");
$obj = new HSPFContainer;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['HSPFContainer']['xml'] = $xml;
   $who_xmlobjects['HSPFContainer']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['HSPFContainer']['name'] = 'HSPF Container';
   $who_xmlobjects['HSPFContainer']['description'] = 'Wrapper around an HSPF model file, has the ability to parse model output files (plotgen), write model input files (mustins), and initiate a model execution if needed.';
}

#print("Creating Object<br>");
$obj = new CBPModelContainer;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['CBPModelContainer']['xml'] = $xml;
   $who_xmlobjects['CBPModelContainer']['type'] = '4'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['CBPModelContainer']['name'] = 'CBP HSPF Model Container';
   $who_xmlobjects['CBPModelContainer']['description'] = 'Wrapper around an CBP HSPF model file(s), will load all modeling segments above the specified outlet river UCI, and create sub-components for each.';
}

$obj = new HSPFPlotgen;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['HSPFPlotgen']['xml'] = $xml;
   $who_xmlobjects['HSPFPlotgen']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['HSPFPlotgen']['name'] = 'HSPF Plotgen Time Series';
   $who_xmlobjects['HSPFPlotgen']['parent'] = array('HSPFContainer');
   # properties to return to child object for use in select lists, etc.
   $who_xmlobjects['HSPFPlotgen']['parentprops'] = array('plotgenoutput'=>'plotgen');
   $who_xmlobjects['HSPFPlotgen']['description'] = 'Access data from a Plotgen on the parent HSPF Container.';
}

$obj = new WDMDSNaccessor;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['WDMDSNaccessor']['xml'] = $xml;
   $who_xmlobjects['WDMDSNaccessor']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['WDMDSNaccessor']['name'] = 'HSPF WDM DSN';
   $who_xmlobjects['WDMDSNaccessor']['parent'] = array('HSPFContainer');
   # properties to return to child object for use in select lists, etc.
   $who_xmlobjects['WDMDSNaccessor']['parentprops'] = array('wdmoutput'=>'wdm');
   $who_xmlobjects['WDMDSNaccessor']['description'] = 'Access data from a WDM on the parent HSPF Container.';
}

#print("Creating Object<br>");
$obj = new reverseFlowObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['reverseFlowObject']['xml'] = $xml;
   $who_xmlobjects['reverseFlowObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['reverseFlowObject']['name'] = 'Reach Reverse Flow Input';
   $who_xmlobjects['reverseFlowObject']['description'] = 'Takes one or more flow time series as input, area weights AND temporally shifts (to obtain the flow that must have entered the input reaches in order to produce the observed outflow), to produce a synthetic hydrograph for an ungaged area.';
}

#print("Creating Object<br>");
$obj = new flowTransformer;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['flowTransformer']['xml'] = $xml;
   $who_xmlobjects['flowTransformer']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['flowTransformer']['name'] = 'Synthetic Hydrograph';
   $who_xmlobjects['flowTransformer']['description'] = 'Takes one or more flow time series as input, and area weights flows to produce a synthetic hydrograph for an ungaged area.';
}

#print("Creating Object<br>");
$obj = new HabitatSuitabilityObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['HabitatSuitabilityObject']['xml'] = $xml;
   $who_xmlobjects['HabitatSuitabilityObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['HabitatSuitabilityObject']['name'] = 'Habitat Suitability Object';
   $who_xmlobjects['HabitatSuitabilityObject']['description'] = 'Container for habitat suitability object, lookup tables, and equations must be added in order to use this.';
}


#print("Creating Object<br>");
$obj = new PopulationGenerationObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['PopulationGenerationObject']['xml'] = $xml;
   $who_xmlobjects['PopulationGenerationObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['PopulationGenerationObject']['name'] = 'Generation-based Population Object';
   $who_xmlobjects['PopulationGenerationObject']['description'] = 'A dynamic generation based population component for use with year-class type analyses.  Will spawn child object each time it reproduces.';
}


#print("Creating Object<br>");
$obj = new surfaceObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['surfaceObject']['xml'] = $xml;
   $who_xmlobjects['surfaceObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['surfaceObject']['name'] = 'Surface Object';
   $who_xmlobjects['surfaceObject']['description'] = 'Simulated infiltration and runoff when given rainfall, and soil properties as input.';
}

#print("Creating Object<br>");
$obj = new storageObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['storageObject']['xml'] = $xml;
   $who_xmlobjects['storageObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['storageObject']['name'] = 'Lake/Reservoir';
   $who_xmlobjects['storageObject']['description'] = 'Storage object, for routing withdrawals to simulate complex river/reservoir system.';
}

#print("Creating Object<br>");
$obj = new channelObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['channelObject']['xml'] = $xml;
   $who_xmlobjects['channelObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['channelObject']['name'] = 'Channel Object';
   $who_xmlobjects['channelObject']['description'] = 'Used to model streamflow in a section of reach, can be connected to other objects to simulate the effects of withdrawals on water levels and aquatic life.';
}

#print("Creating Object<br>");
$obj = new pumpObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['pumpObject']['xml'] = $xml;
   $who_xmlobjects['pumpObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['pumpObject']['name'] = 'Water Withdrawal';
   $who_xmlobjects['pumpObject']['description'] = 'Rule-based withdrawal from a stream or reservoir.';
}


#print("Creating Object<br>");
$obj = new blankShell;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['blankShell']['xml'] = $xml;
   $who_xmlobjects['blankShell']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['blankShell']['name'] = 'Shell Object ';
   $who_xmlobjects['blankShell']['description'] = 'Generic modeling object, with no internal methods.  All methods must be defined by the user.';
}

#print("Creating Object<br>");
$obj = new Equation;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['Equation']['xml'] = $xml;
   $who_xmlobjects['Equation']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['Equation']['name'] = 'Equation';
   $who_xmlobjects['Equation']['description'] = 'Performs mathematical evaluation for models (such as Habitat Suitability), evaluates using algebraic order of operations, including parentheses, possesses the basic arithmetic operators [+ - / *], and the pow(base,exponent) function.';
}

#print("Creating Object<br>");
$obj = new Statistic;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['Statistic']['xml'] = $xml;
   $who_xmlobjects['Statistic']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['Statistic']['name'] = 'Statistic';
   $who_xmlobjects['Statistic']['parentprops'] = array('vars'=>'publicvars');
   $who_xmlobjects['Statistic']['description'] = 'Performs statistical evaluation for of a set of numbers, added in csv notation.';
}


#print("Creating Object<br>");
$obj = new modelContainer;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['modelContainer']['xml'] = $xml;
   $who_xmlobjects['modelContainer']['type'] = '3'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['modelContainer']['name'] = 'Model Container';
   $who_xmlobjects['modelContainer']['description'] = 'An object that can be used to assemble and run individual model components in a concerted fashion.';
}

#print("Creating Object<br>");
$obj = new lookupObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['lookupObject']['xml'] = $xml;
   $who_xmlobjects['lookupObject']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['lookupObject']['name'] = 'Lookup Object';
   $who_xmlobjects['lookupObject']['parentprops'] = array('input'=>'publicvars');
   $who_xmlobjects['lookupObject']['description'] = 'Performs a lookup into one or more tables for a single variable input (+ time).  If time inputs are specified, the lookup is turned on/off based on the value fo the simulation time.  Interpolation for a non-exact match can be enabled or disabled, and can be linear, next closest value, or previous closest value.';
}

#print("Creating Object<br>");
$obj = new reportObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['reportObject']['xml'] = $xml;
   $who_xmlobjects['reportObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['reportObject']['name'] = 'Report Object';
   $who_xmlobjects['reportObject']['description'] = 'Pulls information from other modeling objects to assemble reports and graphs.';
}

#print("Creating Object<br>");
$obj = new graphObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['graphObject']['xml'] = $xml;
   $who_xmlobjects['graphObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['graphObject']['name'] = 'Graph Object';
   $who_xmlobjects['graphObject']['description'] = 'Pulls information from other modeling objects to assemble reports and graphs.';
}

#print("Creating Object<br>");
$obj = new giniGraph;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['giniGraph']['xml'] = $xml;
   $who_xmlobjects['giniGraph']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['giniGraph']['name'] = 'Gini Graph Object';
   $who_xmlobjects['giniGraph']['description'] = 'Assembles and Calculates Gini coefficients for each graph component.';
}

#print("Creating Object<br>");
$obj = new flowDurationGraph;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['flowDurationGraph']['xml'] = $xml;
   $who_xmlobjects['flowDurationGraph']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['flowDurationGraph']['name'] = 'Flow Duration Graph Object';
   $who_xmlobjects['flowDurationGraph']['description'] = 'Assembles and Calculates Flow Duration Curves for each graph component.';
}


#print("Creating Object<br>");
$obj = new graphComponent;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['graphComponent']['xml'] = $xml;
   $who_xmlobjects['graphComponent']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['graphComponent']['parent'] = array('graphObject','giniGraph','flowDurationGraph'); # set this if it should only show under certain types of objects
   $who_xmlobjects['graphComponent']['name'] = 'Graph Component';
   $who_xmlobjects['graphComponent']['description'] = 'Pulls information from other modeling objects to assemble reports and graphs.';
}

#print("Creating Object<br>");
$obj = new queryWizardComponent;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['queryWizardComponent']['xml'] = $xml;
   $who_xmlobjects['queryWizardComponent']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp# set this if it should only show under certain types of objects
   $who_xmlobjects['queryWizardComponent']['name'] = 'Query Wizard Component';
   $who_xmlobjects['queryWizardComponent']['parentprops'] = array('qcols'=>'publicvars','wcols'=>'publicvars','ocols'=>'publicvars');
   $who_xmlobjects['queryWizardComponent']['description'] = 'Pulls information from other modeling objects to assemble reports and permits query access.';
}

#print("Creating Object<br>");
$obj = new dataConnectionObject;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['dataConnectionObject']['xml'] = $xml;
   $who_xmlobjects['dataConnectionObject']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp# set this if it should only show under certain types of objects
   $who_xmlobjects['dataConnectionObject']['name'] = 'Data Connection Object';
   $who_xmlobjects['dataConnectionObject']['parentprops'] = array('tablecols'=>'publicvars','lon_col'=>'publicvars');
   $who_xmlobjects['dataConnectionObject']['localprops'] = array('lon_col'=>'privatevars','lat_col'=>'privatevars','datecolumn'=>'privatevars','yearcolumn'=>'privatevars','monthcolumn'=>'privatevars','daycolumn'=>'privatevars');
   $who_xmlobjects['dataConnectionObject']['description'] = 'Pulls information from other modeling objects to assemble reports and permits query access.';
}

#print("Creating Object<br>");
$obj = new dataConnectionTransform;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['dataConnectionTransform']['xml'] = $xml;
   $who_xmlobjects['dataConnectionTransform']['type'] = '2'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   # set this if it should only show under certain types of objects
   $who_xmlobjects['dataConnectionTransform']['name'] = 'Query Column Transformation';
   # can only be a child of the dataConnectionObject
   $who_xmlobjects['dataConnectionTransform']['parent'] = array('dataConnectionObject');
   $who_xmlobjects['dataConnectionTransform']['parentprops'] = array('col_name'=>'privatevars');
   $who_xmlobjects['dataConnectionTransform']['description'] = 'Creates a summary of query data visible to other components.  This operation is performed prior to model run.';
}

#print("Creating Object<br>");
$obj = new droughtMonitor;
// perform serialization
$result = $serializer->serialize($obj);
#print("Printing Result<br>");
// check result code and display XML if success
if($result === true)
{
   $xml = $serializer->getSerializedData();
   $who_xmlobjects['droughtMonitor']['xml'] = $xml;
   $who_xmlobjects['droughtMonitor']['type'] = '1'; # type 1 - stand-alone object, 2 - sub-component only, 3 - model container (runnable), 4 - both stand-alone and sub-comp
   $who_xmlobjects['droughtMonitor']['name'] = 'Drought Monitor Object';
   $who_xmlobjects['droughtMonitor']['description'] = 'Gathers and Analyzes Drought Monitoring Info.';
}


?>
Return current item: Non-Point Source Model Development Tool