Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bbn.openmap
Class PropertyHandler

    java.lang.Object
      com.bbn.openmap.MapHandlerChild
          com.bbn.openmap.PropertyHandler

All Implemented Interfaces:
  java.beans.beancontext.BeanContextChild, java.beans.beancontext.BeanContextMembershipListener, java.util.EventListener, LightMapHandlerChild, SoloMapComponent

public class PropertyHandler
extends MapHandlerChild
implements SoloMapComponent

The PropertyHandler object is the organizer of properties, looking for settings on how to configure OpenMap components. It is designed to look through a series of locations to find properties files, loading them in order. If there is a name conflict for a property, the last version of the property set is the one that gets used. This object isn't really interested in hooking up with other objects. It's assumed that many objects will want to contact this object, and find the properties that apply to them. There is one exception this: When components start implementing the PropertyProvider interface, and the PropertyHandler becomes capable of creating an properties file, then the PropertyHandler will be able to use the BeanContext to query PropertyProviders to get their properties to put in the properties file.

The PropertyHandler looks in several places for an openmap.properties file:

- as a resource in the code base.
- in the configDir set as a system property at runtime.
- in the user's home directory.

For each properties file, a check is performed to look within for an include property containing a marker name list. That list is parsed, and each item is checked (markerName.URL) for an URL to another properties file.

Also significant, the PropertyHandler can be given a BeanContext to load components. For this, the openmap.components property contains a marker name list for openmap objects. Each member of the list is then used to look for another property (markername.class) which specifies which class names are to be instantiated and added to the BeanContext. Intelligent components are smart enough to wire themselves together. Order does matter for the openmap.components property, especially for components that get added to lists and menus. Place the components in the list in the order that you want components added to the MapHandler.

If the debug.showprogress environment variable is set, the PropertyHandler will display a progress bar when it is creating components. If the debug.properties file is set, the steps that the PropertyHandler takes in looking for property files will be displayed.

If the PropertyHandler is created with an empty constructor or with a null Properties object, it will do the search for an openmap.properties file. If you don't want it to do that search, create it with an empty Properties object.

Field Summary
`static java.lang.String` | `componentProperty` The property name used to hold a list of marker names.
`static java.lang.String` | `configDirProperty` The name of the system directory containing a properties file.
`protected boolean` | `DEBUG`
`protected I18n` | `i18n` All components can have access to an I18n object, which is provided by the Environment.
`static java.lang.String` | `includeProperty` The property name used to hold a list of marker names.
`static java.lang.String` | `localizedProperty` The property name used to hold a file, resource or URL of a file to use containing localized properties, like layer names.
`protected java.util.Hashtable` | `prefixLibrarian` A hashtable to keep track of property prefixes and the objects that were created for them.
`protected ProgressSupport` | `progressSupport`
`protected java.util.Properties` | `properties` Final openmap properties object.
`protected java.lang.String` | `propertyPrefix` The propertyPrefix can be set to reflect a particular set of properties, or for an application.
`static java.lang.String` | `propsFileName` The appendix for the name of the properties file to read.
`protected boolean` | `updateProgress` Flag to set whether the PropertyHandler should provide status updates to any progress listeners, when it is building components.
`protected java.util.Set` | `usedPrefixes` Container to hold prefixes for components that have been created, in order to determine if duplicates might have been made.

Fields inherited from class com.bbn.openmap.MapHandlerChild
`beanContextChildSupport`

Constructor Summary
`PropertyHandler()` Create a PropertyHandler object that checks in the default order for openmap.properties files.
`PropertyHandler(boolean provideProgressUpdates)` Create a PropertyHandler object that checks in the default order for openmap.properties files.
`PropertyHandler(java.util.Properties props)` Constructor to take Properties object as argument, to create context for a particular map.
`PropertyHandler(java.lang.String urlString)` Constructor to take resource name, file path or URL string as argument, to create context for a particular map.
`PropertyHandler(java.net.URL url)` Constructor to take path (URL) as argument, to create context for a particular map.

