Class HarvestSource
java.lang.Object
org.javastro.ivoa.registry.harvesting.HarvestSource
Represents a known harvest source (a remote OAI-PMH registry endpoint).
The sourceKey uniquely identifies a source. For the RofR seed it is
the normalized OAI URL; for discovered sources it is the IVOA identifier when
available, otherwise the normalized OAI URL.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum number of recent run records retained per source. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRunRecord(HarvestRunRecord record) Append a run record and trim toMAX_RECENT_RUNS.static HarvestSourceFactory for creating a new source entry.intgetDepth()voidsetDepth(int depth) voidsetDiscoveredFromSourceKey(String discoveredFromSourceKey) voidsetDiscoverySet(String discoverySet) voidsetFirstSeen(Instant firstSeen) voidsetIdentifier(String identifier) voidsetLastAttempted(Instant lastAttempted) voidsetLastSuccessful(Instant lastSuccessful) voidvoidsetRecentRuns(List<HarvestRunRecord> recentRuns) voidsetRejectionReason(String rejectionReason) voidsetStatus(SourceStatus status)
-
Field Details
-
MAX_RECENT_RUNS
public static final int MAX_RECENT_RUNSMaximum number of recent run records retained per source.- See Also:
-
-
Constructor Details
-
HarvestSource
public HarvestSource()
-
-
Method Details
-
create
public static HarvestSource create(String identifier, String oaiUrl, String discoveredFromSourceKey, int depth) Factory for creating a new source entry. -
addRunRecord
Append a run record and trim toMAX_RECENT_RUNS. -
getIdentifier
-
setIdentifier
-
getOaiUrl
-
setOaiUrl
-
getStatus
-
setStatus
-
getDiscoveredFromSourceKey
-
setDiscoveredFromSourceKey
-
getDepth
public int getDepth() -
setDepth
public void setDepth(int depth) -
getFirstSeen
-
setFirstSeen
-
getLastAttempted
-
setLastAttempted
-
getLastSuccessful
-
setLastSuccessful
-
getRejectionReason
-
setRejectionReason
-
getRecentRuns
-
setRecentRuns
-
getDiscoverySet
-
setDiscoverySet
-