Ejemplo n.º 1
0
            public ManifestRecord(MashupParseContext context, ManifestBlock block)
            {
                this.block = block;
                XMLTagReader xMLTagReader = context.NewTagReader("ManifestRecord");

                path                    = context.GetRequiredAttribute("Path");
                _fileExists             = context.GetRequiredAttributeBoolean("FileExists");
                _fileLength             = context.GetRequiredAttributeLong("FileLength");
                indirectManifestBlockId = context.GetRequiredAttributeInt("IndirectManifestBlockId");
                xMLTagReader.SkipAllSubTags();
            }
Ejemplo n.º 2
0
 public TransparencyOptions(MashupParseContext context, DirtyEvent dirty)
 {
     this.Initialize(dirty);
     XMLTagReader xMLTagReader = context.NewTagReader("TransparencyOptions");
     this._useDocumentTransparency = true;
     context.GetAttributeBoolean("UseDocumentTransparency", ref this._useDocumentTransparency);
     this._enabled = context.GetRequiredAttributeBoolean("Enabled");
     this._inverted = context.GetRequiredAttributeBoolean("Inverted");
     while (xMLTagReader.FindNextStartTag())
     {
         if (xMLTagReader.TagIs(TransparencyColor.GetXMLTag()))
         {
             this._colorList.Add(new TransparencyColor(context));
         }
         else
         {
             if (xMLTagReader.TagIs(FadeOptions.GetXMLTag()))
             {
                 this._fadeOptions = new FadeOptions(context, dirty);
             }
         }
     }
 }
Ejemplo n.º 3
0
        public SourceMapRegistrationView(SourceMap sourceMap, MashupParseContext context)
        {
            this.sourceMap = sourceMap;
            XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag());

            locked = context.GetRequiredAttributeBoolean(lockedAttribute);
            bool flag = false;

            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(sourceMapViewTag))
                {
                    XMLTagReader xMLTagReader2 = context.NewTagReader(sourceMapViewTag);
                    while (xMLTagReader2.FindNextStartTag())
                    {
                        if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag()))
                        {
                            sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance);
                            flag          = true;
                        }
                    }
                }
                else
                {
                    if (xMLTagReader.TagIs(referenceMapViewTag))
                    {
                        XMLTagReader xMLTagReader3 = context.NewTagReader(referenceMapViewTag);
                        while (xMLTagReader3.FindNextStartTag())
                        {
                            if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version)))
                            {
                                referenceMapView =
                                    new MapPosition(context, null, MercatorCoordinateSystem.theInstance);
                            }
                        }
                    }
                }
            }

            if (referenceMapView == null)
            {
                throw new InvalidMashupFile(context, "No " + referenceMapViewTag + " tag in LayerView.");
            }

            if (flag == locked)
            {
                throw new InvalidMashupFile(context, "locked flag disagrees with " + sourceMapViewTag + " element.");
            }
        }
Ejemplo n.º 4
0
        public TransparencyOptions(MashupParseContext context, DirtyEvent dirty)
        {
            this.Initialize(dirty);
            XMLTagReader xMLTagReader = context.NewTagReader("TransparencyOptions");

            this._useDocumentTransparency = true;
            context.GetAttributeBoolean("UseDocumentTransparency", ref this._useDocumentTransparency);
            this._enabled  = context.GetRequiredAttributeBoolean("Enabled");
            this._inverted = context.GetRequiredAttributeBoolean("Inverted");
            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(TransparencyColor.GetXMLTag()))
                {
                    this._colorList.Add(new TransparencyColor(context));
                }
                else
                {
                    if (xMLTagReader.TagIs(FadeOptions.GetXMLTag()))
                    {
                        this._fadeOptions = new FadeOptions(context, dirty);
                    }
                }
            }
        }
		public SourceMapRegistrationView(SourceMap sourceMap, MashupParseContext context)
		{
			this._sourceMap = sourceMap;
			XMLTagReader xMLTagReader = context.NewTagReader(SourceMapRegistrationView.GetXMLTag());
			this._locked = context.GetRequiredAttributeBoolean(SourceMapRegistrationView.lockedAttribute);
			bool flag = false;
			while (xMLTagReader.FindNextStartTag())
			{
				if (xMLTagReader.TagIs(SourceMapRegistrationView.sourceMapViewTag))
				{
					XMLTagReader xMLTagReader2 = context.NewTagReader(SourceMapRegistrationView.sourceMapViewTag);
					while (xMLTagReader2.FindNextStartTag())
					{
						if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag()))
						{
							this.sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance);
							flag = true;
						}
					}
				}
				else
				{
					if (xMLTagReader.TagIs(SourceMapRegistrationView.referenceMapViewTag))
					{
						XMLTagReader xMLTagReader3 = context.NewTagReader(SourceMapRegistrationView.referenceMapViewTag);
						while (xMLTagReader3.FindNextStartTag())
						{
							if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version)))
							{
								this.referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance);
							}
						}
					}
				}
			}
			if (this.referenceMapView == null)
			{
				throw new InvalidMashupFile(context, "No " + SourceMapRegistrationView.referenceMapViewTag + " tag in LayerView.");
			}
			if (flag == this._locked)
			{
				throw new InvalidMashupFile(context, "locked flag disagrees with " + SourceMapRegistrationView.sourceMapViewTag + " element.");
			}
		}
