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

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

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

URI.toString介绍

[英]Get the URI as a string specification. See RFC 2396 Section 5.2.
[中]获取URI作为字符串规范。参见RFC 2396第5.2节。

代码示例

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

if (uriNew.getScheme().equals("http")) {
    LOG.debug("I state that I can resolve '" + uriNew.toString() + "'");
    return true;
  LOG.debug("I state that I can't resolve '" + uriNew.toString() + "'");
} catch (URI.MalformedURIException ex) {
  if (documents == null || documents.size() == 0) {

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

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

/**
 * Take a SystemID string and try to turn it into a good absolute URI.
 *
 * @param urlString SystemID string
 * @param base The URI string used as the base for resolving the systemID
 *
 * @return The resolved absolute URI
 * @throws TransformerException thrown if the string can't be turned into a URI.
 */
public static String getAbsoluteURI(String urlString, String base)
    throws TransformerException
{    
 if (base == null)
  return getAbsoluteURI(urlString);
 
 String absoluteBase = getAbsoluteURI(base);
 URI uri = null;
 try 
 {
  URI baseURI = new URI(absoluteBase);
  uri = new URI(baseURI, urlString);
 }
 catch (MalformedURIException mue)
 {
  throw new TransformerException(mue);
 }
 
 return replaceChars(uri.toString());
}

相关文章