Class RRCCTypesDiscoverer

java.lang.Object
org.gcube.informationsystem.resourceregistry.schema.RRCCTypesDiscoverer
All Implemented Interfaces:
org.gcube.informationsystem.model.knowledge.TypesDiscoverer<org.gcube.informationsystem.types.reference.Type>

public class RRCCTypesDiscoverer extends Object implements org.gcube.informationsystem.model.knowledge.TypesDiscoverer<org.gcube.informationsystem.types.reference.Type>
TypesDiscoverer backed by a ResourceRegistrySchemaClientImpl: discovers types by fetching them directly from the Resource Registry server (bypassing any local cache), so that TypesKnowledge can bootstrap or renew its own cache from an authoritative source.
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

  • Constructor Details

    • RRCCTypesDiscoverer

      public RRCCTypesDiscoverer(ResourceRegistrySchemaClientImpl rrsc)
      Creates a new types discoverer instance.
      Parameters:
      rrsc - the Resource Registry Schema Client implementation to use for type discovery
  • Method Details

    • discover

      public Collection<org.gcube.informationsystem.types.reference.Type> discover(org.gcube.informationsystem.base.reference.AccessType accessType)

      Always requests the full subtype hierarchy (TypePath.DEPTH_UNLIMITED) directly from the server.

      Specified by:
      discover in interface org.gcube.informationsystem.model.knowledge.TypesDiscoverer<org.gcube.informationsystem.types.reference.Type>
      Throws:
      RuntimeException - wrapping a ResourceRegistryException if the discovery request fails