public final class URIUtils extends Object
Modifier and Type | Method and Description |
---|---|
static org.eclipse.core.resources.IFile |
getFile(org.eclipse.emf.common.util.URI uri)
Convert EMF URI to Eclipse file
|
static org.eclipse.core.resources.IFolder |
getFolder(org.eclipse.emf.common.util.URI uri)
Convert EMF URI to Eclipse folder
|
static InputStream |
getInputStream(org.eclipse.emf.common.util.URI uri)
Get an input stream from the given URI.
|
static File |
getJavaFile(org.eclipse.emf.common.util.URI uri)
Get the Java file for a URI
|
static OutputStream |
getOutputStream(org.eclipse.emf.common.util.URI uri)
Get an output stream from the given URI.
|
static org.eclipse.emf.common.util.URI |
getRelativePath(org.eclipse.emf.common.util.URI uri,
org.eclipse.emf.common.util.URI relativeTo)
Get the relative path of a
URI w.r.t. |
static org.eclipse.emf.common.util.URI |
getURI(File file)
Convert a file name to an EMF URI
|
static org.eclipse.emf.common.util.URI |
getURI(org.eclipse.core.runtime.IPath path)
Create an EMF URI from an Eclipse path
|
static org.eclipse.emf.common.util.URI |
getURI(org.eclipse.core.resources.IResource file)
Convert Eclipse resource to EMF URI
|
static org.eclipse.emf.common.util.URI |
getURI(String fileName)
Convert a file name to an EMF URI
|
static org.eclipse.emf.common.util.URI |
getURI(URL url)
Get EMF URI from Java URL
|
static URL |
getURL(org.eclipse.emf.common.util.URI uri)
Get Java URL from EMF URI
|
static String |
incrementVersionSegment(String segment)
Increment the first part of a version number in a URI segment, as might
be in a package namespace URI, if it appears to contain a version number.
|
static org.eclipse.core.resources.IFile |
replaceExtension(org.eclipse.core.resources.IFile file,
String ext)
Replace extension of a file
|
static org.eclipse.emf.common.util.URI |
replaceExtension(org.eclipse.emf.common.util.URI uri,
String ext)
Replace extension of a EMF URI
|
public static org.eclipse.core.resources.IFile getFile(org.eclipse.emf.common.util.URI uri)
public static org.eclipse.core.resources.IFolder getFolder(org.eclipse.emf.common.util.URI uri)
public static org.eclipse.emf.common.util.URI getURI(org.eclipse.core.resources.IResource file)
public static org.eclipse.emf.common.util.URI getURI(org.eclipse.core.runtime.IPath path)
public static org.eclipse.emf.common.util.URI getURI(String fileName)
fileName
- public static org.eclipse.emf.common.util.URI getURI(File file)
file
- public static URL getURL(org.eclipse.emf.common.util.URI uri)
uri
- EMF URIpublic static org.eclipse.emf.common.util.URI getURI(URL url)
url
- Java URLpublic static org.eclipse.core.resources.IFile replaceExtension(org.eclipse.core.resources.IFile file, String ext)
file
- Fileext
- New extensionpublic static org.eclipse.emf.common.util.URI replaceExtension(org.eclipse.emf.common.util.URI uri, String ext)
uri
- EMF URIext
- New extensionpublic static File getJavaFile(org.eclipse.emf.common.util.URI uri)
uri
- public static InputStream getInputStream(org.eclipse.emf.common.util.URI uri)
InputStream
or null
if no stream could be createdpublic static OutputStream getOutputStream(org.eclipse.emf.common.util.URI uri)
OutputStream
or null
if no stream could be createdpublic static org.eclipse.emf.common.util.URI getRelativePath(org.eclipse.emf.common.util.URI uri, org.eclipse.emf.common.util.URI relativeTo)
URI
w.r.t. another URI
.public static String incrementVersionSegment(String segment)
segment
- an URI segmentsegment
, or just the segment
as is
if it does not appear to be or to contain a discrete a version numberCopyright © 2019. All rights reserved.