Class NFEFeatureElement

  • All Implemented Interfaces:
    NFEModelObject
    Direct Known Subclasses:
    NFEBasicFeatureElement

    public abstract class NFEFeatureElement
    extends NFEBasicModelObject
    Base class for representing a feature element. Feature elements are contained in features. A feature element only may belong to one feature. The way used to differentiate a feature element is the key property. A feature element always lays over a network element. The type of the feature element determines if it can lay over a node or a link.
    • Constructor Detail

      • NFEFeatureElement

        public NFEFeatureElement()
    • Method Detail

      • getKey

        public abstract java.lang.String getKey()
        Gets the feature element's key which is used to uniquely identify a feature element in an NFEModel
        Returns:
        a feature element's key
      • setFeature

        public abstract void setFeature​(NFEFeature feature)
        Sets the feature which contains the feature element
        Parameters:
        feature - a feature instance
      • getFeature

        public abstract NFEFeature getFeature()
        Gets the feature element's feature
        Returns:
        a feature instance
      • getFeatureLayer

        public abstract NFEFeatureLayer getFeatureLayer()
        Gets the feature element's feature layer. It is a shorthand for NFEFeatureElement.getFeature().getFeatureLayer()
        Returns:
        a feature layer instance
      • setNetworkElement

        public abstract void setNetworkElement​(NFENetworkElement networkElement)
        Sets the network element where the feature element resides
        Parameters:
        networkElement - a network element instance (node or link)
      • getNetworkElement

        public abstract NFENetworkElement getNetworkElement()
        Gets the network element where the feature element resides
        Returns:
        a network element instance (node or link)
      • setType

        public abstract void setType​(FeatureElement.FeatureElementType type)
        Sets the type of the feature element. This type determines if the element can be placed over a link or node.
        Parameters:
        type - a feature element type
      • setStartPercentage

        public abstract void setStartPercentage​(double startPercentage)
        Sets the feature element's position relative to its link's length. For line feature elements this value sets the start of the line. This property is not used when a feature element is set over a node
        Parameters:
        startPercentage - a value between 0 and 1
      • getStartPercentage

        public abstract double getStartPercentage()
        Gets the position of the feature element's relative to its link's length. This property is not used when a feature element is set over a node
        Returns:
        a value between 0 and 1
      • setEndPercentage

        public abstract void setEndPercentage​(double endPercentage)
        Sets the line feature element's end point relative to its link's length. This property is not used for point feature elements.
        Parameters:
        endPercentage - a value between 0 and 1
      • getEndPercentage

        public abstract double getEndPercentage()
        Gets the line feature element's end point relative to its link's length. This property is not used for point feature elements.
        Returns:
        a value between 0 and 1
      • setSequence

        public abstract void setSequence​(long sequence)
        Sets the feature element's sequence number
        Parameters:
        sequence - the feature element's sequence
      • getSequence

        public abstract long getSequence()
        Gets the feature element's sequence number
        Returns:
        the feature element's sequence
      • createCopy

        public abstract NFEFeatureElement createCopy()
        Returns object copy.
        Returns:
        object copy
      • notifyPropertyChanged

        protected void notifyPropertyChanged​(java.lang.String property,
                                             java.lang.Object previousValue)
      • createKey

        public static java.lang.String createKey​(long featLayerId,
                                                 long featureId,
                                                 long netElemId,
                                                 long sequence)