|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jsdai.lang.SdaiCommon jsdai.lang.SdaiModel
SdaiModel
is a Java class used for grouping entity instances.
Each entity instance within SdaiSession
must belong to
some SdaiModel
.
Each SdaiModel
is based upon one EXPRESS schema called underlying schema.
The EXPRESS types of all entities whose instances can appear in an
SdaiModel
shall be defined or declared in the EXPRESS schema
underlying for this SdaiModel
.
Conceptionally, the SdaiModel
can be represented by
the following EXPRESS entity:
ENTITY SdaiModel;
name
: String;
underlyingSchema
: ESchema_definition;
describedSchema
: OPTIONAL ESchema_definition;
repository
: SdaiRepository;
changeDate
: OPTIONAL String;
mode
: OPTIONAL int;
instances
: SET [0:?] OF EEntity;
folders
: SET [0:?] OF EntityExtent;
populatedFolders
: SET [0:?] OF EntityExtent;
defaultLanguage
: OPTIONAL String;
contextIdentifiers
: LIST [0:?] OF String;
INVERSE
associatedWith
: SET [0:?] OF SchemaInstance FOR associatedModels
;
UNIQUE
UR1: name, repository;
WHERE
WR1: SELF IN SELF.repository.models
;
END_ENTITY;
The attributes defaultLanguage
and contextIdentifiers
are read-write, whereas all other attributes are read-only.
For each attribute a corresponding get method (or methods sometimes)
is defined. The changeDate
can be retrieved either as String
or
as long
. Similarly, underlyingSchema
can be retrieved
either as ESchema_definition
or as String
.
The attribute defaultLanguage
also has the corresponding set method.
The entity instances together with their grouping into EntityExtent
s
comprise the contents of SdaiModel
.
To make the instances within the contents of an SdaiModel
available,
the SdaiModel
needs to be started in either read-only or read-write
access mode.
Upon ending read-only or read-write access all entity instances belonging to
this SdaiModel
become not available.
If some entity instance within a SdaiModel
has been
created, deleted or modified since the most recent
commit, abort or start transaction read-write access
operation was performed, then before ending read-write access of this
SdaiModel
either commit or abort operation has to be
applied once again.
Each SdaiModel
belongs to exactly one SdaiRepository
.
The SdaiRepository
needs to be opened to
access the SdaiModel
. Upon closing the SdaiRepository
all SdaiModel
s contained in it become not available.
SdaiModel
s containing dictionary and mapping information
belong to special SdaiRepository
named "SystemRepository".
For these SdaiModel
s read-write access mode is forbidden.
A SdaiRepository
may contain one or more virtual models.
Virtual model is an instance of SdaiModel
with only 'name' and
'repository' fields set with values. A virtual model has no underlying schema
attached to it. Such models are created automatically when unresolved
references are detected while starting read-only or read-write access of
normal (non-virtual) SdaiModel
s. When needed, virtual models
are (automatically) promoted to normal ones.
Field Summary | |
static int |
NO_ACCESS
When getMode returns this value, the contents of this SdaiModel
is not accessible. |
static int |
READ_ONLY
When getMode returns this value, the contents of this SdaiModel
is available for read-only access. |
static int |
READ_WRITE
When getMode returns this value, the contents of this SdaiModel
is available for read-write access. |
Method Summary | |
void |
addSdaiListener(SdaiListener listener)
Adds SdaiListener extending java.util.EventListener
to a special aggregate in this repository. |
abstract SdaiPermission |
checkPermission()
Returns this model effective permission which determines the model's access rights. |
abstract void |
checkRead()
Throws SdaiException.SY_SEC if the owning session
has no read access to this model. |
abstract void |
checkWrite()
Throws SdaiException.SY_SEC if the owning session
has no write access to this model. |
void |
connectInConnector(jsdai.lang.SdaiModel.Connector connector)
Connects connector to the incomming connector ring. |
EEntity |
copyInstance(EEntity source)
Makes a copy of the specified instance and puts this copy into the contents of this model. |
AEntity |
copyInstances(AEntity source)
Makes a copy of all instances from the specified aggregate to this model. |
EEntity |
create(ComplexEntityValue values)
This method is for internal JSDAI use only. |
EEntity |
createEntityInstance(java.lang.Class provided_class)
Creates a new entity instance within this SdaiModel .
|
EEntity |
createEntityInstance(jsdai.dictionary.EEntity_definition entity_definition)
Creates a new entity instance within this SdaiModel .
|
abstract void |
deleteSdaiModel()
Deletes this SdaiModel together with all entity instances within it.
|
void |
disconnectInConnector(jsdai.lang.SdaiModel.Connector connector)
Disconnects connector from the incomming connector ring. |
abstract void |
endReadOnlyAccess()
Terminates the read-only access for this SdaiModel .
|
abstract void |
endReadWriteAccess()
Terminates the read-write access for this SdaiModel .
|
void |
exportXml(java.io.OutputStream location,
InstanceReader instanceReader)
Writes this model in XML representation to specified stream. |
AEntity |
findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity,
ASdaiModel targetDomain,
ASdaiModel mappingDomain,
jsdai.mapping.AEntity_mapping instanceMappings,
int mode)
Finds instances that are mappings of given source entity. |
AEntity |
findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity,
ASdaiModel targetDomain,
ASdaiModel mappingDomain,
int mode)
Finds instances that are mappings of given source entity. |
AEntity |
findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping,
ASdaiModel targetDomain,
ASdaiModel mappingDomain,
jsdai.mapping.AEntity_mapping instanceMappings,
int mode)
Finds instances that are mappings of given source entity. |
AEntity |
findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping,
ASdaiModel targetDomain,
ASdaiModel mappingDomain,
int mode)
Finds instances that are mappings of given entity mapping. |
ASchemaInstance |
getAssociatedWith()
Returns the set of schema instances with which this SdaiModel
is currently associated.
|
java.lang.String |
getChangeDate()
Returns the date and time when this SdaiModel was
created or most recently modified. |
long |
getChangeDateLong()
Returns a long value of the date and time when
this SdaiModel was created or most recently modified. |
A_string |
getContextIdentifiers()
Returns an aggregate A_string containing information
describing the contexts within which the instances of this model
are applicable.
|
java.lang.String |
getDefaultLanguage()
Returns a String identifying the default language
for string values in this model, or null if the
default language for this model is not specified.
|
jsdai.dictionary.ESchema_definition |
getDefinedSchema()
Returns schema definition if this SdaiModel
manages dictionary data, and null otherwise.
|
jsdai.dictionary.EEntity_definition |
getEntityDefinition(java.lang.String entity_name)
Returns entity definition for the entity with the specified name. |
jsdai.dictionary.EEntity_definition |
getEntityDefinitionByRef(jsdai.query.SerializableRef entityRef)
Returns entity definition for the entity referenced by specified SerializableRef . |
AEntity |
getEntityExtentInstances(java.lang.Class provided_class)
Deprecated, use getInstances(Class type)
instead. |
AEntity |
getEntityExtentInstances(jsdai.dictionary.EEntity_definition entity_definition)
Deprecated, use getInstances(EEntity_definition type)
instead. |
int |
getExactInstanceCount(java.lang.Class type)
Returns the number of instances of the specified entity data type within this model. |
int |
getExactInstanceCount(jsdai.dictionary.EEntity_definition type)
Returns the number of instances of the specified entity data type within this model. |
int |
getExactInstanceCount(jsdai.dictionary.EEntity_definition[] types)
Returns the number of instances of the entity consisting of the specified simple entity data types. |
AEntity |
getExactInstances(java.lang.Class type)
Returns a read-only aggregate containing all instances of the specified entity data type. |
AEntity |
getExactInstances(jsdai.dictionary.EEntity_definition type)
Returns a read-only aggregate containing all instances of the specified entity data type. |
AEntityExtent |
getFolders()
Returns the set of EntityExtent s for all entity types
available in the EXPRESS schema corresponding to this model.
|
java.lang.String |
getId()
Returns model identifier as a String .
|
int |
getInstanceCount()
Returns the number of instances contained in this model. |
int |
getInstanceCount(java.lang.Class type)
Returns the number of instances of the specified entity data type and of all its subtypes. |
int |
getInstanceCount(java.lang.Class[] types)
Returns the total number of instances of those entities which contain specified simple entity data types. |
int |
getInstanceCount(jsdai.dictionary.EEntity_definition type)
Returns the number of instances of the specified entity data type and of all its subtypes. |
int |
getInstanceCount(jsdai.dictionary.EEntity_definition[] types)
Returns the total number of instances of those entities which contain specified simple entity data types. |
AEntity |
getInstances()
Returns the set of all entity instances contained in this model. |
AEntity |
getInstances(java.lang.Class type)
Returns a read-only aggregate containing all instances of the specified entity data type and all instances of all its subtypes. |
AEntity |
getInstances(java.lang.Class[] types)
Returns a read-only aggregate consisting of all instances of those entities which contain specified simple entity data types. |
AEntity |
getInstances(jsdai.dictionary.EEntity_definition type)
Returns a read-only aggregate containing all instances of the specified entity data type and all instances of all its subtypes. |
AEntity |
getInstances(jsdai.dictionary.EEntity_definition[] types)
Returns a read-only aggregate consisting of all instances of those entities which contain specified simple entity data types. |
java.net.URL |
getLocationURL()
Returns model location as a URL .
|
java.lang.String |
getLockingUser()
Returns the name of the user that has placed exclusive lock on remote model. |
int |
getMode()
Returns the current access mode for this SdaiModel .
|
java.lang.String |
getName()
Returns the name of the model as a String .
|
java.lang.String |
getOriginalSchemaName()
Returns the name of the EXPRESS schema which was assigned to this model in Part 21 file the repository containing this model was imported from. |
AEntityExtent |
getPopulatedFolders()
Returns the set of EntityExtent s for those entity types
available in the EXPRESS schema corresponding to this model for which
instances currently exist in the model.
|
ASdaiModel |
getQuerySourceDomain()
Returns domain in which to perform a search. |
jsdai.query.SerializableRef |
getQuerySourceDomainRef()
|
jsdai.query.SerializableRef |
getQuerySourceInstanceRef()
Gets the reference to the connected SdaiModel .
|
AEntity |
getQuerySourceInstances()
Returns starting instances which serve as the first input instance set for a query. |
SdaiRepository |
getRepository()
Returns the SdaiRepository to which this SdaiModel belongs. |
jsdai.dictionary.ESchema_definition |
getUnderlyingSchema()
Returns definition of the EXPRESS schema on which the contents of this SdaiModel is based on. |
java.lang.String |
getUnderlyingSchemaString()
Returns the name of the EXPRESS schema on which the contents of this SdaiModel is based on. |
boolean |
isModified()
Informs if this model is modified. |
abstract void |
promoteSdaiModelToRW()
Changes the access mode for this SdaiModel from read-only to read-write.
|
int |
query(java.lang.String where,
EEntity entity,
AEntity result)
This method is not implemented in current JSDAI version. |
abstract void |
reduceSdaiModelToRO()
Changes the access mode for this SdaiModel from read-write to read-only.
|
void |
removeSdaiListener(SdaiListener listener)
Removes SdaiListener extending java.util.EventListener
from the special aggregate in this repository. |
void |
renameSdaiModel(java.lang.String provided_name)
Assigns a new name to this SdaiModel .
|
SdaiModel |
resolveConnectedModel()
Resolve to connected SdaiModel .
|
void |
setDefaultLanguage(java.lang.String value)
Assigns a String to the attribute identifying
the default language for string values in this model.
|
void |
setOriginalSchemaName(java.lang.String name)
Provides the name of an EXPRESS schema which will be used to relate this model with that schema when exporting the repository containing this model to a Part 21 file. |
abstract void |
startPartialReadOnlyAccess()
Makes the contents of this SdaiModel available for read-only access
in partial dynamic mode. |
abstract void |
startPartialReadWriteAccess()
Makes the contents of this SdaiModel available for read-write access
in partial dynamic mode. |
abstract void |
startReadOnlyAccess()
Makes the contents of this SdaiModel available for read-only access.
|
abstract void |
startReadWriteAccess()
Makes the contents of this SdaiModel available for read-write access.
|
EEntity |
substituteInstance(EEntity old)
Substitutes a given entity instance with a newly created one which is written to the contents of this SdaiModel .
|
EEntity |
substituteInstance(EEntity old,
java.lang.Class type)
Substitutes a given entity instance with a newly created one which is written to the contents of this SdaiModel .
|
EEntity |
substituteInstance(EEntity old,
jsdai.dictionary.EEntity_definition entity_definition)
Substitutes a given entity instance with a newly created one which is written to the contents of this SdaiModel .
|
boolean |
testChangeDate()
Checks if the creation date or date of the most recent modification of this model was set. |
java.lang.String |
toString()
Returns a description of this model as a String .
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NO_ACCESS
getMode
returns this value, the contents of this SdaiModel
is not accessible.
public static final int READ_ONLY
getMode
returns this value, the contents of this SdaiModel
is available for read-only access.
public static final int READ_WRITE
getMode
returns this value, the contents of this SdaiModel
is available for read-write access.
Method Detail |
public java.lang.String getName() throws SdaiException
String
.
The models within a SdaiRepository
must have unique names.
SdaiModel
.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- SY_ERR, underlying system error.public java.lang.String getId() throws SdaiException
String
.
The models within a SdaiRepository
have unique identifiers,
which are not reused when some models are deleted and some new created.
SdaiModel
.
SdaiException
- MO_NEXS, SdaiModel does not exist.public jsdai.dictionary.ESchema_definition getUnderlyingSchema() throws SdaiException
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.getUnderlyingSchemaString()
public java.lang.String getUnderlyingSchemaString() throws SdaiException
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.getUnderlyingSchema()
,
getOriginalSchemaName()
public java.lang.String getOriginalSchemaName() throws SdaiException
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.getUnderlyingSchemaString()
,
setOriginalSchemaName(java.lang.String)
public void setOriginalSchemaName(java.lang.String name) throws SdaiException
name
- the name of an EXPRESS schema.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.getOriginalSchemaName()
public SdaiRepository getRepository() throws SdaiException
SdaiRepository
to which this SdaiModel
belongs.
SdaiException
- MO_NEXS, SdaiModel does not exist.public boolean testChangeDate() throws SdaiException
true
if the date was set, and
false
otherwise.
SdaiException
- MO_NEXS, SdaiModel does not exist.getChangeDate()
,
getChangeDateLong()
public java.lang.String getChangeDate() throws SdaiException
SdaiModel
was
created or most recently modified.
String
representing the date and time.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.testChangeDate()
,
getChangeDateLong()
public long getChangeDateLong() throws SdaiException
long
value of the date and time when
this SdaiModel
was created or most recently modified.
long
representing the date and time.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- VA_NSET, value not set.testChangeDate()
,
getChangeDate()
public int getMode() throws SdaiException
SdaiModel
.
The contents of an SdaiModel
is a collection of
entity instances grouped into EntityExtent
s.
For accessing this contents, 3 modes are defined:
NO_ACCESS: contents cannot be accessed;
READ_ONLY: only read operations on the contents are allowed;
READ_WRITE: read-write operations are allowed.
SdaiException
- MO_NEXS, SdaiModel does not exist.public ASchemaInstance getAssociatedWith() throws SdaiException
SdaiModel
is currently associated.
An SdaiModel
may be associated with no, one or
several SchemaInstance
s.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- SY_ERR, underlying system error.public java.lang.String getLockingUser() throws SdaiException
null
for local schema instance.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsSdaiSession.lock(jsdai.lang.ASdaiRepository, jsdai.lang.ASchemaInstance, jsdai.lang.ASdaiModel, int)
public AEntityExtent getFolders() throws SdaiException
EntityExtent
s for all entity types
available in the EXPRESS schema corresponding to this model.
The entity data types in an EXPRESS schema can be defined
either directly or indirectly.
An SdaiModel
contains an EntityExtent
for each entity data type.
The method is valid only when the access mode for the model is set.
EntityExtent
s of this model.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.getPopulatedFolders()
public AEntityExtent getPopulatedFolders() throws SdaiException
EntityExtent
s for those entity types
available in the EXPRESS schema corresponding to this model for which
instances currently exist in the model.
The entity data types in an EXPRESS schema can be defined
either directly or indirectly.
An SdaiModel
contains an EntityExtent
for each entity data type. This method finds those
EntityExtent
s which have at least one entity instance.
The method is valid only when the access mode for the model is set.
EntityExtent
s of this model.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- SY_ERR, underlying system error.getFolders()
public java.lang.String getDefaultLanguage() throws SdaiException
String
identifying the default language
for string values in this model, or null
if the
default language for this model is not specified.
After creation of the model using
createSdaiModel
method
the default language is unset.
In the case when a model was created during execution of
importClearTextEncoding
method, this model may contain some value for the default language
extracted from the header of the exchange structure
(see ISO 10303-21::8.2.4 section_language).
String
identifying the default language for string
values in the model.
SdaiException
- MO_NEXS, SdaiModel does not exist.setDefaultLanguage(java.lang.String)
,
SdaiRepository.getDefaultLanguage()
,
SdaiRepository.setDefaultLanguage(java.lang.String)
,
"ISO 10303-21::8.2.4 section_language."public void setDefaultLanguage(java.lang.String value) throws SdaiException
String
to the attribute identifying
the default language for string values in this model.
To unset the default language, null
to the
parameter of the method should be passed.
When applying
exportClearTextEncoding
,
the default language, if non-null, will be written to the exchange structure
created by the above method.
value
- the default language for string
values in this model.
SdaiException
- MO_NEXS, SdaiModel does not exist.getDefaultLanguage()
,
SdaiRepository.getDefaultLanguage()
,
SdaiRepository.setDefaultLanguage(java.lang.String)
,
"ISO 10303-21::8.2.4 section_language."public A_string getContextIdentifiers() throws SdaiException
A_string
containing information
describing the contexts within which the instances of this model
are applicable.
After creation of the model using
createSdaiModel
method
this aggregate is empty.
In the case when the model was created during execution of
importClearTextEncoding
method, this aggregate may contain some context identifiers
extracted from the header of the exchange structure
(see ISO 10303-21::8.2.5 section_context).
That is, this aggregate always exists, but may be empty.
During a read-write transaction the aggregate can be
modified by adding/modifying/removing its members.
When applying
exportClearTextEncoding
method,
the content of this aggregate, if non-empty, will be written to the exchange structure
created by the above method.
SdaiException
- MO_NEXS, SdaiModel does not exist.SdaiRepository.getContextIdentifiers()
,
"ISO 10303-21::8.2.5 section_context."public boolean isModified() throws SdaiException
true
if this model is modified, and
false
otherwise.
SdaiException
- MO_NEXS, SdaiModel does not exist.public abstract SdaiPermission checkPermission() throws SdaiException
SdaiException
- if an error occurs performing underlying JSDAI operationscheckRead()
,
checkWrite()
,
SdaiPermission
public abstract void checkRead() throws SdaiException
SdaiException.SY_SEC
if the owning session
has no read access to this model. Otherwise this method returns
with no action.
SdaiException
- SY_SEC
if the owning session is
not granted the read access
SdaiException
- if an error occurs performing underlying JSDAI operationscheckPermission()
,
checkWrite()
,
SdaiPermission
public abstract void checkWrite() throws SdaiException
SdaiException.SY_SEC
if the owning session
has no write access to this model. Otherwise this method returns
with no action.
SdaiException
- SY_SEC
if the owning session is
not granted the write access
SdaiException
- if an error occurs performing underlying JSDAI operationscheckPermission()
,
checkRead()
,
SdaiPermission
public abstract void deleteSdaiModel() throws SdaiException
SdaiModel
together with all entity instances within it.
The SdaiModel
is also removed from the SdaiRepository
this model belongs to.
Deleting of an SdaiModel
from "SystemRepository"
is forbidden. In this case, SdaiException VT_NVLD is thrown.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- VT_NVLD, value type invalid.
SdaiException
- MO_LOCK, SDAI-model locked by another user.
SdaiException
- RP_LOCK, repository locked by another user.
SdaiException
- SY_ERR, underlying system error.public void renameSdaiModel(java.lang.String provided_name) throws SdaiException
SdaiModel
.
This new name must differ from the names of other models in the
same SdaiRepository
. If this condition is violated, then
SdaiException MO_DUP is thrown. Passing null value to the method's
parameter results in SdaiException VA_NSET.
This method realizes the SDAI operation "Rename SDAI-model", specified in ISO 10303-22::10.7.2. Currently, the use of the method is limited: if the model being renamed is referenced by instances in other models (in the same or other repositories), and at the moment of invocation of the method, access of at least one such model is not started (or already ended), then the results of the renaming operation are unpredictable.
Renaming of an SdaiModel
from "SystemRepository"
is forbidden.
In the case of such an attempt, SdaiException VT_NVLD is thrown.
provided_name
- new name of this model.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- VT_NVLD, value type invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- MO_DUP, SDAI-model duplicate.
SdaiException
- SY_ERR, underlying system error.public EEntity createEntityInstance(jsdai.dictionary.EEntity_definition entity_definition) throws SdaiException
SdaiModel
.
This method is applicable to only instantiable entities
(represented by their definitions), which are encountered in the
EXPRESS schema whose definition is underlying for this model.
Otherwise, that is, if provided entity is not known for this schema,
or is not instantiable, then SdaiException ED_NVLD is thrown.
The integer used to construct the name of the created entity instance
(see ISO 10303-21::7.3.4) is larger than the number in the name
of any already existing instance in the same repository.
The attributes of the created entity instance are unset, so the
testAttribute
method applied to any of them
will return value 0.
If null value is passed to the method's parameter, then SdaiException ED_NDEF is thrown.
entity_definition
- definition of the entity of which an instance has to be created.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- SY_ERR, underlying system error.createEntityInstance(Class provided_class)
,
"ISO 10303-22::10.7.9 Create entity instance",
"ISO 10303-21::7.3.4 Entity instance names"public EEntity createEntityInstance(java.lang.Class provided_class) throws SdaiException
SdaiModel
.
This method is applicable to only instantiable entities
(represented by the corresponding class EXxx.class where "xxx" is
entity name), which are encountered in the
EXPRESS schema whose definition is underlying for this model.
Otherwise, that is, if the parameter passed to this method does not
allow to identify an entity that is known for this schema,
or an entity was identified but is not instantiable,
then SdaiException ED_NDEF and, respectively, ED_NVLD is thrown.
The integer used to construct the name of the created entity instance
(see ISO 10303-21::7.3.4) is larger than the number in the name
of any already existing instance in the same repository.
The attributes of the created entity instance are unset, so the
testAttribute
method applied to any of them
will return value 0.
If null value is passed to the method's parameter, then SdaiException VA_NSET is thrown.
provided_class
- Java class for the entity of which an instance has to be created.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.createEntityInstance(EEntity_definition entity_definition)
,
"ISO 10303-22::10.7.9 Create entity instance",
"ISO 10303-21::7.3.4 Entity instance names"public abstract void startReadOnlyAccess() throws SdaiException
SdaiModel
available for read-only access.
This method is available both for models with the application data and for
models in "SystemRepository". In the latter case there is no need for the
transaction to be started. If the model contains application data and the
dictionary model with the data of the schema that is underlying to the
former model is without read-only access, then the access for this
dictionary model (contained in "SystemRepository") is started automatically.
The model, if its access was started successfully, is included
into the set "active_models" of SdaiSession
.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NAVL, transaction currently not available.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- MX_RW, SDAI-model access read-write.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- SY_ERR, underlying system error.startReadWriteAccess()
,
promoteSdaiModelToRW()
,
endReadOnlyAccess()
,
SdaiSession.getActiveModels()
,
"ISO 10303-22::10.7.3 Start read-only access"public abstract void startReadWriteAccess() throws SdaiException
SdaiModel
available for read-write access.
For models in "SystemRepository" this method is forbidden
(SdaiException FN_NAVL is thrown).
If the dictionary model with the data of the schema that is underlying to this
model is without read-only access, then the access for this
dictionary model (contained in "SystemRepository") is started automatically.
The model, if its access was started successfully, is included
into the set "active_models" of SdaiSession
.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- MX_RW, SDAI-model access read-write.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- MO_LOCK, SDAI-model locked by another user.
SdaiException
- FN_NAVL, function not available.
SdaiException
- SY_ERR, underlying system error.startReadOnlyAccess()
,
reduceSdaiModelToRO()
,
endReadWriteAccess()
,
SdaiSession.getActiveModels()
,
"ISO 10303-22::10.7.6 Start read-write access"public abstract void startPartialReadOnlyAccess() throws SdaiException
SdaiModel
available for read-only access
in partial dynamic mode. No actual instances are loaded to memory when this method
is invoked but needed data is provided lazily on demand.
This method is available only for remote SdaiModels
SdaiException
- if an error occurs during the operation
SdaiException
- FN_NAVL, if the method is invoked for non remote SdaiModel
public abstract void startPartialReadWriteAccess() throws SdaiException
SdaiModel
available for read-write access
in partial dynamic mode. No actual instances are loaded to memory when this method
is invoked but needed data is provided lazily on demand.
This method is available only for remote SdaiModels
SdaiException
- if an error occurs during the operation
SdaiException
- FN_NAVL, if the method is invoked for non remote SdaiModel
public abstract void promoteSdaiModelToRW() throws SdaiException
SdaiModel
from read-only to read-write.
For models in "SystemRepository" this method is forbidden
(SdaiException FN_NAVL is thrown).
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- MX_RW, SDAI-model access read-write.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- FN_NAVL, function not available.
SdaiException
- SY_ERR, underlying system error.endReadOnlyAccess()
,
"ISO 10303-22::10.7.4 Promote SDAI-model to read-write"public abstract void reduceSdaiModelToRO() throws SdaiException
SdaiModel
from read-write to read-only.
If some entity instance within this SdaiModel
has been
created, deleted or modified since the most recent
commit, abort or start transaction read-write access
operation was performed, then SdaiException TR_RW is thrown.
This method is an extension of JSDAI, which is not a part of the standard.
SdaiException
- TR_RW, transaction read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- SY_ERR, underlying system error.endReadWriteAccess()
,
SdaiTransaction.commit()
,
SdaiTransaction.abort()
,
SdaiSession.startTransactionReadWriteAccess()
public abstract void endReadOnlyAccess() throws SdaiException
SdaiModel
.
As a result, the contents of the model becomes inaccessable.
The model is removed from the set "active_models" of SdaiSession
.
When applied to a model in "SystemRepository", this method
throws SdaiException
FN_NAVL.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- MX_RW, SDAI-model access read-write.
SdaiException
- FN_NAVL, function not available.
SdaiException
- SY_ERR, underlying system error.startReadOnlyAccess()
,
promoteSdaiModelToRW()
,
SdaiSession.getActiveModels()
,
"ISO 10303-22::10.7.5 End read-only access"public abstract void endReadWriteAccess() throws SdaiException
SdaiModel
.
As a result, the contents of the model becomes inaccessable.
The model is removed from the set "active_models" of SdaiSession
.
If some entity instance within this SdaiModel
has been
created, deleted or modified since the most recent
commit, abort or start transaction read-write access
operation was performed, then SdaiException TR_RW is thrown.
SdaiException
- TR_RW, transaction read-write.
SdaiException
- RP_NOPN, repository is not open.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SDAI-model access not defined.
SdaiException
- MX_RO, SDAI-model access read-only.
SdaiException
- SY_ERR, underlying system error.startReadWriteAccess()
,
reduceSdaiModelToRO()
,
SdaiSession.getActiveModels()
,
"ISO 10303-22::10.7.7 End read-write access"public void addSdaiListener(SdaiListener listener)
SdaiListener
extending java.util.EventListener
to a special aggregate in this repository.
addSdaiListener
in interface SdaiEventSource
listener
- a SdaiListener
to be added.removeSdaiListener(jsdai.lang.SdaiListener)
public void removeSdaiListener(SdaiListener listener)
SdaiListener
extending java.util.EventListener
from the special aggregate in this repository.
removeSdaiListener
in interface SdaiEventSource
listener
- SdaiListener
to be removed.addSdaiListener(jsdai.lang.SdaiListener)
public int query(java.lang.String where, EEntity entity, AEntity result) throws SdaiException
SdaiException FN_NAVL will be thrown if this method is invoked.
query
in interface QuerySource
where
- a String
valueentity
- an EEntity
valueresult
- an AEntity
value
int
value
SdaiException
- FN_NAVL, function not available.public ASdaiModel getQuerySourceDomain() throws SdaiException
QuerySource
getQuerySourceDomain
in interface QuerySource
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic AEntity getQuerySourceInstances() throws SdaiException
QuerySource
getQuerySourceInstances
in interface QuerySource
AEntity
containing the instances or null
this aggregate consists all instances in query source domain
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationspublic jsdai.query.SerializableRef getQuerySourceInstanceRef() throws SdaiException
SdaiModelConnector
SdaiModel
.
This method is intended for internal use only.
getQuerySourceInstanceRef
in interface QuerySource
SdaiException
public jsdai.query.SerializableRef getQuerySourceDomainRef() throws SdaiException
getQuerySourceDomainRef
in interface QuerySource
SdaiException
public jsdai.dictionary.EEntity_definition getEntityDefinition(java.lang.String entity_name) throws SdaiException
entity_name
- the name of the entity whose definition is requested.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.SchemaDefinition.getEntityDefinition(java.lang.String)
,
"ISO 10303-22::10.7.8 Get entity definition"public jsdai.dictionary.ESchema_definition getDefinedSchema() throws SdaiException
SdaiModel
manages dictionary data, and null otherwise.
This method is an extension of JSDAI, which is not a part of the standard.
SdaiModel
.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SDAI-model access not defined.public EEntity substituteInstance(EEntity old, jsdai.dictionary.EEntity_definition entity_definition) throws SdaiException
SdaiModel
.
The given entity instance can belong to other model and even
to other repository. Moreover, the entity type of the given instance
and that of the new one may be different.
This new entity must be instantiable and must be defined or declared in the
EXPRESS schema whose definition is underlying for this model.
Otherwise, that is, if this entity is not known for this schema,
or is not instantiable, then SdaiException ED_NVLD is thrown.
At the end of the operation the given instance is deleted
from its owning model.
If entity type supplied for creation of new instance is the same as
entity type of the given one, then values of all attributes
are passed from the old instance to its substitute.
If entity types are different, then values are passed only for
common parts of these entities. The remaining attributes are left unset,
so the testAttribute
method applied
to any of them will return value 0.
If the given instance belongs to the same repository as this model does,
then its substitute gets the persistent label (or name as specified in
ISO 10303-21::7.3.4) of it. Otherwise, new persistent label for
the substitute is chosen. The integer used to construct it
is taken larger than the number in the persistent label of any already
existing instance in the same repository.
All the references from other instances within models in at least
read-only mode to the given instance are replaced by the references
to its substitute.
If null value is passed to one of the method's parameters specifying the given instance and entity type for its substitute, then SdaiException VA_NSET and, respectively, ED_NDEF is thrown. Submitting an invalid instance leads to throwing SdaiException EI_NEXS.
This method is an extension of JSDAI, which is not a part of the standard.
old
- given entity instance.entity_definition
- definition of the entity of which an instance
has to substitute the given one.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.substituteInstance(EEntity old, Class type)
,
substituteInstance(EEntity old)
,
"ISO 10303-21::7.3.4 Entity instance names"public EEntity substituteInstance(EEntity old, java.lang.Class type) throws SdaiException
SdaiModel
.
The given entity instance can belong to other model and even
to other repository. Moreover, the entity type of the given instance
and that of the new one may be different.
This new entity (represented by the corresponding java class EXxx.class
where "xxx" is entity name) must be
instantiable and must be defined or declared in the
EXPRESS schema whose definition is underlying for this model.
Otherwise, that is, if the second parameter passed to this method does not
allow to identify an entity that is known for this schema,
or an entity was identified but is not instantiable,
then SdaiException ED_NDEF and, respectively, ED_NVLD is thrown.
At the end of the operation the given instance is deleted
from its owning model.
If entity type supplied (through the second parameter)
for creation of new instance is the same as
entity type of the given one, then values of all attributes
are passed from the old instance to its substitute.
If entity types are different, then values are passed only for
common parts of these entities. The remaining attributes are left unset,
so the testAttribute
method applied
to any of them will return value 0.
If the given instance belongs to the same repository as this model does,
then its substitute gets the persistent label (or name as specified in
ISO 10303-21::7.3.4) of it. Otherwise, new persistent label for
the substitute is chosen. The integer used to construct it
is taken larger than the number in the persistent label of any already
existing instance in the same repository.
All the references from other instances within models in at least
read-only mode to the given instance are replaced by the references
to its substitute.
If null value is passed to either of the method's parameters, then SdaiException VA_NSET is thrown. Submitting an invalid instance leads to throwing SdaiException EI_NEXS.
This method is an extension of JSDAI, which is not a part of the standard.
old
- given entity instance.type
- Java class for the entity of which an instance
has to substitute the given one.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.substituteInstance(EEntity old, EEntity_definition entity_definition)
,
substituteInstance(EEntity old)
,
"ISO 10303-21::7.3.4 Entity instance names"public EEntity substituteInstance(EEntity old) throws SdaiException
SdaiModel
.
The given entity instance can belong to other model and even
to other repository. The entity type of the new instance is the same
as that of the given one.
This entity type must be instantiable and must be defined or declared in the
EXPRESS schema whose definition is underlying for this model.
Otherwise, that is, if this entity is not known for this schema,
or is not instantiable, then SdaiException ED_NVLD is thrown.
At the end of the operation the given instance is deleted
from its owning model.
The values of all attributes of the old instance are passed to its substitute. If the given instance belongs to the same repository as this model does, then its substitute gets the persistent label (or name as specified in ISO 10303-21::7.3.4) of it. Otherwise, new persistent label for the substitute is chosen. The integer used to construct it is taken larger than the number in the persistent label of any already existing instance in the same repository. All the references from other instances within models in at least read-only mode to the given instance are replaced by the references to its substitute.
If null value is passed to the method's parameter, then SdaiException VA_NSET is thrown. Submitting an invalid instance leads to throwing SdaiException EI_NEXS.
This method is an extension of JSDAI, which is not a part of the standard.
old
- given entity instance.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- TR_EAB, transaction ended abnormally.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- EI_NEXS, entity instance does not exist.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.substituteInstance(EEntity old, EEntity_definition entity_definition)
,
substituteInstance(EEntity old, Class type)
,
"ISO 10303-21::7.3.4 Entity instance names"public AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity, ASdaiModel targetDomain, ASdaiModel mappingDomain, int mode) throws SdaiException
Example:
SdaiModel m = ...;
EEntity_definition sourceEntity = ...; // definition of source entity
AEntity instances = m.findMappingInstances(sourceEntity, targetDomain, mappingDomain, EEntity.NO_RESTRICTIONS);
This method is part of the mapping extensions of JSDAI.
sourceEntity
- this method searches instances that are mappings of this entitytargetDomain
- the domain where to search instances to satisfy mapping constraints.
It can be null.mappingDomain
- the domain for mapping constraints and dictionary data.mode
- EEntity.NO_RESTRICTIONS
- no restrictions,
EEntity.MOST_SPECIFC_ENTITY
- retured mappings are restricted to most specific.
If there is mapping of subtype entity then mapping of supertype entity is not included.
Entities that can not be instanciated are also not included.
EEntity.MANDATORY_ATTRIBUTES_SET
- in addition to MOST_SPECIFIC_ENTITY it also requires, that all explicit mandatory attributes are set.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsfindMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int)
,
EEntity.testMappedEntity
,
EEntity.findEntityMappings(EEntity_definition, ASdaiModel, ASdaiModel, AEntity_mapping, int)
,
EEntity.findEntityMappings(ASdaiModel, ASdaiModel, AEntity_mapping, int)
,
ASdaiModel.findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
,
JSDAI Mapping Extensionpublic AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity, ASdaiModel targetDomain, ASdaiModel mappingDomain, jsdai.mapping.AEntity_mapping instanceMappings, int mode) throws SdaiException
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
and adds extra possibility to get most specific mappings of the instances.
This method is part of the mapping extensions of JSDAI.
sourceEntity
- this method searches instances that are mappings of this entitytargetDomain
- the domain where to search instances to satisfy mapping constraints.
It can be null.mappingDomain
- the domain for mapping constraints and dictionary data.instanceMappings
- if not null should be an empty aggregate. The most specific entity
mappings are returned in this aggregate. The member indexes are synchronized with instance
aggregate which is returned from this method. If null then the method works as
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
mode
- Should always be EEntity.NO_RESTRICTIONS
- no restrictions.
instanceMappings
is
not null then member indexes in both aggregates make pairs. Every pair
(instance, instanceMapping) is mentioned in both aggregates only once. If
instanceMappings
is null then every instance is mentioned
only once in this aggregate.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsfindMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
,
EEntity.findMostSpecificMappings(jsdai.lang.ASdaiModel, jsdai.lang.ASdaiModel, jsdai.mapping.AEntity_mapping, int)
,
JSDAI Mapping Extensionpublic AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping, ASdaiModel targetDomain, ASdaiModel mappingDomain, int mode) throws SdaiException
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
, because it searches instances that meets requirements only for specified mapping.
Instances that satisfy mapping constraints must be in this model, but other instances required by mapping constraints may be in other models within target domain.
Example:
SdaiModel m = ...;
EEntity_mapping mapping = ...; // mapping of source entity
AEntity instances = m.findMappingInstances(sourceEntity, targetDomain, mappingDomain, EEntity.NO_RESTRICTIONS);
This method is part of the mapping extensions of JSDAI.
entityMapping
- this method searches instances that satisfies constraints for this entity mapping.targetDomain
- targetInstances domain where to search instances to satisfy mapping constraints.
It can be null.mappingDomain
- the domain for mapping constraints and dictionary data.mode
- NO_RESTRICTIONS
- no restrictions,
MOST_SPECIFC_ENTITY
- retured mappings are restricted to most specific.
If there is mapping of subtype entity then mapping of supertype entity is not included.
Entities that can not be instanciated are also not included.
MANDATORY_ATTRIBUTES_SET
- in addition to MOST_SPECIFIC_ENTITY it also requires, that all explicit mandatory attributes are set.
SdaiException
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
,
EEntity.testMappedEntity(EEntity_mapping, ASdaiModel, ASdaiModel, int)
,
EEntity.findEntityMappings(ASdaiModel, ASdaiModel, AEntity_mapping, int)
,
ASdaiModel.findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int)
,
JSDAI Mapping Extensionpublic AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping, ASdaiModel targetDomain, ASdaiModel mappingDomain, jsdai.mapping.AEntity_mapping instanceMappings, int mode) throws SdaiException
findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int)
and adds extra possibility to get most specific mappings of the instances.
This method is part of the mapping extensions of JSDAI.
entityMapping
- this method searches instances that satisfies constraints
for this entity mapping.targetDomain
- the domain where to search instances to satisfy mapping constraints.
It can be null.mappingDomain
- the domain for mapping constraints and dictionary data.instanceMappings
- if not null should be an empty aggregate. The most specific entity
mappings are returned in this aggregate. The member indexes are synchronized with instance
aggregate which is returned from this method. If null then the method works as
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
mode
- Should always be EEntity.NO_RESTRICTIONS
- no restrictions.
instanceMappings
is
not null then member indexes in both aggregates make pairs. Every pair
(instance, instanceMapping) is mentioned in both aggregates only once. If
instanceMappings
is null then every instance is mentioned
only once in this aggregate.
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsfindMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int)
,
EEntity.findMostSpecificMappings(jsdai.lang.ASdaiModel, jsdai.lang.ASdaiModel, jsdai.mapping.AEntity_mapping, int)
,
JSDAI Mapping Extensionpublic AEntity getInstances() throws SdaiException
SdaiModel
.
SdaiException
- MO_NEXS, SdaiModel does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.public AEntity getInstances(jsdai.dictionary.EEntity_definition type) throws SdaiException
Example:
SdaiModel m = ...;
EEntity_definition cp_type = ...; // cartesian point
ACartesian_point aggr = (ACartesian_point)m.getInstances(cp_type);
type
- definition of the entity of which instances are required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- SY_ERR, underlying system error.getInstances(Class type)
,
getInstances(EEntity_definition types[])
,
getInstances(Class types[])
,
getExactInstances(EEntity_definition type)
,
getExactInstances(Class type)
,
getInstanceCount(EEntity_definition type)
public AEntity getInstances(java.lang.Class type) throws SdaiException
Example:
SdaiModel m = ...;
ACartesian_point aggr = (ACartesian_point)m.getInstances(ECartesian_point.class);
type
- Java class for the entity of which instances are required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.getInstances(EEntity_definition type)
,
getInstances(EEntity_definition types[])
,
getInstances(Class types[])
,
getExactInstances(EEntity_definition type)
,
getExactInstances(Class type)
,
getInstanceCount(Class type)
public AEntity getInstances(jsdai.dictionary.EEntity_definition[] types) throws SdaiException
Example:
SdaiModel m = ...;
EEntity_definition [] types = new EEntity_definition[5];
types[0] = m.getEntityDefinition("C"); // definition for entity C
types[1] = m.getEntityDefinition("E"); // definition for entity E
types[2] = null;
// If, for example, entity A is a subtype of entities C, D and E,
// and entity B is a subtype of entities C, E and F,
// then the aggregate returned by the following application
// of getInstances will contain all instances of both A and B.
AEntity aggr = m.getInstances(types);
types
- an array of definitions of simple entity data types.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- SY_ERR, underlying system error.getInstances(EEntity_definition type)
,
getInstances(Class type)
,
getInstances(Class types[])
,
getExactInstances(EEntity_definition type)
,
getExactInstances(Class type)
,
getInstanceCount(EEntity_definition types[])
public AEntity getInstances(java.lang.Class[] types) throws SdaiException
Example:
SdaiModel m = ...;
Class [] types = new Class[5];
types[0] = CC.class; // class for entity C
types[1] = CE.class; // class for entity E
types[2] = null;
// If, for example, entity A is a subtype of entities C, D and E,
// and entity B is a subtype of entities C, E and F,
// then the aggregate returned by the following application
// of getInstances will contain all instances of both A and B.
AEntity aggr = m.getInstances(types);
types
- an array of classes representing simple entity data types.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.getInstances(EEntity_definition type)
,
getInstances(Class type)
,
getInstances(EEntity_definition types[])
,
getExactInstances(EEntity_definition type)
,
getExactInstances(Class type)
,
getInstanceCount(Class types[])
public AEntity getExactInstances(jsdai.dictionary.EEntity_definition type) throws SdaiException
Example:
SdaiModel m = ...;
EEntity_definition cp_type = ...; // cartesian point
ACartesian_point aggr = (ACartesian_point)m.getExactInstances(cp_type);
type
- definition of the entity of which instances are required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- SY_ERR, underlying system error.getInstances(EEntity_definition type)
,
getInstances(Class type)
,
getInstances(EEntity_definition types[])
,
getInstances(Class types[])
,
getExactInstances(Class type)
,
getExactInstanceCount(EEntity_definition type)
public AEntity getExactInstances(java.lang.Class type) throws SdaiException
Example:
SdaiModel m = ...;
ACartesian_point aggr = (ACartesian_point)m.getExactInstances(CCartesian_point.class);
type
- Java class for the entity of which instances are required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.getInstances(EEntity_definition type)
,
getInstances(Class type)
,
getInstances(EEntity_definition types[])
,
getInstances(Class types[])
,
getExactInstances(EEntity_definition type)
,
getExactInstanceCount(Class type)
public int getInstanceCount() throws SdaiException
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
public int getInstanceCount(jsdai.dictionary.EEntity_definition type) throws SdaiException
type
- definition of the entity of which the instance count is required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.getInstanceCount()
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
,
getInstances(EEntity_definition type)
public int getInstanceCount(java.lang.Class type) throws SdaiException
type
- Java class for the entity of which the instance count is required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
,
getInstances(Class type)
public int getInstanceCount(jsdai.dictionary.EEntity_definition[] types) throws SdaiException
Example:
SdaiModel m = ...;
EEntity_definition [] types = new EEntity_definition[5];
types[0] = m.getEntityDefinition("C"); // definition for entity C
types[1] = m.getEntityDefinition("E"); // definition for entity E
types[2] = null;
// If, for example, entity A is a subtype of entities C, D and E,
// and entity B is a subtype of entities C, E and F,
// then the count returned by the following application
// of getInstanceCount will include all instances of both A and B.
int A_and_B_and_other = m.getInstanceCount(types);
types
- an array of definitions of simple entity data types.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
,
getInstances(EEntity_definition types[])
public int getInstanceCount(java.lang.Class[] types) throws SdaiException
Example:
SdaiModel m = ...;
Class [] types = new Class[5];
types[0] = CC.class; // class for entity C
types[1] = CE.class; // class for entity E
types[2] = null;
// If, for example, entity A is a subtype of entities C, D and E,
// and entity B is a subtype of entities C, E and F,
// then the count returned by the following application
// of getInstanceCount will include all instances of both A and B.
int A_and_B_and_other = m.getInstanceCount(types);
types
- an array of classes representing simple entity data types.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- VA_NSET, value not set.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
,
getInstances(Class types[])
public int getExactInstanceCount(jsdai.dictionary.EEntity_definition type) throws SdaiException
type
- definition of the entity of which the instance count is required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(Class type)
,
getExactInstanceCount(EEntity_definition types[])
,
getExactInstances(EEntity_definition type)
public int getExactInstanceCount(java.lang.Class type) throws SdaiException
type
- Java class for the entity of which the instance count is required.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(EEntity_definition types[])
,
getExactInstances(Class type)
public int getExactInstanceCount(jsdai.dictionary.EEntity_definition[] types) throws SdaiException
types
- an array of definitions of simple entity data types.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NDEF, SdaiModel access not defined.
SdaiException
- ED_NDEF, entity definition not defined.getInstanceCount()
,
getInstanceCount(EEntity_definition type)
,
getInstanceCount(Class type)
,
getInstanceCount(EEntity_definition types[])
,
getInstanceCount(Class types[])
,
getExactInstanceCount(EEntity_definition type)
,
getExactInstanceCount(Class type)
public EEntity copyInstance(EEntity source) throws SdaiException
copyApplicationInstance
method.
The entity data type of the original instance must be defined or declared in the EXPRESS schema whose definition is underlying for this model. Otherwise, SdaiException ED_NVLD is thrown. Passing null value to the method's parameter results in SdaiException VA_NSET. The method is not applicable to models from "System Repository". Moreover, no instance from the models of "System Repository" can be copied to any model from any repository. In both these cases SdaiException FN_NAVL is thrown.
This method is an extension of JSDAI, which is not a part of the standard.
source
- the given entity instance.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- FN_NAVL, function not available.
SdaiException
- SY_ERR, underlying system error.copyInstances(jsdai.lang.AEntity)
public AEntity copyInstances(AEntity source) throws SdaiException
copyApplicationInstance
method.
The entity data type of each original instance must be defined or declared in the EXPRESS schema whose definition is underlying for this model. Otherwise, SdaiException ED_NVLD is thrown. Passing null value to the method's parameter results in SdaiException VA_NSET. The method is not applicable to models from "System Repository". Moreover, no instance from the models of "System Repository" can be copied to any model from any repository. In both these cases SdaiException FN_NAVL is thrown.
This method is an extension of JSDAI, which is not a part of the standard.
Example:
SdaiModel m = ...;
SdaiModel m_source = ...;
AEntity source = m_source.getInstances(ECartesian_point.class);
AEntity res_aggr = m.copyInstances(source);
source
- the aggregate of entity instances.
SdaiException
- TR_NEXS, transaction does not exist.
SdaiException
- TR_NRW, transaction not read-write.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- MX_NRW, SDAI-model access not read-write.
SdaiException
- ED_NVLD, entity definition invalid.
SdaiException
- VA_NSET, value not set.
SdaiException
- FN_NAVL, function not available.
SdaiException
- SY_ERR, underlying system error.copyInstance(jsdai.lang.EEntity)
public java.lang.String toString()
String
.
It includes constant string "SdaiModel: " and the name of the model.
public AEntity getEntityExtentInstances(jsdai.dictionary.EEntity_definition entity_definition) throws SdaiException
getInstances(EEntity_definition type)
instead.
SdaiException
public AEntity getEntityExtentInstances(java.lang.Class provided_class) throws SdaiException
getInstances(Class type)
instead.
SdaiException
public EEntity create(ComplexEntityValue values) throws SdaiException
SdaiException
public void exportXml(java.io.OutputStream location, InstanceReader instanceReader) throws SdaiException
instanceReader
parameter.
location
- an OutputStream
to write XML toinstanceReader
- an InstanceReader
describing output format
SdaiException
- if an error occurs during the operation
or in underlying JSDAI operationsjsdai.xml.InstanceReader
,
jsdai.xml.LateBindingReader
public java.net.URL getLocationURL() throws SdaiException
URL
.
The models can be stored in repository directory or in SDAI file.
SdaiModel
.
SdaiException
- MO_NEXS, SdaiModel does not exist.public jsdai.dictionary.EEntity_definition getEntityDefinitionByRef(jsdai.query.SerializableRef entityRef) throws SdaiException
SerializableRef
. This method searches the set of entities that
are encountered in the EXPRESS schema whose definition is underlying for this model.
If this parameter does not allow to identify an entity that is known for this schema,
then SdaiException ED_NDEF is thrown. Passing null value to the method's
parameter results in SdaiException VA_NSET.
entityRef
- SerializableRef
used to refer to remote entity instance.
entityRef.getTypeIndex()
should return positive value otherwise
SdaiException ED_NDEF is thrown.
SdaiException
- MO_NEXS, SDAI-model does not exist.
SdaiException
- ED_NDEF, entity definition not defined.
SdaiException
- VA_NSET, value not set.
SdaiException
- SY_ERR, underlying system error.getEntityDefinition(java.lang.String)
public void connectInConnector(jsdai.lang.SdaiModel.Connector connector)
SdaiModelConnector
connectInConnector
in interface SdaiModelConnector
connector
- a connector to connect.public void disconnectInConnector(jsdai.lang.SdaiModel.Connector connector)
SdaiModelConnector
disconnectInConnector
in interface SdaiModelConnector
connector
- a connector to disconnect.public SdaiModel resolveConnectedModel()
SdaiModelConnector
SdaiModel
.
This method is intended for internal use only.
resolveConnectedModel
in interface SdaiModelConnector
SdaiModel
|
Copyright © LKSoftWare GmbH, 1999-2008 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |