/** * @see * org.gbif.portal.service.DataResourceManager#getResourceNetworksForDataResource(java.lang.String) */ @SuppressWarnings("unchecked") public List<ResourceNetworkDTO> getResourceNetworksForDataResource(String dataResourceKey) throws ServiceException { Long dataResourceId = parseKey(dataResourceKey); List<ResourceNetwork> resourceNetworks = resourceNetworkDAO.getResourceNetworksForDataResource(dataResourceId); return (List<ResourceNetworkDTO>) resourceNetworkDTOFactory.createDTOList(resourceNetworks); }
/** * @see org.gbif.portal.service.DataResourceManager#findResourceNetworks(java.lang.String, * boolean, java.lang.String, java.util.Date, org.gbif.portal.dto.util.SearchConstraints) */ public SearchResultsDTO findResourceNetworks( String networkName, boolean fuzzy, String code, Date modifiedSince, SearchConstraints searchConstraints) { List<ResourceNetwork> networks = resourceNetworkDAO.findResourceNetworks( networkName, fuzzy, code, modifiedSince, searchConstraints.getStartIndex(), searchConstraints.getMaxResults() + 1); return resourceNetworkDTOFactory.createResultsDTO(networks, searchConstraints.getMaxResults()); }
/** @see org.gbif.portal.service.DataResourceManager#getResourceNetworkList() */ @SuppressWarnings("unchecked") public List<KeyValueDTO> getResourceNetworkList() { List resourceNetworkKVs = resourceNetworkDAO.getResourceNetworkList(); return keyValueDTOFactory.createDTOList(resourceNetworkKVs); }
/** * @see org.gbif.portal.service.DataResourceManager#countResourceNetworks(java.lang.String, * boolean, java.lang.String, java.util.Date) */ public Long countResourceNetworks( String networkName, boolean fuzzy, String code, Date modifiedSince) { return resourceNetworkDAO.countResourceNetworks(networkName, fuzzy, code, modifiedSince); }
/** @see org.gbif.portal.service.DataResourceManager#getResourceNetworkFor(java.lang.String) */ public ResourceNetworkDTO getResourceNetworkFor(String resourceNetworkKey) throws ServiceException { Long resourceNetworkId = parseKey(resourceNetworkKey); ResourceNetwork resourceNetwork = resourceNetworkDAO.getResourceNetworkFor(resourceNetworkId); return (ResourceNetworkDTO) resourceNetworkDTOFactory.createDTO(resourceNetwork); }