Package org.dbwiki.data.index

Examples of org.dbwiki.data.index.DatabaseContent


      savePresentationFile(args.urldecoding, _wiki.getURLDecodingVersion(), PresentationFileType.URLDecoding);

      //TODO: Move this to Wiki class.
      // Save the wiki pages to WIKI page path.
      assert(_wiki.wiki() != null);
      DatabaseContent wikiContent = _wiki.wiki().content();
      File wikiDirFile = new File(args.wikiDir);
      // Ensure directory for wiki pages exists
      if(!wikiDirFile.exists()) {
        System.err.println("Creating wiki directory " + args.wikiDir);
        wikiDirFile.mkdir();
      }
      if(wikiDirFile.isDirectory()) {
        for(int i = 0; i < wikiContent.size(); i++) {
          WikiPageDescription wikiEntry = (WikiPageDescription)wikiContent.get(i);
         
          File wikiFile = new File(args.wikiDir+ File.separator + "page_" + i +".xml" );
          OutputStream wikioutstream = new FileOutputStream(wikiFile);
          OutputStreamWriter wikiout = new OutputStreamWriter(wikioutstream);
         
View Full Code Here


    QueryNodeHandler queryHandler = _query.getQueryHandler(result);
   
    // Collect all the entries that potentially match the query condition. For each of the
    // candidate entries we then evaluate the query statement and add the results to the
    // QueryResultSet.
    DatabaseContent content = _database.getMatchingEntries(_query.getConditionListing());
    for (int iEntry = 0; iEntry < content.size(); iEntry++) {
      DatabaseGroupNode entry = (DatabaseGroupNode)_database.get(content.get(iEntry).identifier());
      if (_query.getVersionClause() != null) {
        entry = this.versionReader(entry, _query.getVersionClause().getTimestamp());
        if (entry != null) {
          new AbsoluteXPathConsumer().consume(entry, _query.rootTargetPath(), queryHandler);
        }
View Full Code Here

 
  public QueryResultSet execute() throws org.dbwiki.exception.WikiException {


    QueryResultSet result = new QueryResultSet();
    DatabaseContent content = _database.getMatchingEntries(_targetPath.getConditionListing());
    for (int iEntry = 0; iEntry < content.size(); iEntry++) {
      DatabaseGroupNode entry = (DatabaseGroupNode)_database.get(content.get(iEntry).identifier());
      new AbsoluteXPathConsumer().consume(entry, _targetPath, result);

    }

    return result;
View Full Code Here

                  new FullIndexPrinter(request, database()
                      .content()));
        }
      } else if (request.type().isSearch()) { // The case for a search
                          // request
        DatabaseContent content = null;
        String query = request.parameters()
            .get(RequestParameter.ParameterSearch).value();
        if (query != null) {
          content = database().search(query);
        } else {
View Full Code Here

TOP

Related Classes of org.dbwiki.data.index.DatabaseContent

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.