@ParametersAreNonnullByDefault public abstract class AbstractUriFactory extends Object implements UriFactory
UriFactory that manages the assembly and the construction of URIs.| 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, waitcreateScheme, forName, forSchemeprotected 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)
UriFactoryuri.
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 UriFactoryuri - the base file-based URI@Nonnull public org.eclipse.emf.common.util.URI createLocalUri(File file)
UriFactoryfile descriptor.createLocalUri in interface UriFactoryfile - the File to build a URI from@Nonnull public org.eclipse.emf.common.util.URI createLocalUri(String filePath)
UriFactoryfile descriptor.createLocalUri in interface UriFactoryfilePath - 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)
UriFactoryhost, port, and model by creating a hierarchical URI that
references the distant model resource.createRemoteUri in interface UriFactoryhost - 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)
UriFactoryhost, port, and model by creating a hierarchical URI that
references the distant model resource.createRemoteUri in interface UriFactoryhost - 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)
UriFactoryhost, port, and model by creating a hierarchical URI that
references the distant model resource.createRemoteUri in interface UriFactoryhost - 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)
UriFactoryhost, port, and model by creating a hierarchical URI that
references the distant model resource.createRemoteUri in interface UriFactoryhost - 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.