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

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

本文整理了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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. /**
  2. * Construct a new URI that does not follow the generic URI syntax.
  3. * Only the scheme and scheme-specific part (stored as the path) are
  4. * initialized.
  5. *
  6. * @param p_scheme the URI scheme (cannot be null or empty)
  7. * @param p_schemeSpecificPart the scheme-specific part (cannot be
  8. * null or empty)
  9. *
  10. * @throws MalformedURIException if p_scheme violates any
  11. * syntax rules
  12. */
  13. public URI(String p_scheme, String p_schemeSpecificPart)
  14. throws MalformedURIException
  15. {
  16. if (p_scheme == null || p_scheme.trim().length() == 0)
  17. {
  18. throw new MalformedURIException(
  19. "Cannot construct URI with null/empty scheme!");
  20. }
  21. if (p_schemeSpecificPart == null
  22. || p_schemeSpecificPart.trim().length() == 0)
  23. {
  24. throw new MalformedURIException(
  25. "Cannot construct URI with null/empty scheme-specific part!");
  26. }
  27. setScheme(p_scheme);
  28. setPath(p_schemeSpecificPart);
  29. }

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

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

  1. setPort(p_port);
  2. setUserinfo(p_userinfo);
  3. setPath(p_path);
  4. setQueryString(p_queryString);
  5. setFragment(p_fragment);

相关文章