SDAI file

Last update 2003-09-03

Introduction

SDAI file contains the equivalent information as a part21 (ISO 10303-21) file, but in a binary encoded way which can be much faster processed and needs less storage space. SDAI file can be easily used for exchange.

SDAI file features:

Creating SdaiRepository to be stored in SDAI file:

If you want to create a SdaiRepository to be stored in SDAI file then use createRepository() method and pass path of SDAI file as a location (second) parameter. If the value of the name (first) parameter is null or an empty string "", then a SdaiRepository with name derived from SDAI file name will be created. If SdaiRepository with the specified or derived name already exists, then SdaiRepository with modified name (SdaiRepository name plus sequence number) will be created.

Example

// create SdaiRepositories stored in SDAI files
repo = s.createRepository("MyRepo1", "c:\\myrepos\\MyRepo.sdai");
repo = s.createRepository("", "c:\\MyRepo2.sdai");
repo = s.createRepository(null, "c:\\MyRepo2.sdai");

If createRepository() method is called with location parameter set to null, then SdaiRepository is created into sdairepos directory and it's format depends on the value of an additional property new.repository.format in jsdai.properties file.

Example

//fragment of jsdai.properties file
new.repository.format = SDAI

// create SdaiRepository stored in SDAI file in sdairepos directory
repo = s.createRepository("MyRepo", null);

Linking SdaiRepository stored in SDAI file:

If you want to link an existing SdaiRepository stored in SDAI file then use linkRepository() method and pass path of SDAI file as a location (second) parameter. If the value of the name (first) parameter is null or an empty string "", then SdaiRepository name is derived from SDAI file name. If SdaiRepository with the specified or derived name already exists and name parameter was not null, then SdaiRepository with modified name (SdaiRepository name plus sequence number) is linked. If SdaiRepository with the specified or derived name already exists and name parameter was null, then SdaiException LC_NVLD is thrown.
Example

// link SdaiRepositories stored in SDAI files
rep = s.linkRepository("MyRepo1", "c:\\myrepos\\MyRepo.sdai");
rep = s.linkRepository("", "c:\\MyRepo2.sdai");
rep = s.linkRepository(null, "c:\\MyRepo2.sdai");

During session start all SdaiRepositories (conventional and stored in SDAI files) located in sdairepos directory are automatically linked to known_servers.

SDAI file format:

SDAI file format has several advantages:

  1. Only one file per SdaiRepository is used. It is very simple to exchange such files between users.
  2. Space used to store SdaiRepository is reduced. Over 50% of storage space is saved.
And drawbacks:
  1. Reading and writing operations are slower. It is due compression/recompression of data stored in SDAI file.

SDAI file format specification