gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-20 19:39:40 27 4
gpt4 key购买 nike

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

XPathContextMajor.getController介绍

暂无

代码示例

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

/**
 * Set an object that will be used to resolve URIs used in
 * fn:unparsed-text() and related functions.
 *
 * @param resolver An object that implements the UnparsedTextURIResolver interface, or
 *                 null.
 * @since 9.5
 */
public void setUnparsedTextURIResolver(UnparsedTextURIResolver resolver) {
  contextObject.getController().setUnparsedTextURIResolver(resolver);
}

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

/**
 * Get the collection finder associated with this configuration. This is used to dereference
 * collection URIs used in the fn:collection and fn:uri-collection functions
 *
 * @return the CollectionFinder to be used
 * @since 9.7
 */
public CollectionFinder getCollectionFinder() {
  return contextObject.getController().getCollectionFinder();
}

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

/**
 * Set the collection finder associated with this configuration. This is used to dereference
 * collection URIs used in the fn:collection and fn:uri-collection functions
 *
 * @param cf the CollectionFinder to be used
 * @since 9.7
 */
public void setCollectionFinder(CollectionFinder cf) {
  contextObject.getController().setCollectionFinder(cf);
}

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

/**
 * Get the CollectionURIResolver used for resolving references to collections.
 * If none has been set on the Controller, returns the
 * CollectionURIResolver registered with the Configuration
 *
 * @return the resolver for references to collections
 * @since 9.4
 * @deprecated since 9.7 - use {@link #getCollectionFinder()}
 */
public CollectionURIResolver getCollectionURIResolver() {
  return contextObject.getController().getCollectionURIResolver();
}

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

/**
 * Set the CollectionURIResolver used for resolving collection URIs.
 * Defaults to the CollectionURIResolver registered with the Configuration
 *
 * @param resolver the resolver for references to collections
 * @since 9.4
 * @deprecated since 9.7 - use {@link #setCollectionFinder(CollectionFinder)}
 */
public void setCollectionURIResolver(CollectionURIResolver resolver) {
  contextObject.getController().setCollectionURIResolver(resolver);
}

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

/**
 * Get the URI resolver for unparsed text.
 *
 * @return the user-supplied unparsed text URI resolver if there is one, or the
 * system-defined one otherwise
 * @since 9.5
 */
public UnparsedTextURIResolver getUnparsedTextURIResolver() {
  return contextObject.getController().getUnparsedTextURIResolver();
}

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

/**
 * Get the URI resolver for unparsed text.
 *
 * @return the user-supplied unparsed text URI resolver if there is one, or the
 * system-defined one otherwise
 * @since 9.5
 */
public UnparsedTextURIResolver getUnparsedTextURIResolver() {
  return contextObject.getController().getUnparsedTextURIResolver();
}

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

/**
 * Get the collection finder associated with this configuration. This is used to dereference
 * collection URIs used in the fn:collection and fn:uri-collection functions
 *
 * @return the CollectionFinder to be used
 * @since 9.7
 */
public CollectionFinder getCollectionFinder() {
  return contextObject.getController().getCollectionFinder();
}

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

/**
 * Set an object that will be used to resolve URIs used in
 * fn:unparsed-text() and related functions.
 *
 * @param resolver An object that implements the UnparsedTextURIResolver interface, or
 *                 null.
 * @since 9.5
 */
public void setUnparsedTextURIResolver(UnparsedTextURIResolver resolver) {
  contextObject.getController().setUnparsedTextURIResolver(resolver);
}

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

/**
 * Set the CollectionURIResolver used for resolving collection URIs.
 * Defaults to the CollectionURIResolver registered with the Configuration
 *
 * @param resolver the resolver for references to collections
 * @since 9.4
 * @deprecated since 9.7 - use {@link #setCollectionFinder(CollectionFinder)}
 */
public void setCollectionURIResolver(CollectionURIResolver resolver) {
  contextObject.getController().setCollectionURIResolver(resolver);
}

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

/**
 * Get the CollectionURIResolver used for resolving references to collections.
 * If none has been set on the Controller, returns the
 * CollectionURIResolver registered with the Configuration
 *
 * @return the resolver for references to collections
 * @since 9.4
 * @deprecated since 9.7 - use {@link #getCollectionFinder()}
 */
public CollectionURIResolver getCollectionURIResolver() {
  return contextObject.getController().getCollectionURIResolver();
}

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

/**
 * Set the collection finder associated with this configuration. This is used to dereference
 * collection URIs used in the fn:collection and fn:uri-collection functions
 *
 * @param cf the CollectionFinder to be used
 * @since 9.7
 */
public void setCollectionFinder(CollectionFinder cf) {
  contextObject.getController().setCollectionFinder(cf);
}

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

