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

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

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

URI.<init>介绍

[英]Construct a new and uninitialized URI.
[中]构造一个新的未初始化URI。

代码示例

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

代码示例来源:origin: arhs/sd-dss

  1. return true;
  2. final URI baseUri = new URI(baseUriString);
  3. URI uriNew = new URI(baseUri, documentUri);
  4. if (uriNew.getScheme().equals("http")) {

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

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

  1. /**
  2. * Take a SystemID string and try to turn it into a good absolute URI.
  3. *
  4. * @param urlString SystemID string
  5. * @param base The URI string used as the base for resolving the systemID
  6. *
  7. * @return The resolved absolute URI
  8. * @throws TransformerException thrown if the string can't be turned into a URI.
  9. */
  10. public static String getAbsoluteURI(String urlString, String base)
  11. throws TransformerException
  12. {
  13. if (base == null)
  14. return getAbsoluteURI(urlString);
  15. String absoluteBase = getAbsoluteURI(base);
  16. URI uri = null;
  17. try
  18. {
  19. URI baseURI = new URI(absoluteBase);
  20. uri = new URI(baseURI, urlString);
  21. }
  22. catch (MalformedURIException mue)
  23. {
  24. throw new TransformerException(mue);
  25. }
  26. return replaceChars(uri.toString());
  27. }

相关文章