Skip to content

Commit

Permalink
Merge pull request #242 from kbss-cvut/development
Browse files Browse the repository at this point in the history
[3.0.0] Release
  • Loading branch information
ledsoft committed Aug 21, 2023
2 parents 5232f3b + 90b4dc7 commit e74fd30
Show file tree
Hide file tree
Showing 82 changed files with 1,365 additions and 1,553 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push-to-protected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

# Runs a set of commands using the runners shell
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM maven:3-eclipse-temurin-11 as build
FROM maven:3-eclipse-temurin-17 as build

WORKDIR /termit

Expand All @@ -12,7 +12,7 @@ COPY src src

RUN mvn package -B -P graphdb,standalone -DskipTests=true

FROM eclipse-temurin:11-jdk-alpine as runtime
FROM eclipse-temurin:17-jdk-alpine as runtime
COPY --from=build /termit/target/termit.jar termit.jar

EXPOSE 8080
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ An **asset** is an object of one of the main domain types managed by the system

## Required Technologies

- JDK 11 or newer
- JDK 17 or newer
- Apache Maven 3.6.x or newer


Expand All @@ -30,7 +30,7 @@ See the [docs folder](doc/index.md) for additional information on implementation

This section briefly lists the main technologies and principles used (or planned to be used) in the application.

