Class CooperativeChallengeOperation
- java.lang.Object
-
- org.openstreetmap.atlas.checks.maproulette.data.cooperative_challenge.CooperativeChallengeOperation
-
- Direct Known Subclasses:
TagChangeOperation
public abstract class CooperativeChallengeOperation extends java.lang.ObjectThis represents an operation that is embedded in a cooperative challenge. Example: Given a FeatureCollection geojson uploaded to MapRoulette:{ "type": "FeatureCollection", "features": [ ... ], // omitted for readability "cooperativeWork": { // special `cooperativeWork` property "meta": { "version": 2, // must be format version `2` "type": 1 // `1` for tag fix type }, "operations": [ // Operations section (see below) ... ] } }This class is an abstract representation of the json material to be found under "operations". Its subclasses should handle the various ChangeDescriptor types, including GeometryChangeDescriptor, LongElementChangeDescriptor, RelationMemberChangeDescriptor, TagChangeDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringDATA_KEYprotected static java.lang.StringID_KEYprotected static java.lang.StringOPERATION_KEYprotected static java.lang.StringOPERATION_TYPE_KEYprotected static java.lang.StringOPERATIONS_KEY
-
Constructor Summary
Constructors Modifier Constructor Description protectedCooperativeChallengeOperation(org.openstreetmap.atlas.geography.atlas.change.description.ChangeDescription changeDescription)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CooperativeChallengeOperationcreate()protected java.util.List<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor>getChangeDescriptorList()protected java.lang.StringgetIdentifier()com.google.gson.JsonObjectgetJson()protected org.openstreetmap.atlas.geography.atlas.change.description.ChangeDescriptorTypegetOperationType()protected abstract java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor>operationFilter()protected voidsetJson(com.google.gson.JsonObject json)
-
-
-
Field Detail
-
OPERATION_TYPE_KEY
protected static final java.lang.String OPERATION_TYPE_KEY
- See Also:
- Constant Field Values
-
DATA_KEY
protected static final java.lang.String DATA_KEY
- See Also:
- Constant Field Values
-
ID_KEY
protected static final java.lang.String ID_KEY
- See Also:
- Constant Field Values
-
OPERATIONS_KEY
protected static final java.lang.String OPERATIONS_KEY
- See Also:
- Constant Field Values
-
OPERATION_KEY
protected static final java.lang.String OPERATION_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public abstract CooperativeChallengeOperation create()
-
getJson
public com.google.gson.JsonObject getJson()
-
getChangeDescriptorList
protected java.util.List<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor> getChangeDescriptorList()
-
getIdentifier
protected java.lang.String getIdentifier()
-
getOperationType
protected org.openstreetmap.atlas.geography.atlas.change.description.ChangeDescriptorType getOperationType()
-
operationFilter
protected abstract java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor> operationFilter()
-
setJson
protected void setJson(com.google.gson.JsonObject json)
-
-