Class CooperativeChallengeOperation

  • Direct Known Subclasses:
    TagChangeOperation

    public abstract class CooperativeChallengeOperation
    extends java.lang.Object
    This 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.String DATA_KEY  
      protected static java.lang.String ID_KEY  
      protected static java.lang.String OPERATION_KEY  
      protected static java.lang.String OPERATION_TYPE_KEY  
      protected static java.lang.String OPERATIONS_KEY  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CooperativeChallengeOperation​(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 CooperativeChallengeOperation create()  
      protected java.util.List<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor> getChangeDescriptorList()  
      protected java.lang.String getIdentifier()  
      com.google.gson.JsonObject getJson()  
      protected org.openstreetmap.atlas.geography.atlas.change.description.ChangeDescriptorType getOperationType()  
      protected abstract java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.description.descriptors.ChangeDescriptor> operationFilter()  
      protected void setJson​(com.google.gson.JsonObject json)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CooperativeChallengeOperation

        protected CooperativeChallengeOperation​(org.openstreetmap.atlas.geography.atlas.change.description.ChangeDescription changeDescription)
    • Method Detail

      • 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)