Esri Geoportal Server
1.0

com.esri.gpt.catalog.harvest.repository
Class HrRecord

java.lang.Object
  extended by com.esri.gpt.framework.request.Record
      extended by com.esri.gpt.catalog.harvest.repository.HrRecord

public class HrRecord
extends Record

Harvest repository record.

Represents single harvest repository definition. Usually, objects of this class are stored within HrRecords. Object of the class HrSelectRequest is being used to read a list of records from the database.

See Also:
HrRecords, HrSelectRequest

Nested Class Summary
static class HrRecord.HarvestFrequency
          Harvest frequency.
static class HrRecord.RecentJobStatus
          Harvest job status.
 
Constructor Summary
HrRecord()
           
 
Method Summary
 void checkConnection()
          Checks connection to the remote host.
 Native generateNativeResource()
          Generates temporary native resource.
 MmdEnums.ApprovalStatus getApprovalStatus()
          Gets approval status.
 boolean getFindable()
          Checks if record is findable.
 HrRecord.HarvestFrequency getHarvestFrequency()
          Gets harvest frequency.
 String getHostUrl()
          Gets host url.
 String getHostUrlShort()
          Gets short version of host url.
 Date getInputDate()
          Gets input date.
 boolean getIsHarvestDue()
          Checks if is harvest due now.
 Date getLastHarvestDate()
          Gets last harvest date.
 Date getLastSyncDate()
          Gets last synchronization date.
 int getLocalId()
          Gets local id.
 String getName()
          Gets name.
 Date getNextHarvestDate()
          Gets next harvest date.
 int getOwnerId()
          Gets owner user local id.
 Protocol getProtocol()
          Gets harvest protocol.
 HrRecord.RecentJobStatus getRecentJobStatus()
          Gets recent job status.
 boolean getSearchable()
          Checks if records is searchable.
 boolean getSendNotification()
          Gets sending notification switch flag.
 boolean getSynchronizable()
          Checks if records is synchronizable.
 Date getUpdateDate()
          Gets update date.
 String getUuid()
          Gets harvest repository UUID.
 QueryBuilder newQueryBuilder(IterationContext iterationContext)
          Creates new query builder.
 void setApprovalStatus(MmdEnums.ApprovalStatus approvalStatus)
          Sets approval status.
 void setFindable(boolean findable)
          Sets record is findable.
 void setHarvestFrequency(HrRecord.HarvestFrequency harvestFrequency)
          Sets harvest frequency.
 void setHostUrl(String hostUrl)
          Sets host url.
 void setInputDate(Date inputDate)
          Sets input date.
 void setLastHarvestDate(Date lastHarvestDate)
          Sets last harvest date.
 void setLastSyncDate(Date lastSyncDate)
          Sets last synchronization date.
 void setLocalId(int localId)
          Sets local id.
 void setName(String name)
          Sets name.
 void setOwnerId(int ownerId)
          Sets owner user local id.
 void setProtocol(Protocol protocol)
          Sets protocol.
 void setSearchable(boolean searchable)
          Sets records is searchable.
 void setSendNotification(boolean sendNotification)
          Sets sending notification switch flag.
 void setSynchronizable(boolean synchronizable)
          Sets records is synchronizable.
 void setUpdateDate(Date updateDate)
          Sets update date.
 void setUuid(String uuid)
          Sets harvest repository UUID.
 String toString()
          Creates string representation of the site.
 
Methods inherited from class com.esri.gpt.framework.request.Record
getIsSelected, setIsSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HrRecord

public HrRecord()
Method Detail

getLocalId

public int getLocalId()
Gets local id. Local id is an identity number generated by database.

Returns:
local id

setLocalId

public void setLocalId(int localId)
Sets local id. Local id is an identity number generated by database.

Parameters:
localId - local id

getUuid

public String getUuid()
Gets harvest repository UUID.

Returns:
harvest UUID

setUuid

public void setUuid(String uuid)
Sets harvest repository UUID.

If the uuid argument is invald, UUID becomes an empty string.

Parameters:
uuid - harvest UUID

getOwnerId

public int getOwnerId()
Gets owner user local id.

Returns:
owner user local id

setOwnerId

public void setOwnerId(int ownerId)
Sets owner user local id.

Parameters:
ownerId - owner user local id

getInputDate

public Date getInputDate()
Gets input date.

Returns:
input date

setInputDate

public void setInputDate(Date inputDate)
Sets input date.

