Examples of Indexable


Examples of edu.umd.cloud9.collection.Indexable

      int docno = 0;
      try {
        if (req.getParameterValues(DOCNO) != null)
          docno = Integer.parseInt(req.getParameterValues(DOCNO)[0]);

        Indexable doc = mForwardIndex.getDocument(docno);

        if (doc != null) {
          sLogger.info("fetched: " + doc.getDocid() + " = docno " + docno);
          res.setContentType(doc.getDisplayContentType());

          PrintWriter out = res.getWriter();
          out.print(doc.getDisplayContent());
          out.close();
        } else {
          throw new Exception();
        }
      } catch (Exception e) {
View Full Code Here

Examples of edu.umd.cloud9.collection.Indexable

        if (req.getParameterValues("docno") != null)
          docno = Integer.parseInt(req.getParameterValues("docno")[0]);
        else if (req.getParameterValues("docid") != null)
          docno = sForwardIndex.getDocno(req.getParameterValues("docid")[0]);

        Indexable doc = null;
        int i = 0;
        for(i = 0; i < lastDocs.length; i++)
          if(docno <= lastDocs[i]) {
            doc = docForwardIndex[i].getDocument(docno);
            break;
          }

        if (doc != null) {
          LOG.info("fetched: " + doc.getDocid() + " = docno " + docno);
          res.setContentType(doc.getDisplayContentType());

          PrintWriter out = res.getWriter();
          out.print(doc.getContent().replaceAll("<\\s*/\\s*[bB][oO][dD][Yy]\\s*>", "<br><br><a href=\"/fetch_docno?docno=" + docno +
                "\"> Fetch anchor text for docno: " + docno + "</a></body>"));
          out.close();
        } else {
          throw new Exception();
        }
View Full Code Here

Examples of edu.umd.cloud9.collection.Indexable

      try {
       
        if (req.getParameterValues("docid") != null)
          docid = req.getParameterValues("docid")[0];

        Indexable doc = sForwardIndex.getDocument(docid);
       
        if (doc != null) {
          LOG.info("fetched: " + doc.getDocid());
          res.setContentType(doc.getDisplayContentType());

          PrintWriter out = res.getWriter();
          out.print(doc.getContent().replace("<body>", "<body><a href=\"/fetch_content?docid=" + docid +
              "\"> Fetch content for docid: " + docid + "</a><br><br>"));
          out.close();
        } else {
          throw new Exception();
        }
View Full Code Here

Examples of edu.umd.cloud9.collection.Indexable

      try {
       
        if (req.getParameterValues("docno") != null)
          docno = Integer.parseInt(req.getParameterValues("docno")[0]);

        Indexable doc = sForwardIndex.getDocument(docno);
 
        if (doc != null) {
          LOG.info("fetched: " + doc.getDocid() + " = docno " + docno);
          res.setContentType(doc.getDisplayContentType());
         
          PrintWriter out = res.getWriter();
          out.print(doc.getContent().replace("<body>", "<body><a href=\"/fetch_content?docno=" + docno +
              "\"> Fetch content for docno: " + docno + "</a><br><br>"));
          out.close();
        } else {
          throw new Exception();
        }
View Full Code Here

Examples of edu.umd.cloud9.collection.Indexable

      int docno = 0;
      try {
        if (req.getParameterValues(DOCNO) != null)
          docno = Integer.parseInt(req.getParameterValues(DOCNO)[0]);

        Indexable doc = mForwardIndex.getDocument(docno);

        if (doc != null) {
          sLogger.info("fetched: " + doc.getDocid() + " = docno " + docno);
          res.setContentType(doc.getDisplayContentType());

          PrintWriter out = res.getWriter();
          out.print(doc.getDisplayContent());
          out.close();
        } else {
          throw new Exception();
        }
      } catch (Exception e) {
View Full Code Here

Examples of org.exist.storage.Indexable

              result.addAll(ref.evalFunction(Sequence.EMPTY_SEQUENCE, null, params));
              data.clear();
          }
      // no index specified: use the range index
        } else {
            final Indexable indexable = (Indexable) args[1].itemAt(0);
            ValueOccurrences occur[] = null;
            // First check for indexes defined on qname
            final QName[] allQNames = getDefinedIndexes(context.getBroker(), docs);
            if (allQNames.length > 0)
                {occur = context.getBroker().getValueIndex().scanIndexKeys(docs, nodes, allQNames, indexable);}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.