Class FlaggedObject
- java.lang.Object
-
- org.openstreetmap.atlas.checks.flag.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.LocatedAbstract base class forAtlasObjects flagged by the integrity framework- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringAREA_TAGprotected static java.lang.StringCOUNTRY_MISSINGprotected static java.lang.StringEDGE_TAGprotected static java.lang.StringITEM_IDENTIFIER_TAGprotected static java.lang.StringITEM_TYPE_TAGprotected static java.lang.StringLINE_TAGprotected static java.lang.StringNODE_TAGprotected static java.lang.StringOSM_IDENTIFIER_TAGprotected static java.lang.StringPOINT_TAG
-
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.JsonObjectasGeoJsonFeature(java.lang.String flagIdentifier)A GeoJSON representation of the flagged object.booleanequals(java.lang.Object other)abstract FlaggedObjectgetAsCompleteFlaggedObject()Return either itself or a copy of itself where there is no memory reference to an Atlas.java.lang.StringgetCountry()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()booleanhasCountry()inthashCode()
-
-
-
Field Detail
-
AREA_TAG
protected static final java.lang.String AREA_TAG
- See Also:
- Constant Field Values
-
COUNTRY_MISSING
protected static final java.lang.String COUNTRY_MISSING
- See Also:
- Constant Field Values
-
EDGE_TAG
protected static final java.lang.String EDGE_TAG
- See Also:
- Constant Field Values
-
ITEM_IDENTIFIER_TAG
protected static final java.lang.String ITEM_IDENTIFIER_TAG
- See Also:
- Constant Field Values
-
ITEM_TYPE_TAG
protected static final java.lang.String ITEM_TYPE_TAG
- See Also:
- Constant Field Values
-
LINE_TAG
protected static final java.lang.String LINE_TAG
- See Also:
- Constant Field Values
-
NODE_TAG
protected static final java.lang.String NODE_TAG
- See Also:
- Constant Field Values
-
OSM_IDENTIFIER_TAG
protected static final java.lang.String OSM_IDENTIFIER_TAG
- See Also:
- Constant Field Values
-
POINT_TAG
protected static final java.lang.String POINT_TAG
- See Also:
- Constant Field Values
-
-
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:
equalsin classjava.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
-
hasCountry
public boolean hasCountry()
- Returns:
trueif the flagged object has a country code property
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getObject
protected abstract java.util.Optional<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> getObject()
-
-