@ParametersAreNonnullByDefault public abstract class AbstractUriFactory extends Object implements UriFactory
UriFactory
that manages the assembly and the construction of URI
s.Modifier | Constructor and Description |
---|---|
protected |
AbstractUriFactory(boolean supportsLocal,
boolean supportsRemote)
Constructs a new default
AbstractUriFactory . |
protected |
AbstractUriFactory(String scheme,
boolean supportsLocal,
boolean supportsRemote)
Constructs a new
AbstractUriFactory with the given scheme . |
Modifier and Type | Method and Description |
---|---|
org.eclipse.emf.common.util.URI |
createLocalUri(File file)
Creates a new URI from the given
file descriptor. |
org.eclipse.emf.common.util.URI |
createLocalUri(String filePath)
Creates a new URI from the given
file descriptor. |
org.eclipse.emf.common.util.URI |
createLocalUri(org.eclipse.emf.common.util.URI uri)
Creates a new URI from the given
uri . |
org.eclipse.emf.common.util.URI |
createRemoteUri(InetAddress host,
int port,
String model)
Creates a new URI from the
host , port , and model by creating a hierarchical URI that
references the distant model resource. |
org.eclipse.emf.common.util.URI |
createRemoteUri(InetAddress host,
int port,
org.eclipse.emf.common.util.URI model)
Creates a new URI from the
host , port , and model by creating a hierarchical URI that
references the distant model resource. |
org.eclipse.emf.common.util.URI |
createRemoteUri(String host,
int port,
String model)
Creates a new URI from the
host , port , and model by creating a hierarchical URI that
references the distant model resource. |
org.eclipse.emf.common.util.URI |
createRemoteUri(String host,
int port,
org.eclipse.emf.common.util.URI model)
Creates a new URI from the
host , port , and model by creating a hierarchical URI that
references the distant model resource. |
protected String |
scheme()
Gets the scheme to identify the
BackendFactory to use. |
protected boolean |
supportsLocalUris()
Checks that the
BackendFactory associated to the created URI supports file-based storage. |
protected boolean |
supportsRemoteUris()
Checks that the
BackendFactory associated to the created URI supports server-based storage. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createScheme, forName, forScheme
protected AbstractUriFactory(boolean supportsLocal, boolean supportsRemote)
AbstractUriFactory
.supportsLocal
- true
if file-based URIs are supportedsupportsRemote
- true
if server-based URIs are supportedprotected AbstractUriFactory(String scheme, boolean supportsLocal, boolean supportsRemote)
AbstractUriFactory
with the given scheme
.scheme
- the scheme to identify the BackendFactory
to usesupportsLocal
- true
if file-based URIs are supportedsupportsRemote
- true
if server-based URIs are supported@Nonnull protected final String scheme()
BackendFactory
to use.URI
schemeprotected boolean supportsLocalUris()
BackendFactory
associated to the created URI
supports file-based storage.true
if file-based URIs are supportedprotected boolean supportsRemoteUris()
BackendFactory
associated to the created URI
supports server-based storage.true
if server-based URIs are supported@Nonnull public org.eclipse.emf.common.util.URI createLocalUri(org.eclipse.emf.common.util.URI uri)
UriFactory
uri
.
This method checks that the scheme of the provided uri
can be used to create a new UriFactory
. Its scheme must be registered in the BackendFactoryRegistry
.
createLocalUri
in interface UriFactory
uri
- the base file-based URI@Nonnull public org.eclipse.emf.common.util.URI createLocalUri(File file)
UriFactory
file
descriptor.createLocalUri
in interface UriFactory
file
- the File
to build a URI from@Nonnull public org.eclipse.emf.common.util.URI createLocalUri(String filePath)
UriFactory
file
descriptor.createLocalUri
in interface UriFactory
filePath
- the path of the File
to build a URI from@Nonnull public org.eclipse.emf.common.util.URI createRemoteUri(String host, int port, org.eclipse.emf.common.util.URI model)
UriFactory
host
, port
, and model
by creating a hierarchical URI that
references the distant model resource.createRemoteUri
in interface UriFactory
host
- the address of the server (use "localhost"
if the server is running locally)port
- the port of the servermodel
- a URI identifying the model in the database@Nonnull public org.eclipse.emf.common.util.URI createRemoteUri(String host, int port, String model)
UriFactory
host
, port
, and model
by creating a hierarchical URI that
references the distant model resource.createRemoteUri
in interface UriFactory
host
- the address of the server (use "localhost"
if the server is running locally)port
- the port of the servermodel
- a string identifying the model in the database@Nonnull public org.eclipse.emf.common.util.URI createRemoteUri(InetAddress host, int port, org.eclipse.emf.common.util.URI model)
UriFactory
host
, port
, and model
by creating a hierarchical URI that
references the distant model resource.createRemoteUri
in interface UriFactory
host
- the address of the server (use "localhost"
if the server is running locally)port
- the port of the servermodel
- a URI identifying the model in the database@Nonnull public org.eclipse.emf.common.util.URI createRemoteUri(InetAddress host, int port, String model)
UriFactory
host
, port
, and model
by creating a hierarchical URI that
references the distant model resource.createRemoteUri
in interface UriFactory
host
- the address of the server (use "localhost"
if the server is running locally)port
- the port of the servermodel
- a string identifying the model in the databaseCopyright © 2013–2019 Atlanmod. All rights reserved.