gpt4 book ai didi

javax.xml.xquery.XQDataSource.setProperty()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 20:41:05 25 4
gpt4 key购买 nike

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

XQDataSource.setProperty介绍

[英]Sets the named property to the specified value. If a property with the same name was already set, then this method will override the old value for that property with the new value.

If the implementation does not support the given property or if it can determine that the value given for this property is invalid, then an exception is thrown. If an exception is thrown, then no previous value is overwritten.
[中]将命名属性设置为指定值。如果已设置同名属性,则此方法将用新值覆盖该属性的旧值。
如果实现不支持给定的属性,或者它可以确定为此属性给定的值无效,则会引发异常。如果抛出异常,则不会覆盖以前的值。

代码示例

代码示例来源:origin: dsukhoroslov/bagri

public XQJClientApp(Properties props) throws XQException {
  XQDataSource xqds = new BagriXQDataSource();
  xqds.setProperty(ADDRESS, props.getProperty(pn_schema_address));
  xqds.setProperty(SCHEMA, props.getProperty(pn_schema_name));
  xqds.setProperty(USER, props.getProperty(pn_schema_user));
  xqds.setProperty(PASSWORD, props.getProperty(pn_schema_password));
  xqds.setProperty(XQ_PROCESSOR, "com.bagri.xquery.saxon.XQProcessorClient");
  xqds.setProperty(XDM_REPOSITORY, "com.bagri.client.hazelcast.impl.SchemaRepositoryImpl");
  xqConn = xqds.getConnection();
}

代码示例来源:origin: dsukhoroslov/bagri

protected static XQDataSource initDataSource() throws XQException {
  XQDataSource xqds = new BagriXQDataSource();
  xqds.setProperty(ADDRESS, System.getProperty(pn_schema_address));
  xqds.setProperty(SCHEMA, System.getProperty(pn_schema_name));
  xqds.setProperty(USER, System.getProperty(pn_schema_user));
  xqds.setProperty(PASSWORD, System.getProperty(pn_schema_password));
  xqds.setProperty(XQ_PROCESSOR, "com.bagri.xquery.saxon.XQProcessorClient");
  xqds.setProperty(XDM_REPOSITORY, "com.bagri.client.hazelcast.impl.SchemaRepositoryImpl");
  String value = System.getProperty(pn_client_loginTimeout);
  if (value != null) {
    xqds.setProperty(pn_client_loginTimeout, value);
  }
  value = System.getProperty(pn_client_bufferSize);
  if (value != null) {
    xqds.setProperty(pn_client_bufferSize, value);
  }
  value = System.getProperty(pn_client_connectAttempts);
  if (value != null) {
    xqds.setProperty(pn_client_connectAttempts, value);
  }
  return xqds;
}

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