Class MetaInformationHandler

java.lang.Object
org.openjump.util.metaData.MetaInformationHandler
All Implemented Interfaces:
HandlerToMakeYourLifeEasier

public class MetaInformationHandler extends Object implements HandlerToMakeYourLifeEasier
Tool class for easier handling of meta information on a layer basis.
- objects will be created, if neccessary
- you don't need to access the properties map of the data source (where the meta information is stored) yourself
Version:
$Rev: 1559 $
Author:
Ole Rahn

FH Osnabrück - University of Applied Sciences Osnabrück,
Project: PIROL (2005),
Subproject: Daten- und Wissensmanagement
  • Field Details

  • Constructor Details

    • MetaInformationHandler

      public MetaInformationHandler(Layer layerWithMetaInformation)
      Parameters:
      layerWithMetaInformation - the layer you want the meta information of (has to have a DataSource!!)
    • MetaInformationHandler

      public MetaInformationHandler(ObjectContainingMetaInformation objectWithMetaInformation)
      Parameters:
      objectWithMetaInformation - the object you want the meta information of
  • Method Details

    • createPirolFeatureCollection

      public static PirolFeatureCollection createPirolFeatureCollection(FeatureCollection fc)
      creates a PirolFeatureCollection out of a regular FeatureCollection
      Parameters:
      fc - regular FeatureCollection
      Returns:
      PirolFeatureCollection
    • createPirolFeatureCollection

      public static PirolFeatureCollection createPirolFeatureCollection(FeatureCollection fc, FeatureCollectionRole role)
      creates a PirolFeatureCollection out of a regular FeatureCollection
      Parameters:
      fc - regular FeatureCollection
      Returns:
      PirolFeatureCollection
    • getExistentMetaInformationMap

      public MetaDataMap getExistentMetaInformationMap()
      Retrieve the existent meta information map.
      Returns:
      the existent meta information map or null, if there is none
    • getMetaInformationMap

      public MetaDataMap getMetaInformationMap()
      Retrieve the existent meta information map or create one.
      Returns:
      the existent meta information map or an empty meta information map (that is now attached to the DataSource)
    • containsMetaInformation

      public boolean containsMetaInformation()
      Returns:
      true if the given layer already contains meta information, false if not
    • addMetaInformation

      public void addMetaInformation(String key, Object value)
      Adds a new meta information key-value-pair to the meta information map, replaces an existing pair with the same key.
      Parameters:
      key - key of the metadata to add
      value - value of the metadata to add
    • getMetaData

      public HashMap getMetaData()
    • setMetaData

      public void setMetaData(HashMap<Object,Object> metaData)
    • clear

      public void clear()
    • containsKey

      public boolean containsKey(String key)
    • getMetaInformation

      public Object getMetaInformation(String key)
    • containsValue

      public boolean containsValue(Object value)
    • keySet

      public Set keySet()
    • remove

      public Object remove(String key)
    • getAttribute2UnitMap

      public Attribute2UnitMap getAttribute2UnitMap()
      Returns:
      the Attribute2UnitMap of the given DataSource or null, if there is none
    • putAttribute2UnitMap

      public void putAttribute2UnitMap(Attribute2UnitMap attribute2UnitMap)
    • containsAttribute2UnitMap

      public boolean containsAttribute2UnitMap()