Package ORG.oclc.oai.server.verb

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


                int offset = xmlRec.indexOf("?>");
                xmlRec = xmlRec.substring(offset+2);
            }
            return xmlRec;
        } catch (UnsupportedEncodingException e) {
            throw new CannotDisseminateFormatException("An error occurred");
        }
    }
View Full Code Here


    public String createMetadata(Object nativeItem)
  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

                StringWriter sw = new StringWriter();
                e.printStackTrace(new PrintWriter(sw));
                log.error("*** Stack trace follows:");
                log.error(sw.toString());

            throw new CannotDisseminateFormatException(schemaLabel);
        }
    }
View Full Code Here

                    }
                }
            }
                    catch (SQLException e)
                    {
                        throw new CannotDisseminateFormatException(e.toString());
        }
                }
            }
        }
View Full Code Here

            if ((schemaURL = getCrosswalks().getSchemaURL(metadataPrefix)) == null)
            {
                log.info(LogManager.getHeader(null, "oai_error",
                        "cannot_disseminate_format"));
                throw new CannotDisseminateFormatException(metadataPrefix);
            }

            record = getRecordFactory().create(itemInfo, schemaURL,
                    metadataPrefix);
        }
View Full Code Here

        // Null means bad metadata prefix was bad
        if (m == null)
        {
            log.info(LogManager.getHeader(null, "oai_error",
                    "cannot_disseminate_format"));
            throw new CannotDisseminateFormatException(metadataPrefix);
        }

        // If there were zero results, return the appropriate error
        Iterator i = (Iterator) m.get("records");
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.