If the inputDate is null than input date is set to current date.

Parameters:
inputDate - input date.

getUpdateDate

public Date getUpdateDate()
Gets update date.

Returns:
update date

setUpdateDate

public void setUpdateDate(Date updateDate)
Sets update date. If the lastHarvestDate is null than update date is set to current date.

Parameters:
updateDate - update date

getName

public String getName()
Gets name.

Returns:
name

setName

public void setName(String name)
Sets name.

Parameters:
name - name

getHostUrl

public String getHostUrl()
Gets host url.

Returns:
host url

setHostUrl

public void setHostUrl(String hostUrl)
Sets host url.

Parameters:
hostUrl - host url

getHostUrlShort

public String getHostUrlShort()
Gets short version of host url.

Returns:
short version of host url

getProtocol

public Protocol getProtocol()
Gets harvest protocol.

Returns:
harvest protocol

setProtocol

public void setProtocol(Protocol protocol)
Sets protocol.

Parameters:
protocol - protocol

getHarvestFrequency

public HrRecord.HarvestFrequency getHarvestFrequency()
Gets harvest frequency.

Returns:
harvest frequency

setHarvestFrequency

public void setHarvestFrequency(HrRecord.HarvestFrequency harvestFrequency)
Sets harvest frequency.

Parameters:
harvestFrequency - harvest frequency

getSendNotification

public boolean getSendNotification()
Gets sending notification switch flag.

Returns:
sending notification switch flag

setSendNotification

public void setSendNotification(boolean sendNotification)
Sets sending notification switch flag.

Parameters:
sendNotification - sending notification switch flag

getLastHarvestDate

public Date getLastHarvestDate()
Gets last harvest date. Last harvest date might be null if no harvest performed on the repository.

Returns:
last harvest date

setLastHarvestDate

public void setLastHarvestDate(Date lastHarvestDate)
Sets last harvest date.

Parameters:
lastHarvestDate - last harvest date

getNextHarvestDate

public Date getNextHarvestDate()
Gets next harvest date.

Returns:
next harvest date or null harvesting not due yet

getRecentJobStatus

public HrRecord.RecentJobStatus getRecentJobStatus()
Gets recent job status.

Returns:
recent job status

getFindable

public boolean getFindable()
Checks if record is findable.

Returns:
true if record is findable

setFindable

public void setFindable(boolean findable)
Sets record is findable.

Parameters:
findable - true to make record is findable

getSynchronizable

public boolean getSynchronizable()
Checks if records is synchronizable.

Returns:
true if records is synchronizable

setSynchronizable

public void setSynchronizable(boolean synchronizable)
Sets records is synchronizable.

Parameters:
synchronizable - true to make records is synchronizable

getSearchable

public boolean getSearchable()
Checks if records is searchable.

Returns:
true if records is searchable

setSearchable

public void setSearchable(boolean searchable)
Sets records is searchable.

Parameters:
searchable - true to make records is searchable

getApprovalStatus

public MmdEnums.ApprovalStatus getApprovalStatus()
Gets approval status.

Returns:
approval status

setApprovalStatus

public void setApprovalStatus(MmdEnums.ApprovalStatus approvalStatus)
Sets approval status.

Parameters:
approvalStatus - approval status

getLastSyncDate

public Date getLastSyncDate()
Gets last synchronization date. This is a date when last successful synchronization has been started

Returns:
last synchronization date

setLastSyncDate

public void setLastSyncDate(Date lastSyncDate)
Sets last synchronization date. This is a date when last successful synchronization has been started

Parameters:
lastSyncDate - last synchronization date

toString

public String toString()
Creates string representation of the site.

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

checkConnection

public void checkConnection()
                     throws HRInvalidProtocolException,
                            HRConnectionException
Checks connection to the remote host.

Throws:
HRInvalidProtocolException - when protocol attributes are invalid
HRConnectionException - if connecting remote repository failed

getIsHarvestDue

public boolean getIsHarvestDue()
Checks if is harvest due now.

Returns:
true if harvest is due now

newQueryBuilder

public QueryBuilder newQueryBuilder(IterationContext iterationContext)
Creates new query builder.

Parameters:
iterationContext - iteration context (can be null)
Returns:
query builder or null if no protocol

generateNativeResource

public Native generateNativeResource()
                              throws IllegalArgumentException
Generates temporary native resource.

Returns:
native resource
Throws:
IllegalArgumentException - if title not provided

Esri Geoportal Server
1.0

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