Ejemplo n.º 6
0
        public LegendView(Legend legend, MashupParseContext context)
        {
            this.legend = legend;
            object       obj          = null;
            XMLTagReader xMLTagReader = context.NewTagReader(GetXMLTag());

            showingPreview = context.GetRequiredAttributeBoolean(previewAttr);
            while (xMLTagReader.FindNextStartTag())
            {
                if (xMLTagReader.TagIs(sourceMapViewTag))
                {
                    XMLTagReader xMLTagReader2 = context.NewTagReader(sourceMapViewTag);
                    while (xMLTagReader2.FindNextStartTag())
                    {
                        if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag()))
                        {
                            sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance);
                            context.AssertUnique(obj);
                            obj = new object();
                        }
                    }
                }
                else
                {
                    if (xMLTagReader.TagIs(referenceMapViewTag))
                    {
                        context.AssertUnique(referenceMapView);
                        XMLTagReader xMLTagReader3 = context.NewTagReader(referenceMapViewTag);
                        while (xMLTagReader3.FindNextStartTag())
                        {
                            if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version)))
                            {
                                referenceMapView =
                                    new MapPosition(context, null, MercatorCoordinateSystem.theInstance);
                            }
                        }
                    }
                }
            }

            context.AssertPresent(obj, sourceMapViewTag);
            context.AssertPresent(referenceMapView, referenceMapViewTag);
        }
Ejemplo n.º 7
0
		public LegendView(Legend legend, MashupParseContext context)
		{
			this._legend = legend;
			object obj = null;
			XMLTagReader xMLTagReader = context.NewTagReader(LegendView.GetXMLTag());
			this._showingPreview = context.GetRequiredAttributeBoolean(LegendView.previewAttr);
			while (xMLTagReader.FindNextStartTag())
			{
				if (xMLTagReader.TagIs(LegendView.sourceMapViewTag))
				{
					XMLTagReader xMLTagReader2 = context.NewTagReader(LegendView.sourceMapViewTag);
					while (xMLTagReader2.FindNextStartTag())
					{
						if (xMLTagReader2.TagIs(LatLonZoom.GetXMLTag()))
						{
							this.sourceMapView = new LatLonZoom(context, ContinuousCoordinateSystem.theInstance);
							context.AssertUnique(obj);
							obj = new object();
						}
					}
				}
				else
				{
					if (xMLTagReader.TagIs(LegendView.referenceMapViewTag))
					{
						context.AssertUnique(this.referenceMapView);
						XMLTagReader xMLTagReader3 = context.NewTagReader(LegendView.referenceMapViewTag);
						while (xMLTagReader3.FindNextStartTag())
						{
							if (xMLTagReader3.TagIs(MapPosition.GetXMLTag(context.version)))
							{
								this.referenceMapView = new MapPosition(context, null, MercatorCoordinateSystem.theInstance);
							}
						}
					}
				}
			}
			context.AssertPresent(obj, LegendView.sourceMapViewTag);
			context.AssertPresent(this.referenceMapView, LegendView.referenceMapViewTag);
		}
