Package se.kb.oai.pmh

Examples of se.kb.oai.pmh.IdentifiersList


        // OAI hierarchy is flat (no sub-directories) - only allow 'null' as pdURI!
        ArrayList<URI> resultList = new ArrayList<URI>();
       
        OaiPmhServer server = new OaiPmhServer(baseURL);
        try {
          IdentifiersList list;
          if (q == null) {
            list = server.listIdentifiers(metaDataPrefix);           
          } else {
            if (!(q instanceof QueryDateRange))
              throw new QueryValidationException("Unsupported query type");
           
            list = server.listIdentifiers(metaDataPrefix, dateFormat.format(((QueryDateRange) q).getStartDate().getTime()), dateFormat.format(((QueryDateRange) q).getEndDate().getTime()), set)
          }
         
          for (Header header : list.asList()) {
            try {
              resultList.add(new URI(header.getIdentifier()));
            } catch (URISyntaxException e) {
              log.warning("Illegal identifier returned from " + baseURL + ": " + header.getIdentifier());
            }
View Full Code Here

TOP

Related Classes of se.kb.oai.pmh.IdentifiersList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.