org.apache.xml.utils.URI.setPath()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(10.8k)|赞(0)|评价(0)|浏览(178)

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

URI.setPath介绍

[英]Set the path for this URI. If the supplied path is null, then the query string and fragment are set to null as well. If the supplied path includes a query string and/or fragment, these fields will be parsed and set as well. Note that, for URIs following the "generic URI" syntax, the path specified should start with a slash. For URIs that do not follow the generic URI syntax, this method sets the scheme-specific part.
[中]设置此URI的路径。如果提供的路径为null,那么查询字符串和片段也将设置为null。如果提供的路径包含查询字符串和/或片段,那么这些字段也将被解析和设置。请注意,对于遵循“通用URI”语法的URI,指定的路径应该以斜杠开头。对于不遵循通用URI语法的URI,此方法设置特定于方案的部分。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: xalan/xalan

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: robovm/robovm

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: xalan/xalan

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: ibinti/bugvm

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

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

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

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

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Construct a new URI that does not follow the generic URI syntax.
 * Only the scheme and scheme-specific part (stored as the path) are
 * initialized.
 *
 * @param p_scheme the URI scheme (cannot be null or empty)
 * @param p_schemeSpecificPart the scheme-specific part (cannot be
 *                             null or empty)
 *
 * @throws MalformedURIException if p_scheme violates any
 *                                  syntax rules
 */
public URI(String p_scheme, String p_schemeSpecificPart)
    throws MalformedURIException
{
 if (p_scheme == null || p_scheme.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme!");
 }
 if (p_schemeSpecificPart == null
     || p_schemeSpecificPart.trim().length() == 0)
 {
  throw new MalformedURIException(
   "Cannot construct URI with null/empty scheme-specific part!");
 }
 setScheme(p_scheme);
 setPath(p_schemeSpecificPart);
}

代码示例来源:origin: MobiVM/robovm

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: ibinti/bugvm

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

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

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

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

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: com.gluonhq/robovm-rt

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

setPort(p_port);
setUserinfo(p_userinfo);
setPath(p_path);
setQueryString(p_queryString);
setFragment(p_fragment);

相关文章