private RegistryServices buildServiceTypeParams(Resource resource){
  RegistryServices rs=new RegistryServices();
  rs.serviceTypes=SERVICE_TYPE_EML;
  rs.serviceURLs=cfg.getResourceEmlUrl(resource.getShortname());
  if (resource.hasPublishedData() && resource.getCoreTypeTerm() != null) {
    if (DwcTerm.Occurrence == resource.getCoreTypeTerm()) {
      log.debug("Registering EML & DwC-A Occurrence Service");
      rs.serviceURLs+="|" + cfg.getResourceArchiveUrl(resource.getShortname());
      rs.serviceTypes+="|" + SERVICE_TYPE_OCCURRENCE;
    }
 else     if (DwcTerm.Taxon == resource.getCoreTypeTerm()) {
      log.debug("Registering EML & DwC-A Checklist Service");
      rs.serviceURLs+="|" + cfg.getResourceArchiveUrl(resource.getShortname());
      rs.serviceTypes+="|" + SERVICE_TYPE_CHECKLIST;
    }
 else     if (DwcTerm.Event == resource.getCoreTypeTerm()) {
      log.debug("Registering EML & DwC-A Sampling Event Service");
      rs.serviceURLs+="|" + cfg.getResourceArchiveUrl(resource.getShortname());
      rs.serviceTypes+="|" + SERVICE_TYPE_SAMPLING_EVENT;
    }
 else {
      log.warn("Unknown core resource type " + resource.getCoreTypeTerm());
      log.debug("Registering EML service only");
    }
  }
 else {
    log.debug("Resource has no published data, therefore only the EML Service will be registered");
  }
  return rs;
}

private RegistryServices buildServiceTypeParams ( Resource resource ) { RegistryServices rs = new RegistryServices ( ) ; rs . serviceTypes = SERVICE_TYPE_EML ; rs . serviceURLs = cfg . getResourceEmlUrl ( resource . getShortname ( ) ) ; if ( resource . hasPublishedData ( ) && resource . getCoreTypeTerm ( ) != null ) { if ( DwcTerm . Occurrence == resource . getCoreTypeTerm ( ) ) { log . debug ( "Registering EML & DwC-A Occurrence Service" ) ; rs . serviceURLs += "|" + cfg . getResourceArchiveUrl ( resource . getShortname ( ) ) ; rs . serviceTypes += "|" + SERVICE_TYPE_OCCURRENCE ; } else if ( DwcTerm . Taxon == resource . getCoreTypeTerm ( ) ) { log . debug ( "Registering EML & DwC-A Checklist Service" ) ; rs . serviceURLs += "|" + cfg . getResourceArchiveUrl ( resource . getShortname ( ) ) ; rs . serviceTypes += "|" + SERVICE_TYPE_CHECKLIST ; } else if ( DwcTerm . Event == resource . getCoreTypeTerm ( ) ) { log . debug ( "Registering EML & DwC-A Sampling Event Service" ) ; rs . serviceURLs += "|" + cfg . getResourceArchiveUrl ( resource . getShortname ( ) ) ; rs . serviceTypes += "|" + SERVICE_TYPE_SAMPLING_EVENT ; } else { log . warn ( "Unknown core resource type " + resource . getCoreTypeTerm ( ) ) ; log . debug ( "Registering EML service only" ) ; } } else { log . debug ( "Resource has no published data, therefore only the EML Service will be registered" ) ; } return rs ; }
builds service type parameters used in push or post to registry . there can only be 4 different types of services that the ipt registers : eml , dwc - archive - occurrence , dwc - archive - checklist , dwc - archive - sampling - event - that ' s it .