/**
 * Get the current mode.
 *
 * @return the current mode. May return null if the current mode is the default mode.
 */
public Component.M getCurrentMode() {
  Component.M m = currentMode;
  if (m == null) {
    RuleManager rm = getController().getRuleManager();
    if (rm != null) {
      return rm.getUnnamedMode().getDeclaringComponent();
    } else {
      return null;
    }
  } else {
    return m;
  }
}

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

/**
 * Get the current mode.
 *
 * @return the current mode. May return null if the current mode is the default mode.
 */
public Component.M getCurrentMode() {
  Component.M m = currentMode;
  if (m == null) {
    RuleManager rm = getController().getRuleManager();
    if (rm != null) {
      return rm.getUnnamedMode().getDeclaringComponent();
    } else {
      return null;
    }
  } else {
    return m;
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Get the Base URI for the node, that is, the URI used for resolving a relative URI contained
 * in the node. This will be the same as the System ID unless xml:base has been used.
 *
 * @return the base URI of the node
 */
public String getBaseURI() {
  if (node == null) {
    // the base URI of a constructed parentless document or element node is the static base URI of the
    // instruction/expression that created it
    PipelineConfiguration pipe = savedXPathContext.getController().makePipelineConfiguration();
    return pipe.getLocationProvider().getSystemId(instruction.getLocationId());
  } else {
    return node.getBaseURI();
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
 * Get the Base URI for the node, that is, the URI used for resolving a relative URI contained
 * in the node. This will be the same as the System ID unless xml:base has been used.
 *
 * @return the base URI of the node
 */
public String getBaseURI() {
  if (node == null) {
    // the base URI of a constructed parentless document or element node is the static base URI of the
    // instruction/expression that created it
    PipelineConfiguration pipe = savedXPathContext.getController().makePipelineConfiguration();
    return pipe.getLocationProvider().getSystemId(instruction.getLocationId());
  } else {
    return node.getBaseURI();
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Get a PullProvider that delivers the stream of events corresponding to the tree rooted at this virtual node
 * @return the PullProvider for the events in the virtual tree
 */
public PullProvider getPuller() {
  if (node == null) {
    VirtualTreeWalker walker = new VirtualTreeWalker(instruction, savedXPathContext);
    walker.setPipelineConfiguration(savedXPathContext.getController().makePipelineConfiguration());
    walker.setNameCode(getNameCode());
    return walker;
  } else {
    return TreeWalker.makeTreeWalker(node);
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
 * Get a PullProvider that delivers the stream of events corresponding to the tree rooted at this virtual node
 * @return the PullProvider for the events in the virtual tree
 */
public PullProvider getPuller() {
  if (node == null) {
    VirtualTreeWalker walker = new VirtualTreeWalker(instruction, savedXPathContext);
    walker.setPipelineConfiguration(savedXPathContext.getController().makePipelineConfiguration());
    walker.setNameCode(getNameCode());
    return walker;
  } else {
    return TreeWalker.makeTreeWalker(node);
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
 * Evaluate the variable. That is,
 * get the value of the select expression if present or the content
 * of the element otherwise, either as a tree or as a sequence
*/
public ValueRepresentation getSelectValue(XPathContext context) throws XPathException {
  if (select==null) {
    throw new AssertionError("*** No select expression for global variable $" +
        getVariableQName().getDisplayName() + "!!");
  } else {
    XPathContextMajor c2 = context.newCleanContext();
    c2.setOrigin(this);
    UnfailingIterator initialNode =
        SingletonIterator.makeIterator(c2.getController().getContextForGlobalVariables());
    initialNode.next();
    c2.setCurrentIterator(initialNode);
    if (stackFrameMap != null) {
      c2.openStackFrame(stackFrameMap);
    }
    return ExpressionTool.evaluate(select, evaluationMode, c2, referenceCount);
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
 * Evaluate the variable. That is,
 * get the value of the select expression if present or the content
 * of the element otherwise, either as a tree or as a sequence
*/
public ValueRepresentation getSelectValue(XPathContext context) throws XPathException {
  if (select==null) {
    throw new AssertionError("*** No select expression for global variable $" +
        getVariableQName().getDisplayName() + "!!");
  } else {
    XPathContextMajor c2 = context.newCleanContext();
    c2.setOrigin(this);
    UnfailingIterator initialNode =
        SingletonIterator.makeIterator(c2.getController().getContextForGlobalVariables());
    initialNode.next();
    c2.setCurrentIterator(initialNode);
    if (stackFrameMap != null) {
      c2.openStackFrame(stackFrameMap);
    }
    return ExpressionTool.evaluate(select, evaluationMode, c2, referenceCount);
  }
}

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