Esempio n. 1
0
        /// <summary>
        ///		Allows the class to be copied
        /// </summary>
        /// <remarks>
        ///		Performs a 'deep copy' of all the data in the class (and its children)
        /// </remarks>
        public override object Clone()
        {
            cuahsiTimeSeries_v1_0Lib.Qualifier newObject = new cuahsiTimeSeries_v1_0Lib.Qualifier(_elementName);
            newObject.m_QualifierCode        = m_QualifierCode;
            newObject.m_IsValidQualifierCode = m_IsValidQualifierCode;
            newObject.m_QualifierID          = m_QualifierID;
            newObject.m_IsValidQualifierID   = m_IsValidQualifierID;
            newObject.m_Oid                     = m_Oid;
            newObject.m_IsValidOid              = m_IsValidOid;
            newObject.m_MetadataDateTime        = (LiquidTechnologies.Runtime.Net20.XmlDateTime)m_MetadataDateTime.Clone();
            newObject.m_IsValidMetadataDateTime = m_IsValidMetadataDateTime;
            newObject.m_Network                 = m_Network;
            newObject.m_IsValidNetwork          = m_IsValidNetwork;
            newObject.m_Vocabulary              = m_Vocabulary;
            newObject.m_IsValidVocabulary       = m_IsValidVocabulary;
            newObject.m_Default                 = m_Default;
            newObject.m_IsValidDefault          = m_IsValidDefault;


            newObject._elementText = _elementText;
// ##HAND_CODED_BLOCK_START ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

// Add Additional clone code here...

// ##HAND_CODED_BLOCK_END ID="Additional clone"## DO NOT MODIFY ANYTHING OUTSIDE OF THESE TAGS

            return(newObject);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates an object from an XML Element.
        /// </summary>
        /// <param name="xmlParent">The data that needs loading</param>
        /// <param name="context">The context to use when loading the data</param>
        /// <returns>The wrapper object, loaded with the supplied data</returns>
        /// <remarks>Throws an exception if the XML data is not compatable with the schema</remarks>
        static public LiquidTechnologies.Runtime.Net20.XmlObjectBase FromXmlElement(XmlElement xmlParent, LiquidTechnologies.Runtime.Net20.XmlSerializationContext context)
        {
            LiquidTechnologies.Runtime.Net20.XmlObjectBase retVal = null;
            String elementName;
            String elementNamespaceUri;


            // Get the type name this is either
            // from the element ie <Parent>... = Parent
            // or from the type ie <Parent xsi:type="someNS:SomeElement">... = SomeElement
            if (GetElementType(xmlParent) == "")
            {
                elementName         = xmlParent.LocalName;
                elementNamespaceUri = xmlParent.NamespaceURI;
            }
            else
            {
                elementName         = GetElementType(xmlParent);
                elementNamespaceUri = GetElementTypeNamespaceUri(xmlParent);
            }

            // create the appropriate object
            if (elementName == null || elementName == String.Empty)
            {
                throw new LiquidTechnologies.Runtime.Net20.LtInvalidParamException("The element to load has no name");
            }
            else if (elementName == "ContactInformationType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.ContactInformationType();
            }
            else if (elementName == "criteria" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Criteria();
            }
            else if (elementName == "datasetInfo" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.DatasetInfo();
            }
            else if (elementName == "DataSetInfoType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.DataSetInfoType();
            }
            else if (elementName == "daylightSavingsTimeZone" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.DaylightSavingsTimeZone();
            }
            else if (elementName == "defaultTimeZone" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.DefaultTimeZone();
            }
            else if (elementName == "extension" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Extension();
            }
            else if (elementName == "GeogLocationType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.GeogLocationType();
            }
            else if (elementName == "geoLocation" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.GeoLocation();
            }
            else if (elementName == "latLonBox" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.LatLonBox();
            }
            else if (elementName == "LatLonBoxType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.LatLonBoxType();
            }
            else if (elementName == "latLonPoint" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.LatLonPoint();
            }
            else if (elementName == "LatLonPointType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.LatLonPointType();
            }
            else if (elementName == "localSiteXY" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.LocalSiteXY();
            }
            else if (elementName == "MetaDataType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.MetaDataType();
            }
            else if (elementName == "MethodType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.MethodType();
            }
            else if (elementName == "NoteType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.NoteType();
            }
            else if (elementName == "OffsetType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.OffsetType();
            }
            else if (elementName == "option" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Option();
            }
            else if (elementName == "option" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Option();
            }
            else if (elementName == "optionGroup" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.OptionGroup();
            }
            else if (elementName == "options" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Options();
            }
            else if (elementName == "options" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Options();
            }
            else if (elementName == "parentID" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.ParentID();
            }
            else if (elementName == "qualifier" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Qualifier();
            }
            else if (elementName == "qualifier" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Qualifier();
            }
            else if (elementName == "qualifier" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.QualifierA();
            }
            else if (elementName == "qualityControlLevel" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.QualityControlLevel();
            }
            else if (elementName == "qualityControlLevel" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.QualityControlLevel();
            }
            else if (elementName == "QualityControlLevelType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.QualityControlLevelType();
            }
            else if (elementName == "QueryInfoType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.QueryInfoType();
            }
            else if (elementName == "related" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Related();
            }
            else if (elementName == "relatedID" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.RelatedID();
            }
            else if (elementName == "series" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Series();
            }
            else if (elementName == "seriesCatalogType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SeriesCatalogType();
            }
            else if (elementName == "site" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Site();
            }
            else if (elementName == "site" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Site();
            }
            else if (elementName == "siteCode" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SiteCode();
            }
            else if (elementName == "SiteInfoType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SiteInfoType();
            }
            else if (elementName == "sitesResponse" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SitesResponse();
            }
            else if (elementName == "SourceInfoType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SourceInfoType();
            }
            else if (elementName == "SourceType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.SourceType();
            }
            else if (elementName == "TimeIntervalType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeIntervalType();
            }
            else if (elementName == "timeParam" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeParam();
            }
            else if (elementName == "TimePeriodRealTimeType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimePeriodRealTimeType();
            }
            else if (elementName == "TimePeriodType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimePeriodType();
            }
            else if (elementName == "timeSeriesResponse" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeSeriesResponse();
            }
            else if (elementName == "TimeSeriesType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeSeriesType();
            }
            else if (elementName == "TimeSingleType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeSingleType();
            }
            else if (elementName == "timeSupport" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeSupport();
            }
            else if (elementName == "timeZoneInfo" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.TimeZoneInfo();
            }
            else if (elementName == "timeZoneInfo" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TimeZoneInfo();
            }
            else if (elementName == "TsValuesSingleVariableType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.TsValuesSingleVariableType();
            }
            else if (elementName == "units" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Units();
            }
            else if (elementName == "units" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Units();
            }
            else if (elementName == "UnitsType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.UnitsType();
            }
            else if (elementName == "valueCount" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.ValueCount();
            }
            else if (elementName == "ValueSingleVariable" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.ValueSingleVariable();
            }
            else if (elementName == "variableCode" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.VariableCode();
            }
            else if (elementName == "variableCode" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.VariableCode();
            }
            else if (elementName == "VariableInfoType" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.VariableInfoType();
            }
            else if (elementName == "VariableInfoType_related_Group" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.VariableInfoType_related_Group();
            }
            else if (elementName == "variables" && elementNamespaceUri == "")
            {
                retVal = new cuahsiTimeSeries_v1_0Lib.Variables();
            }
            else if (elementName == "variables" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.Variables();
            }
            else if (elementName == "variablesResponse" && elementNamespaceUri == "http://www.cuahsi.org/waterML/1.0/")
            {
                retVal = new tns.VariablesResponse();
            }
            else
            {
                throw new LiquidTechnologies.Runtime.Net20.LtException(
                          string.Format("Failed load the element {0}:{1}. No appropriate class exists to load the data into. Ensure that the XML document complies with the schema.",
                                        xmlParent.Name, xmlParent.NamespaceURI));
            }

            // load the data into the object
            retVal.FromXmlElement(xmlParent, context);

            return(retVal);
        }