Method Summary
`void` | `addProgressListener(ProgressListener list)` Add a ProgressListener that will display build progress.
`void` | `addProperties(java.util.Properties p)` Add in the properties from the given Properties object.
`void` | `addProperties(java.lang.String propFile)` Add in the properties from the given source, which can be a resorce, file or URL.
`void` | `addProperties(java.net.URL urlToProperties)` Add in the properties from the given URL.
`void` | `addProperty(java.lang.String property, java.lang.String value)` Add (or overwrite) a property to the current properties
`boolean` | `addUsedPrefix(java.lang.String prefix)` Changes ' ' characters to '_', and then tries to add it to the used prefix list.
`void` | `appendProperty(java.lang.String property, java.util.Properties src)` Append the given property into the current properties
`void` | `appendProperty(java.lang.String property, java.lang.String value)` Append the given property into the current properties
`void` | `clearProgressListeners()` Clear all progress listeners.
`void` | `createComponents(MapHandler mapHandler)` Given a BeanContext (actually a MapHandler, to handle SoloMapComponents), look for the openmap.components property in the current properties, and parse the list given as that property.
`static java.util.Properties` | `createOpenMapProperties(MapHandler mapHandler, java.io.PrintStream ps)` Creates a Properties object containing the current settings as defined by OpenMap components held by the MapHandler.
`static java.util.Properties` | `fetchProperties(java.net.URL propsURL)` Load a Properties object from the classpath.
`void` | `findAndInit(java.lang.Object obj)` All the PropertyHandler does with the MapHandler is look for PropertyConsumers and register their prefixes with the prefixLibarian.
`void` | `findAndUndo(java.lang.Object obj)` The childrenRemoved has been changed to go through its iterator to call this method with every object.
`protected void` | `fireProgressUpdate(int type, java.lang.String task, int frameNumber, int totalFrames)` Fire an build update to progress listeners.
`java.lang.Object` | `get(java.lang.String markername)` Given a property prefix, or markername, from the properties file, get the object that was created for it.
`protected java.util.Properties` | `getIncludeProperties(java.lang.String markerList, java.util.Properties props)` Take a marker name list (space separated names), and open the properties files listed in the propertu with keys of marker.URL.
`protected java.util.Properties` | `getLocalizedProperties(java.lang.String localizedPropertyFile, java.lang.String userHomeDirectory)` Load the localized properties that will take precidence over all other properties.
`java.util.Hashtable` | `getPrefixLibrarian()` Get the Hashtable being held that matches property prefix strings with components.
`protected ProgressSupport` | `getProgressSupport()` Get progress support if needed.
`java.util.Properties` | `getProperties()` Get the current properties set within this handler.
`java.util.Properties` | `getProperties(java.lang.String prefix)` Get a properties object containing all the properties with the given prefix.
`java.lang.String` | `getPropertyPrefix()`
`java.lang.String` | `getUniquePrefix(java.lang.String prefix)` If you are creating a new object, it's important to get a unique prefix for its properties.
`boolean` | `getUpdateProgress()`
`protected void` | `init(java.util.Properties props, java.lang.String howString)` Initialize internal properties from Properties object.
`void` | `loadProjectionAndLayers(MapHandler mapHandler, java.util.Properties props)` Given a MapHandler and a Java Properties object, the LayerHandler will be cleared of it's current layers, and reloaded with the layers in the properties.
`protected void` | `merge(java.util.Properties from)` Take the from properties, copy them into the internal PropertyHandler properties.
`protected void` | `merge(java.util.Properties from, java.util.Properties to)` Take the from properties, copy them into the to properties.
`protected void` | `merge(java.util.Properties from, java.util.Properties to, java.lang.String what, java.lang.String where)` Take the from properties, copy them into the to properties.
`protected void` | `merge(java.util.Properties from, java.lang.String what, java.lang.String where)` Take the from properties, copy them into the internal PropertyHandler properties.
`void` | `prependProperty(java.lang.String property, java.util.Properties src)` Prepend the given property into the current properties
`void` | `prependProperty(java.lang.String property, java.lang.String value)` Prepend the given property into the current properties
`protected static void` | `printComponentProperties(java.util.Vector components, PropertyHandler ph, java.io.PrintStream ps, java.util.Properties createdProperties)` A helper function to createOpenMapProperties that gets the current properties of the given components and prints them out to the PrintStream and the provided Properties object.
`protected static void` | `printLayerProperties(LayerHandler layerHandler, PropertyHandler ph, java.io.PrintStream ps, java.util.Properties createdProperties)` A helper function to createOpenMapProperties that gets the current properties of the layers in the LayerHandler and prints them out to the PrintStream and the provided Properties object.
`protected static void` | `printMapProperties(MapBean mapBean, java.io.PrintStream ps, java.util.Properties createdProperties)` A helper function to createOpenMapProperties that gets the current properties of the MapBean and prints them out to the PrintStream and the provided Properties object.
`protected static void` | `printProperties(java.lang.String key, java.lang.String value, java.io.PrintStream ps, java.util.Properties createdProperties)` A simple helper method that writes key-value pairs to a print stream or Properties, whatever is not null.
`void` | `put(java.lang.String markername, java.lang.Object obj)` Register an object with the prefix librarian against a specific markername.
`java.lang.Object` | `remove(java.lang.String markername)` Remove an object from the prefix librarian register, returning that object if it has been found.
`void` | `removeMarker(java.lang.String property, java.lang.String marker)` remove a marker from a space delimated set of properties.
`void` | `removeProgressListener(ProgressListener list)` Remove a ProgressListener that displayed build progress.
`boolean` | `removeProperty(java.lang.String property)` Remove an existing property if it exists.
`boolean` | `removeUsedPrefix(java.lang.String prefix)` Changes ' ' characters to '_', and then tries to remove it to the used prefix list.
`protected void` | `searchForAndLoadProperties()` Look for openmap.properties files as a resource in the classpath, in the config directory, and in the user's home directory, in that order.
`void` | `setProperties(java.util.Properties props)` Merges the properties to the overall properties held by the PropertyHandler.
`void` | `setPropertyPrefix(java.lang.String propertyPrefix)`
`void` | `setUpdateProgress(boolean set)` Set a flag that will trigger the PropertyHandler to fire progress events when it is going through the creation process.

