Class FlaggedObject

  • All Implemented Interfaces:
    java.io.Serializable, org.openstreetmap.atlas.geography.Located
    Direct Known Subclasses:
    FlaggedPoint, FlaggedPolyline, FlaggedRelation

    public abstract class FlaggedObject
    extends java.lang.Object
    implements java.io.Serializable, org.openstreetmap.atlas.geography.Located
    Abstract base class for AtlasObjects flagged by the integrity framework
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FlaggedObject()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract com.google.gson.JsonObject asGeoJsonFeature​(java.lang.String flagIdentifier)
      A GeoJSON representation of the flagged object.
      boolean equals​(java.lang.Object other)  
      abstract FlaggedObject getAsCompleteFlaggedObject()
      Return either itself or a copy of itself where there is no memory reference to an Atlas.
      java.lang.String getCountry()  
      abstract java.lang.Iterable<org.openstreetmap.atlas.geography.Location> getGeometry()  
      protected abstract java.util.Optional<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> getObject()  
      abstract java.util.Map<java.lang.String,​java.lang.String> getProperties()  
      java.lang.String getUniqueIdentifier()  
      boolean hasCountry()  
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.openstreetmap.atlas.geography.Located

        bounds, within
    • Constructor Detail

      • FlaggedObject

        public FlaggedObject()
    • Method Detail

      • asGeoJsonFeature

        public abstract com.google.gson.JsonObject asGeoJsonFeature​(java.lang.String flagIdentifier)
        A GeoJSON representation of the flagged object.
        Parameters:
        flagIdentifier - We always will want to know the id of the flag assocaited with this flag object.
        Returns:
        GeoJSON representation of the flagged object.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getAsCompleteFlaggedObject

        public abstract FlaggedObject getAsCompleteFlaggedObject()
        Return either itself or a copy of itself where there is no memory reference to an Atlas.
        Returns:
        Flagged Object with no memory reference to an Atlas
      • getCountry

        public java.lang.String getCountry()
        Returns:
        the flagged object's country code
      • getGeometry

        public abstract java.lang.Iterable<org.openstreetmap.atlas.geography.Location> getGeometry()
        Returns:
        flagged geometry
      • getProperties

        public abstract java.util.Map<java.lang.String,​java.lang.String> getProperties()
        Returns:
        flag key-value property map
      • getUniqueIdentifier

        public java.lang.String getUniqueIdentifier()
      • hasCountry

        public boolean hasCountry()
        Returns:
        true if the flagged object has a country code property
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getObject

        protected abstract java.util.Optional<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> getObject()