Ejemplo n.º 8
0
        public RenderOptions(MashupParseContext context, DirtyEvent parentDirtyEvent,
                             ref SingleMaxZoomForEntireMashupCompatibilityBlob blob)
        {
            dirtyEvent = new DirtyEvent(parentDirtyEvent);
            XMLTagReader xMLTagReader = context.NewTagReader(RenderOptionsTag);

            while (xMLTagReader.FindNextStartTag())
            {
                if (context.version == SingleMaxZoomForEntireMashupSchema.schema &&
                    xMLTagReader.TagIs(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag))
                {
                    blob = new SingleMaxZoomForEntireMashupCompatibilityBlob();
                    XMLTagReader xMLTagReader2 = context.NewTagReader(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag);
                    string       attribute;
                    if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MinZoomTag)) !=
                        null)
                    {
                        blob.minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context,
                                                                                                 SingleMaxZoomForEntireMashupSchema.MinZoomTag,
                                                                                                 attribute);
                    }

                    if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MaxZoomTag)) !=
                        null)
                    {
                        blob.maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context,
                                                                                                 SingleMaxZoomForEntireMashupSchema.MaxZoomTag,
                                                                                                 attribute);
                    }

                    xMLTagReader2.SkipAllSubTags();
                }
                else
                {
                    if (xMLTagReader.TagIs(RenderToFileOptions.xmlTag))
                    {
                        _renderToOptions = new RenderToFileOptions(context, dirtyEvent);
                    }
                    else
                    {
                        if (xMLTagReader.TagIs(compatibility_RenderToFileOutputTag))
                        {
                            _renderToOptions = new RenderToFileOptions(context,
                                                                       dirtyEvent,
                                                                       compatibility_RenderToFileOutputTag);
                        }
                        else
                        {
                            if (xMLTagReader.TagIs(RenderToS3Options.xmlTag))
                            {
                                _renderToOptions = new RenderToS3Options(context, dirtyEvent);
                            }
                            else
                            {
                                if (xMLTagReader.TagIs(OutputTileTypeTag))
                                {
                                    XMLTagReader xMLTagReader3 = context.NewTagReader(OutputTileTypeTag);
                                    outputTileType =
                                        OutputTileType.Parse(context.reader.GetAttribute(OutputTileTypeAttr));
                                    xMLTagReader3.SkipAllSubTags();
                                }
                                else
                                {
                                    if (xMLTagReader.TagIs(PublishSourceDataTag))
                                    {
                                        XMLTagReader xMLTagReader4 = context.NewTagReader(PublishSourceDataTag);
                                        publishSourceData =
                                            context.GetRequiredAttributeBoolean(PublishSourceDataValueAttr);
                                        xMLTagReader4.SkipAllSubTags();
                                    }
                                    else
                                    {
                                        if (xMLTagReader.TagIs(PermitCompositionTag))
                                        {
                                            XMLTagReader xMLTagReader5 = context.NewTagReader(PermitCompositionTag);
                                            permitComposition =
                                                context.GetRequiredAttributeBoolean(PermitCompositionValueAttr);
                                            xMLTagReader5.SkipAllSubTags();
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Ejemplo n.º 9
0
		public RenderOptions(MashupParseContext context, DirtyEvent parentDirtyEvent, ref SingleMaxZoomForEntireMashupCompatibilityBlob blob)
		{
			this.dirtyEvent = new DirtyEvent(parentDirtyEvent);
			XMLTagReader xMLTagReader = context.NewTagReader(RenderOptions.RenderOptionsTag);
			while (xMLTagReader.FindNextStartTag())
			{
				if (context.version == SingleMaxZoomForEntireMashupSchema.schema && xMLTagReader.TagIs(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag))
				{
					blob = new SingleMaxZoomForEntireMashupCompatibilityBlob();
					XMLTagReader xMLTagReader2 = context.NewTagReader(SingleMaxZoomForEntireMashupSchema.ZoomLevelsTag);
					string attribute;
					if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MinZoomTag)) != null)
					{
						blob.minZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, SingleMaxZoomForEntireMashupSchema.MinZoomTag, attribute);
					}
					if ((attribute = context.reader.GetAttribute(SingleMaxZoomForEntireMashupSchema.MaxZoomTag)) != null)
					{
						blob.maxZoom = MercatorCoordinateSystem.theInstance.GetZoomRange().Parse(context, SingleMaxZoomForEntireMashupSchema.MaxZoomTag, attribute);
					}
					xMLTagReader2.SkipAllSubTags();
				}
				else
				{
					if (xMLTagReader.TagIs(RenderToFileOptions.xmlTag))
					{
						this._renderToOptions = new RenderToFileOptions(context, this.dirtyEvent);
					}
					else
					{
						if (xMLTagReader.TagIs(RenderOptions.compatibility_RenderToFileOutputTag))
						{
							this._renderToOptions = new RenderToFileOptions(context, this.dirtyEvent, RenderOptions.compatibility_RenderToFileOutputTag);
						}
						else
						{
							if (xMLTagReader.TagIs(RenderToS3Options.xmlTag))
							{
								this._renderToOptions = new RenderToS3Options(context, this.dirtyEvent);
							}
							else
							{
								if (xMLTagReader.TagIs(RenderOptions.OutputTileTypeTag))
								{
									XMLTagReader xMLTagReader3 = context.NewTagReader(RenderOptions.OutputTileTypeTag);
									this._outputTileType = OutputTileType.Parse(context.reader.GetAttribute(RenderOptions.OutputTileTypeAttr));
									xMLTagReader3.SkipAllSubTags();
								}
								else
								{
									if (xMLTagReader.TagIs(RenderOptions.PublishSourceDataTag))
									{
										XMLTagReader xMLTagReader4 = context.NewTagReader(RenderOptions.PublishSourceDataTag);
										this.publishSourceData = context.GetRequiredAttributeBoolean(RenderOptions.PublishSourceDataValueAttr);
										xMLTagReader4.SkipAllSubTags();
									}
									else
									{
										if (xMLTagReader.TagIs(RenderOptions.PermitCompositionTag))
										{
											XMLTagReader xMLTagReader5 = context.NewTagReader(RenderOptions.PermitCompositionTag);
											this.permitComposition = context.GetRequiredAttributeBoolean(RenderOptions.PermitCompositionValueAttr);
											xMLTagReader5.SkipAllSubTags();
										}
									}
								}
							}
						}
					}
				}
			}
		}