Esri Geoportal Server
1.2.9

com.esri.gpt.catalog.harvest.protocols
Class HarvestProtocol

java.lang.Object
  extended by com.esri.gpt.catalog.harvest.protocols.HarvestProtocol
All Implemented Interfaces:
Protocol, Serializable
Direct Known Subclasses:
AbstractHTTPHarvestProtocol, HarvestProtocolNone

public abstract class HarvestProtocol
extends Object
implements Protocol, Serializable

Generic harvesting protocol.

See Also:
HrRecord, Serialized Form

Nested Class Summary
static class HarvestProtocol.ProtocolType
          Deprecated.  
 
Constructor Summary
HarvestProtocol()
           
 
Method Summary
 void applyAttributeMap(StringAttributeMap attributeMap)
          Applies protocol attributes map.
protected  String chckAttr(StringAttribute attribute)
          Checks attribute.
 void checkConnection(String url)
          Deprecated.  
protected  String decryptString(String s)
          Decrypts string.
protected  String encryptString(String s)
          Encrypts string.
 StringAttributeMap extractAttributeMap()
          Extracts protocol attributes map.
 String getAdHoc()
          Gets ad-hoc harvesting info.
 StringAttributeMap getAttributeMap()
          Gets protocol attributes map.
 HRClient getClient(String hostUrl)
          Deprecated.  
 List<String> getDestinations()
          Gets destinations.
 long getFlags()
          Gets flag set.
 String getKind()
          Gets protocol kind.
 boolean getPingSupported()
          Checks if ping operation is supported.
abstract  HarvestProtocol.ProtocolType getType()
          Deprecated.  
 Executor newExecutor(DataProcessor dataProcessor, ExecutionUnit unit, IWorker worker)
          Creates new executor.
 void ping(String url)
          Deprecated.  
 void setAdHoc(String adHoc)
          Sets ad-hoc info.
 void setAttributeMap(StringAttributeMap attributeMap)
          Sets protocol attributes map.
 void setDestinations(List<String> destinations)
          Sets destinations.
 void setFlags(long flags)
          Sets flag set.
 String toString()
          Gets string representation of the protocol.
 String toXmlString()
          Creates xml string representation of the protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.esri.gpt.control.webharvest.protocol.Protocol
newQueryBuilder
 

Constructor Detail

HarvestProtocol

public HarvestProtocol()
Method Detail

setDestinations

public void setDestinations(List<String> destinations)
Sets destinations.

Parameters:
destinations - destinations

getDestinations

public List<String> getDestinations()
Gets destinations.

Returns:
destinations

getPingSupported

public boolean getPingSupported()
Checks if ping operation is supported.

Returns:
true if ping operation is supported
See Also:
HRClient.ping()

getType

@Deprecated
public abstract HarvestProtocol.ProtocolType getType()
Deprecated. 

Gets protocol type.

Returns:
protocol type

getKind

public String getKind()
Description copied from interface: Protocol
Gets protocol kind.

Specified by:
getKind in interface Protocol
Returns:
protocol kind

getClient

@Deprecated
public HRClient getClient(String hostUrl)
                   throws HRInvalidProtocolException
Deprecated. 

Gets client associated with particular protocol.

Parameters:
hostUrl - host URL
Returns:
instance of the harvest repository client
Throws:
HRInvalidProtocolException - if unable to create client for the protocol

checkConnection

@Deprecated
public final void checkConnection(String url)
                           throws HRInvalidProtocolException,
                                  HRConnectionException
Deprecated. 

Checks connection to the specific server.

Parameters:
url - server URL
Throws:
HRInvalidProtocolException - when protocol attributes are invalid
HRConnectionException - if connecting remote repository failed

ping

@Deprecated
public void ping(String url)
          throws Exception
Deprecated. 

Pings resource.

Parameters:
url - resource URL
Throws:
IllegalArgumentException - if invalid protocol definition
IOException - if error connection resource
Exception

toXmlString

public String toXmlString()
Creates xml string representation of the protocol.

Returns:
xml string representation of the protocol

toString

public String toString()
Gets string representation of the protocol.

Overrides:
toString in class Object
Returns:
string representation of the protocol

chckAttr

protected String chckAttr(StringAttribute attribute)
Checks attribute.

Parameters:
attribute - attributes
Returns:
attribute value

getFlags

public long getFlags()
Description copied from interface: Protocol
Gets flag set.

Specified by:
getFlags in interface Protocol
Returns:
flags set

setFlags

public void setFlags(long flags)
Description copied from interface: Protocol
Sets flag set.

Specified by:
setFlags in interface Protocol
Parameters:
flags - flag set

getAttributeMap

public StringAttributeMap getAttributeMap()
Description copied from interface: Protocol
Gets protocol attributes map. Used to exchange attributes with the form.

Specified by:
getAttributeMap in interface Protocol
Returns:
attributes map

setAttributeMap

public void setAttributeMap(StringAttributeMap attributeMap)
Description copied from interface: Protocol
Sets protocol attributes map. Used to exchange attributes with the form.

Specified by:
setAttributeMap in interface Protocol
Parameters:
attributeMap - attributes map

extractAttributeMap

public StringAttributeMap extractAttributeMap()
Description copied from interface: Protocol
Extracts protocol attributes map. Used saving (typically encrypts user name/password).

Specified by:
extractAttributeMap in interface Protocol
Returns:
attributes map

applyAttributeMap

public void applyAttributeMap(StringAttributeMap attributeMap)
Description copied from interface: Protocol
Applies protocol attributes map. Used loading (typically decrypts user name/password).

Specified by:
applyAttributeMap in interface Protocol
Parameters:
attributeMap - attributes map

getAdHoc

public String getAdHoc()
Description copied from interface: Protocol
Gets ad-hoc harvesting info.

Ad-hoc information allows to store precise definition or pattern of the time when harvesting should occur. Ad-hoc is a pipe (|) separated set of time definitions. Currently, the following syntax is supported:

Specified by:
getAdHoc in interface Protocol
Returns:
ad-hoc

setAdHoc

public void setAdHoc(String adHoc)
Description copied from interface: Protocol
Sets ad-hoc info.

Specified by:
setAdHoc in interface Protocol
Parameters:
adHoc - ad-hoc info
See Also:
Protocol.setAdHoc(java.lang.String)

newExecutor

public Executor newExecutor(DataProcessor dataProcessor,
                            ExecutionUnit unit,
                            IWorker worker)
Description copied from interface: Protocol
Creates new executor.

Specified by:
newExecutor in interface Protocol
Parameters:
dataProcessor - data processor
unit - execution unit
worker - worker
Returns:
executor

decryptString

protected String decryptString(String s)
Decrypts string.

Parameters:
s - string to decrypt
Returns:
decrypted string

encryptString

protected String encryptString(String s)
Encrypts string.

Parameters:
s - string to encrypt
Returns:
encrypted string

Esri Geoportal Server
1.2.9

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