Package ORG.oclc.oai.server.verb

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


    public String createMetadata(Object nativeItem, String schemaURL, String metadataPrefix,
       Iterator setSpecs, Iterator abouts)
  throws IllegalArgumentException, CannotDisseminateFormatException {
        try {
            if (isDeleted(nativeItem)) {
                throw new CannotDisseminateFormatException("Record is deleted.");
            }
            String result = quickCreateMetadata(nativeItem, schemaURL, metadataPrefix);
            if (result == null) {
                if (setSpecs == null) {
                    setSpecs = getSetSpecs(nativeItem);
                }
                if (abouts == null) {
                    abouts = getAbouts(nativeItem);
                }
                result = createMetadata(nativeItem, schemaURL,
                                isDeleted(nativeItem));
            }
       
            return result;
        } catch (OAIInternalServerError e) {
            e.printStackTrace();
            throw new CannotDisseminateFormatException(e.getMessage());
        }
    }
View Full Code Here


     */
    public String createMetadata(Object nativeItem, String schemaURL, boolean isDeleted)
  throws IllegalArgumentException, CannotDisseminateFormatException, OAIInternalServerError {
  StringBuffer xmlRec = new StringBuffer();
  if (isDeleted) {
            throw new CannotDisseminateFormatException("Record is deleted");
  }
        Iterator iterator = getCrosswalks().iterator();
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry)iterator.next();
            CrosswalkItem crosswalkItem = (CrosswalkItem)entry.getValue();
View Full Code Here

           
            if (metadataPrefix != null) {
                if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix))
                        == null) {
//                  logger.info("metadataPrefix not found:" + metadataPrefix);
                    throw new CannotDisseminateFormatException(metadataPrefix);
                }
            }
            try {
                String s =
                    getRecordFactory().create(
View Full Code Here

                        == null) {
                    if (debug) {
                        System.out.println(
                        "SRUOAICatalog.getRecord: metadataPrefix not found");
                    }
                    throw new CannotDisseminateFormatException(metadataPrefix);
                }
            }
            try {
                return getRecordFactory().createMetadata(
                        nativeObject,
View Full Code Here

                RecordFactory recordFactory = getRecordFactory();
                String schemaURL = null;
                if (metadataPrefix != null) {
                    if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix))
                            == null)
                        throw new CannotDisseminateFormatException(metadataPrefix);
                }
//              logger.debug("schemaURL=" + schemaURL);
                for (int i = 0; i < nodeList.getLength(); ++i) {
                    Object rec = getRecordData(nodeList.item(i));
                    HashMap hashMap = new HashMap();
View Full Code Here

            RecordFactory recordFactory = getRecordFactory();
            String schemaURL = null;
            if (metadataPrefix != null) {
                if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix))
                        == null)
                    throw new CannotDisseminateFormatException(metadataPrefix);
            }
            for (int i = 0; i < nodeList.getLength(); ++i) {
                Object rec = getRecordData(nodeList.item(i));
                HashMap hashMap = new HashMap();
                hashMap.put("header", rec);
View Full Code Here

        Iterator setSpecs = getSetSpecs(nativeItem);
        Iterator abouts = getAbouts(nativeItem);
       
        if (metadataPrefix != null) {
            if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix)) == null)
                throw new CannotDisseminateFormatException(metadataPrefix);
        }
        return getRecordFactory().create(nativeItem, schemaURL, metadataPrefix, setSpecs, abouts);
    }
View Full Code Here

            synchronized (transformer) {
                transformer.transform(streamSource, new StreamResult(stringWriter));
            }
            return stringWriter.toString();
        } catch (Exception e) {
            throw new CannotDisseminateFormatException(e.getMessage());
        }
    }
View Full Code Here

            }
        } catch (Exception e) {
            if (debug) {
                e.printStackTrace();
            }
            throw new CannotDisseminateFormatException(e.getMessage());
        }
    }
View Full Code Here

  throws CannotDisseminateFormatException {
  String fullItem = (String)nativeItem;

  int startOffset = fullItem.indexOf(elementStart);
  if (startOffset == -1) {
      throw new CannotDisseminateFormatException(getSchemaLocation());
  }
  int endOffset = fullItem.indexOf(elementEnd) + elementEnd.length();
  return fullItem.substring(startOffset, endOffset);
    }
View Full Code Here

TOP

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

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.