public interface IEncyclopedia
This interface is not intended to be implemented by clients.
SAApplication.getEncyclopedia()
Modifier and Type | Method and Description |
---|---|
boolean |
closeUnLock(LockMode mode)
Closes the encyclopedia lock.
|
IDefinition |
createDefinition(String name,
long type)
Creates an instance of the definition class with a specified definition name and definition
type.
|
IDiagram |
createDiagram(String name,
long type)
Creates an instance of the diagram class with a specified diagram name and diagram type.
|
void |
exportXML(File file)
Exports the encyclopedia's XML content into a valid xml file.
|
SAApplication |
getApplication()
The application object returns the parent application object of the current encyclopedia
object.
|
IEncyclopediaConnection |
getConnection()
Returns the information required to connect to an encyclopedia.
|
IDiagram |
getCurrentDiagram()
Returns the currently open diagram.
|
IDefinition |
getDefinitionById(long id)
Returns a definition from its specified identity.
|
IDefinition |
getDefinitionByName(String name,
long type)
Returns a definition from its specified name.
|
List<IDefinition> |
getDefinitions()
Returns all definitions in the encyclopedia.
|
List<IDefinition> |
getDefinitions(String pattern,
long type)
Returns a filtered definition collection of an encyclopedia.
|
IDiagram |
getDiagramById(long id)
Returns a diagram from its specified identity.
|
IDiagram |
getDiagramByName(String name,
long type)
Returns a diagram from its specified identity.
|
List<IDiagram> |
getDiagrams()
Returns all diagrams in the encyclopedia.
|
List<IDiagram> |
getDiagrams(String pattern,
long type)
Returns a filtered diagram collection of an encyclopedia.
|
String |
getFullName()
Returns the name of the current encyclopedia including the full path.
|
IMetaModel |
getMetaModel()
Returns the MetaModel Class.
|
String |
getName()
Returns the name of the current encyclopedia.
|
String |
getPath()
Returns the path of the current encyclopedia.
|
void |
importXML(File xmlFile,
CollisionMode collisionMode)
Imports an xml file into the encyclopedia.
|
void |
importXML(InputSource source,
CollisionMode collisionMode)
Imports an xml file into the encyclopedia.
|
boolean |
isOpenObjectsAsReadOnly()
Determines whether all objects from the Object model are to be opened as Read-only.
|
boolean |
openLock(LockMode mode)
The OpenLock and CloseUnlock methods control the lock status of the current System Architect encyclopedia.
|
void |
setOpenObjectsAsReadOnly(boolean value)
Sets whether all objects from the Object model are to be opened as Read-only.
|
SAApplication getApplication()
String getFullName()
String getName()
String getPath()
IEncyclopediaConnection getConnection()
IMetaModel getMetaModel()
boolean isOpenObjectsAsReadOnly()
true
if all objects from the Object model are to be opened as Read-only, false
otherwise.void setOpenObjectsAsReadOnly(boolean value)
value
- true
if all objects from the Object model are to be opened as Read-only, false
otherwise.boolean openLock(LockMode mode)
The OpenLock and CloseUnlock methods control the lock status of the current System Architect encyclopedia. This determines whether the encyclopedia is locked for read-only, read-write or update access while operations are taking place.
If an OpenLock is executed in a particular mode then a CloseUnlock must be executed in the same mode later in the code.
OpenLock and CloseUnlock methods can be operated multiple times in code if different levels of locking are required on the encyclopedia.
If OpenLock and CloseUnlock methods are not executed in the code then System Architect will perform it's own locking when required each time an Object Model method is issued. This can affect the performance of the code.
mode
- lock status of current System Architect Encyclopedia.true
if the method was successful, false
otherwise.closeUnLock(LockMode)
boolean closeUnLock(LockMode mode)
mode
- lock status of current System Architect Encyclopedia.true
if the method was successful, false
otherwise.openLock(LockMode)
IDefinition createDefinition(String name, long type)
Refer to the DEFNS.BAS file in the System Architect directory for a complete listing of all definitions and their internal numbers.
name
- name of new definition.type
- type of System Architect definition that is being created.List<IDefinition> getDefinitions()
List<IDefinition> getDefinitions(String pattern, long type)
Refer to the DEFNS.BAS file in the System Architect directory for a complete listing of all definitions and their internal numbers.
pattern
- filter criteria (e.g. "C*"
means all definitions starting with "C"
). The pattern is case sensitive.type
- type of System Architect definition that is being retrieved .IDefinition getDefinitionById(long id)
All definitions stored in System Architect are uniquely identified internally by the use of a data dictionary identifier.
id
- the definition identifier.null
if there is no match.IDefinition getDefinitionByName(String name, long type)
Refer to the DEFNS.BAS file in the System Architect directory for a complete listing of all definitions and their internal numbers.
name
- the definition name.type
- type of System Architect definition.null
if there is no match.IDiagram createDiagram(String name, long type)
Refer to the DIAGRAMS.BAS file in the System Architect directory for a complete listing of all diagrams and their internal numbers.
name
- name of new diagram.type
- type of System Architect diagram that is being created.List<IDiagram> getDiagrams()
List<IDiagram> getDiagrams(String pattern, long type)
Refer to the DIAGRAMS.BAS file in the System Architect directory for a complete listing of all diagrams and their internal numbers.
pattern
- filter criteria (e.g. "C*"
means all diagrams starting with "C"
). The pattern is case sensitive.type
- type of System Architect diagram that is being retrieved .IDiagram getDiagramById(long id)
All diagrams stored in System Architect are uniquely identified internally by the use of a data dictionary identifier.
id
- the diagram identifier.null
if there is no match.IDiagram getDiagramByName(String name, long type)
Refer to the DIAGRAMS.BAS file in the System Architect directory for a complete listing of all diagrams and their internal numbers.
name
- the diagram name.type
- type of System Architect diagram.null
if there is no match.IDiagram getCurrentDiagram()
void importXML(File xmlFile, CollisionMode collisionMode)
xmlFile
- a valid xml file name, from which System Architect is
importing the XML code.collisionMode
- determines how to handle conflicts.void importXML(InputSource source, CollisionMode collisionMode) throws IOException
source
- a source containing XML data, from which System Architect is
importing the XML code.collisionMode
- determines how to handle conflicts.IOException
- if reading the character stream of byte stream throws an error.void exportXML(File file)
Preconditions:
file
- a valid xml file name to which System Architect will
export the encyclopedia's xml content.