Package ORG.oclc.oai.server.verb

Examples of ORG.oclc.oai.server.verb.IdDoesNotExistException


            recordid=recordid + "/" + metadataPrefix;
        }
        if (debug) System.out.println("XMLFileOAICatalog.getRecord: recordid=" + recordid);
        Object nativeRecord = nativeMap.get(recordid.toLowerCase());
        if (nativeRecord == null)
            throw new IdDoesNotExistException(oaiIdentifier);
        return constructRecord(nativeRecord, metadataPrefix);
    }
View Full Code Here


            recordid=recordid + "/" + metadataPrefix;
        }
        if (debug) System.out.println("XMLFileOAICatalog.getRecord: recordid=" + recordid);
        HashMap nativeRecord = (HashMap)nativeMap.get(recordid.toLowerCase());
        if (nativeRecord == null)
            throw new IdDoesNotExistException(oaiIdentifier);
        if (debug) {
            Iterator keys = nativeRecord.keySet().iterator();
            while (keys.hasNext())
                System.out.println(keys.next());
        }
View Full Code Here

      }
        }
        if (v.size() > 0) {
            return v;
        } else {
            throw new IdDoesNotExistException(oaiIdentifier);
        }
    }
View Full Code Here

             * (which happens here) from the record content interpretation
             * (which is the responsibility of the RecordFactory implementation).
             */
            if (!rs.next()) {
                endConnection(con);
                throw new IdDoesNotExistException(oaiIdentifier);
            } else {
                /* Make sure the identifierQuery returns the columns you need
                 * (if any) to determine the supported schemaLocations for this item */
                HashMap nativeItem = new HashMap();
                nativeItem.put("coreResult", getColumnValues(rs));
View Full Code Here

            Statement stmt = con.createStatement();
            ResultSet rs =
                stmt.executeQuery(populateIdentifierQuery(oaiIdentifier));
            if (!rs.next()) {
                endConnection(con);
                throw new IdDoesNotExistException(oaiIdentifier);
            }
            HashMap nativeItem = new HashMap();
            nativeItem.put("coreResult", getColumnValues(rs));
            extendItem(con, nativeItem);
            endConnection(con);
View Full Code Here

     String metadata = abstractCatalog.getRecord(identifier, "oai_dc");
     if (metadata != null) {
                    sb.append(metadata);
      } else {
                    if (debug) System.out.println("ID does not exist");
          throw new IdDoesNotExistException(identifier);
     }
      }
  } catch (BadArgumentException e) {
            if (debug) e.printStackTrace();
            throw new FileNotFoundException(e.getMessage());
View Full Code Here

     String metadata = abstractCatalog.getMetadata(identifier, metadataPrefix);
     if (metadata != null) {
                    sb.append(metadata);
     } else {
                    if (debug) System.out.println("ID does not exist");
         throw new IdDoesNotExistException(identifier);
     }
      }
  } catch (BadArgumentException e) {
            if (debug) e.printStackTrace();
            throw new FileNotFoundException();
View Full Code Here

      String localIdentifier
    = getRecordFactory().fromOAIIdentifier(oaiIdentifier);

            nativeItem = getNativeRecord(localIdentifier);
            if (nativeItem == null)
                throw new IdDoesNotExistException(oaiIdentifier);
            return constructRecord(nativeItem, metadataPrefix);
        } catch (IOException e) {
            e.printStackTrace();
            throw new OAIInternalServerError("Database Failure");
        }
View Full Code Here

        }
       
        if (nativeItem != null) {
            return getRecordFactory().getSchemaLocations(nativeItem);
        } else {
            throw new IdDoesNotExistException(oaiIdentifier);
        }
    }
View Full Code Here

             * (which happens here) from the record content interpretation
             * (which is the responsibility of the RecordFactory implementation).
             */
            if (!rs.next()) {
                endConnection(con);
                throw new IdDoesNotExistException(oaiIdentifier);
            } else {
                /* Make sure the identifierQuery returns the columns you need
                 * (if any) to determine the supported schemaLocations for this item */
                HashMap nativeItem = getColumnValues(rs);
                endConnection(con);
View Full Code Here

TOP

Related Classes of ORG.oclc.oai.server.verb.IdDoesNotExistException

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.