ecostruxure / olga Goto Github PK
View Code? Open in Web Editor NEWan Ontology SDK
License: MIT License
an Ontology SDK
License: MIT License
Describe the bug
I am trying to generate POCO/POJO classes for Brick ontology v1.2.0 but the OLGA CLI generate throws an error about Invalid class name for both C3 and Java code gen.
The Error happens because BRICK has some classes which contain '.' e.g. PM2.5_Concentration. This interferes with Class naming convention of .Net and Java.
Visitor.IsValidToken() returns false and the codegen fails for such classes.
To Reproduce
Steps to reproduce the behavior:
java -jar OLGA-Cli/target/OLGA-Cli-0.0.6-with-dependencies.jar --code java --library rdf4j --name BrickSchemaClasses --path Brick.ttl --out
.I see the following error
2021-06-28 20:20:08 ERROR OLGA:90 - semanticstore.ontology.library.generator.exceptions.InvalidClassNameException: PM2.5_Concentration Invalid class name, it doesn't follow the convention. PM2.5_Concentration Invalid class name, it doesn't follow the convention.
**
Expected behavior
The POCO/POJO classes should be generated for the Brick ontology (since the documentation mentions that it has been tested against Brick (maybe a previous version).
Desktop (please complete the following information):
Add turtle file support to the OLGA web service (CLI already supports turtle files)
Currently when I try to submit a turtle file to the web service I get the following error:
{
"timestamp": "2020-01-28T16:07:53.065Z",
"status": 415,
"error": "Unsupported Media Type",
"exception": "org.springframework.web.HttpMediaTypeNotSupportedException",
"message": "Content type 'text/turtle' not supported",
"path": "/Ontology/OLGAsaas/1.0.0/1.0/generate"
}
Move the integration testing from internal setup to the Github actions so that any contributor can see the failures and the errors to fix them
Describe the bug
rdfs:Datatype is not handled. OLGA considers it as a class to generate with the superclass rdfs:Literal. But OLGA prevents classes from rdfs: to be generated see here. Hence the superclass of the rdfs:Datatype is not generated which causes a compile error.
To Reproduce
Steps to reproduce the behavior:
Execute OLGAJavaTest#testSarefMerged junit test
Expected behavior
The generated code should compile.
Describe the bug
Some classes are not being generated with RDF4J with the preserve namespace option code generation.
To Reproduce
-preserve --code java --library rdf4j --name DigitalBuildings --path PATH_TO_ONTOLOGY
Expected behavior
Some Classes are not being generated,
Desktop (please complete the following information):
Describe the bug
Swagger documentation URL - http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0/ does not display API documentation, instead it display the string redirect:swagger-ui.html
To Reproduce
Steps to reproduce the behavior:
http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0/
Instead of seeing API documentation I see a page with the text: redirect:swagger-ui.html
. If I go directly to http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0/swagger-ui.html
I get the documentation UI, but I get a dialog prompting me for the API's base URL.
Also note that the web service readme gives the wrong URL for the API documentation (http://localhost:9090/
instead of http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0/
)
Expected behavior
Browser should redirect to API documentation
Screenshots
Desktop (please complete the following information):
OS: MacOS Mojave 10.14.6
Browser Firefox
Version 71.0 (64 bit)
Browser Chrome
Version 79.0.3945.117 (Official Build) (64-bit)
Hello,
I have used docker and installed in my Ubuntu 18.04.
After docker run ./docker-run.sh and opening
http://localhost:9090/Ontology/OLGAsaas/1.0.0/1.0/swagger-ui.html.
I tried generating code both in python and java.
The zip file created after is corrupted. Unable to extract any files.
Facing Compilation error while trying to generate jar file for fiesta ontology using OLGA
Steps to reproduce the behavior:
Open command prompt from OLGA folder and give this command
java -jar OLGA-Cli/target/OLGA-Cli-0.0.6-with-dependencies.jar --code java --library rdf4j --name Fiesta --path OLGA-Cli/target/fiesta-iot.owl
I get the following error
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /G:/OLGA-master/OLGA-master/OLGA/fiesta-RDF4J-java/src/main/java/fiesta/rdf/model/Metadata.java:[17,8] class MetaData is public, should be declared in a file named MetaData.java
[ERROR] /G:/OLGA-master/OLGA-master/OLGA/fiesta-RDF4J-java/src/main/java/fiesta/rdf/model/IMetadata.java:[9,8] interface IMetaData is public, should be declared in a file named IMetaData.java
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Could someone please take a look on this and provide solution as soon as possible, it will be very much helpful.
Thanks in advance.
Compilation fails for Java code generated using the OLGA SDK
Steps to reproduce the behavior:
Download the digital_buildings rdf file from the digital buildings repo.
ZIP the OLGA Repo Master branch.
install the CORE and CLI packages,
java -jar OLGA-Cli/target/OLGA-Cli-0.0.6-with-dependencies.jar --code java --library rdf4j --name DigitalBuildings --path digital_buildings.rdf
I get the following error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project digitalbuildings-RDF4J: Compilation failure: Compilation failure:
[ERROR] /E:/OLGA-master/OLGA-master/OLGA/OLGA/generated/digitalbuildings-RDF4J-java/src/main/java/digitalbuildings/rdf/model/Ahu_bspc_dx4sc_econm_efss_efvsc_oafmc_sfss_sfvsc_sspc.java:[64,17] method addUsesOptionalsEconomizer_mode(digitalbuildings.rdf.model.IEconomizer_mode) is already defined in class digitalbuildings.rdf.model.Ahu_bspc_dx4sc_econm_efss_efvsc_oafmc_sfss_sfvsc_sspc
This comes for a lot of classes
Please Help
As a user, I might just need one library and one language, therefore, I would like to skip the tests for all languages.
For example, if I would like to use only java, I would like to skip the tests for C# and Python dependencies.
Describe the bug
When trying to built the docker following this example, step 27/30 fails.
To Reproduce
Steps to reproduce the behavior:
% ./build-docker-image.sh
Using https://github.com/EcoStruxure/OLGA.git as git repo URL
Using master as git branch
Using OLGA as project
Using OLGA-Core,OLGA-Ws as subprojects
Using OLGA-Ws as Maven artifact ID
Using 0.0.5 as version
Using ecostruxure/olga:latest as the Docker tag
Sending build context to Docker daemon 3.584kB
Step 1/30 : FROM alpine/git as clone
---> 8f5f87e1dbac
Step 2/30 : ARG url
---> Using cache
---> af5efd494ea7
Step 3/30 : ARG branch
---> Using cache
---> 98dc352216ea
Step 4/30 : WORKDIR /app
---> Using cache
---> 4570109b47ff
Step 5/30 : RUN git clone -b ${branch} --single-branch ${url}
---> Using cache
---> e0520e2dc2a7
Step 6/30 : FROM maven:3.5-jdk-8-alpine as build
---> fb4bb0d89941
Step 7/30 : ARG project
---> Using cache
---> aeba4bf3d4f8
Step 8/30 : ARG subprojects
---> Using cache
---> 202620a431b2
Step 9/30 : WORKDIR /app
---> Using cache
---> 5e3e3bfbbe92
Step 10/30 : COPY --from=clone /app/${project} /app
---> Using cache
---> d5bcb57a8d71
Step 11/30 : WORKDIR /app/${project}
---> Using cache
---> ad0c768b884a
Step 12/30 : RUN mvn --projects ${subprojects} clean install -DskipTests
---> Using cache
---> 6c57ef6d40b4
Step 13/30 : FROM maven:3.5-jdk-8-alpine
---> fb4bb0d89941
Step 14/30 : ARG project
---> Using cache
---> aeba4bf3d4f8
Step 15/30 : ARG artifactid
---> Using cache
---> 3885bc681dc2
Step 16/30 : ARG version
---> Using cache
---> 0017c7c1897d
Step 17/30 : ENV artifact ${artifactid}-${version}-with-dependencies.jar
---> Using cache
---> fcfb5af4fe3c
Step 18/30 : ENV M2_HOME ${MAVEN_HOME}
---> Using cache
---> e88f4af25cd3
Step 19/30 : ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps
---> Using cache
---> 42d1902900f0
Step 20/30 : RUN apk add --no-cache icu-libs openssl-dev
---> Using cache
---> 432729cb87cc
Step 21/30 : ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
---> Using cache
---> 2ec1b2f24ffe
Step 22/30 : ENV DOTNET_SDK_VERSION 2.1.607
---> Using cache
---> 6944623b6da3
Step 23/30 : RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz && dotnet_sha512='61caf6602b8a2aa89769b3e91ddaec963d8ab9f802cd7f6c6da4f02426358712bc2bb0930e7ee3a81d75c7607039543b554cb8ed50e45610655f9e91ed0f2f17' && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - && mkdir -p /usr/share/dotnet && tar -C /usr/share/dotnet -xzf dotnet.tar.gz && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet && rm dotnet.tar.gz
---> Using cache
---> 26df7bcc17d7
Step 24/30 : ENV DOTNET_USE_POLLING_FILE_WATCHER=true NUGET_XMLDOC_MODE=skip
---> Using cache
---> b6972fd69e7f
Step 25/30 : RUN dotnet help
---> Using cache
---> 1e1ac47645cc
Step 26/30 : WORKDIR /app
---> Using cache
---> d1b6538e6ae4
Step 27/30 : COPY --from=build /app/${project}/${artifactid}/target/${artifact} /app
COPY failed: stat /var/lib/docker/overlay2/599d6faae67bccbef0c845ae0404d8ca76feea148940b305da03c788e46592b2/merged/app/OLGA/OLGA-Ws/target/OLGA-Ws-0.0.5-with-dependencies.jar: no such file or directory
Expected Behaviour:
Building of the docker is successful.
OS:
Ubuntu GNU/Linux 18.04 LTS
Describe the bug
The generation does not seem to run using service through the docker image.
Response is:
{
"content-disposition": "attachment;filename=test.zip",
"content-length": "0",
"date": "Tue, 10 Nov 2020 12:26:40 GMT"
}
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should download the result, but the ontology file doesn't seem to be picked up by service.
Log
2020-11-10 12:26:40 INFO GeneratorController:90 - Operation Starts
2020-11-10 12:26:40 INFO GeneratorController:96 - Parsing Inputs
2020-11-10 12:26:40 INFO GeneratorController:104 - Invoke Olga Service
2020-11-10 12:26:40 ERROR OlgaService:223 - java.nio.file.NoSuchFileException: ./temp/b26d57b2-7897-435a-91e5-328b15d44020
2020-11-10 12:26:40 ERROR OlgaService:123 - java.nio.file.NoSuchFileException: ./temp/b26d57b2-7897-435a-91e5-328b15d44020
2020-11-10 12:26:40 ERROR OlgaService:78 - java.nio.file.NoSuchFileException: ./temp/b26d57b2-7897-435a-91e5-328b15d44020
2020-11-10 12:26:40 ERROR GeneratorController:133 - java.nio.file.NoSuchFileException: ./temp/b26d57b2-7897-435a-91e5-328b15d44020
./temp/b26d57b2-7897-435a-91e5-328b15d44020
2020-11-10 12:26:40 INFO GeneratorController:137 - Clean up
2020-11-10 12:26:40 INFO GeneratorController:142 -
Desktop (please complete the following information):
Additional context
I've built and run the OLGA docker container under windows.
Also, the documentation has not been updated since the endpoint parameters was switched to Multipart-Form. ´
Would it be possible to provide an example of how to submit multiple ontology files to the /generate
endpoint?
It would be very helpful to have a working Docker image which has the HTTP API enabled. That would make it much easier for us to use OLGA as a generator in our ontology platform 'modom.io'.
The RDFAlchemy project's repo is archived and inactive - https://github.com/gjhiggins/RDFAlchemy and it doesn't look like there is a clear replacement. Perhaps https://github.com/cosminbasca/surfrdf or https://pypi.org/project/Owlready2/ ?
In addition to RDF and OWL it would be great if OLGA supported Turtle syntax ontology files
Describe the bug
When running tests on master branch, NullPointerException is thrown from OWL manager method loadOntologyFromOntologyDocument
To Reproduce
Steps to reproduce the behavior:
mvn clean install --projects OLGA-Core
Expected behavior
All tests pass.
Actual behavior
Several tests fail with a NullPointerException thrown by the call to loadOntologyFromOntologyDocument
. For example,
[INFO] Running semanticstore.ontology.library.generator.visitor.OLGAVisitorDSPTest
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.002 s <<< FAILURE! - in semanticstore.ontology.library.generator.visitor.OLGAVisitorDSPTest
[ERROR] semanticstore.ontology.library.generator.visitor.OLGAVisitorDSPTest Time elapsed: 0.002 s <<< ERROR!
java.lang.NullPointerException
at semanticstore.ontology.library.generator.visitor.OLGAVisitorDSPTest.setUpBeforeClass(OLGAVisitorDSPTest.java:238)
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
I had to add the following exclusion to the maven-invoker-plugin in OLGA-Core pom.xml:
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</exclusion>
I have used digital building example code and create java library. mvn build worked and I was able use this library in my new maven project. After ruuning the code with Rio.write(GLOBAL.model, System.out, RDFFormat.TURTLE);build was successful. But I am not getting any out jsonld file as an output.
Error
Caused by: java.lang.NoClassDefFoundError: www/google/com/digitalbuildings/_0_0_1/facilities/IFloor
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.