Example #1
0
 protected DataElement(DataElementType type, uint field1, uint field2, uint field3)
 {
     Type   = type;
     Field1 = field1;
     Field2 = field2;
     Field3 = field3;
 }
Example #2
0
        internal Iso8583Element CreateElement(DataElementId id, byte[] buffer)
        {
            DataElementType type        = elementTypes[id];
            string          description = elementDescriptions[id];
            int             length      = elementLengths[id];

            return(Iso8583Element.Inflate(id, type, description, length, buffer));
        }
Example #3
0
        public void DeserializeDEFromPath()
        {
            string path = "C:\\Users\\rmoldwi\\OneDrive\\One Drive Documents\\SDC\\SDC Git Repo\\sdc-schema-package\\DE sample.xml";
            //string sdcFile = File.ReadAllText(path, System.Text.Encoding.UTF8);
            DataElementType DE    = DataElementType.DeserializeFromXmlPath(path);
            var             myXML = DE.GetXml();

            Debug.Print(myXML);
        }
Example #4
0
        public void DeserializeDEFromXml()
        {
            BaseType.ClearTopNode();
            //string path = @".\Test files\DE sample.xml";
            string          path    = Path.Combine(".", "Test files", "DE sample.xml");
            string          sdcFile = File.ReadAllText(path, System.Text.Encoding.UTF8);
            DataElementType DE      = DataElementType.DeserializeFromXml(sdcFile);
            var             myXML   = DE.GetXml();

            Debug.Print(myXML);
        }
        internal static Iso8583Element Inflate(DataElementId id, DataElementType type, string description, int length, byte[] buffer)
        {
            Iso8583Element element = new Iso8583Element {
                Id          = id,
                Type        = type,
                Description = description,
                Length      = length,
                Buffer      = buffer
            };

            return(element);
        }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the DataElement class.
        /// </summary>
        /// <param name="type">data element type</param>
        /// <param name="data">Specifies the data of the element.</param>
        public DataElement(DataElementType type, DataElementData data)
            : base(StreamObjectTypeHeaderStart.DataElement)
        {
            if (!dataElementDataTypeMapping.Keys.Contains(type))
            {
                throw new InvalidOperationException("Invalid argument type value" + (int)type);
            }

            this.DataElementType         = type;
            this.Data                    = data;
            this.DataElementExtendedGUID = new ExGuid(SequenceNumberGenerator.GetCurrentSerialNumber(), Guid.NewGuid());
            this.SerialNumber            = new SerialNumber(Guid.NewGuid(), SequenceNumberGenerator.GetCurrentSerialNumber());
        }
Example #7
0
        /// <summary>
        /// Create an AgsDataElement and extract some useful information from the metadata
        /// </summary>
        public AgsDataElement(AgsGeoDataService service, DataElement dataElement)
        {
            _service     = service;
            _dataElement = dataElement;
            _name        = dataElement.Name;
            _metadata    = dataElement.Metadata.XmlDoc;

            if (dataElement is DEDataset)
            {
                switch (((DEDataset)dataElement).DatasetType)
                {
                case esriDatasetType.esriDTFeatureClass:
                    _type = DataElementType.FeatureClass;
                    break;

                case esriDatasetType.esriDTFeatureDataset:
                    _type = DataElementType.FeatureDataSet;
                    break;
                }
            }

            XElement metaData = XElement.Parse(_metadata);

            _origin   = GetXPathValue(metaData, "./idinfo/citation/citeinfo/origin");
            _title    = GetXPathValue(metaData, "./idinfo/citation/citeinfo/title");
            _abstract = GetXPathValue(metaData, "./idinfo/descript/abstract");
            _purpose  = GetXPathValue(metaData, "./idinfo/descript/purpose");
            _keywords = String.Join(",", GetXPathValues(metaData, "./idinfo/keywords/theme", "themekey").ToArray());
            _places   = String.Join(",", GetXPathValues(metaData, "./idinfo/keywords/place", "placekey").ToArray());

            _pubDate        = GetXPathValue(metaData, "./idinfo/citation/citeinfo/pubdate");
            _timePeriodDate = GetXPathValue(metaData, "./idinfo/timeperd/timeinfo/sngdate/caldate");

            string leftValue   = GetXPathValue(metaData, "./idinfo/spdom/lboundng/leftbc");
            string bottomValue = GetXPathValue(metaData, "./idinfo/spdom/lboundng/bottombc");
            string rightValue  = GetXPathValue(metaData, "./idinfo/spdom/lboundng/rightbc");
            string topValue    = GetXPathValue(metaData, "./idinfo/spdom/lboundng/topbc");

            double left, bottom, right, top;

            if (Double.TryParse(leftValue, out left) && Double.TryParse(bottomValue, out bottom) && Double.TryParse(rightValue, out right) && Double.TryParse(topValue, out top))
            {
                _envelope = new AppGeo.Geo.Envelope(left, bottom, right, top);
            }

            _contactOrganization = GetXPathValue(metaData, "./idinfo/ptcontac/cntinfo/cntorgp/cntorg");

            _sourceScale = GetXPathValue(metaData, "./dataqual/lineage/srcinfo/srcscale");
        }
Example #8
0
 private void AddElementMapping(DataElementId id, DataElementType type, string description, int length)
 {
     elementTypes[id]        = type;
     elementDescriptions[id] = description;
     elementLengths[id]      = length;
 }
  /// <summary>
  /// Initializes a new instance of the DataElementTypeFilter class
  /// </summary>
  /// <param name="dataElementType">Specify the data element type.</param>
 public DataElementTypeFilter(DataElementType dataElementType)
      : base(FilterType.DataElementTypeFilter)
  {
      this.DataElementType = dataElementType;
      this.QueryChangesFilterDataElementType = new StreamObjectHeaderStart32bit(StreamObjectTypeHeaderStart.QueryChangesFilterDataElementType, 2);
  }
Example #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScopeNodeIdentifier"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="id">The id.</param>
 /// <param name="displayName">The display name.</param>
 public DataElement(DataElementType type, string id, string displayName)
 {
     this.Type        = type;
     this.Id          = id;
     this.DisplayName = displayName;
 }
 /// <summary>
 /// Initializes a new instance of the DataElementTypeFilter class
 /// </summary>
 /// <param name="dataElementType">Specify the data element type.</param>
 public DataElementTypeFilter(DataElementType dataElementType)
     : base(FilterType.DataElementTypeFilter)
 {
     this.DataElementType = dataElementType;
     this.QueryChangesFilterDataElementType = new StreamObjectHeaderStart32bit(StreamObjectTypeHeaderStart.QueryChangesFilterDataElementType, 2);
 }
Example #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScopeNodeIdentifier"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="id">The id.</param>
 /// <param name="displayName">The display name.</param>
 public DataElement(DataElementType type, string id, string displayName)
 {
     this.Type = type;
     this.Id = id;
     this.DisplayName = displayName;
 }
Example #13
0
 protected DataElement(DataElementType type)
 {
     Type = type;
 }