public class CheckFlag
extends java.lang.Object
implements java.lang.Iterable<org.openstreetmap.atlas.geography.Location>, org.openstreetmap.atlas.geography.Located, java.io.Serializable
CheckFlag is used to flag one or more AtlasObjects found to violate some set of
rules.| Constructor and Description |
|---|
CheckFlag(java.lang.String identifier)
A basic constructor that simply flags some identifying value
|
CheckFlag(java.lang.String identifier,
java.util.Set<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects,
java.util.List<java.lang.String> instructions)
Creates a
CheckFlag with a set of AtlasObjects to flag, most commonly used
when all of the AtlasObjects contribute to the rule violation |
CheckFlag(java.lang.String identifier,
java.util.Set<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects,
java.util.List<java.lang.String> instructions,
java.util.List<org.openstreetmap.atlas.geography.Location> points)
Creates a
CheckFlag with the addition of a list of point Locations
that highlight specific points in the geometry that caused the rule violation |
| Modifier and Type | Method and Description |
|---|---|
void |
addInstruction(java.lang.String instruction)
Adds any instructions that may help communicate why the
AtlasObject(s) were flagged |
void |
addInstructions(java.lang.Iterable<java.lang.String> instructions)
Adds a list of instructions that may help communicate why the
AtlasObject(s) were
flagged. |
void |
addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
Adds an
AtlasObject to flag |
void |
addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object,
org.openstreetmap.atlas.geography.Location point,
java.lang.String instruction)
Flags an
AtlasObject, highlighting a specific point Location and
instructions with more detail. |
void |
addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object,
java.lang.String instruction)
Flags an
AtlasObject with instructions. |
void |
addObjects(java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects)
Adds a list of
AtlasObjects to flag |
void |
addPoint(org.openstreetmap.atlas.geography.Location point)
Flags a specific
Location |
void |
addPoints(java.lang.Iterable<org.openstreetmap.atlas.geography.Location> points)
Flags a list of
point Locations |
com.google.gson.JsonObject |
asGeoJsonFeature() |
org.openstreetmap.atlas.geography.Rectangle |
bounds() |
boolean |
equals(java.lang.Object other) |
java.util.Optional<java.lang.String> |
getChallengeName() |
java.lang.String |
getCountryISO()
Will return the first country ISO that it finds in the objects provided in the flag
|
java.util.Set<FlaggedObject> |
getFlaggedObjects() |
java.lang.String |
getIdentifier() |
java.lang.String |
getInstructions() |
java.util.List<org.openstreetmap.atlas.geography.geojson.GeoJsonBuilder.LocationIterableProperties> |
getLocationIterableProperties() |
Task |
getMapRouletteTask()
|
java.util.Set<org.openstreetmap.atlas.geography.Location> |
getPoints() |
java.util.Set<org.openstreetmap.atlas.geography.PolyLine> |
getPolyLines() |
java.lang.Iterable<java.lang.Iterable<org.openstreetmap.atlas.geography.Location>> |
getShapes() |
int |
hashCode() |
java.util.Iterator<org.openstreetmap.atlas.geography.Location> |
iterator() |
void |
save(org.openstreetmap.atlas.streaming.resource.WritableResource writableResource)
Writes the string value of this
CheckFlag to the WritableResource |
void |
setChallengeName(java.lang.String challengeName)
Sets a Challenge name for this Flag
|
java.lang.String |
toString() |
public CheckFlag(java.lang.String identifier)
identifier - the identifying value to flagpublic CheckFlag(java.lang.String identifier,
java.util.Set<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects,
java.util.List<java.lang.String> instructions)
CheckFlag with a set of AtlasObjects to flag, most commonly used
when all of the AtlasObjects contribute to the rule violationidentifier - the identifying value to flagobjects - AtlasObjects to flaginstructions - a list of free form instructionspublic CheckFlag(java.lang.String identifier,
java.util.Set<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects,
java.util.List<java.lang.String> instructions,
java.util.List<org.openstreetmap.atlas.geography.Location> points)
CheckFlag with the addition of a list of point Locations
that highlight specific points in the geometry that caused the rule violationidentifier - the identifying value to flagobjects - AtlasObjects to flaginstructions - a list of free form instructionspoints - point Locations to highlightpublic void addInstruction(java.lang.String instruction)
AtlasObject(s) were flaggedinstruction - a free form instructionpublic void addInstructions(java.lang.Iterable<java.lang.String> instructions)
AtlasObject(s) were
flagged. This can be useful if multiple rules were violatedinstructions - a list of free form instructionpublic void addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object)
AtlasObject to flagobject - an AtlasObjectpublic void addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object,
org.openstreetmap.atlas.geography.Location point,
java.lang.String instruction)
AtlasObject, highlighting a specific point Location and
instructions with more detail. This helps build flags iteratively when more complex
Checks span a large number of AtlasObjects.object - the AtlasObject to flagpoint - the point Location to highlightinstruction - a free form instructionpublic void addObject(org.openstreetmap.atlas.geography.atlas.items.AtlasObject object,
java.lang.String instruction)
AtlasObject with instructions. This helps build flags iteratively when more
complex Checks span a large number of AtlasObjectsobject - the AtlasObject to flaginstruction - a free form instructionpublic void addObjects(java.lang.Iterable<org.openstreetmap.atlas.geography.atlas.items.AtlasObject> objects)
AtlasObjects to flagobjects - a list of AtlasObjectspublic void addPoint(org.openstreetmap.atlas.geography.Location point)
Locationpoint - the point Location to flagpublic void addPoints(java.lang.Iterable<org.openstreetmap.atlas.geography.Location> points)
point Locationspoints - the point Locations to flagpublic org.openstreetmap.atlas.geography.Rectangle bounds()
bounds in interface org.openstreetmap.atlas.geography.Locatedpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.util.Optional<java.lang.String> getChallengeName()
public java.lang.String getCountryISO()
public java.util.Set<FlaggedObject> getFlaggedObjects()
AtlasObjectspublic java.lang.String getIdentifier()
public java.lang.String getInstructions()
Stringpublic java.util.List<org.openstreetmap.atlas.geography.geojson.GeoJsonBuilder.LocationIterableProperties> getLocationIterableProperties()
GeoJsonBuilder.LocationIterableProperties representing all flagged
geometriespublic java.util.Set<org.openstreetmap.atlas.geography.Location> getPoints()
point Location geometries flaggedpublic java.util.Set<org.openstreetmap.atlas.geography.PolyLine> getPolyLines()
polyline geometries flaggedpublic java.lang.Iterable<java.lang.Iterable<org.openstreetmap.atlas.geography.Location>> getShapes()
shape representation of all polyline geometries flaggedpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.Iterator<org.openstreetmap.atlas.geography.Location> iterator()
iterator in interface java.lang.Iterable<org.openstreetmap.atlas.geography.Location>public void save(org.openstreetmap.atlas.streaming.resource.WritableResource writableResource)
CheckFlag to the WritableResourcewritableResource - a WritableResource to write topublic void setChallengeName(java.lang.String challengeName)
challengeName - a Challenge namepublic java.lang.String toString()
toString in class java.lang.Objectpublic com.google.gson.JsonObject asGeoJsonFeature()