cdm/src/main/java/ucar/nc2/dataset/DatasetUrl.java
@Urlencoded
  static private ServiceType decodeLeadProtocol(String protocol) throws IOException {
    if (protocol.equals("dods"))
      return ServiceType.OPENDAP;

    else if (protocol.equals("dap4"))
      return ServiceType.DAP4;

    else if (protocol.equals("httpserver") || protocol.equals("nodods"))
      return ServiceType.HTTPServer;

    else if (protocol.equals(CdmRemote.PROTOCOL))
      return ServiceType.CdmRemote;

    else if (protocol.equals(DataFactory.PROTOCOL)) //thredds
      return ServiceType.THREDDS;

    return null;
  }
@Urlencoded
  static private ServiceType decodeLeadProtocol(String protocol) throws IOException {
    if (protocol.equals("dods"))
      return ServiceType.OPENDAP;

    else if (protocol.equals("dap4"))
      return ServiceType.DAP4;

    else if (protocol.equals("httpserver") || protocol.equals("nodods"))
      return ServiceType.HTTPServer;

    else if (protocol.equals(CdmRemote.PROTOCOL))
      return ServiceType.CdmRemote;

    else if (protocol.equals(DataFactory.PROTOCOL)) //thredds
      return ServiceType.THREDDS;

    return null;
  }
/*
Attempt to map a leading url protocol url to a service type (see thredds.catalog.ServiceType).
Possible service types should include at least the following.
<ol>
<li> OPENDAP (DAP2 protocol)
<li> DAP4 (DAP4 protocol)
<li> CdmRemote (remote ncstream)
</ol>

@param protocol The leading protocol
@return ServiceType indicating how to handle the url, or null.