Class HarvestSource

java.lang.Object
org.javastro.ivoa.registry.harvesting.HarvestSource

public class HarvestSource extends Object
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 Details

    • MAX_RECENT_RUNS

      public static final int MAX_RECENT_RUNS
      Maximum 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

      public void addRunRecord(HarvestRunRecord record)
      Append a run record and trim to MAX_RECENT_RUNS.
    • getIdentifier

      public String getIdentifier()
    • setIdentifier

      public void setIdentifier(String identifier)
    • getOaiUrl

      public String getOaiUrl()
    • setOaiUrl

      public void setOaiUrl(String oaiUrl)
    • getStatus

      public SourceStatus getStatus()
    • setStatus

      public void setStatus(SourceStatus status)
    • getDiscoveredFromSourceKey

      public String getDiscoveredFromSourceKey()
    • setDiscoveredFromSourceKey

      public void setDiscoveredFromSourceKey(String discoveredFromSourceKey)
    • getDepth

      public int getDepth()
    • setDepth

      public void setDepth(int depth)
    • getFirstSeen

      public Instant getFirstSeen()
    • setFirstSeen

      public void setFirstSeen(Instant firstSeen)
    • getLastAttempted

      public Instant getLastAttempted()
    • setLastAttempted

      public void setLastAttempted(Instant lastAttempted)
    • getLastSuccessful

      public Instant getLastSuccessful()
    • setLastSuccessful

      public void setLastSuccessful(Instant lastSuccessful)
    • getRejectionReason

      public String getRejectionReason()
    • setRejectionReason

      public void setRejectionReason(String rejectionReason)
    • getRecentRuns

      public List<HarvestRunRecord> getRecentRuns()
    • setRecentRuns

      public void setRecentRuns(List<HarvestRunRecord> recentRuns)
    • getDiscoverySet

      public String getDiscoverySet()
    • setDiscoverySet

      public void setDiscoverySet(String discoverySet)