gpt4 book ai didi

net.sf.saxon.expr.XPathContextMajor.setCurrentMergeGroupIterator()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 18:37:40 41 4
gpt4 key购买 nike

本文整理了Java中net.sf.saxon.expr.XPathContextMajor.setCurrentMergeGroupIterator()方法的一些代码示例,展示了XPathContextMajor.setCurrentMergeGroupIterator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathContextMajor.setCurrentMergeGroupIterator()方法的具体详情如下:
包路径:net.sf.saxon.expr.XPathContextMajor
类名称:XPathContextMajor
方法名:setCurrentMergeGroupIterator

XPathContextMajor.setCurrentMergeGroupIterator介绍

[英]Set the current merge group iterator. This supports the current-merge-group() and current-merge-key() functions in XSLT 3.0
[中]设置当前合并组迭代器。这支持XSLT 3.0中的current-merge-group()和current-merge-key()函数

代码示例

代码示例来源:origin: net.sf.saxon/Saxon-HE

@Override
  public int getLength() throws XPathException {
    if (last >= 0) {
      return last;
    } else {
      AtomicComparer[] comps = getComparators(context);
      GroupIterator mgi = context.getCurrentMergeGroupIterator();
      final XPathContextMajor c1 = context.newContext();
      c1.setCurrentMergeGroupIterator(mgi);
      SequenceIterator inputIterator = getMergedInputIterator(context, comps, c1);
      // Now perform the merge into a grouped sequence
      inputIterator = new MergeGroupingIterator(inputIterator, getComparer(mergeSources[0].mergeKeyDefinitions, comps), null);
      return last = Count.steppingCount(inputIterator);
    }
  }
};

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

@Override
  public int getLength() throws XPathException {
    if (last >= 0) {
      return last;
    } else {
      AtomicComparer[] comps = getComparators(context);
      GroupIterator mgi = context.getCurrentMergeGroupIterator();
      final XPathContextMajor c1 = context.newContext();
      c1.setCurrentMergeGroupIterator(mgi);
      SequenceIterator inputIterator = getMergedInputIterator(context, comps, c1);
      // Now perform the merge into a grouped sequence
      inputIterator = new MergeGroupingIterator(inputIterator, getComparer(mergeSources[0].mergeKeyDefinitions, comps), null);
      return last = Count.steppingCount(inputIterator);
    }
  }
};

代码示例来源:origin: net.sf.saxon/Saxon-HE

public SequenceIterator<?> iterate(XPathContext context) throws XPathException {
  try {
    AtomicComparer[] comps = getComparators(context);
    GroupIterator mgi = context.getCurrentMergeGroupIterator();
    final XPathContextMajor c1 = context.newContext();
    c1.setCurrentMergeGroupIterator(mgi);
    SequenceIterator<?> inputIterator = getMergedInputIterator(context, comps, c1);
    // Now perform the merge into a grouped sequence
    inputIterator = new MergeGroupingIterator(inputIterator, getComparer(mergeSources[0].mergeKeyDefinitions, comps), getLastPositionFinder(context));
    // and apply the merging action to each group of duplicate items within this sequence
    c1.setCurrentMergeGroupIterator((GroupIterator) inputIterator);
    XPathContext c3 = c1.newMinorContext();
    c3.trackFocus(inputIterator);
    return new ContextMappingIterator<>(cxt -> getAction().iterate(cxt), c3);
  } catch (XPathException e) {
    e.maybeSetLocation(getLocation());
    throw e;
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

public SequenceIterator<?> iterate(XPathContext context) throws XPathException {
  try {
    AtomicComparer[] comps = getComparators(context);
    GroupIterator mgi = context.getCurrentMergeGroupIterator();
    final XPathContextMajor c1 = context.newContext();
    c1.setCurrentMergeGroupIterator(mgi);
    SequenceIterator<?> inputIterator = getMergedInputIterator(context, comps, c1);
    // Now perform the merge into a grouped sequence
    inputIterator = new MergeGroupingIterator(inputIterator, getComparer(mergeSources[0].mergeKeyDefinitions, comps), getLastPositionFinder(context));
    // and apply the merging action to each group of duplicate items within this sequence
    c1.setCurrentMergeGroupIterator((GroupIterator) inputIterator);
    XPathContext c3 = c1.newMinorContext();
    c3.trackFocus(inputIterator);
    return new ContextMappingIterator<>(cxt -> getAction().iterate(cxt), c3);
  } catch (XPathException e) {
    e.maybeSetLocation(getLocation());
    throw e;
  }
}

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com