Exemplo n.º 1
0
        private static DatasetType[] CreateDatasets()
        {
            List <DatasetType> datasets = new List <DatasetType>();
            DatasetType        dataset  = new DatasetType();

            foreach (int id in DatasetsData.GetListOfDatasetIDs())
            {
                dataset = new DatasetType();
                dataset.applicationSchema = DatasetsData.SchemaFileUri(id);
                dataset.datasetId         = id.ToString();
                dataset.name    = DatasetsData.Name(id);
                dataset.version = DatasetsData.Version(id);
                List <FeatureTypeType> lstFeatTypes = new List <FeatureTypeType>();
                FeatureTypeType        featType     = new FeatureTypeType();
                featType.Name = new XmlQualifiedName(DatasetsData.Name(id), DatasetsData.TargetNamespace(id));
                List <MetadataURLType> lstMetaDataUrl = new List <MetadataURLType>();
                MetadataURLType        metadataUrl    = new MetadataURLType();
                metadataUrl.href = DatasetsData.TargetNamespace(id);
                lstMetaDataUrl.Add(metadataUrl);
                featType.MetadataURL = lstMetaDataUrl.ToArray();
                List <Title> lstTitles = new List <Title>();
                Title        title     = new Title();
                title.lang  = "no";
                title.Value = DatasetsData.Name(id);
                lstTitles.Add(title);
                featType.Title            = lstTitles.ToArray();
                featType.Items            = new[] { "urn:ogc:def:crs:EPSG::" + DatasetsData.DefaultCrs(id) };
                featType.ItemsElementName = new ItemsChoiceType1[1];
                featType.ItemsElementName.SetValue(ItemsChoiceType1.DefaultCRS, 0);
                featType.OutputFormats = new OutputFormatListType();
                List <string> formats = new List <string>();
                formats.Add("text/xml; subtype=gml/3.2.1"); //DB?
                featType.OutputFormats.Format = formats.ToArray();
                List <WGS84BoundingBoxType> lstWgs84Box = new List <WGS84BoundingBoxType>();
                WGS84BoundingBoxType        wgs84Box    = new WGS84BoundingBoxType();
                wgs84Box.LowerCorner = DatasetsData.LowerCornerCoords(id);
                wgs84Box.UpperCorner = DatasetsData.UpperCornerCoords(id);
                lstWgs84Box.Add(wgs84Box);
                if ((wgs84Box.LowerCorner != "") || (wgs84Box.UpperCorner != ""))
                {
                    featType.WGS84BoundingBox = lstWgs84Box.ToArray();
                }
                lstFeatTypes.Add(featType);
                dataset.featureTypes = lstFeatTypes.ToArray();
                datasets.Add(dataset);
            }
            return(datasets.ToArray());
        }
Exemplo n.º 2
0
 public void ReplaceMetadataURLAt(MetadataURLType newValue, int index)
 {
     ReplaceDomElementAt("", "MetadataURL", index, newValue);
 }
Exemplo n.º 3
0
 public void InsertMetadataURLAt(MetadataURLType newValue, int index)
 {
     InsertDomElementAt("", "MetadataURL", index, newValue);
 }
Exemplo n.º 4
0
 public XmlNode AddMetadataURL(MetadataURLType newValue)
 {
     return AppendDomElement("", "MetadataURL", newValue);
 }
Exemplo n.º 5
0
			public type2Enumerator(MetadataURLType par) 
			{
                this.SetSamplerState(0, SamplerStateparent = par;
                this.SetSamplerState(0, SamplerStatenIndex = -1;
			}