public String encodeURI(){
  if (!isWellFormed()) {
    throw new MalformedArtifactIDException(this);
  }
  final StringBuffer uri=new StringBuffer();
  try {
    uri.append(VSTFS_PREFIX);
    uri.append(URLEncoder.encode(tool,URL_ENCODING));
    uri.append(URI_SEPARATOR);
    uri.append(URLEncoder.encode(artifactType,URL_ENCODING));
    uri.append(URI_SEPARATOR);
    uri.append(URLEncoder.encode(toolSpecificId,URL_ENCODING));
  }
 catch (  final UnsupportedEncodingException ex) {
    throw new RuntimeException(ex);
  }
  return uri.toString();
}

public String encodeURI ( ) { if ( ! isWellFormed ( ) ) { throw new MalformedArtifactIDException ( this ) ; } final StringBuffer uri = new StringBuffer ( ) ; try { uri . append ( VSTFS_PREFIX ) ; uri . append ( URLEncoder . encode ( tool , URL_ENCODING ) ) ; uri . append ( URI_SEPARATOR ) ; uri . append ( URLEncoder . encode ( artifactType , URL_ENCODING ) ) ; uri . append ( URI_SEPARATOR ) ; uri . append ( URLEncoder . encode ( toolSpecificId , URL_ENCODING ) ) ; } catch ( final UnsupportedEncodingException ex ) { throw new RuntimeException ( ex ) ; } return uri . toString ( ) ; }
encodes this artifact id as a tfs uri .
