Class PrimitiveData

    • Constructor Detail

      • PrimitiveData

        protected PrimitiveData​(long id)
        Constructs a new PrimitiveData with given id.
        Parameters:
        id - id
        Since:
        12017
      • PrimitiveData

        protected PrimitiveData​(PrimitiveData data)
        Constructs a new PrimitiveData from an existing one.
        Parameters:
        data - the data to copy
    • Method Detail

      • setId

        public void setId​(long id)
        Sets the primitive identifier.
        Parameters:
        id - primitive identifier
      • setVersion

        public void setVersion​(int version)
        Sets the primitive version.
        Parameters:
        version - primitive version
      • makeCopy

        public abstract PrimitiveData makeCopy()
        Returns a copy of this primitive data.
        Returns:
        a copy of this primitive data
      • isTagged

        public boolean isTagged()
        Description copied from interface: IPrimitive
        Determines if this object is considered "tagged". To be "tagged", an object must have one or more "interesting" tags. "created_by" and "source" are typically considered "uninteresting" and do not make an object "tagged".
        Specified by:
        isTagged in interface IPrimitive
        Returns:
        true if this object is considered "tagged"
      • isAnnotated

        public boolean isAnnotated()
        Description copied from interface: IPrimitive
        Determines if this object is considered "annotated". To be "annotated", an object must have one or more "work in progress" tags, such as "note" or "fixme".
        Specified by:
        isAnnotated in interface IPrimitive
        Returns:
        true if this object is considered "annotated"
      • hasDirectionKeys

        public boolean hasDirectionKeys()
        Description copied from interface: IPrimitive
        true if this object has direction dependent tags (e.g. oneway)
        Specified by:
        hasDirectionKeys in interface IPrimitive
        Returns:
        true if this object has direction dependent tags
      • reversedDirection

        public boolean reversedDirection()
        Description copied from interface: IPrimitive
        true if this object has the "reversed direction" flag enabled
        Specified by:
        reversedDirection in interface IPrimitive
        Returns:
        true if this object has the "reversed direction" flag enabled
      • setHighlighted

        public void setHighlighted​(boolean highlighted)
        Description copied from interface: IPrimitive
        Updates the highlight flag for this primitive.
        Specified by:
        setHighlighted in interface IPrimitive
        Parameters:
        highlighted - The new highlight flag.
      • isHighlighted

        public boolean isHighlighted()
        Description copied from interface: IPrimitive
        Checks if the highlight flag for this primitive was set
        Specified by:
        isHighlighted in interface IPrimitive
        Returns:
        The highlight flag.
      • getReferrers

        public final List<PrimitiveDatagetReferrers​(boolean allowWithoutDataset)
        Description copied from interface: IPrimitive
        Find primitives that reference this primitive. Returns only primitives that are included in the same dataset as this primitive.
        For example following code will add wnew as referer to all nodes of existingWay, but this method will not return wnew because it's not part of the dataset
        Way wnew = new Way(existingWay)
        Specified by:
        getReferrers in interface IPrimitive
        Parameters:
        allowWithoutDataset - If true, method will return empty list if primitive is not part of the dataset. If false, exception will be thrown in this case
        Returns:
        a collection of all primitives that reference this primitive.
      • getDataSet

        public OsmData<?,​?,​?,​?> getDataSet()
        Description copied from interface: IPrimitive
        Returns the parent data set of this primitive.
        Specified by:
        getDataSet in interface IPrimitive
        Returns:
        OsmData this primitive is part of.
      • isCachedStyleUpToDate

        public boolean isCachedStyleUpToDate()
        Description copied from interface: Stylable
        Check if the cached style for this primitive is up to date.
        Specified by:
        isCachedStyleUpToDate in interface Stylable
        Returns:
        true if the cached style for this primitive is up to date