7.2.5 Creating a data files definition file
This section describes the file format and specification format for, and provides specification examples of data files definition files for which the jamexport command is used to export object classes.
- Organization of this subsection
(1) Format of data files definition file
To export multiple asset data items in a batch operation, create a data files definition file. This section describes the format of a data files definition file, the character encoding, delimiters, and the location of delimiters.
-
File format
You must create a data files definition file in the text format.
-
Supported character encoding
Depending on the system locale of the machine on which the asset management server is installed, the character encoding used for the description differs.
-
Japanese: Shift_JIS encoding
-
English: ASCII encoding
-
Chinese: GBK encoding
-
-
Delimiters and their locations
-
When exporting object classes
Specify the name of a data file to be exported paired with the corresponding object class name and delimit the pair with a linefeed code (CRLF or LF). Enclose each data file name and object class name in double quotation marks (") and separate the two with a comma.
-
When exporting association classes
Specify the name of a data file to be exported, the corresponding association class name, and the associated two object class names as a set and delimit the set with a linefeed code (CRLF or LF). Enclose each data file name, association class name, and object class names in double quotation marks (") and separate them with the comma.
-
(2) Specification format for data files definition file
You must create a data files definition file as a text file. In the file, specify the name of the target data file and the corresponding object class name.
To export an association class, specify the name of the target data file, corresponding association class name, and associated two object class names.
The following figure shows the specification format for a data files definition file.
|
The following describes the items specified in a data files definition file:
- data-file-name
-
Specifies the name of the data file in which asset data is to be written. You can specify a full or relative path. A relative path is based on the path where the data files definition file is located. Neither .\ nor ..\ is permitted.
- object-class-name and association-class-name
-
Specifies the class name for the asset data to be exported.
- associated-object-class-name and another-associated-object-class-name
-
Specifies the names of two object classes that are associated with each other as association classes.
Specify this information only when an association class is to be imported.
(3) Specification example of data files definition file (object class)
This section describes an example of specifying a data files definition file when object classes are exported using the jamexport command.
The following figure shows a specification example of a data files definition file.
|
Line 1 indicates that the name of the data file is C:\temp\AssetInfo.csv and that the name of the object class is AssetInfo.
By executing the jamexport command, this example exports the entire contents of the object class AssetInfo to C:\temp\AssetInfo.csv.
The subsequent lines are processed in the same manner as with line 1.
(4) Specification example of data files definition file (association class)
This section describes an example of a data files definition file when association classes are exported using the jamexport command.
The following figure shows a specification example of a data files definition file.
|
Line 1 indicates that the name of the data file is C:\temp\ContMLink.csv, that the name of the association class is ContractMaintenanceLink, and that the names of the associated object classes are AssetInfo and Contract.
By executing the jamexport command, this example exports the entire contents of the association class ContractMaintenanceLink to C:\temp\ContMLink.csv.
The subsequent lines are processed in the same manner as with line 1.
- Note
-
You can export weak association classes, but you cannot import them. For details about weak association classes, see 8.1.3 Types of associations.