Skip to content

Commit

Permalink
Merge pull request #272 from kbss-cvut/development
Browse files Browse the repository at this point in the history
[3.1.1] Release
  • Loading branch information
ledsoft authored Jul 16, 2024
2 parents f95660a + 500e84c commit b84e1d3
Show file tree
Hide file tree
Showing 73 changed files with 818 additions and 602 deletions.
10 changes: 4 additions & 6 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>3.2.5</version>
<version>3.3.1</version>
</parent>

<artifactId>termit</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>
<name>TermIt</name>
<description>Terminology manager based on Semantic Web technologies.</description>
<packaging>${packaging}</packaging>
Expand All @@ -31,7 +31,7 @@
<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>2.2.0</org.springdoc.version>
<cz.cvut.kbss.jopa.version>2.0.0</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jopa.version>2.0.2</cz.cvut.kbss.jopa.version>
<cz.cvut.kbss.jsonld.version>0.14.3</cz.cvut.kbss.jsonld.version>

<!-- Default value for deployment type property which should otherwise specified on command line -->
Expand Down Expand Up @@ -112,7 +112,7 @@
<dependency>
<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-rio-rdfxml</artifactId>
<version>4.3.11</version>
<version>5.0.0</version>
</dependency>

<!-- Spring declarative transactions with JOPA -->
Expand Down Expand Up @@ -437,8 +437,6 @@
<version>1.13.1</version>
<configuration>
<complianceLevel>${java.version}</complianceLevel>
<source>${java.version}</source>
<target>${java.version}</target>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
Expand Down
98 changes: 0 additions & 98 deletions src/main/java/cz/cvut/kbss/termit/aspect/ChangeTrackingAspect.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package cz.cvut.kbss.termit.asset.provenance;

import cz.cvut.kbss.termit.aspect.RefreshLastModifiedAspect;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand All @@ -27,9 +25,7 @@
/**
* Designates methods which modify data and should thus refresh last modified date on completion.
* <p>
* This annotation should be used on methods of classes implementing {@link SupportsLastModification}. A corresponding
* aspect defined in {@link RefreshLastModifiedAspect} refreshes the last modified timestamp when a method modifying
* data is invoked.
* This annotation should be used on methods of classes implementing {@link SupportsLastModification}.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/cz/cvut/kbss/termit/config/ServiceConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@
package cz.cvut.kbss.termit.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import cz.cvut.kbss.termit.aspect.ChangeTrackingAspect;
import cz.cvut.kbss.termit.aspect.VocabularyContentModificationAspect;
import cz.cvut.kbss.termit.exception.ResourceNotFoundException;
import cz.cvut.kbss.termit.util.Utils;
import org.apache.hc.client5.http.classic.HttpClient;
import org.apache.hc.client5.http.impl.DefaultRedirectStrategy;
import org.apache.hc.client5.http.impl.classic.HttpClientBuilder;
import org.aspectj.lang.Aspects;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down Expand Up @@ -108,16 +105,4 @@ public Resource termStatesLanguageFile(cz.cvut.kbss.termit.util.Configuration co
}
return new ClassPathResource("languages/states.ttl");
}

@Bean
ChangeTrackingAspect changeTrackingAspect() {
// Need to create the aspect as a bean, so that it can be injected into
return Aspects.aspectOf(ChangeTrackingAspect.class);
}

@Bean
VocabularyContentModificationAspect vocabularyContentModificationAspect() {
// Need to create the aspect as a bean, so that it can be injected into
return Aspects.aspectOf(VocabularyContentModificationAspect.class);
}
}
26 changes: 26 additions & 0 deletions src/main/java/cz/cvut/kbss/termit/dto/TextAnalysisInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ public class TextAnalysisInput {
*/
private URI vocabularyRepository;

/**
* Username to access the repository
*/
private String vocabularyRepositoryUserName;

/**
* Password to access the repository
*/
private String vocabularyRepositoryPassword;

/**
* URIs of contexts containing vocabularies whose terms are used in the text analysis. Optional.
* <p>
Expand Down Expand Up @@ -84,6 +94,22 @@ public void setVocabularyRepository(URI vocabularyRepository) {
this.vocabularyRepository = vocabularyRepository;
}

public String getVocabularyRepositoryUserName() {
return vocabularyRepositoryUserName;
}

public void setVocabularyRepositoryUserName(String vocabularyRepositoryUserName) {
this.vocabularyRepositoryUserName = vocabularyRepositoryUserName;
}

public String getVocabularyRepositoryPassword() {
return vocabularyRepositoryPassword;
}

public void setVocabularyRepositoryPassword(String vocabularyRepositoryPassword) {
this.vocabularyRepositoryPassword = vocabularyRepositoryPassword;
}

public Set<URI> getVocabularyContexts() {
return vocabularyContexts;
}
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/cz/cvut/kbss/termit/event/AssetPersistEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cz.cvut.kbss.termit.event;

import cz.cvut.kbss.termit.model.Asset;
import org.springframework.context.ApplicationEvent;

/**
* Event published when an asset is persisted.
*/
public class AssetPersistEvent extends ApplicationEvent {

private final Asset<?> asset;

public AssetPersistEvent(Object source, Asset<?> asset) {
super(source);
this.asset = asset;
}

public Asset<?> getAsset() {
return asset;
}
}
21 changes: 21 additions & 0 deletions src/main/java/cz/cvut/kbss/termit/event/AssetUpdateEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package cz.cvut.kbss.termit.event;

import cz.cvut.kbss.termit.model.Asset;
import org.springframework.context.ApplicationEvent;

/**
* Event published when an asset is updated.
*/
public class AssetUpdateEvent extends ApplicationEvent {

private final Asset<?> asset;

public AssetUpdateEvent(Object source, Asset<?> asset) {
super(source);
this.asset = asset;
}

public Asset<?> getAsset() {
return asset;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@

import org.springframework.context.ApplicationEvent;

import java.net.URI;

/**
* Represents an event of modification of the content of a vocabulary.
* <p>
* This typically means a term is added, removed or modified. Modification of vocabulary metadata themselves is not considered here.
*/
public class VocabularyContentModified extends ApplicationEvent {

public VocabularyContentModified(Object source) {
private final URI vocabularyIri;

public VocabularyContentModified(Object source, URI vocabularyIri) {
super(source);
this.vocabularyIri = vocabularyIri;
}

public URI getVocabularyIri() {
return vocabularyIri;
}
}
Loading

0 comments on commit b84e1d3

Please sign in to comment.