Methods inherited from class com.bbn.openmap.MapHandlerChild
`addPropertyChangeListener, addVetoableChangeListener, childrenAdded, childrenRemoved, findAndInit, firePropertyChange, fireVetoableChange, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### i18n

    protected transient I18n i18n

  All components can have access to an I18n object, which is provided by the Environment.

### propertyPrefix

    protected java.lang.String propertyPrefix

  The propertyPrefix can be set to reflect a particular set of properties, or for an application. If this variable is not set, 'openmap' will be used. This prefix will be placed in front of the default properties file that will be sought if a specific properties file is not specified, and will also be placed in front of the standard application component properties.

### propsFileName

    public static final java.lang.String propsFileName

  The appendix for the name of the properties file to read. The propertyPrefix will be prepended to this string for the default property file search.

  See Also:
    Constant Field Values

### configDirProperty

    public static final java.lang.String configDirProperty

  The name of the system directory containing a properties file. The propertyPrefix.configDir property will be checked for a possible location for properties.

  See Also:
    Constant Field Values

### componentProperty

    public static final java.lang.String componentProperty

  The property name used to hold a list of marker names. Each marker name is used to create another property to look for to create a component to add to a BeanContext. For example:

       # if 'openmap' is the PropertyHandler property prefix...
       openmap.components=name1 name2 name3
       name1.class=com.bbn.openmap.InformationDelegator
       name2.class=com.bbn.openmap.MouseDelegator
       name3.class=com.bbn.openmap.LayerHandler

  See Also:
    Constant Field Values

### includeProperty

    public static final java.lang.String includeProperty

  The property name used to hold a list of marker names. Each marker name is used to create another property to look for to connect to a URL to load a properties file. For example:

       openmap.include=name1 name2
       name1.URL=http://openmap.bbn.com/props/link.properties
       name2.URL=file:///usr/local/share/openmap/props/shape.properties

  See Also:
    Constant Field Values

### localizedProperty

    public static final java.lang.String localizedProperty

  The property name used to hold a file, resource or URL of a file to use containing localized properties, like layer names. This is optional, if it's not in the openmap.properties file or the properties file being read in, an openmap_<localization string>.properties file will be searched for in the classpath (i.e. openmap.localized=openmap_en_US.properties).

  See Also:
    Constant Field Values

### properties

    protected java.util.Properties properties

  Final openmap properties object.

### usedPrefixes

    protected java.util.Set usedPrefixes

  Container to hold prefixes for components that have been created, in order to determine if duplicates might have been made. Important if properties are going to be written out, so that property scoping can occur properly. This collection holds prefixes of objects that have been created by this PropertyHandler, and also prefixes that have been given out on request.

### progressSupport

    protected ProgressSupport progressSupport

### updateProgress

    protected boolean updateProgress

  Flag to set whether the PropertyHandler should provide status updates to any progress listeners, when it is building components.

### prefixLibrarian

    protected java.util.Hashtable prefixLibrarian

  A hashtable to keep track of property prefixes and the objects that were created for them.

### DEBUG

    protected boolean DEBUG

Constructor Detail

### PropertyHandler

    public PropertyHandler()

  Create a PropertyHandler object that checks in the default order for openmap.properties files. It checks for the openmap.properties file as a resource, in the configDir if specified as a system property, and lastly, in the user's home directory. If you want an empty PropertyHandler that doesn't do the search, use the constructor that takes a java.util.Properties object and provide it with empty Properties.

### PropertyHandler

    public PropertyHandler(boolean provideProgressUpdates)

  Create a PropertyHandler object that checks in the default order for openmap.properties files. It checks for the openmap.properties file as a resource, in the configDir if specified as a system property, and lastly, in the user's home directory.

Parameters:
  `provideProgressUpdates` - if true, a progress bar will be displayed to show the progress of building components.

### PropertyHandler

    public PropertyHandler(java.lang.String urlString)
                    throws java.net.MalformedURLException,
                           java.io.IOException

  Constructor to take resource name, file path or URL string as argument, to create context for a particular map.

### PropertyHandler

    public PropertyHandler(java.net.URL url)
                    throws java.io.IOException

  Constructor to take path (URL) as argument, to create context for a particular map.

### PropertyHandler

    public PropertyHandler(java.util.Properties props)

  Constructor to take Properties object as argument, to create context for a particular map.

Method Detail

### searchForAndLoadProperties

    protected void searchForAndLoadProperties()

  Look for openmap.properties files as a resource in the classpath, in the config directory, and in the user's home directory, in that order. If any property is duplicated in any version, last one wins.

### getLocalizedProperties

    protected java.util.Properties getLocalizedProperties(java.lang.String localizedPropertyFile,
                                                          java.lang.String userHomeDirectory)

  Load the localized properties that will take precidence over all other properties. If the localizedPropertyFile is null, a localized version of the openmap.properties file will be searched for in the classpath and in the user home directory (if that isn't null as well).

### init

    protected void init(java.util.Properties props,
                        java.lang.String howString)

  Initialize internal properties from Properties object. Appends all the properties it finds, overwriting the ones with the same key. Called by the two constructors where a Properties object is passed in, or when a URL for a Properties file is provided. This is not called by the consstructor that has to go looking for the properties to use.

  Parameters:
    `props` - the properties to merge into the properties held by the PropertyHandler.
    `howString` - a string describing where the properties come from. Just used for debugging purposes, so passing in a null value is no big deal.
  Returns:
    the properties contained in this PropertyHandler.

### getIncludeProperties

    protected java.util.Properties getIncludeProperties(java.lang.String markerList,
                                                        java.util.Properties props)

  Take a marker name list (space separated names), and open the properties files listed in the propertu with keys of marker.URL.

  Parameters:
    `markerList` - space separated marker names in a single string that needs to be parsed.
    `props` - the properties that the markerList comes from, in order to get the marker.URL properties.
  Returns:
    an allocated Properties object containing all the properties from the inlude files. If no include files are listed, the Properties object is empty, not null.

### merge

    protected void merge(java.util.Properties from)

  Take the from properties, copy them into the internal PropertyHandler properties.

  Parameters:
    `from` - the source properties.

### merge

    protected void merge(java.util.Properties from,
                         java.util.Properties to)

  Take the from properties, copy them into the to properties.

  Parameters:
    `from` - the source properties.
    `to` - the destination properties.

### merge

    protected void merge(java.util.Properties from,
                         java.lang.String what,
                         java.lang.String where)

  Take the from properties, copy them into the internal PropertyHandler properties. The what and where are simple for a more clearly defined Debug statement. The what and where are only used for debugging statements when there are no properties found, so don't put too much work into creating them, like adding strings together before passing them in. The what and where fit into a debug output statement like: PropertyHandler.merge(): no _what_ found in _where_.

  Parameters:
    `from` - the source properties.
    `what` - a description of what the from properties represent.
    `where` - a description of where the properties were read from.

### merge

    protected void merge(java.util.Properties from,
                         java.util.Properties to,
                         java.lang.String what,
                         java.lang.String where)

  Take the from properties, copy them into the to properties. The what and where are simple for a more clearly defined Debug statement. The what and where are only used for debugging statements when there are no properties found, so don't put too much work into creating them, like adding strings together before passing them in. The what and where fit into a debug output statement like: PropertyHandler.merge(): no _what_ found in _where_.

  Parameters:
    `from` - the source properties.
    `to` - the destination properties.
    `what` - a description of what the from properties represent.
    `where` - a description of where the properties were read from.

### setProperties

    public void setProperties(java.util.Properties props)

  Merges the properties to the overall properties held by the PropertyHandler.

### getProperties

    public java.util.Properties getProperties()

  Get the current properties set within this handler.

### get

    public java.lang.Object get(java.lang.String markername)

  Given a property prefix, or markername, from the properties file, get the object that was created for it. This method uses the prefix librarian.

### getProperties

    public java.util.Properties getProperties(java.lang.String prefix)

  Get a properties object containing all the properties with the given prefix.

### put

    public void put(java.lang.String markername,
                    java.lang.Object obj)

  Register an object with the prefix librarian against a specific markername.

### remove

    public java.lang.Object remove(java.lang.String markername)

  Remove an object from the prefix librarian register, returning that object if it has been found.

### getPrefixLibrarian

    public java.util.Hashtable getPrefixLibrarian()

  Get the Hashtable being held that matches property prefix strings with components.

### createComponents

    public void createComponents(MapHandler mapHandler)

  Given a BeanContext (actually a MapHandler, to handle SoloMapComponents), look for the openmap.components property in the current properties, and parse the list given as that property. From that list of marker names, look for the marker.class properties and create those Java objects. Those objects will be added to the BeanContext given.

  Parameters:
    `mapHandler` - BeanContext.

### getPropertyPrefix

    public java.lang.String getPropertyPrefix()

### setPropertyPrefix

    public void setPropertyPrefix(java.lang.String propertyPrefix)

### createOpenMapProperties

    public static java.util.Properties createOpenMapProperties(MapHandler mapHandler,
                                                               java.io.PrintStream ps)

  Creates a Properties object containing the current settings as defined by OpenMap components held by the MapHandler. If the MapHandler contains a PropertyHandler, that property handler will be consulted for properties for different objects in case those objects don't know how to provide their settings correctly.

  Parameters:
    `mapHandler` - MapHandler containing components to use for Properties.
    `ps` - PrintStream to write properties to, may be null if you just want the Properties object that is returned.
  Returns:
    Properties object containing everything written (or that would have been written, if the PrintStream is null) to PrintStream.

### printProperties

    protected static void printProperties(java.lang.String key,
                                          java.lang.String value,
                                          java.io.PrintStream ps,
                                          java.util.Properties createdProperties)

  A simple helper method that writes key-value pairs to a print stream or Properties, whatever is not null.

### printMapProperties

    protected static void printMapProperties(MapBean mapBean,
                                             java.io.PrintStream ps,
                                             java.util.Properties createdProperties)

  A helper function to createOpenMapProperties that gets the current properties of the MapBean and prints them out to the PrintStream and the provided Properties object.

  Parameters:
    `mapBean` - MapBean to get parameters from.
    `ps` - PrintStream to write properties to, may be null.
    `createdProperties` - Properties object to store properties in, may be null.

### printComponentProperties

    protected static void printComponentProperties(java.util.Vector components,
                                                   PropertyHandler ph,
                                                   java.io.PrintStream ps,
                                                   java.util.Properties createdProperties)

  A helper function to createOpenMapProperties that gets the current properties of the given components and prints them out to the PrintStream and the provided Properties object.

  Parameters:
    `components` - Vector of components to get parameters from.
    `ph` - PropertyHandler that may have properties to use as a foundation for the properties for the components. If the component can't provide properties reflecting its settings, the property handler will be consulted for properties it knows about for that component.
    `ps` - PrintStream to write properties to, may be null.
    `createdProperties` - Properties object to store properties in, may be null.

### printLayerProperties

    protected static void printLayerProperties(LayerHandler layerHandler,
                                               PropertyHandler ph,
                                               java.io.PrintStream ps,
                                               java.util.Properties createdProperties)

  A helper function to createOpenMapProperties that gets the current properties of the layers in the LayerHandler and prints them out to the PrintStream and the provided Properties object.

  Parameters:
    `layerHandler` - LayerHandler to get layers from.
    `ph` - PropertyHandler that may have properties to use as a foundation for the properties for the components. If the component can't provide properties reflecting its settings, the property handler will be consulted for properties it knows about for that component.
    `ps` - PrintStream to write properties to, may be null.
    `createdProperties` - Properties object to store properties in, may be null.

### loadProjectionAndLayers

    public void loadProjectionAndLayers(MapHandler mapHandler,
                                        java.util.Properties props)

  Given a MapHandler and a Java Properties object, the LayerHandler will be cleared of it's current layers, and reloaded with the layers in the properties. The MapBean will be set to the projection settings listed in the properties.

### getUniquePrefix

    public java.lang.String getUniquePrefix(java.lang.String prefix)

  If you are creating a new object, it's important to get a unique prefix for its properties. This function takes a prefix string and checks it against all others it knows about. If there is a conflict, it adds a number to the end until it becomes unique. This prefix will be logged by the PropertyHandler as a name given out, so duplicate instances of that string will not be given out later. It doesn't, however, log that name in the prefixLibrarian. That only occurs when the object is programmatically registered with the prefixLibrarian or when the PropertyHandler finds that object in the MapHandler (and even then that object must be a PropertyConsumer to be registered this way).

### addUsedPrefix

    public boolean addUsedPrefix(java.lang.String prefix)

  Changes ' ' characters to '_', and then tries to add it to the used prefix list. Returns true if successful.

### removeUsedPrefix

    public boolean removeUsedPrefix(java.lang.String prefix)

  Changes ' ' characters to '_', and then tries to remove it to the used prefix list. Returns true if successful.

### addProgressListener

    public void addProgressListener(ProgressListener list)

  Add a ProgressListener that will display build progress.

### removeProgressListener

    public void removeProgressListener(ProgressListener list)

  Remove a ProgressListener that displayed build progress.

### clearProgressListeners

    public void clearProgressListeners()

  Clear all progress listeners.

### getProgressSupport

    protected ProgressSupport getProgressSupport()

  Get progress support if needed.

### fireProgressUpdate

    protected void fireProgressUpdate(int type,
                                      java.lang.String task,
                                      int frameNumber,
                                      int totalFrames)

  Fire an build update to progress listeners.

  Parameters:
    `frameNumber` - the current frame count
    `totalFrames` - the total number of frames.

### setUpdateProgress

    public void setUpdateProgress(boolean set)

  Set a flag that will trigger the PropertyHandler to fire progress events when it is going through the creation process.

### getUpdateProgress

    public boolean getUpdateProgress()

### removeProperty

    public boolean removeProperty(java.lang.String property)

  Remove an existing property if it exists.

  Returns:
    true if a property was actually removed.

### addProperty

    public void addProperty(java.lang.String property,
                            java.lang.String value)

  Add (or overwrite) a property to the current properties

### addProperties

    public void addProperties(java.net.URL urlToProperties)

  Add in the properties from the given URL. Any existing properties will be overwritten except for openmap.components, openmap.layers and openmap.startUpLayers which will be appended.

### addProperties

    public void addProperties(java.lang.String propFile)
                       throws java.net.MalformedURLException

  Add in the properties from the given source, which can be a resorce, file or URL. Any existing properties will be overwritten except for openmap.components, openmap.layers and openmap.startUpLayers which will be appended.

  Throws:
    `java.net.MalformedURLException` - if propFile doesn't resolve properly.

### addProperties

    public void addProperties(java.util.Properties p)

  Add in the properties from the given Properties object. Any existing properties will be overwritten except for openmap.components, openmap.layers and openmap.startUpLayers where values will be prepended to any existing lists.

### removeMarker

    public void removeMarker(java.lang.String property,
                             java.lang.String marker)

  remove a marker from a space delimated set of properties.

### appendProperty

    public void appendProperty(java.lang.String property,
                               java.util.Properties src)

  Append the given property into the current properties

### appendProperty

    public void appendProperty(java.lang.String property,
                               java.lang.String value)

  Append the given property into the current properties

### prependProperty

    public void prependProperty(java.lang.String property,
                                java.util.Properties src)

  Prepend the given property into the current properties

### prependProperty

    public void prependProperty(java.lang.String property,
                                java.lang.String value)

  Prepend the given property into the current properties

### fetchProperties

    public static java.util.Properties fetchProperties(java.net.URL propsURL)

  Load a Properties object from the classpath. The method always returns a `Properties` object. If there was an error loading the properties from `propsURL`, an empty `Properties` object is returned.

  Parameters:
    `propsURL` - the URL of the properties to be loaded
  Returns:
    the loaded properties, or an empty Properties object if there was an error.

### findAndInit

    public void findAndInit(java.lang.Object obj)

  All the PropertyHandler does with the MapHandler is look for PropertyConsumers and register their prefixes with the prefixLibarian.

  Specified by:
    `findAndInit` in interface `LightMapHandlerChild`
  Overrides:
    `findAndInit` in class `MapHandlerChild`

### findAndUndo

    public void findAndUndo(java.lang.Object obj)

  Description copied from class: `MapHandlerChild`
  The childrenRemoved has been changed to go through its iterator to call this method with every object. This lets subclasses call this method on their super class, so it can handle what it needs to with objects it may be interested in.

  Specified by:
    `findAndUndo` in interface `LightMapHandlerChild`
  Overrides:
    `findAndUndo` in class `MapHandlerChild`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details