public String getTargetPath() { String uri = getUri().toString(); String cpath = getContextPath(); return cpath == null ? uri : uri.substring(cpath.length()); }
public RequestContext setAttribute(String name, Object value) { return setAttribute(Scope.REQUEST, name, value); }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(Parser parser, ParserOptions options) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (parser == null) parser = getAbdera().getParser(); if (parser == null) throw new IllegalArgumentException("No Parser implementation was provided"); if (document == null) { document = parser.parse(getInputStream(), getResolvedUri().toString(), options); } return (Document<T>)document; }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(ParserOptions options) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (document == null) document = getDocument(getAbdera().getParser(), options); return (Document<T>)document; }
public String absoluteUrlFor(Object key, Object param) { return getResolvedUri().resolve(urlFor(key, param)).toString(); }
public IRI getResolvedUri() { return baseUri.resolve(getUri()); }
public boolean isAtom() { try { return MimeTypeHelper.isAtom(getContentType().toString()); } catch (Exception e) { return false; } } }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument() throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (document == null) document = getDocument(getAbdera().getParser()); return (Document<T>)document; }
@SuppressWarnings("unchecked") public synchronized <T extends Element> Document<T> getDocument(Parser parser) throws ParseException, IOException { log.debug(Localizer.get("PARSING.REQUEST.DOCUMENT")); if (parser == null) parser = getAbdera().getParser(); if (parser == null) throw new IllegalArgumentException("No Parser implementation was provided"); if (document == null) document = getDocument(parser, parser.getDefaultParserOptions()); return (Document<T>)document; }