gpt4 book ai didi

org.codehaus.stax2.validation.XMLValidationSchema类的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 14:49:05 29 4
gpt4 key购买 nike

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

XMLValidationSchema介绍

[英]Defines the API that validator schema instances have to implement. Schema objects are results of parsing of input that defines validation rules; things like DTD files, W3c Schema input documents and so on. Schema instances can not be directly used for validation; they are blueprints for constructing such validator Objects. Because of this, they are also guaranteed to be thread-safe and reusable. One way to think of this is that schemas are actual validator factories instead of XMLValidationSchemaFactory instances.

One note about creation of validator instances: since the validation may be invoked from wide variety of contexts (from parser, from serializer, from processing pipeline etc), the validation context is abstracted as ValidationContext. Instances may make use of additional knowledge about actual implementing classes if they can safely determine the type runtime, but should gracefully handle the cases where the context is created by a caller that is not part of the same StAX implementation as the validator.
[中]

代码示例

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

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

/**
 * Returns type of schema that was used to construct this
 * validator instance.
 *
 * @return One of external schema identifier values (such as
 *   {@link XMLValidationSchema#SCHEMA_ID_DTD}).
 */
public String getSchemaType() {
  XMLValidationSchema sch = getSchema();
  return (sch == null) ? null : sch.getSchemaType();
}

代码示例来源:origin: woodstox/wstx-asl

/**
 * Returns type of schema that was used to construct this
 * validator instance.
 *
 * @return One of external schema identifier values (such as
 *   {@link XMLValidationSchema#SCHEMA_ID_DTD}).
 */
public String getSchemaType() {
  XMLValidationSchema sch = getSchema();
  return (sch == null) ? null : sch.getSchemaType();
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

代码示例来源:origin: woodstox/wstx-lgpl

/**
 * Returns type of schema that was used to construct this
 * validator instance.
 *
 * @return One of external schema identifier values (such as
 *   {@link XMLValidationSchema#SCHEMA_ID_DTD}).
 */
public String getSchemaType() {
  XMLValidationSchema sch = getSchema();
  return (sch == null) ? null : sch.getSchemaType();
}

代码示例来源:origin: FasterXML/woodstox

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: Nextdoor/bender

/**
 * Returns type of schema that was used to construct this
 * validator instance.
 *
 * @return One of external schema identifier values (such as
 *   {@link XMLValidationSchema#SCHEMA_ID_DTD}).
 */
public String getSchemaType() {
  XMLValidationSchema sch = getSchema();
  return (sch == null) ? null : sch.getSchemaType();
}

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

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: woodstox/wstx-lgpl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: woodstox/wstx-asl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: Nextdoor/bender

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  /* Should we first check if we maybe already have a validator
   * for the schema?
   */
  return addValidator(schema.createValidator(this));
}

代码示例来源:origin: woodstox/wstx-asl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

代码示例来源:origin: FasterXML/aalto-xml

@Override
public XMLValidator validateAgainst(XMLValidationSchema schema) throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (_validator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    _cfgCheckStructure = true;
    _cfgCheckAttrs = true;
    _validator = vld;
  } else {
    _validator = new ValidatorPair(_validator, vld);
  }
  return vld;
}

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

@Override
public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

代码示例来源:origin: com.fasterxml/aalto-xml

@Override
public XMLValidator validateAgainst(XMLValidationSchema schema) throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (_validator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    _cfgCheckStructure = true;
    _cfgCheckAttrs = true;
    _validator = vld;
  } else {
    _validator = new ValidatorPair(_validator, vld);
  }
  return vld;
}

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

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

代码示例来源:origin: woodstox/wstx-lgpl

public XMLValidator validateAgainst(XMLValidationSchema schema)
  throws XMLStreamException
{
  XMLValidator vld = schema.createValidator(this);
  if (mValidator == null) {
    /* Need to enable other validation modes? Structural validation
     * should always be done when we have other validators as well,
     * as well as attribute uniqueness checks.
     */
    mCheckStructure = true;
    mCheckAttrs = true;
    mValidator = vld;
  } else {
    mValidator = new ValidatorPair(mValidator, vld);
  }
  return vld;
}

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