public interface EAResource
This resource encapsulates a conversion from EA models stored in eap files to other types of models. Hence, the
contents of this resource will be elements which are created by extensions implementing EA
Content Factories
.
OPTION_READONLY
and please know what
you are doing ;-).Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EA_CONTENT_FACTORY
Load option that determines via the content factory id which
IEAContentFactory shall be used. |
static java.lang.String |
EA_CONTENT_FACTORY_EXTENSION_ID
Extension point ID for
EA content factories . |
static java.lang.String |
EA_ERROR_MARKER_TYPE
The error marker for EA resources.
|
static java.lang.String |
EA_LANGUAGES_EXTENSION_ID
Extension point ID for providing EA primitive type languages.
|
static java.lang.String |
EA_PREFERENCES_NODE
The qualifier for the EA Resource preferences.
|
static java.lang.String |
EA_RESOURCE_ADAPTER_EXTENSION_ID
Extension point ID for
resource adapters that will be added to the resource by the EA resource
factory. |
static java.lang.String |
EA_SPECIFICS_SOURCE
Source attribute of all
EAnnotation s that contain EA-specific properties that do not exist in UML. |
static java.lang.String |
FILE_EXTENSION
Main file extension for this resource.
|
static java.lang.String |
FILE_EXTENSION_EAPX
Secondary file extension for this resource.
|
static java.util.List<java.lang.String> |
FILE_EXTENSIONS
All supported file extensions for this resource.
|
static java.lang.String |
GUID_PROVIDER_EXTENSION_ID
Extension point ID for providing new GUIDs.
|
static java.lang.String |
OPTION_ABORT_ON_FIRST_ERROR
This load option specifies how the resource should behave in case of invalid EA models.
|
static java.lang.Boolean |
OPTION_ABORT_ON_FIRST_ERROR_DEFAULT |
static java.lang.String |
OPTION_DB_DRIVER
Load option to explicitly set the database driver to be used for accessing the EA database.
|
static java.lang.String |
OPTION_DUPLICATE_TAGGED_VALUE_KEYS
Whether or not to allow loading tagged values with duplicate keys.
|
static java.lang.Boolean |
OPTION_DUPLICATE_TAGGED_VALUE_KEYS_DEFAULT |
static java.lang.String |
OPTION_GUID_PROVIDER
The EA uses globally unique identifiers (GUIDs) for each model element in the database.
|
static java.lang.String |
OPTION_PASSWORD
Load option for EA models: if the database is password protected, the user name and password may be provided as
load options
OPTION_USERNAME and OPTION_PASSWORD . |
static java.lang.String |
OPTION_PASSWORD_DEFAULT |
static java.lang.String |
OPTION_PROGRESS_MONITOR
Load option for showing progress on long-term operations such as loading, adding, or deleting many elements.
|
static java.lang.String |
OPTION_READONLY
Load option for accessing EA models readonly or not.
|
static java.lang.Boolean |
OPTION_READONLY_DEFAULT |
static java.lang.String |
OPTION_RELOAD_ONLY_ON_HASH_CHANGE
If a model is loaded with the EA-Bridge and in the meantime it is externally modified, e.g. with the Enterprise
Architect, then the workspace file is
refreshed . |
static java.lang.Boolean |
OPTION_RELOAD_ONLY_ON_HASH_CHANGE_DEFAULT |
static java.lang.String |
OPTION_REPORT_AS_RESOURCE_MARKERS
If this option is set and
OPTION_ABORT_ON_FIRST_ERROR is false (which is the default case),
all loading errors (no saving errors!) |
static java.lang.Boolean |
OPTION_REPORT_AS_RESOURCE_MARKERS_DEFAULT |
static java.lang.String |
OPTION_REPORT_TO_ERROR_LOG
If this option is set and
OPTION_ABORT_ON_FIRST_ERROR is true , all loading and saving
errors are reported to the Eclipse error log and shown in the UI via the ErrorLog view. |
static java.lang.Boolean |
OPTION_REPORT_TO_ERROR_LOG_DEFAULT |
static java.lang.String |
OPTION_TAGGED_VALUE_NOTES
Load option for tagged value notes: if enabled, then tagged value notes will be loaded into a separate
EAnnotation with source TAG_NOTE_URI . |
static boolean |
OPTION_TAGGED_VALUE_NOTES_DEFAULT |
static java.lang.String |
OPTION_USERNAME
Load option for EA models: if the database is password protected, the user name and password may be provided as
load options
OPTION_USERNAME and OPTION_PASSWORD . |
static java.lang.String |
OPTION_USERNAME_DEFAULT |
static java.util.regex.Pattern |
PATTERN_GUID
The pattern that matches GUIDs that are surrounded with curly brackets (which may be escaped).
|
static java.lang.String |
TAG_NOTE_URI
The Enterprise Architect allows to specify 'Notes' for tagged values.
|
static java.lang.String |
TAG_URI
This URI should be used for
EAnnotation s in EMF models whenever EA tagged values are read from or stored
in EA-databases. |
static java.util.regex.Pattern |
URI_FRAGMENT_PATTERN_GUID
Alternative and more general pattern for URI fragments for proxies:
(contentFactoryId)_(guid) . |
static java.util.regex.Pattern |
URI_FRAGMENT_PATTERN_ID
Pattern for URI fragments for proxies:
(contentFactoryId)_(eaObjectType)_(eaObjectId)
Possible values for EAObjectType are: package, element, operation, attribute, connector . |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Object,java.lang.Object> |
getDefaultLoadOptions()
Returns the map of options that, in addition to the overriding options specified during load, are used to to
control load behavior.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getDefaultSaveOptions()
Returns the map of options that, in addition to the overriding options specified during save, are used to to
control save behavior.
|
boolean |
isReadonly() |
void |
setURI(URI uri)
Sets the URI of this resource.
|
static final java.lang.String FILE_EXTENSION
static final java.lang.String FILE_EXTENSION_EAPX
static final java.util.List<java.lang.String> FILE_EXTENSIONS
static final java.lang.String EA_PREFERENCES_NODE
static final java.lang.String OPTION_READONLY
Boolean.TRUE
or
Boolean.FALSE
. This option overwrites the preference setting (see IEAPreferencesConstants
for
details).
Default is Boolean.TRUE
.
static final java.lang.Boolean OPTION_READONLY_DEFAULT
static final java.lang.String OPTION_USERNAME
OPTION_USERNAME
and OPTION_PASSWORD
. This option overwrites the preference
setting (see IEAPreferencesConstants
for details).
Default is null
.
static final java.lang.String OPTION_USERNAME_DEFAULT
static final java.lang.String OPTION_PASSWORD
OPTION_USERNAME
and OPTION_PASSWORD
. This option overwrites the preference
setting (see IEAPreferencesConstants
for details).
Default is null
.
static final java.lang.String OPTION_PASSWORD_DEFAULT
static final java.lang.String OPTION_PROGRESS_MONITOR
IEAContentFactory
. The UML content factory, for instance, supports progress monitors.
Default is null
.
static final java.lang.String OPTION_DB_DRIVER
IDBDriver
.
Default behavior is to check the preferences for the database driver with the highest priority.
static final java.lang.String OPTION_GUID_PROVIDER
IGuidProvider
.
By default, the guid provider is configured in the global preferences page of the YAKINDU EA-Bridge.
The value must be an instance ofIGuidProvider
.IGuidProvider
,
Constant Field Valuesstatic final java.lang.String OPTION_TAGGED_VALUE_NOTES
EAnnotation
with source TAG_NOTE_URI
. The key will be the same as in the EAnnotation
with source TAG_URI
which contains the actual values.
Default is true
.
static final boolean OPTION_TAGGED_VALUE_NOTES_DEFAULT
static final java.lang.String OPTION_DUPLICATE_TAGGED_VALUE_KEYS
EAnnotation
s, entries with duplicate keys are technically possible but reported as validation error. So
keep in mind that when enabling this option, tagged values with duplicate keys will yield validation issues.
Possible options are Boolean.TRUE
or Boolean.FALSE
. Default is false
, which is also
the default in EA.
static final java.lang.Boolean OPTION_DUPLICATE_TAGGED_VALUE_KEYS_DEFAULT
static final java.lang.String EA_CONTENT_FACTORY
IEAContentFactory
shall be used.
Default setting is empty and uses all available factories.
static final java.lang.String EA_CONTENT_FACTORY_EXTENSION_ID
EA content factories
.static final java.lang.String EA_RESOURCE_ADAPTER_EXTENSION_ID
resource adapters
that will be added to the resource by the EA resource
factory.static final java.lang.String GUID_PROVIDER_EXTENSION_ID
static final java.lang.String EA_LANGUAGES_EXTENSION_ID
static final java.lang.String OPTION_ABORT_ON_FIRST_ERROR
The resource either continues (default) and reports errors according to OPTION_REPORT_TO_ERROR_LOG
and
"OPTION_REPORT_AS_RESOURCE_MARKERS" or aborts on the first error via an exception that is thrown (the
other options for error reporting are then ignored).
static final java.lang.Boolean OPTION_ABORT_ON_FIRST_ERROR_DEFAULT
static final java.lang.String OPTION_REPORT_TO_ERROR_LOG
OPTION_ABORT_ON_FIRST_ERROR
is true
, all loading and saving
errors are reported to the Eclipse error log and shown in the UI via the ErrorLog
view. Default
value is false
.
If this option and OPTION_REPORT_AS_RESOURCE_MARKERS
are both disabled, then loading and saving errors
are not reported at all (which is typically a bad idea).
static final java.lang.Boolean OPTION_REPORT_TO_ERROR_LOG_DEFAULT
static final java.lang.String OPTION_REPORT_AS_RESOURCE_MARKERS
OPTION_ABORT_ON_FIRST_ERROR
is false
(which is the default case),
all loading errors (no saving errors!) are reported as resource markers at the eap-file
. These error
markers are shown in the UI via the Problems
view.
If this option and OPTION_REPORT_TO_ERROR_LOG
are both disabled, then loading errors are not reported at
all (which is typically a bad idea).
static final java.lang.Boolean OPTION_REPORT_AS_RESOURCE_MARKERS_DEFAULT
static final java.lang.String OPTION_RELOAD_ONLY_ON_HASH_CHANGE
refreshed
. This causes the entire model to be reloaded which might be a time-consuming task for big models.
This option enables a hash data calculation on load which is stored together with the loaded model. As soon as an external file refresh is triggered, the data hash is re-calculated and only if it differs (which means that relevant data was modified), the model is re-loaded. Otherwise the loaded model is untouched.
Please keep in mind that hash calculation produces a slight overhead to model loading and saving. This is why the option is disabled by default.static final java.lang.Boolean OPTION_RELOAD_ONLY_ON_HASH_CHANGE_DEFAULT
static final java.lang.String EA_ERROR_MARKER_TYPE
static final java.lang.String TAG_URI
EAnnotation
s in EMF models whenever EA tagged values are read from or stored
in EA-databases.static final java.lang.String TAG_NOTE_URI
EAnnotation
s with this source URI:static final java.lang.String EA_SPECIFICS_SOURCE
EAnnotation
s that contain EA-specific properties that do not exist in UML.static final java.util.regex.Pattern URI_FRAGMENT_PATTERN_ID
(contentFactoryId)_(eaObjectType)_(eaObjectId)
Possible values for EAObjectType
are: package, element, operation, attribute, connector
.
com.yakindu.bridges.ea.uml_operation_42
static final java.util.regex.Pattern PATTERN_GUID
static final java.util.regex.Pattern URI_FRAGMENT_PATTERN_GUID
(contentFactoryId)_(guid)
. This
is required since custom GUIDs may differ from the EA-default format for GUIDs.
A special case are GUIDs that are escaped, i.e. '{' and '}' are replaced with '%7B' and '%7D'.
Examples:com.yakindu.bridges.ea.uml_{ff1040a3-bd42-4ccf-bf4c-86450854d652}
,
com.yakindu.bridges.ea.uml_%7Bff1040a3-bd42-4ccf-bf4c-86450854d652%7D
void setURI(URI uri)
#save(java.util.Map)
. Otherwise an exception is thrown.uri
- A uri to an existing file or a platform-resource uri to create a new and empty model.java.util.Map<java.lang.Object,java.lang.Object> getDefaultLoadOptions()
java.util.Map<java.lang.Object,java.lang.Object> getDefaultSaveOptions()
boolean isReadonly()
readonly
.java.lang.IllegalStateException
- in case the resource is not loaded.Copyright (c) 2015 itemis AG, and others. All rights reserved.