Esempio n. 1
0
            internal virtual void WritePoint(MappingWriter pointWriter, Point property)
            {
                pointWriter.WriteString("type", property.GeometryType);
                //write coordinates
                ListWriter coordinatesWriter = pointWriter.NewList(RepresentationType.Double, "coordinates");

                foreach (double?coordinate in property.Coordinate.Coordinate)
                {
                    coordinatesWriter.writeFloatingPointNumber(RepresentationType.Double, coordinate);
                }
                coordinatesWriter.Done();

                //Write coordinate reference system
                CRS           crs       = property.CRS;
                MappingWriter crsWriter = pointWriter.NewMapping(RepresentationType.Map, "crs");

                crsWriter.WriteInteger(RepresentationType.Integer, "srid", crs.Code);
                crsWriter.WriteString("name", crs.Type);
                crsWriter.WriteString("type", "link");
                MappingWriter propertiesWriter = crsWriter.NewMapping(Representation.Map, "properties");

                propertiesWriter.WriteString("href", crs.Href + "ogcwkt/");
                propertiesWriter.WriteString("type", "ogcwkt");
                propertiesWriter.Done();
                crsWriter.Done();
            }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchDoubleArrayProperty(PropertyArray<double[], double> array, String param)
            protected internal override Void DispatchDoubleArrayProperty(PropertyArray <double[], double> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Double, param);

                foreach (double?d in array)
                {
                    list.writeFloatingPointNumber(RepresentationType.Double, d);
                }
                list.Done();
                return(null);
            }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchBooleanArrayProperty(PropertyArray<boolean[], bool> array, String param)
            protected internal override Void DispatchBooleanArrayProperty(PropertyArray <bool[], bool> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Boolean, param);

                foreach (bool?z in array)
                {
                    list.WriteBoolean(z.Value);
                }
                list.Done();
                return(null);
            }
Esempio n. 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchLongArrayProperty(PropertyArray<long[], long> array, String param)
            protected internal override Void DispatchLongArrayProperty(PropertyArray <long[], long> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Long, param);

                foreach (long?j in array)
                {
                    list.writeInteger(RepresentationType.Long, j);
                }
                list.Done();
                return(null);
            }
Esempio n. 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchFloatArrayProperty(PropertyArray<float[], float> array, String param)
            protected internal override Void DispatchFloatArrayProperty(PropertyArray <float[], float> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Float, param);

                foreach (float?f in array)
                {
                    list.writeFloatingPointNumber(RepresentationType.Float, f);
                }
                list.Done();
                return(null);
            }
Esempio n. 6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchCharacterArrayProperty(PropertyArray<char[], char> array, String param)
            protected internal override Void DispatchCharacterArrayProperty(PropertyArray <char[], char> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Char, param);

                foreach (char?c in array)
                {
                    list.writeInteger(RepresentationType.Char, c);
                }
                list.Done();
                return(null);
            }
Esempio n. 7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchIntegerArrayProperty(PropertyArray<int[], int> array, String param)
            protected internal override Void DispatchIntegerArrayProperty(PropertyArray <int[], int> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Integer, param);

                foreach (int?i in array)
                {
                    list.writeInteger(RepresentationType.Integer, i);
                }
                list.Done();
                return(null);
            }
Esempio n. 8
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchShortArrayProperty(PropertyArray<short[], short> array, String param)
            protected internal override Void DispatchShortArrayProperty(PropertyArray <short[], short> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Short, param);

                foreach (short?s in array)
                {
                    list.writeInteger(RepresentationType.Short, s);
                }
                list.Done();
                return(null);
            }
Esempio n. 9
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @SuppressWarnings("boxing") protected Void dispatchByteArrayProperty(PropertyArray<byte[], sbyte> array, String param)
            protected internal override Void DispatchByteArrayProperty(PropertyArray <sbyte[], sbyte> array, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Byte, param);

                foreach (sbyte?b in array)
                {
                    list.writeInteger(RepresentationType.Byte, b);
                }
                list.Done();
                return(null);
            }
Esempio n. 10
0
            protected internal override Void DispatchTemporalAmountArrayProperty(TemporalAmount[] property, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.TemporalAmount, param);

                foreach (TemporalAmount p in property)
                {
                    list.WriteString(p.ToString());
                }
                list.Done();
                return(null);
            }
Esempio n. 11
0
            protected internal override Void DispatchStringArrayProperty(string[] property, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.String, param);

                foreach (string s in property)
                {
                    list.WriteString(s);
                }
                list.Done();
                return(null);
            }
Esempio n. 12
0
            protected internal override Void DispatchPointArrayProperty(Point[] property, string param)
            {
                ListWriter list = Writer.newList(RepresentationType.Point, param);

                foreach (Point p in property)
                {
                    MappingWriter pointWriter = list.NewMapping(RepresentationType.Point);
                    WritePoint(pointWriter, p);
                    pointWriter.Done();
                }
                list.Done();
                return(null);
            }
Esempio n. 13
0
 internal void Serialize(ListWriter list, ListRepresentation value)
 {
     value.Serialize(new ListSerializer(list, _baseUri, _extensions));
     list.Done();
 }