org.eclipse.emf.common.util.URI.devicePath()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(136)

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

URI.devicePath介绍

[英]If this is a hierarchical URI with a path, returns a string representation of the path, including the authority and the device component; null otherwise.

If there is no authority, the format of this string is:

device/pathSegment1/pathSegment2...

If there is an authority, it is:

//authority/device/pathSegment1/pathSegment2...

For an archive URI, it's just:

authority/pathSegment1/pathSegment2...

[中]如果这是带有路径的分层URI,则返回路径的字符串表示形式,包括权限和device componentnull否则。
如果没有权限,此字符串的格式为:

device/pathSegment1/pathSegment2...

如果有权威机构,它是:

//authority/device/pathSegment1/pathSegment2...

对于archive URI而言,它只是:

authority/pathSegment1/pathSegment2...

代码示例

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common

@Override
public String devicePath()
{
 return uri.devicePath();
}

代码示例来源:origin: fr.inria.atlanmod.neoemf/neoemf-core

@Override
public String devicePath() {
  return internalUri.devicePath();
}

代码示例来源:origin: atlanmod/NeoEMF

@Override
public String devicePath() {
  return base.devicePath();
}

代码示例来源:origin: org.eclipse/org.eclipse.jem.util

protected URI normalizeFileProtocol(URI aFileUri, String fragment) {
  URI result = null;
  //Make the relative path absolute and return a platform URI.
  String devicePath = aFileUri.devicePath();
  //Test for workspace location.
  if (!devicePath.startsWith(METADATA_LOCATION) &&
    devicePath.startsWith(WORKSPACE_ROOT_LOCATION) && devicePath.length() > WORKSPACE_ROOT_LOCATION.length()) {
    //test for workspace location
    result = normalizeToWorkspaceURI(new Path(devicePath.substring(WORKSPACE_ROOT_LOCATION.length())), fragment);
  } else if (aFileUri.isRelative()) {
    result = normalizeToWorkspaceURI(new Path(aFileUri.toString()), fragment);
  } else {
    result = aFileUri;
  }
  return result;
}

相关文章

微信公众号

最新文章

更多