The following document contains the results of PMD's CPD 4.2.2.
File | Project | Line |
---|---|---|
org/fedoracommons/funapi/pmh/dspace/DSpacePmhResolver.java | funapi-pmh-dspace | 36 |
org/fedoracommons/funapi/pmh/fedora/FedoraPmhResolver.java | funapi-pmh-fedora | 37 |
InputStream in = getClass().getResourceAsStream("/FedoraPmhResolver.properties"); props = new Properties(); try { props.load(in); } catch (IOException e) { throw new UnapiException(e.getMessage(), e); } // e.g. http://localhost:8080/fedora/oai String temp = props.getProperty("pmhBaseUrl"); if (temp.endsWith("/")) { temp.substring(0, temp.length() -1); } try { baseUrl = new URL(temp); } catch (MalformedURLException e) { throw new UnapiException(e.getMessage(), e); } pmhIdPrefix = props.getProperty("pmhIdPrefix"); if (pmhIdPrefix == null) { // e.g. oai:localhost: pmhIdPrefix = String.format("oai:%s:", baseUrl.getHost()); } username = props.getProperty("username"); password = props.getProperty("password"); } /** * {@inheritDoc} */ @Override protected String getPmhId(String id) { String oaiId = null; |