Package org.apache.abdera.parser

Examples of org.apache.abdera.parser.ParseException


    private void checkMultipartContent(Document<Source> entry,
            Map<String, String> dataHeaders, RequestContext request)
            throws ParseException {
        if (entry == null) {
            throw new ParseException(
                    "multipart/related stream invalid, media link entry is missing");
        }
        if (!dataHeaders.containsKey(CONTENT_TYPE_HEADER)) {
            throw new ParseException(
                    "multipart/related stream invalid, data content-type is missing");
        }
        if (!isContentTypeAccepted(dataHeaders.get(CONTENT_TYPE_HEADER),
                request)) {
            throw new ParseException(
                    "multipart/related stream invalid, content-type "
                            + dataHeaders.get(CONTENT_TYPE_HEADER)
                            + " not accepted into this multipart file");
        }
    }
View Full Code Here


      if (language != null) doc.setLanguage(language);
      String slug = getSlug();
      if (slug != null) doc.setSlug(slug);
      return doc;
    } catch (Exception e) {
      throw new ParseException(e);
    }
  }
View Full Code Here

      if (options != null && options.getCharset() != null)
        ((OMDocument)document).setCharsetEncoding(options.getCharset());
      if (options != null) document.setMustPreserveWhitespace(options.getMustPreserveWhitespace());
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
    return document;
  }
View Full Code Here

          StAXUtils.createXMLStreamReader(in, charset);
        return parse(xmlreader, base, options);
      }
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
  }
View Full Code Here

          in,options.getFilterRestrictedCharacterReplacement());
      }
      return parse(StAXUtils.createXMLStreamReader(in), base, options);
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
  }
View Full Code Here

          reader,
          options);
      return getDocument(builder, base != null ? new IRI(base) : null, options);
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
  }
View Full Code Here

                break;
            case XMLStreamConstants.ENTITY_REFERENCE:
                lastNode = createOMText(XMLStreamConstants.ENTITY_REFERENCE);
                break;
            default :
                throw new ParseException();
        }
        return token;
    } catch (ParseException e) {
        throw e;
    } catch (OMException e) {
        throw new ParseException(e);
    } catch (Exception e) {
        throw new ParseException(e);
    }
  }
View Full Code Here

      FOMBuilder builder = new FOMBuilder(factory, xmlreader, options);
      document = getDocument(builder, base);
      setCharset(options, xmlreader.getCharacterEncodingScheme(), document);
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
    return document;
  }
View Full Code Here

      FOMBuilder builder = new FOMBuilder(factory, xmlreader, options);
      document = getDocument(builder, base);
      setCharset(options, xmlreader.getCharacterEncodingScheme(), document);
    } catch (Exception e) {
      if (!(e instanceof ParseException))
        e = new ParseException(e);
      throw (ParseException)e;
    }
    return document;
  }
View Full Code Here

                ((OMDocument)document).setCharsetEncoding(options.getCharset());
            if (options != null)
                document.setMustPreserveWhitespace(options.getMustPreserveWhitespace());
        } catch (Exception e) {
            if (!(e instanceof ParseException))
                e = new ParseException(e);
            throw (ParseException)e;
        }
        return document;
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.parser.ParseException

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.