Class InvService

  • Direct Known Subclasses:
    ResultService

    public class InvService
    extends Object
    A Service is an abstraction for an internet service, such as a data server, FTP, etc.
    • Constructor Detail

      • InvService

        public InvService​(String name,
                          String serviceTypeName,
                          String base,
                          String suffix,
                          String desc)
        Constructor.
        Parameters:
        name - : name to show to the user
        serviceTypeName - : ServiceType
        base - : base for forming URL
        suffix - : suffix for forming URL, may be null.
        desc - : human readable description, may be null.
    • Method Detail

      • getName

        public String getName()
        Get the service name: referenced by dataset and access elements.
        Returns:
        the service name
      • getBase

        public String getBase()
        get the base URL for the service
        Returns:
        the base URL for the service
      • getServiceType

        public ServiceType getServiceType()
        get the Service Type
        Returns:
        the Service Type
      • getSuffix

        public String getSuffix()
        Get the suffix; may be null
        Returns:
        the suffix; may be null
      • getDescription

        public String getDescription()
        Get the "human readable" description; use ServiceType.toString() if not set
        Returns:
        the "human readable" description
      • getProperties

        public List<InvProperty> getProperties()
        Get properties for this service.
        Returns:
        List of type Property. May be empty, but not null.
      • getDatasetRoots

        public List<InvProperty> getDatasetRoots()
        Deprecated.
        put roots only in the catalog
        Get dataset roots.
        Returns:
        List of InvProperty. May be empty, may not be null.
      • findProperty

        public String findProperty​(String name)
        Get named property.
        Parameters:
        name - match this name
        Returns:
        String value of Property or null if not exist.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • dump

        public String dump()
        Returns:
        debugging info
      • addService

        public void addService​(InvService service)
        Add a nested service to a service of type COMPOUND.
        Parameters:
        service - add this
      • addProperty

        public void addProperty​(InvProperty p)
        Add a property
        Parameters:
        p - add this
      • addDatasetRoot

        public void addDatasetRoot​(InvProperty root)
        Deprecated.
        use InvCatalogImpl
        Add Dataset Root (1.0), key = path, value = location.
        Parameters:
        root - add this
      • getServices

        public List<InvService> getServices()
        Get nested services; only if getServiceType() == ServiceType.COMPOUND.
        Returns:
        List of type InvService. May be empty, but not null.
      • getFullName

        public String getFullName()
        Deprecated.
        services should always be at top level.
        Get full name for this Service, which has all parent collection names.
        Returns:
        name
      • isRelativeBase

        public boolean isRelativeBase()
        See if the service Base is relative
        Returns:
        true if the service Base is relative