gpt4 book ai didi

org.apache.openjpa.lib.xml.XMLFactory.factoryIndex()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 16:19:05 25 4
gpt4 key购买 nike

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

XMLFactory.factoryIndex介绍

[英]Return the array index of the factory with the given properties.
[中]返回具有给定属性的工厂数组索引。

代码示例

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return a DocumentBuilder with the specified configuration.
 */
public static DocumentBuilder getDOMParser(boolean validating,
  boolean namespaceAware) {
  DocumentBuilder db;
  try {
    db = _domFactories[factoryIndex(validating, namespaceAware)].
      newDocumentBuilder();
  } catch (ParserConfigurationException pce) {
    throw new RuntimeException(pce);
  }
  if (validating)
    db.setErrorHandler(_validating);
  return db;
}

代码示例来源:origin: org.apache.openjpa/openjpa-lib

/**
 * Return a DocumentBuilder with the specified configuration.
 */
public static DocumentBuilder getDOMParser(boolean validating,
  boolean namespaceAware) {
  DocumentBuilder db;
  try {
    db = _domFactories[factoryIndex(validating, namespaceAware)].
      newDocumentBuilder();
  } catch (ParserConfigurationException pce) {
    throw new RuntimeException(pce);
  }
  if (validating)
    db.setErrorHandler(_validating);
  return db;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Return a DocumentBuilder with the specified configuration.
 */
public static DocumentBuilder getDOMParser(boolean validating,
  boolean namespaceAware) {
  DocumentBuilder db;
  try {
    db = _domFactories[factoryIndex(validating, namespaceAware)].
      newDocumentBuilder();
  } catch (ParserConfigurationException pce) {
    throw new NestableRuntimeException(pce);
  }
  if (validating)
    db.setErrorHandler(_validating);
  return db;
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Return a SAXParser with the specified configuration.
 */
public static SAXParser getSAXParser(boolean validating,
  boolean namespaceAware) {
  SAXParser sp;
  try {
    sp = _saxFactories[factoryIndex(validating, namespaceAware)].
      newSAXParser();
  } catch (ParserConfigurationException pce) {
    throw new RuntimeException(pce);
  } catch (SAXException se) {
    throw new RuntimeException(se);
  }
  if (validating) {
    try {
      sp.getXMLReader().setErrorHandler(_validating);
    } catch (SAXException se) {
      throw new RuntimeException(se);
    }
  }
  return sp;
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return a DocumentBuilder with the specified configuration.
 */
public static DocumentBuilder getDOMParser(boolean validating,
  boolean namespaceAware) {
  DocumentBuilder db;
  try {
    db = _domFactories[factoryIndex(validating, namespaceAware)].
      newDocumentBuilder();
  } catch (ParserConfigurationException pce) {
    throw new NestableRuntimeException(pce);
  }
  if (validating)
    db.setErrorHandler(_validating);
  return db;
}

代码示例来源:origin: org.apache.openjpa/openjpa-lib

/**
 * Return a SAXParser with the specified configuration.
 */
public static SAXParser getSAXParser(boolean validating,
  boolean namespaceAware) {
  SAXParser sp;
  try {
    sp = _saxFactories[factoryIndex(validating, namespaceAware)].
      newSAXParser();
  } catch (ParserConfigurationException pce) {
    throw new RuntimeException(pce);
  } catch (SAXException se) {
    throw new RuntimeException(se);
  }
  if (validating) {
    try {
      sp.getXMLReader().setErrorHandler(_validating);
    } catch (SAXException se) {
      throw new RuntimeException(se);
    }
  }
  return sp;
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Return a SAXParser with the specified configuration.
 */
public static SAXParser getSAXParser(boolean validating,
  boolean namespaceAware) {
  SAXParser sp;
  try {
    sp = _saxFactories[factoryIndex(validating, namespaceAware)].
      newSAXParser();
  } catch (ParserConfigurationException pce) {
    throw new NestableRuntimeException(pce);
  } catch (SAXException se) {
    throw new NestableRuntimeException(se);
  }
  if (validating) {
    try {
      sp.getXMLReader().setErrorHandler(_validating);
    } catch (SAXException se) {
      throw new NestableRuntimeException(se);
    }
  }
  return sp;
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Return a SAXParser with the specified configuration.
 */
public static SAXParser getSAXParser(boolean validating,
  boolean namespaceAware) {
  SAXParser sp;
  try {
    sp = _saxFactories[factoryIndex(validating, namespaceAware)].
      newSAXParser();
  } catch (ParserConfigurationException pce) {
    throw new NestableRuntimeException(pce);
  } catch (SAXException se) {
    throw new NestableRuntimeException(se);
  }
  if (validating) {
    try {
      sp.getXMLReader().setErrorHandler(_validating);
    } catch (SAXException se) {
      throw new NestableRuntimeException(se);
    }
  }
  return sp;
}

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