Examples of MappingIterator


Examples of com.fasterxml.jackson.databind.MappingIterator

    @Override
    protected boolean doProcess(Record inputRecord, InputStream in) throws IOException {
      Record template = inputRecord.copy();
      removeAttachments(template);
      MappingIterator iter = reader.readValues(in);
      try {
        while (iter.hasNextValue()) {
          Object rootNode = iter.nextValue();
          incrementNumRecords();
          LOG.trace("jsonObject: {}", rootNode);
         
          Record outputRecord = template.copy();
          outputRecord.put(Fields.ATTACHMENT_BODY, rootNode);
          outputRecord.put(Fields.ATTACHMENT_MIME_TYPE, MIME_TYPE);
 
          // pass record to next command in chain:
          if (!getChild().process(outputRecord)) {
            return false;
          }
        }
        return true;
      } finally {
        iter.close();
      }
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.MappingIterator

      validateArguments();
    }

    @Override
    protected boolean doProcess(Record inputRecord, InputStream in) throws IOException {
      MappingIterator iter = reader.readValues(in);
      try {
        while (iter.hasNextValue()) {
          Object rootNode = iter.nextValue();
          incrementNumRecords();
          LOG.debug("jsonObject: {}", rootNode);
         
          Record outputRecord = inputRecord.copy();
          removeAttachments(outputRecord);
          outputRecord.put(Fields.ATTACHMENT_BODY, rootNode);
          outputRecord.put(Fields.ATTACHMENT_MIME_TYPE, MIME_TYPE);
 
          // pass record to next command in chain:
          if (!getChild().process(outputRecord)) {
            return false;
          }
        }
        return true;
      } finally {
        iter.close();
      }
    }
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

        }

        SequenceIterator documents =
                top.iterateAxis(Axis.CHILD, NodeKindTest.ELEMENT);

        return new MappingIterator(documents, this, context, null);

    }
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        SequenceIterator iter = argument[0].iterate(context);
        Object[] info = new Object[2];
        info[0] = new HashSet();
        info[1] = getAtomicSortComparer(1, context);
        return new MappingIterator(iter, this, null, info);
    }
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

        DocumentMappingInfo info = new DocumentMappingInfo();
        info.baseURI = baseURI;
        info.stylesheetURI = expressionBaseURI;

        MappingIterator map = new MappingIterator(
                                    hrefSequence,
                                    this,
                                    context,
                                    info);
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

            KeyContextInfo info = new KeyContextInfo();
            info.document = doc;
            info.context = context;

            SequenceIterator keys = argument[0].iterate(context);
            SequenceIterator allValues = new MappingIterator(keys, this, null, info);
            return new DocumentOrderIterator(allValues, LocalOrderComparer.getInstance());
        }
    }
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

    */

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        NodeInfo element = (NodeInfo)argument[0].evaluateItem(context);
        SequenceIterator nsNodes = element.iterateAxis(Axis.NAMESPACE);
        return new MappingIterator(nsNodes, this, null, null);
    }
View Full Code Here

Examples of net.sf.saxon.expr.MappingIterator

     */

    public SequenceIterator getTypedValue(CharSequence value, NodeInfo node) throws ValidationException {
        SequenceIterator iter = new StringTokenIterator(value.toString());
        Object[] data = {node, getItemType()};
        return new MappingIterator(iter, this, null, data);
    }
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.