A Java tool to generate AIXM 5.1 test data.
- Apache Maven 3.6.3.
- Java 11.0.12
- AIXM 5.1 XML Schema (link).
mvn clean package
cp target/aixm-gen-1.0-spring-boot.jar aixm-gen.jar
usage: aixm-gen
-ak,--access-key <accessKey> S3 access key.
-b,--bucket <bucket> S3 bucket.
-c,--configFile <file> use given file for configs
-D,--debug print debugging information
-e,--end <end> end time (valid XML timestamp).
-ep,--end-point <mode> S3 endpoint.
-h,--help print this message
-l,--logfile <file> use given file for log
-m,--multiplier <multiply> Generation multiplier
-op,--output-path <path> Output path.
-q,--quiet be extra quiet
-r,--region <region> S3 region.
-s,--start <start> start time (valid XML timestamp).
-sk,--secret-key <secretKey> S3 secret key.
-sm,--storage-mode <mode> Storage mode
-v,--verbose be extra verbose```
## Examples
```{r, engine='bash', code_block_name}
java -jar aixm-gen.jar -c configs.yaml
java -jar aixm-gen.jar -c configs.yaml -b "2021-01-01T00:00:00.000Z" -e "2021-12-30T23:59:00.000Z"
java -jar aixm-gen.jar -c configs.yaml -b "2021-12-28T23:59:00.000Z"
java -jar aixm-gen.jar -c configs.yaml -e "2021-12-30T23:59:00.000Z"
The configuration is provided via a yaml file, default is:
configs.yaml
Indecates the location of the schema files for AIXM model, currently we are using AIXM model version 5.1.1
schemaFile: "aixm511/aixm-5.1.1/message/AIXM_BasicMessage.xsd"
Indicates how many files are being generated per configuration (country, location, fir, topic, categormy, etc) per day.
multiply: 2
Indicates the time period on which the data is being generated. Values is are prvoided as ISO formated time stamp:
start: "2021-01-01T00:00:00.000Z"
end: "2022-12-31T23:59:59.999Z"
The tool allows to store the generated data locally or to an object storage service such as MinIO or Amazon S3.
outputOptions:
mode: "path" # or minio or s3
endpoint: "http://140.78.58.87:9000"
accessKey: "key"
secretKey: "password"
bucket: "kg-data"
s3region: ""
s3bucket: ""
path: "./files" #files path in case of path mode.
The user can define the schema they like the generator to use. please for configs.yaml for more details.