Package org.apache.oodt.xmlquery

Examples of org.apache.oodt.xmlquery.Result


        String strVal = toString();
        if (strVal == null || (strVal != null && strVal.equals(""))) {
            return null;
        }

        Result r = new Result();
        r.setID(DateConvert.isoFormat(new Date()));
        r.setMimeType("text/plain");
        r.setResourceID("UNKNOWN");
        r.setValue(toString());
        return r;
    }
View Full Code Here


                                .getSelectElementSet()));

                if (res.getRows() == null
                        || (res.getRows() != null && res.getRows().size() == 0)) {
                }
                Result r = res.toResult();
                if (r != null) {
                    query.getResults().add(r);
                }
            } catch (SQLException e) {
                e.printStackTrace();
View Full Code Here

    try {                       // OK, let's try
      for (Iterator i = handlers.iterator(); i.hasNext();) {         // Try each query handler
        QueryHandler handler = (QueryHandler) i.next();         // Get the query handler
        query = handler.query(query);             // Give it the query
        if (!query.getResults().isEmpty()) {           // Did it give any result?
          Result result = (Result) query.getResults().get(0); // Yes, get the result
          deliverResult(handler, result, res);         // And deliver it
          return;                 // Done!
        }
      }
    } catch (ProductException ex) {
View Full Code Here

      ByteArrayOutputStream outStream = new ByteArrayOutputStream();
      OFSNListHandler handler = getListHandler(cmd, cfg.getClassName());
      File[] fileList = handler.getListing(realPath);
      generateOFSNXml(fileList, cfg, outStream);
      xmlQuery.getResults().add(
          new Result(cmdId, XML_MIME_TYPE, null, cmdId, Collections.EMPTY_LIST,
              outStream.toString()));
    } else if (isGetCmd(cmd)) {
      OFSNGetHandler handler = getGetHandler(cmd, cfg.getClassName());
      String rtAndPath = cmd + CMD_SEPARATOR + realPath;
      String mimeType;
View Full Code Here

    try {                       // OK, let's try
      for (Iterator i = handlers.iterator(); i.hasNext();) {         // Try each query handler
        QueryHandler handler = (QueryHandler) i.next();         // Get the query handler
        query = handler.query(query);             // Give it the query
        if (!query.getResults().isEmpty()) {           // Did it give any result?
          Result result = (Result) query.getResults().get(0); // Yes, get the result
          deliverResult(handler, result, res);         // And deliver it
          return;                 // Done!
        }
      }
    } catch (ProductException ex) {
View Full Code Here

      ByteArrayOutputStream outStream = new ByteArrayOutputStream();
      OFSNListHandler handler = getListHandler(cmd, cfg.getClassName());
      File[] fileList = handler.getListing(realPath);
      generateOFSNXml(fileList, cfg, outStream);
      xmlQuery.getResults().add(
          new Result(cmdId, XML_MIME_TYPE, null, cmdId, Collections.EMPTY_LIST,
              outStream.toString()));
    } else if (isGetCmd(cmd)) {
      OFSNGetHandler handler = getGetHandler(cmd, cfg.getClassName());
      String rtAndPath = cmd + CMD_SEPARATOR + realPath;
View Full Code Here

      ByteArrayOutputStream outStream = new ByteArrayOutputStream();
      OFSNListHandler handler = getListHandler(cmd, cfg.getClassName());
      File[] fileList = handler.getListing(realPath);
      generateOFSNXml(fileList, cfg, outStream);
      xmlQuery.getResults().add(
          new Result(cmdId, XML_MIME_TYPE, null, cmdId, Collections.EMPTY_LIST,
              outStream.toString()));
    } else if (isGetCmd(cmd)) {
      OFSNGetHandler handler = getGetHandler(cmd, cfg.getClassName());
      String rtAndPath = cmd + CMD_SEPARATOR + realPath;
      String mimeType;
View Full Code Here

    try {                       // OK, let's try
      for (Iterator i = handlers.iterator(); i.hasNext();) {         // Try each query handler
        QueryHandler handler = (QueryHandler) i.next();         // Get the query handler
        query = handler.query(query);             // Give it the query
        if (!query.getResults().isEmpty()) {           // Did it give any result?
          Result result = (Result) query.getResults().get(0); // Yes, get the result
          deliverResult(handler, result, res);         // And deliver it
          return;                 // Done!
        }
      }
    } catch (ProductException ex) {
View Full Code Here

TOP

Related Classes of org.apache.oodt.xmlquery.Result

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.