Esri Geoportal Server
1.2.9

com.esri.gpt.control.webharvest.protocol
Class ProtocolFactories

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.TreeMap<String,ProtocolFactory>
          extended by com.esri.gpt.control.webharvest.protocol.ProtocolFactories
All Implemented Interfaces:
Serializable, Cloneable, Map<String,ProtocolFactory>, NavigableMap<String,ProtocolFactory>, SortedMap<String,ProtocolFactory>

public class ProtocolFactories
extends TreeMap<String,ProtocolFactory>

Collection of protocol factories.

Protocol factories is a collection (a map) initialized during application configuration loading. The default behavior is to load all protocol factories known at the compilation time. However, this can be altered by providing configuration information in gpt.xml configuration file.

Example of the configuration:

    <gptConfig>
      ...
      <protocols default="false">
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.ArcImsProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.arcims"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.CswProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.csw"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.OaiProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.oai"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.WafProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.waf"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.ResourceProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.resource"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.ArcGISProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.arcgis"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.ThreddsProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.thredds"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.AtomProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.atom"/>
        <protocol factoryClass="com.esri.gpt.control.webharvest.protocol.factories.Agp2AgpProtocolFactory"
                  resourceKey="catalog.harvest.manage.edit.protocol.agp2agp"/>
      </protocols>
    </gptConfig>
 

Description:

default - if true a default configuration will be loaded first,
factoryClass - canonical name of the factory class,
resourceKey - resource key referring to the string in gpt.resources file.

See Also:
ApplicationConfigurationLoader, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ProtocolFactories()
          Creates instance of the factories.
 
Method Summary
 List<String> getKeys()
          Gets all keys.
 String getResourceKey(String protocolKey)
          Gets resource key of a given protocol.
 void initDefault()
          Initializes collection with default protocol factories.
 Protocol parseProtocol(String xmlString)
          Parses protocol.
 ProtocolFactory put(String key, ProtocolFactory value)
           
 ProtocolFactory put(String key, ProtocolFactory value, String resourceKey)
          Stores a protocol value.
 String toString()
           
 
Methods inherited from class java.util.TreeMap
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, putAll, remove, size, subMap, subMap, tailMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

ProtocolFactories

public ProtocolFactories()
Creates instance of the factories.

Method Detail

initDefault

public void initDefault()
Initializes collection with default protocol factories.


put

public ProtocolFactory put(String key,
                           ProtocolFactory value)
Specified by:
put in interface Map<String,ProtocolFactory>
Overrides:
put in class TreeMap<String,ProtocolFactory>

put

public ProtocolFactory put(String key,
                           ProtocolFactory value,
                           String resourceKey)
Stores a protocol value.

Parameters:
key - protocol key
value - protocol value
resourceKey - resource key

getKeys

public List<String> getKeys()
Gets all keys.

Returns:
list of keys

getResourceKey

public String getResourceKey(String protocolKey)
Gets resource key of a given protocol.

Parameters:
protocolKey - protocol key
Returns:
resource key

parseProtocol

public Protocol parseProtocol(String xmlString)
                       throws ProtocolParseException
Parses protocol.

Parameters:
xmlString - protocol as XML string
Returns:
protocol
Throws:
ProtocolParseException - if error parsing protocol

toString

public String toString()
Overrides:
toString in class AbstractMap<String,ProtocolFactory>

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.