|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConnectorDescriptor
Describes the properties of a model connector.
This interface is not intended to be implemented by clients.
Model.read(String, String),
Model.write(String, String)| Field Summary | |
|---|---|
static String |
PROPERTY_DIAGRAM_PROVIDER
String property that can be used to support diagrams in doc templates. |
static String |
PROPERTY_SINGLE_THREAD
Boolean property that can be used to tell MDWorkbench the underlying connector does not support multi-threaded environments. |
| Method Summary | |
|---|---|
String |
getClassName()
Returns the implementation class name, subclass of ModelReader or ModelWriter,
which is used to do the job of reading/writing the model. |
MetamodelConfiguration |
getConfiguration()
Returns the configuration from which this connector originates. |
FileExtensionDescriptor |
getDefaultFileExtension()
Returns the default file extension this connector expects to deal with. |
List<FileExtensionDescriptor> |
getFileExtensions()
Returns the registered file extension descriptors. |
ConnectorKind |
getKind()
Returns the connector kind, which describes the type of uri (resource locator) this connector expects. |
Metamodel |
getMetamodel()
Returns the metamodel to which this connector is registered. |
String |
getName()
Returns the connector name. |
Object |
getProperty(String name)
Returns the value mapped to the specified property name. |
Set<String> |
getPropertyNames()
Returns the property names registered to this connector. |
boolean |
isReader()
Determines wheter this connector is meant to read models. |
boolean |
isWriter()
Determines wheter this connector is meant to write models. |
void |
setProperty(String name,
Object value)
Associates the specified value with the specified property name. |
| Methods inherited from interface com.sodius.mdw.core.util.PropertySet |
|---|
getProperty, getProperty, getProperty, getProperty, setProperty, setProperty, setProperty, setProperty |
| Field Detail |
|---|
static final String PROPERTY_SINGLE_THREAD
static final String PROPERTY_DIAGRAM_PROVIDER
DiagramProvider.
DiagramProvider,
Constant Field Values| Method Detail |
|---|
Metamodel getMetamodel()
MetamodelConfiguration getConfiguration()
This configuration may differ from the metamodel's one if the connector is declared externally. If connector related resources are required, always use this configuration rather than the metamodel's one, as you don't necessary have the knowledge of how this connector is declared.
String getName()
This name is expected to be unique for a particular metamodel.
Model.read(String, String),
Model.write(String, String)String getClassName()
ModelReader or ModelWriter,
which is used to do the job of reading/writing the model.
Note : this is an advanced facility that is not needed in regular cases You should not have to consider this property in typical uses, since the model framework will instantiate and configure by itself the implementation class as requested.
ConnectorKind getKind()
boolean isReader()
ModelReader.
A connector descriptor is either a reader or a writer, but not both.
true if this connector descriptor is a model reader, false otherwise.boolean isWriter()
ModelWriter.
A connector descriptor is either a reader or a writer, but not both.
true if this connector descriptor is a model writer, false otherwise.List<FileExtensionDescriptor> getFileExtensions()
Typical use of these extensions is to provide a comprehensive file selection dialog box to the end-user. The file uri passed to the underlying connector is not guaranteed to have one of these extensions.
If the connector does not deal with files, the returned list is likely to be empty but this is not required.
Always check the getKind() to determine the type of uri this connector expects.
FileExtensionDescriptor,
an empty list if no extensions is registered.FileExtensionDescriptorFileExtensionDescriptor getDefaultFileExtension()
Typical use is to select this extension as the default one in a file selection dialog box.
null if not specified.Set<String> getPropertyNames()
These properties may comes from the connector descriptor declaration file.
They also can be set dynamically using setProperty(String, Object).
As the underlying ModelReader or ModelWriter has access to this descriptor,
this can be a facility to pass extra parameters to configure the reader/writer.
getPropertyNames in interface PropertySetObject getProperty(String name)
null if the property is not defined or if it maps to null.
getProperty in interface PropertySetname - the property name
void setProperty(String name,
Object value)
setProperty in interface PropertySetname - the property name.value - the property value (can be null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||