Class DatasetUrl


  • public class DatasetUrl
    extends Object
    Detection of the protocol from a location string. TODO: Review and refactor as needed. Perhaps BiMap\?
    Since:
    10/20/2015.
    • Method Detail

      • getProtocols

        public static List<String> getProtocols​(String url)
        Return the set of leading protocols for a url; may be more than one. Watch out for Windows paths starting with a drive letter => protocol names must all have a length > 1. Watch out for '::' Each captured protocol is saved without trailing ':' Assume: the protocols MUST be terminated by the occurrence of '/'.
        Parameters:
        url - the url whose protocols to return
        Returns:
        list of leading protocols without the trailing :
      • create

        public static DatasetUrl create​(@Nullable
                                        ServiceType serviceType,
                                        String trueurl)
        Create a DatasetUrl, which annotates a url with its service type.
        Parameters:
        serviceType - The serviceType, may be null if not known.
        trueurl - The actual URL
      • hashCode

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

        public String getTrueurl()