- Spring Boot 2, Spring Framework 5, Spring Security, Spring Data (paging, filtering)
- Spring Boot 3, Spring Framework 6, Spring Security, Spring Data (paging, filtering)
- Jackson 2.13
- [JB4JSON-LD](https://github.com/kbss-cvut/jb4jsonld-jackson) - Java - JSON-LD (de)serialization library
- [JOPA](https://github.com/kbss-cvut/jopa) - persistence library for the Semantic Web
Expand Down Expand Up @@ -77,7 +77,7 @@ Then, TermIt can be run and exposed at the port 8080 as

An optional argument is `<GRAPHDB_REPOSITORY_URL>` pointing to the RDF4J/GraphDB repository.

TermIt Docker images are also build and published to [DockerHub](https://hub.docker.com/r/kbsscvut/termit).
TermIt Docker images are also published to [DockerHub](https://hub.docker.com/r/kbsscvut/termit).

## Links

Expand Down
31 changes: 19 additions & 12 deletions ontology/termit-glosář.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ termit:glosář a owl:Ontology , <http://www.w3.org/2004/02/skos/core#Co
owl:imports <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/glosář> , <https://slovník.gov.cz/datový/pracovní-prostor/glosář> , <http://rdfs.org/sioc/ns#> , <http://www.w3.org/ns/activitystreams#> , <http://purl.org/vocab/vann/> ;
owl:versionIRI <http://onto.fel.cvut.cz/ontologies/application/termit/glosář/verze/1.1.2> ;
<http://www.w3.org/2004/02/skos/core#hasTopConcept>
termit-pojem:je-selektorem-definice-termu , termit-pojem:přiřazení-termu , termit-pojem:má-cíl , termit-pojem:selektor-definice , termit-pojem:je-přiřazením-termu , termit-pojem:má-suffix-text-quote , termit-pojem:záznam-o-textové-analýze , termit-pojem:má-přesný-text-quote , termit-pojem:selektor , termit-pojem:má-koncovou-pozici , termit-pojem:má-prefix-text-quote , termit-pojem:má-slovník-pro-analýzu , termit-pojem:uživatel-termitu , termit-pojem:cíl , termit-pojem:má-selektor , termit-pojem:má-zdroj-definice-termu , termit-pojem:má-analyzovaný-zdroj , termit-pojem:má-startovní-pozici, termit-pojem:je-draft .
termit-pojem:je-selektorem-definice-termu , termit-pojem:přiřazení-termu , termit-pojem:má-cíl , termit-pojem:selektor-definice , termit-pojem:je-přiřazením-termu , termit-pojem:má-suffix-text-quote , termit-pojem:záznam-o-textové-analýze , termit-pojem:má-přesný-text-quote , termit-pojem:selektor , termit-pojem:má-koncovou-pozici , termit-pojem:má-prefix-text-quote , termit-pojem:má-slovník-pro-analýzu , termit-pojem:uživatel-termitu , termit-pojem:cíl , termit-pojem:má-selektor , termit-pojem:má-zdroj-definice-termu , termit-pojem:má-analyzovaný-zdroj , termit-pojem:má-startovní-pozici , termit-pojem:úvodní-stav-pojmu , termit-pojem:koncový-stav-pojmu .

termit-pojem:má-koncovou-pozici
a <http://www.w3.org/2004/02/skos/core#Concept> ;
Expand Down Expand Up @@ -152,15 +152,6 @@ termit-pojem:má-zdroj-definice-termu
<http://www.w3.org/2004/02/skos/core#prefLabel>
"má zdroj definice termu"@cs .

termit-pojem:je-draft
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
<https://slovník.gov.cz/základní/pojem/vlastnost> , <https://slovník.gov.cz/základní/pojem/typ-vlastnosti> ;
<http://www.w3.org/2004/02/skos/core#inScheme>
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"je draft"@cs .

termit-pojem:selektor
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
Expand Down Expand Up @@ -497,8 +488,6 @@ termit-pojem:zakázaný
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Forbidden"@en , "Zakázaný"@cs .

# TODO consider moving this into a separate namespace (e.g., termit/rizeni-pristupu)

termit-pojem:seznam-řízení-přístupu
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
Expand Down Expand Up @@ -624,3 +613,21 @@ termit-pojem:úroveň-přístupových-oprávnění
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Access level - Security"@en , "Úroveň přístupových oprávnění - Správa"@cs .

termit-pojem:úvodní-stav-pojmu
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
<https://slovník.gov.cz/základní/pojem/typ-objektu> ;
<http://www.w3.org/2004/02/skos/core#inScheme>
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Initial term state"@en , "Úvodní stav pojmu"@cs .

termit-pojem:koncový-stav-pojmu
a <http://www.w3.org/2004/02/skos/core#Concept> ;
<http://www.w3.org/2004/02/skos/core#broader>
<https://slovník.gov.cz/základní/pojem/typ-objektu> ;
<http://www.w3.org/2004/02/skos/core#inScheme>
termit:glosář ;
<http://www.w3.org/2004/02/skos/core#prefLabel>
"Terminal term state"@en , "Koncový stav pojmu"@cs .
21 changes: 10 additions & 11 deletions ontology/termit-model.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,10 @@ termit-pojem:uživatel-termitu

termit-pojem:má-zdroj-definice-termu
a owl:ObjectProperty , <https://slovník.gov.cz/základní/pojem/typ-vztahu> ;
rdfs:domain <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/term> ;
rdfs:domain <http://www.w3.org/2004/02/skos/core#Concept> ;
rdfs:range termit-pojem:zdroj-definice-termu ;
rdfs:subPropertyOf <https://slovník.gov.cz/základní/pojem/vztah> .

termit-pojem:je-draft
a owl:DatatypeProperty , <https://slovník.gov.cz/základní/pojem/typ-vlastnosti> ;
rdfs:domain <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/term> ;
rdfs:range xsd:boolean ;
rdfs:subPropertyOf <https://slovník.gov.cz/základní/pojem/vlastnost> .

<http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/term>
a owl:Class .

termit-pojem:selektor
a <https://slovník.gov.cz/základní/pojem/typ-objektu> , owl:Class ;
rdfs:subClassOf <https://slovník.gov.cz/základní/pojem/objekt> .
Expand Down Expand Up @@ -109,7 +100,7 @@ termit-pojem:cíl a <https://slovník.gov.cz/základní/pojem/typ-objektu>
termit-pojem:je-přiřazením-termu
a owl:ObjectProperty , <https://slovník.gov.cz/základní/pojem/typ-vztahu> ;
rdfs:domain termit-pojem:přiřazení-termu ;
rdfs:range <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/term> ;
rdfs:range <http://www.w3.org/2004/02/skos/core#Concept> ;
rdfs:subPropertyOf <https://slovník.gov.cz/základní/pojem/vztah> .

termit-pojem:selektor-definice
Expand Down Expand Up @@ -334,3 +325,11 @@ termit-pojem:úroveň-přístupových-oprávnění

<http://onto.fel.cvut.cz/ontologies/application/termit/pojem/úroveň-přístupových-oprávnění/správa>
a owl:NamedIndividual .

termit-pojem:úvodní-stav-pojmu
a <https://slovník.gov.cz/základní/pojem/typ-objektu>, owl:Class ;
rdfs:subClassOf <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/stav-pojmu> .

termit-pojem:koncový-stav-pojmu
a <https://slovník.gov.cz/základní/pojem/typ-objektu>, owl:Class ;
rdfs:subClassOf <http://onto.fel.cvut.cz/ontologies/slovník/agendový/popis-dat/pojem/stav-pojmu> .
54 changes: 29 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.12</version>
<version>2.7.13</version>
</parent>

<artifactId>termit</artifactId>
<version>2.18.0</version>
<version>3.0.0</version>
<name>TermIt</name>
<description>Terminology manager based on Semantic Web technologies.</description>
<packaging>${packaging}</packaging>
Expand All @@ -24,13 +24,13 @@
</repositories>

<properties>
<java.version>11</java.version>
<java.version>17</java.version>
<org.apache.tika.tika-core.version>2.7.0</org.apache.tika.tika-core.version>
<org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
<org.springdoc.version>1.7.0</org.springdoc.version>
<cz.cvut.kbss.jopa.version>0.22.1</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jsonld.version>0.12.3</cz.cvut.kbss.jsonld.version>
<org.aspectj.version>1.9.7</org.aspectj.version>
<cz.cvut.kbss.jopa.version>1.1.0</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jsonld.version>0.13.2</cz.cvut.kbss.jsonld.version>
<org.aspectj.version>1.9.19</org.aspectj.version>

<!-- Default value for deployment type property which should otherwise specified on command line -->
<deployment>DEV</deployment>
Expand Down Expand Up @@ -122,15 +122,15 @@
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-rio-rdfxml</artifactId>
<version>3.7.7</version>
<version>4.3.2</version>
</dependency>


<!-- Spring declarative transactions with JOPA -->
<dependency>
<groupId>com.github.ledsoft</groupId>
<artifactId>jopa-spring-transaction</artifactId>
<version>0.1.5</version>
<version>0.2.0</version>
</dependency>

<!-- Spring -->
Expand Down Expand Up @@ -404,13 +404,6 @@
</profile>

<!-- Profiles for storages. Important for correct full text search functionality -->
<profile>
<id>rdf4j</id>
<properties>
<profile.name>rdf4j</profile.name>
<spring.profiles.active>lucene</spring.profiles.active>
</properties>
</profile>
<profile>
<id>graphdb</id>
<properties>
Expand Down Expand Up @@ -509,22 +502,32 @@
<groupId>cz.cvut.kbss.jopa</groupId>
<artifactId>jopa-maven-plugin</artifactId>
<version>${cz.cvut.kbss.jopa.version}</version>
<configuration>
<package>cz.cvut.kbss.termit.util</package>
<output-directory>${project.basedir}/src/main/generated-sources</output-directory>
<ontology-iri>http://onto.fel.cvut.cz/ontologies/application/termit</ontology-iri>
<mapping-file>${project.basedir}/src/main/resources/mapping</mapping-file>
<whole-ontology-as-ics>true</whole-ontology-as-ics>
<vocabulary-only>true</vocabulary-only>
<ignore-failed-imports>true</ignore-failed-imports>
</configuration>
<executions>
<execution>
<id>generate-vocabulary</id>
<phase>generate-sources</phase>
<goals>
<goal>owl2java-transform</goal>
</goals>
<configuration>
<package>cz.cvut.kbss.termit.util</package>
<output-directory>${project.basedir}/src/main/generated-sources</output-directory>
<ontology-iri>http://onto.fel.cvut.cz/ontologies/application/termit</ontology-iri>
<mapping-file>${project.basedir}/src/main/resources/mapping</mapping-file>
<whole-ontology-as-ics>true</whole-ontology-as-ics>
<vocabulary-only>true</vocabulary-only>
<ignore-failed-imports>true</ignore-failed-imports>
</configuration>
</execution>
<execution>
<id>generate-static-metamodel</id>
<phase>generate-sources</phase>
<goals>
<goal>modelgen</goal>
</goals>
<configuration>
<source-package>cz.cvut.kbss.termit.model</source-package>
</configuration>
</execution>
</executions>
</plugin>
Expand Down Expand Up @@ -564,7 +567,8 @@
</goals>
<configuration>
<sources>
<source>src/main/generated-sources</source>
<source>${project.basedir}/src/main/generated-sources</source>
<source>${project.build.directory}/generated-sources/static-metamodel/</source>
</sources>
</configuration>
</execution>
Expand Down
4 changes: 2 additions & 2 deletions profile/graphdb/query/fulltextsearch.rq
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dc: <http://purl.org/dc/terms/>

SELECT DISTINCT ?entity ?label ?vocabularyUri ?draft ?type ?snippetField ?snippetText ?score {
SELECT DISTINCT ?entity ?label ?vocabularyUri ?state ?type ?snippetField ?snippetText ?score {
{
?search a inst:label_index .
}
Expand All @@ -33,7 +33,7 @@ SELECT DISTINCT ?entity ?label ?vocabularyUri ?draft ?type ?snippetField ?snippe
?entity ?inVocabulary ?vocabularyUri .
}
OPTIONAL {
?entity ?isDraft ?draft .
?entity ?hasState ?state .
}
FILTER (?type = ?term || ?type = ?vocabulary)
FILTER NOT EXISTS { ?entity a ?snapshot . }
Expand Down
35 changes: 0 additions & 35 deletions profile/rdf4j/query/fulltextsearch.rq

This file was deleted.

Loading

0 comments on commit e74fd30

Please sign in to comment.