|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl org.eclipse.emf.ecore.resource.impl.URIConverterImpl
ExtensibleURIConverterImpl
instead.
@Deprecated public class URIConverterImpl
A highly functional and extensible URI converter implementation.
This implementation provides seamless transparent Eclipse integration
by supporting the platform:/resource
mechanism both inside of Eclipse and outside of Eclipse.
Furthermore, although the implementation imports
both org.eclipse.core.runtime
and org.eclipse.core.resources
,
and hence requires the Eclipse libraries at development time,
the implementation does not require them at runtime.
Clients of this implementation must be cautious if they wish to maintain this platform neutral behaviour.
Nested Class Summary | |
---|---|
protected class |
URIConverterImpl.Archive
Deprecated. A specialized class for reading from an archive. |
static class |
URIConverterImpl.PlatformResourceOutputStream
Deprecated. @since 2.4; use PlatformResourceURIHandlerImpl.PlatformResourceOutputStream directly. |
static interface |
URIConverterImpl.URIMap
Deprecated. since 2.4 use ExtensibleURIConverterImpl.URIMap instead. |
static class |
URIConverterImpl.WorkbenchHelper
Deprecated. since 2.4; use PlatformResourceURIHandlerImpl.WorkbenchHelper directly. |
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl |
---|
ExtensibleURIConverterImpl.ContentHandlerList, ExtensibleURIConverterImpl.URIHandlerList |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.URIConverter |
---|
URIConverter.Cipher, URIConverter.Readable, URIConverter.ReadableInputStream, URIConverter.Writeable, URIConverter.WriteableOutputStream |
Field Summary | |
---|---|
protected static IWorkspaceRoot |
workspaceRoot
Deprecated. |
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl |
---|
contentHandlers, uriHandlers, uriMap |
Fields inherited from interface org.eclipse.emf.ecore.resource.URIConverter |
---|
ATTRIBUTE_ARCHIVE, ATTRIBUTE_DIRECTORY, ATTRIBUTE_EXECUTABLE, ATTRIBUTE_HIDDEN, ATTRIBUTE_LENGTH, ATTRIBUTE_READ_ONLY, ATTRIBUTE_TIME_STAMP, INSTANCE, NULL_TIME_STAMP, OPTION_REQUESTED_ATTRIBUTES, OPTION_RESPONSE, OPTION_URI_CONVERTER, RESPONSE_TIME_STAMP_PROPERTY, URI_MAP |
Constructor Summary | |
---|---|
URIConverterImpl()
Deprecated. since 2.4; use new ExtensibleURIConverterImpl() instead. |
Method Summary | |
---|---|
protected URIConverterImpl.Archive |
createArchive(URI uri)
Deprecated. |
protected java.io.InputStream |
createArchiveInputStream(URI archiveURI)
Deprecated. Creates an input stream for the archive paths and returns it. |
protected java.io.OutputStream |
createArchiveOutputStream(URI archiveURI)
Deprecated. Creates an output stream for the archive access. |
protected java.io.InputStream |
createEFSInputStream(URI uri)
Deprecated. Creates an input stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it. |
protected java.io.OutputStream |
createEFSOutputStream(URI uri)
Deprecated. Creates an output stream for the URI, assuming it's a URI recognized by the Eclipse File System, and returns it. |
protected java.io.InputStream |
createFileInputStream(java.lang.String filePath)
Deprecated. Creates an input stream for the file path and returns it. |
protected java.io.OutputStream |
createFileOutputStream(java.lang.String filePath)
Deprecated. Creates an output stream for the file path and returns it. |
java.io.InputStream |
createInputStream(URI uri)
Deprecated. Creates an input stream for the URI and returns it. |
java.io.InputStream |
createInputStream(URI uri,
java.util.Map<?,?> options)
Deprecated. Creates an input stream for the URI and returns it. |
java.io.OutputStream |
createOutputStream(URI uri)
Deprecated. Creates an output stream for the URI and returns it. |
java.io.OutputStream |
createOutputStream(URI uri,
java.util.Map<?,?> options)
Deprecated. Creates an output stream for the URI and returns it. |
protected java.io.InputStream |
createPlatformResourceInputStream(java.lang.String platformResourcePath)
Deprecated. Creates an input stream for the platform resource path and returns it. |
protected java.io.OutputStream |
createPlatformResourceOutputStream(java.lang.String platformResourcePath)
Deprecated. Creates an output stream for the platform resource path and returns it. |
protected java.io.InputStream |
createURLInputStream(URI uri)
Deprecated. Creates an input stream for the URI, assuming it's a URL, and returns it. |
protected java.io.OutputStream |
createURLOutputStream(URI uri)
Deprecated. Creates an output stream for the URI, assuming it's a URL, and returns it. |
protected URIConverterImpl.URIMap |
getInternalURIMap()
Deprecated. since 2.4; there should be no need to call this method directly so use ExtensibleURIConverterImpl.getURIMap() instead. |
protected boolean |
isArchiveScheme(java.lang.String scheme)
Deprecated. Returns whether the scheme is one that this implementation should treat as an archive. |
protected boolean |
isEFSScheme(java.lang.String scheme)
Deprecated. Returns whether the scheme is one that this implementation should treat as a supported Eclipse File System scheme. |
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl |
---|
contentDescription, delete, exists, getAttributes, getContentHandlers, getURIHandler, getURIHandlers, getURIMap, normalize, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated protected static IWorkspaceRoot workspaceRoot
Constructor Detail |
---|
@Deprecated public URIConverterImpl()
ExtensibleURIConverterImpl()
instead.
Method Detail |
---|
protected boolean isArchiveScheme(java.lang.String scheme)
true
when the scheme is "archive"
.
scheme
- the scheme to consider.
protected boolean isEFSScheme(java.lang.String scheme)
scheme
- the scheme to consider.
public java.io.OutputStream createOutputStream(URI uri) throws java.io.IOException
This implementation normalizes
the URI and uses that as the basis for further processing.
A file-based
URI is converted
to a file path, e.g.,
file:///C:/directory/file -> C:/directory/fileand is delegated to
createFileOutputStream
.
An archive-based
URI is delegated to createArchiveOutputStream
.
A platform-based
URI is converted
to a platform path
by trimming the leading platform:/resource
, e.g.,
platform:/resource/project/directory/file -> /project/directory/fileand is delegated to
createPlatformResourceOutputStream
.
An EFS-based
URI is delegated to createEFSOutputStream
.
And all other cases are handled as standard URLs by createURLOutputStream
.
createOutputStream
in interface URIConverter
createOutputStream
in class ExtensibleURIConverterImpl
java.io.IOException
- if there is a problem obtaining an open output stream.URIConverter.createOutputStream(URI, Map)
public java.io.OutputStream createOutputStream(URI uri, java.util.Map<?,?> options) throws java.io.IOException
URIConverter
It normalizes
the URI and uses that as the basis for further processing.
Special requirements, such as an Eclipse file refresh,
are handled by the default implementation
.
createOutputStream
in interface URIConverter
createOutputStream
in class ExtensibleURIConverterImpl
uri
- the URI for which to create the output stream.options
- a map of options to influence the kind of stream that is returned; unrecognized options are ignored and null
is permitted.
java.io.IOException
- if there is a problem obtaining an open output stream.protected java.io.OutputStream createFileOutputStream(java.lang.String filePath) throws java.io.IOException
This implementation allocates a FileOutputStream
and creates subdirectories as necessary.
java.io.IOException
- if there is a problem obtaining an open output stream.protected java.io.OutputStream createArchiveOutputStream(URI archiveURI) throws java.io.IOException
java.io.IOException
- if there is a problem obtaining an open output stream.protected java.io.OutputStream createPlatformResourceOutputStream(java.lang.String platformResourcePath) throws java.io.IOException
This implementation does one of two things, depending on the runtime environment.
If there is an Eclipse workspace, it delegates to
WorkbenchHelper.createPlatformResourceOutputStream
,
which gives the expected Eclipse behaviour.
Otherwise, the resolved
URI
is delegated to createOutputStream
for recursive processing.
java.io.IOException
- if there is a problem obtaining an open output stream or a valid interpretation of the path.EcorePlugin.resolvePlatformResourcePath(String)
protected java.io.OutputStream createEFSOutputStream(URI uri) throws java.io.IOException
java.io.IOException
- if there is a problem obtaining an open output stream.protected java.io.OutputStream createURLOutputStream(URI uri) throws java.io.IOException
java.io.IOException
- if there is a problem obtaining an open output stream.public java.io.InputStream createInputStream(URI uri) throws java.io.IOException
This implementation normalizes
the URI and uses that as the basis for further processing.
A file-based
URI is converted
to a file path, e.g.,
file:///C:/directory/file -> C:/directory/fileand is delegated to
createFileInputStream
.
An archive-based
URI is delegated to createArchiveInputStream
.
A platform-based
URI is converted
to a platform path
by trimming the leading platform:/resource
, e.g.,
platform:/resource/project/directory/file -> /project/directory/fileand is delegated to
createPlatformResourceInputStream
.
An EFS-based
URI is delegated to createEFSInputStream
.
And all other cases are handled as standard URLs by createURLInputStream
.
createInputStream
in interface URIConverter
createInputStream
in class ExtensibleURIConverterImpl
uri
- the URI for which to create the input stream.
java.io.IOException
- if there is a problem obtaining an open input stream.URIConverter.createInputStream(URI, Map)
public java.io.InputStream createInputStream(URI uri, java.util.Map<?,?> options) throws java.io.IOException
URIConverter
It normalizes
the URI and uses that as the basis for further processing.
Special requirements, such as an Eclipse file refresh,
are handled by the default implementation
.
createInputStream
in interface URIConverter
createInputStream
in class ExtensibleURIConverterImpl
uri
- the URI for which to create the input stream.options
- a map of options to influence the kind of stream that is returned; unrecognized options are ignored and null
is permitted.
java.io.IOException
- if there is a problem obtaining an open input stream.protected java.io.InputStream createFileInputStream(java.lang.String filePath) throws java.io.IOException
This implementation allocates a FileInputStream
.
java.io.IOException
- if there is a problem obtaining an open input stream.protected URIConverterImpl.Archive createArchive(URI uri)
protected java.io.InputStream createArchiveInputStream(URI archiveURI) throws java.io.IOException
URIConverterImpl.Archive
to implement read access.
java.io.IOException
- if there is a problem obtaining an open input stream.protected java.io.InputStream createPlatformResourceInputStream(java.lang.String platformResourcePath) throws java.io.IOException
This implementation does one of two things, depending on the runtime environment.
If there is an Eclipse workspace, it delegates to
WorkbenchHelper.createPlatformResourceInputStream
,
which gives the expected Eclipse behaviour.
Otherwise, the resolved
URI
is delegated to createInputStream
for recursive processing.
java.io.IOException
- if there is a problem obtaining an open input stream or a valid interpretation of the path.EcorePlugin.resolvePlatformResourcePath(String)
protected java.io.InputStream createEFSInputStream(URI uri) throws java.io.IOException
java.io.IOException
- if there is a problem obtaining an open input stream.protected java.io.InputStream createURLInputStream(URI uri) throws java.io.IOException
java.io.IOException
- if there is a problem obtaining an open input stream.@Deprecated protected URIConverterImpl.URIMap getInternalURIMap()
ExtensibleURIConverterImpl.getURIMap()
instead.
getInternalURIMap
in class ExtensibleURIConverterImpl
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |