Class ChangeFilter

  • All Implemented Interfaces:
    java.util.function.Function<org.openstreetmap.atlas.geography.atlas.change.Change,​java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change>>

    public class ChangeFilter
    extends java.lang.Object
    implements java.util.function.Function<org.openstreetmap.atlas.geography.atlas.change.Change,​java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change>>
    Filter out all FeatureChange objects that do not belong to the specified DynamicAtlas (or initial shard).
    • Constructor Summary

      Constructors 
      Constructor Description
      ChangeFilter​(org.openstreetmap.atlas.geography.atlas.dynamic.DynamicAtlas atlas)  
      ChangeFilter​(org.openstreetmap.atlas.geography.sharding.Shard shard)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change> apply​(org.openstreetmap.atlas.geography.atlas.change.Change change)  
      static org.openstreetmap.atlas.geography.atlas.change.Change changeWithoutMutatorTag​(org.openstreetmap.atlas.geography.atlas.change.Change input, java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.FeatureChange> entitiesToConsider)  
      static java.util.Map<java.lang.String,​java.lang.String> mutatorMetaDataFromTags​(org.openstreetmap.atlas.geography.atlas.change.Change change, java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.FeatureChange> entitiesToConsider)
      Get a map of meta-data tags to add to an Atlas
      static java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change> stripForSaving​(org.openstreetmap.atlas.geography.atlas.change.Change change)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • ChangeFilter

        public ChangeFilter​(org.openstreetmap.atlas.geography.atlas.dynamic.DynamicAtlas atlas)
      • ChangeFilter

        public ChangeFilter​(org.openstreetmap.atlas.geography.sharding.Shard shard)
    • Method Detail

      • changeWithoutMutatorTag

        public static org.openstreetmap.atlas.geography.atlas.change.Change changeWithoutMutatorTag​(org.openstreetmap.atlas.geography.atlas.change.Change input,
                                                                                                    java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.FeatureChange> entitiesToConsider)
      • mutatorMetaDataFromTags

        public static java.util.Map<java.lang.String,​java.lang.String> mutatorMetaDataFromTags​(org.openstreetmap.atlas.geography.atlas.change.Change change,
                                                                                                     java.util.function.Predicate<org.openstreetmap.atlas.geography.atlas.change.FeatureChange> entitiesToConsider)
        Get a map of meta-data tags to add to an Atlas
        Parameters:
        change - The change object being applied
        entitiesToConsider - A predicate choosing only the entities of interest
        Returns:
        A map of meta-data tags to add to an Atlas
      • stripForSaving

        public static java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change> stripForSaving​(org.openstreetmap.atlas.geography.atlas.change.Change change)
      • apply

        public java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change> apply​(org.openstreetmap.atlas.geography.atlas.change.Change change)
        Specified by:
        apply in interface java.util.function.Function<org.openstreetmap.atlas.geography.atlas.change.Change,​java.util.Optional<org.openstreetmap.atlas.geography.atlas.change.Change>>