本文整理了Java中org.eclipse.emf.common.util.URI.hasAbsolutePath()
方法的一些代码示例,展示了URI.hasAbsolutePath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URI.hasAbsolutePath()
方法的具体详情如下:
包路径:org.eclipse.emf.common.util.URI
类名称:URI
方法名:hasAbsolutePath
[英]Returns true
if this is a hierarchical URI with an absolute path, or false
if it is non-hierarchical, has no path, or has a relative path.
[中]如果这是具有绝对路径的分层URI,则返回true
,如果它是非分层的、没有路径或具有相对路径,则返回false
。
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common
@Override
public boolean hasAbsolutePath()
{
return uri.hasAbsolutePath();
}
代码示例来源:origin: fr.inria.atlanmod.neoemf/neoemf-core
@Override
public boolean hasAbsolutePath() {
return internalUri.hasAbsolutePath();
}
代码示例来源:origin: atlanmod/NeoEMF
@Override
public boolean hasAbsolutePath() {
return base.hasAbsolutePath();
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
Archive getClassPathArchive(String uri, List archives){
for (int i = 0; i < archives.size(); i++) {
Archive anArchive = (Archive) archives.get(i);
String archiveURIString = anArchive.getURI();
URI archiveURI = URI.createURI(archiveURIString);
boolean hasAbsolutePath = archiveURI.hasAbsolutePath();
if( hasAbsolutePath ){
archiveURIString = archiveURI.lastSegment();
}
if (archiveURIString.equals(uri))
return anArchive;
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected Archive getArchive(String uri, List archives) {
for (int i = 0; i < archives.size(); i++) {
Archive anArchive = (Archive) archives.get(i);
String archiveURIString = anArchive.getURI();
URI archiveURI = URI.createURI(archiveURIString);
boolean hasAbsolutePath = archiveURI.hasAbsolutePath();
if( hasAbsolutePath ){
archiveURIString = archiveURI.lastSegment();
}
if (archiveURIString.equals(uri))
return anArchive;
}
return null;
}
代码示例来源:origin: org.eclipse/xtext
public URI findResourceOnClasspath(ClassLoader classLoader, URI classpathUri) throws URISyntaxException {
String pathAsString = classpathUri.path();
if (classpathUri.hasAbsolutePath()) {
pathAsString = pathAsString.substring(1);
}
URL resource = classLoader.getResource(pathAsString);
if (resource==null)
throw new FileNotFoundOnClasspathException("Couldn't find resource on classpath. URI was '"+classpathUri+"'");
URI fileUri = URI.createURI(resource.toString(),true);
return fileUri.appendFragment(classpathUri.fragment());
}
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore
if (result.hasAbsolutePath())
if (result.hasAbsolutePath())
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore
if (result.hasAbsolutePath())
if (result.hasAbsolutePath())
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common
newAbsolutePath = base.hasAbsolutePath();
newSegments = base.rawSegments();
newQuery = base.query();
newAbsolutePath = base.hasAbsolutePath() || !hasEmptyPath();
newSegments = newAbsolutePath ? mergePath(base, preserveRootParents) : NO_SEGMENTS;
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.common
if (scheme != oldPrefix.scheme() || authority != oldPrefix.authority() || device != oldPrefix.device() || hasAbsolutePath() != oldPrefix.hasAbsolutePath())
return POOL.intern(false, URIPool.URIComponentsAccessUnit.VALIDATE_NONE, true, newPrefix.scheme(), newPrefix.authority(), newPrefix.device(), newPrefix.hasAbsolutePath(), mergedSegments, query);
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected ClasspathElement createElement(Archive referencingArchive, Archive referencedArchive, String cpEntry) {
ClasspathElement element = new ClasspathElement(referencingArchive);
element.setValid(true);
String uriString = referencedArchive.getURI();
URI uri = URI.createURI(uriString);
boolean hasAbsolutePath = uri.hasAbsolutePath();
if( hasAbsolutePath ){
uriString = uri.lastSegment();
}
//element.setText(referencedArchive.getURI());
element.setText(uriString);
element.setTargetArchive(referencedArchive);
element.setEarProject(earProject);
if( earComponent != null ){
IContainer earConentFolder = earComponent.getRootFolder().getUnderlyingFolder();
if( earConentFolder.getType() == IResource.FOLDER ){
element.setEarContentFolder( earConentFolder.getName());
}else {
element.setEarContentFolder( "" );
}
}
setProjectValues(element, referencedArchive);
if (cpEntry != null)
element.setValuesSelected(cpEntry);
setType(element, referencedArchive);
return element;
}
内容来源于网络,如有侵权,请联系作者删除!