smog
Spreadsheet Model Generator (SMOG): A Lightweight Tool for Object-Spreadsheet Mapping
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.9%) to scientific vocabulary
Keywords
Repository
Spreadsheet Model Generator (SMOG): A Lightweight Tool for Object-Spreadsheet Mapping
Basic Info
- Host: GitHub
- Owner: Onto-Med
- License: mit
- Language: Java
- Default Branch: main
- Homepage: https://onto-med.github.io/SMOG/
- Size: 316 KB
Statistics
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
- Releases: 10
Topics
Metadata Files
README.md
Spreadsheet Model Generator (SMOG): A Lightweight Tool for Object-Spreadsheet Mapping
Description
The SMOG generates Java programming models from annotated Excel templates to read and write spreadsheet data. Following spreadsheet entities are inter alia supported: Fields, Tables and Trees. The entities must be annotated with entity identifiers "Field:", "Table:", "TreeTable:" followed by the entity name (see example.xlsx). Additionally, data types of fields or table values can be specified in the corresponding title or head cells (e.g., [Integer] or [StringL] for list types). For list types, an additional separator character can be defined (e.g., [StringL] <;>). The default separator character is "|".
String fields of a table 1 can be declared as foreign keys to fields of another table 2. This results into methods being generated for the Java class of entries in table 1 to access all referenced entries in table 2.
How to use
Executable JAR
Download one of our JAR releases and run it as shown below (replace 'x.x.x' with the actual SMOG version):
```sh
generate Java files in directory 'src/main/java'
java -jar smog-x.x.x-shaded.jar generate --group-id test.model --artifact-id test_artifact --version 0.1.0 example.xlsx src/main/java
generate Maven package in directory 'lib', default values are used for --group-id, --artifact-id, and --version
java -jar smog-x.x.x-shaded.jar generate --mvn example.xlsx lib
specify maven home
java -jar "-Dmaven.home=/path/to/maven/home" smog-x.x.x-shaded.jar generate --mvn example.xlsx lib ```
```sh
perform an OWL export as described in the config.yaml file
java -jar smog-x.x.x-shaded.jar export config.yaml ```
Maven Dependency
Add SMOG as dependency to your project (e.g. as maven dependency in pom.xml). SMOG is available as maven package
on https://maven.pkg.github.com.
xml
<dependency>
<groupId>de.imise.excel_api</groupId>
<artifactId>smog</artifactId>
<version><!-- smog version --></version>
</dependency>
The following example demonstrates how to start the SMOG:
```java // Build a ModelGenerator object from Microsoft Excel file: example.xlsx ModelGenerator gen = new ModelGenerator(new File("example.xlsx"));
// Use the ModelGenerator object to generate Java class files // in the directory "test/model" with package name "test.model" gen.generate(new File("test/model"), "test.model"); ```
```java // Build a SimpleOWLExport object from a YAML configuration file. SimpleOWLExport export = new SimpleOWLExport(Config.get("config.yaml"));
// Perform the export, as specified in the configuration file. export.export(); ```
OWL Export Configuration
| property | description |
|----------------|-------------------------------------------------------------------------------|
| namespace | namespace to be used for this ontology |
| version | version of the ontology, see https://www.w3.org/TR/owl-ref/#versionInfo-def |
| inputFile | Microsoft Excel input file |
| outputFile | destination of the output file |
| metadata (map) | additional axioms provided as <property-uri>: [value1, value2, ...] |
Example config.yaml:
```yaml
namespace: http://example.com/ex# version: 1.0.0 inputFile: example.xlsx outputFile: example.owl metadata: http://purl.org/dc/terms/title: - Example Ontology ```
Development
The code in this repository, and in contributions provided via pull requests, should conform to Google Java Style.
We use the flag --skip-reflowing-long-strings for google-java-format,
as it is currently not supported by all IDEs.
If you are running Linux and have google-java-format installed, you can run the format script to reformat
all repository files.
Reference
Uciteli, A.; Beger, C.; Kropf, S.; Herre, H. (2019): Spreadsheet Model Generator (SMOG): A Lightweight Tool for Object-Spreadsheet Mapping. In: Studies in health technology and informatics 267, pp. 110–117. DOI: 10.3233/SHTI190814.
License
The code in this repository and the package de.imise.excel_api:smog is licensed under MIT.
Owner
- Name: Onto-Med Research Group
- Login: Onto-Med
- Kind: organization
- Location: Leipzig
- Website: http://www.onto-med.de/
- Repositories: 6
- Profile: https://github.com/Onto-Med
The Onto-Med Research Group conducts basic research in formal ontology, designs formal tools and develops top level, domain and core ontologies.
Citation (CITATION.cff)
cff-version: "1.2.0" message: "If you use this software, please cite it using these metadata." title: "Spreadsheet Model Generator (SMOG)" abstract: "A Lightweight Tool for Object-Spreadsheet Mapping." authors: - affiliation: "Leipzig University" family-names: Uciteli given-names: Alexandr orcid: "https://orcid.org/0000-0001-9558-5352" - affiliation: "Leipzig University" family-names: Beger given-names: Christoph orcid: "https://orcid.org/0000-0002-1166-0368" - affiliation: "Leipzig University" family-names: Kropf given-names: Stefan orcid: "https://orcid.org/0000-0003-1305-8108" - affiliation: "Leipzig University" family-names: Herre given-names: Heinrich keywords: - "spreadsheet-mapping" - "ontologies" version: "v1.2.2" doi: 10.5281/zenodo.10797634 date-released: 2021-04-30 license: MIT url: "https://github.com/Onto-Med/SMOG"
GitHub Events
Total
- Release event: 2
- Delete event: 39
- Issue comment event: 23
- Push event: 50
- Pull request event: 78
- Create event: 44
Last Year
- Release event: 2
- Delete event: 39
- Issue comment event: 23
- Push event: 50
- Pull request event: 78
- Create event: 44
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 32
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.03
- Merged pull requests: 16
- Bot issues: 0
- Bot pull requests: 31
Past Year
- Issues: 0
- Pull requests: 32
- Average time to close issues: N/A
- Average time to close pull requests: 4 days
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.03
- Merged pull requests: 16
- Bot issues: 0
- Bot pull requests: 31
Top Authors
Issue Authors
- KonradHoeffner (4)
Pull Request Authors
- dependabot[bot] (86)
- ChristophB (6)
- KonradHoeffner (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- commons-io:commons-io 2.7
- net.sourceforge.owlapi:owlapi-distribution 5.1.20
- org.apache.poi:poi-ooxml 4.0.1
- junit:junit 4.13.1 test
- actions/checkout v2 composite
- actions/setup-java v1 composite
- actions/checkout v4 composite
- actions/setup-java v3 composite
- axel-op/googlejavaformat-action v3 composite
- de.imise.excel_api:smog {$smog_version} provided
- org.apache.poi:poi-ooxml {$poi_version}