Package org.dbwiki.data.resource

Examples of org.dbwiki.data.resource.WRI


   */
  public WikiSchemaRequest(DatabaseWiki wiki, RequestURL url) throws org.dbwiki.exception.WikiException {
    super(wiki, url);
   
    _isRootRequest = url.isRoot();
      _wri = new WRI(wiki.database().identifier(), wiki.database().getSchemaNodeIdentifierForURL(url));
      _schemaNode = this.wiki().database().getSchemaNode(_wri.resourceIdentifier());
     
      if (url.isGET()) {
        _requestType = requestTypeGET;
      } else if (url.isPOST()) {
View Full Code Here


    }
    if ((nodeIdentifier == null) && (wiki.urlDecoder().size() > 0)) {
      nodeIdentifier = wiki.urlDecoder().decode(wiki.database(), url, RequestParameter.versionParameter(this.parameters().get(RequestParameter.ParameterVersion)));
    }
   
      _wri = new WRI(wiki.database().identifier(), nodeIdentifier);
      _node = null;
     
      /*
      if (url.exchange().getRequestMethod().equalsIgnoreCase("GET")) {
        _requestType = requestTypeGET;
View Full Code Here

  public WikiPageRequest(DatabaseWiki wiki, RequestURL url) throws org.dbwiki.exception.WikiException {
    super(wiki, url);
   
    DatabaseIdentifier wikiIdentifier = new DatabaseIdentifier(wiki.identifier().databaseHomepage() + "/" + RequestURL.WikiPageRequestPrefix);
    if (url.size() == 0) {
      _wri = new WRI(wikiIdentifier, new PageIdentifier());
    } else if (url.size() == 1) {
      long timestamp = -1;
      RequestParameter timestampParameter =
        url.parameters().get(RequestParameter.ParameterVersion);
      if(timestampParameter != null) {
        timestamp = Long.parseLong(timestampParameter.value());
      }
      _wri = new WRI(wikiIdentifier, new PageIdentifier(url.get(0).encodedText(), timestamp));
    } else {
      throw new WikiNodeException(WikiNodeException.InvalidIdentifierFormat, url.toString());
    }
  }
View Full Code Here

TOP

Related Classes of org.dbwiki.data.resource.WRI

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.