Example #1
0
        /// <summary>
        /// Adds a reference from this ID to a row.
        /// </summary>
        /// <param name="row">The row to point to.</param>
        internal void AddReference(Row row)
        {
            m_Rows = (m_Rows == null ? row : m_Rows.Add(row));

            // Check whether any associated features are instances of TextFeature that
            // have RowTextContent geometry (a placeholder class that is meant to exist
            // only during deserialization from the database). If so, see whether the
            // geometry can now be replaced with the "proper" RowTextGeometry.

            if (m_Features != null)
            {
                foreach (Feature f in m_Features)
                {
                    TextFeature tf = (f as TextFeature);
                    if (tf != null)
                    {
                        RowTextContent content = (tf.TextGeometry as RowTextContent);
                        if (content != null && content.TableId == row.Table.Id)
                        {
                            tf.TextGeometry = new RowTextGeometry(row, content);
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Obtains any miscellaneous attribute data for a specific spatial object
        /// </summary>
        /// <param name="so">The object of interest</param>
        /// <returns>Any attributes for the spatial object (never null, but may be an empty list)</returns>
        List <Row> GetRows(ISpatialObject so)
        {
            List <Row> result = new List <Row>();

            Feature f = (so as Feature);

            if (f == null && so is Polygon)
            {
                f = (so as Polygon).Label;
            }

            if (f != null && f.FeatureId != null)
            {
                FeatureId           fid  = f.FeatureId;
                IPossibleList <Row> rows = fid.Rows;
                if (rows != null)
                {
                    foreach (Row r in rows)
                    {
                        result.Add(r);
                    }
                }
            }

            return(result);
        }
Example #3
0
 /// <summary>
 /// Cuts a reference from this ID to a spatial feature.
 /// </summary>
 /// <param name="feature">The feature to cut.</param>
 public void CutReference(Feature feature)
 {
     if (m_Features != null)
     {
         m_Features = m_Features.Remove(feature);
     }
 }
Example #4
0
 /// <summary>
 /// Cuts a reference from this ID to a row of attributes.
 /// </summary>
 /// <param name="row">The row to cut.</param>
 void CutReference(Row row)
 {
     if (m_Rows != null)
     {
         m_Rows = m_Rows.Remove(row);
     }
 }
Example #5
0
 protected FeatureId()
 {
     m_Features = null;
     m_Rows     = null;
 }
Example #6
0
 /// <summary>
 /// Adds a reference from this ID to a spatial feature.
 /// </summary>
 /// <param name="feature">The feature to point to.</param>
 public void AddReference(Feature feature)
 {
     m_Features = (m_Features == null ? feature : m_Features.Add(feature));
 }
Example #7
0
 protected FeatureId()
 {
     m_Features = null;
     m_Rows = null;
 }
Example #8
0
 /// <summary>
 /// Cuts a reference from this ID to a row of attributes.
 /// </summary>
 /// <param name="row">The row to cut.</param>
 void CutReference(Row row)
 {
     if (m_Rows!=null)
         m_Rows = m_Rows.Remove(row);
 }
Example #9
0
        /// <summary>
        /// Adds a reference from this ID to a row. 
        /// </summary>
        /// <param name="row">The row to point to.</param>
        internal void AddReference(Row row)
        {
            m_Rows = (m_Rows==null ? row : m_Rows.Add(row));

            // Check whether any associated features are instances of TextFeature that
            // have RowTextContent geometry (a placeholder class that is meant to exist
            // only during deserialization from the database). If so, see whether the
            // geometry can now be replaced with the "proper" RowTextGeometry.

            if (m_Features != null)
            {
                foreach (Feature f in m_Features)
                {
                    TextFeature tf = (f as TextFeature);
                    if (tf != null)
                    {
                        RowTextContent content = (tf.TextGeometry as RowTextContent);
                        if (content != null && content.TableId == row.Table.Id)
                            tf.TextGeometry = new RowTextGeometry(row, content);
                    }
                }
            }
        }
Example #10
0
 /// <summary>
 /// Cuts a reference from this ID to a spatial feature. 
 /// </summary>
 /// <param name="feature">The feature to cut.</param>
 public void CutReference(Feature feature)
 {
     if (m_Features!=null)
         m_Features = m_Features.Remove(feature);
 }
Example #11
0
 /// <summary>
 /// Adds a reference from this ID to a spatial feature.
 /// </summary>
 /// <param name="feature">The feature to point to.</param>
 public void AddReference(Feature feature)
 {
     m_Features = (m_Features==null ? feature : m_Features.Add(feature));
 }