Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ldio naming cleanup #488

Merged
merged 5 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ldi-core/ldes-client/tree-node-supplier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
<artifactId>HikariCP</artifactId>
<version>${hikari.version}</version>
</dependency>
<dependency>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-common</artifactId>
</dependency>
Yalz marked this conversation as resolved.
Show resolved Hide resolved
</dependencies>

</project>
4 changes: 4 additions & 0 deletions ldi-nifi/ldi-nifi-processors/ldes-client-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
<version>${testcontainers-postgresql.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>be.vlaanderen.informatievlaanderen.ldes.ldi</groupId>
<artifactId>ldi-common</artifactId>
</dependency>
Yalz marked this conversation as resolved.
Show resolved Hide resolved
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.springframework.jms.config.SimpleJmsListenerEndpoint;

public class LdioAmqpIn extends LdioInput implements MessageListener {
public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioAmqpIn";
public static final String NAME = "Ldio:AmqpIn";
private static final Logger log = LoggerFactory.getLogger(LdioAmqpIn.class);
private final String defaultContentType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.slf4j.LoggerFactory;

public class LdioArchiveFileIn extends LdioInput {
public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioArchiveFileIn";
public static final String NAME = "Ldio:ArchiveFileIn";
private final Logger log = LoggerFactory.getLogger(LdioArchiveFileIn.class);
private final ArchiveFileCrawler archiveFileCrawler;
private final Lang sourceFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import be.vlaanderen.informatievlaanderen.ldes.ldio.conversionstrategy.ConversionStrategy;
import be.vlaanderen.informatievlaanderen.ldes.ldio.conversionstrategy.ConversionStrategyFactory;
import be.vlaanderen.informatievlaanderen.ldes.ldio.util.MemberIdExtractor;
import org.apache.jena.rdf.model.Model;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.azure.core.util.BinaryData;
import com.azure.storage.blob.BlobContainerClient;
import com.azure.storage.blob.specialized.BlockBlobClient;
import org.apache.jena.rdf.model.Model;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings("java:S2629")
public class LdiAzureBlobOut implements LdiOutput {
public static final String NAME = "Ldio:AzureBlobOut";
private final Logger log = LoggerFactory.getLogger(LdiAzureBlobOut.class);

private final String outputLanguage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdiAzureBlobOut.NAME;

@Configuration
public class LdioAzureBlobOutAutoConfig {
@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdiAzureBlobOut")
@Bean(NAME)
public LdioOutputConfigurator ldioConfigurator() {
return new LdioAzureBlobOutConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@SuppressWarnings("java:S2629")
public class LdiConsoleOut implements LdiOutput {
public static final String NAME = "Ldio:ConsoleOut";
private final Logger log = LoggerFactory.getLogger(LdiConsoleOut.class);

private final LdiRdfWriterProperties properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldi.rdf.formatter.LdiRdfWriterProperties.RDF_WRITER;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdiConsoleOut.NAME;

@Configuration
public class LdioConsoleOutAutoConfig {
@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdioConsoleOut")
@Bean(NAME)
public LdioOutputConfigurator ldioConfigurator() {
return new LdioConsoleOutConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@SuppressWarnings("java:S112")
public class LdioFileOut implements LdiOutput {

public static final String NAME = "Ldio:FileOut";
private final TimestampExtractor timestampExtractor;
private final String archiveRootDir;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@

import java.io.File;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioFileOut.NAME;

@Configuration
public class LdioFileOutAutoConfig {

public static final String ARCHIVE_ROOT_DIR_PROP = "archive-root-dir";
public static final String TIMESTAMP_PATH_PROP = "timestamp-path";

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdioFileOut")
@Bean(NAME)
public LdioOutputConfigurator ldiFileOutConfigurator() {
return new LdioOutputConfigurator() {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package be.vlaanderen.informatievlaanderen.ldes.ldio.config;
package be.vlaanderen.informatievlaanderen.ldes.ldio;

import be.vlaanderen.informatievlaanderen.ldes.ldi.GeoJsonToWktTransformer;
import be.vlaanderen.informatievlaanderen.ldes.ldio.types.LdioTransformer;
import org.apache.jena.rdf.model.Model;

public class LdioGeoJsonToWkt extends LdioTransformer {
public static final String NAME = "Ldio:GeoJsonToWktTransformer";
private final GeoJsonToWktTransformer transformer;

public LdioGeoJsonToWkt() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package be.vlaanderen.informatievlaanderen.ldes.ldio.config;

import be.vlaanderen.informatievlaanderen.ldes.ldio.LdioGeoJsonToWkt;
import be.vlaanderen.informatievlaanderen.ldes.ldio.configurator.LdioTransformerConfigurator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioGeoJsonToWkt.NAME;

@Configuration
public class LdioGeoJsonToWktAutoConfig {

@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.GeoJsonToWktTransformer")
@Bean(NAME)
public LdioTransformerConfigurator geoJsonToWktConfigurator() {
return properties -> new LdioGeoJsonToWkt();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.util.List;

public class LdioHttpEnricher extends LdioTransformer {

public static final String NAME = "Ldio:HttpEnricher";
private static final Logger log = LoggerFactory.getLogger(LdioHttpEnricher.class);

private final LdiAdapter adapter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpEnricher.NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.LdioHttpEnricherProperties.ADAPTER_CONFIG;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.LdioHttpEnricherProperties.ADAPTER_NAME;

@Configuration
public class LdioHttpEnricherAutoConfig {

@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpEnricher")
@Bean(NAME)
public LdioTransformerConfigurator ldioConfigurator(ConfigurableApplicationContext configContext) {
return config -> {
final LdiAdapter adapter = createAdapter(configContext, config);
Expand Down
Yalz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.PollingInterval.TYPE.CRON;

public class HttpInputPoller extends LdioInput implements Runnable {
public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpInPoller";
public static final String NAME = "Ldio:HttpInPoller";
private final ThreadPoolTaskScheduler scheduler;
private final RequestExecutor requestExecutor;
private final List<? extends Request> requests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.List;
import java.util.Optional;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.HttpInputPoller.NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.HttpInputPollerProperties.*;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.PipelineConfig.PIPELINE_NAME;

Expand All @@ -21,7 +22,7 @@ public class HttpInputPollerAutoConfig {
private static final LdioRequestExecutorSupplier ldioRequestExecutorSupplier = new LdioRequestExecutorSupplier();

@SuppressWarnings("java:S6830")
@Bean(HttpInputPoller.NAME)
@Bean(NAME)
public HttpInputPollerConfigurator httpInputPollerConfigurator(ObservationRegistry observationRegistry) {
return new HttpInputPollerConfigurator(observationRegistry);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import io.micrometer.observation.ObservationRegistry;

public class LdioHttpInProcess extends LdioInput {
public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpIn";
public static final String NAME = "Ldio:HttpIn";

public LdioHttpInProcess(String pipelineName, ComponentExecutor executor, LdiAdapter adapter, ObservationRegistry observationRegistry) {
super(NAME, pipelineName, executor, adapter, observationRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpInProcess.NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.PipelineConfig.PIPELINE_NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.exception.LdiAdapterMissingException.verifyAdapterPresent;

@Configuration
public class LdioHttpInAutoConfig {

@SuppressWarnings("java:S6830")
@Bean(LdioHttpInProcess.NAME)
@Bean(NAME)
public LdioHttpInConfigurator ldioConfigurator(ApplicationEventPublisher eventPublisher,
ObservationRegistry observationRegistry) {
return new LdioHttpInConfigurator(eventPublisher, observationRegistry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.List;

public class LdioHttpOut implements LdiOutput {

public static final String NAME = "Ldio:HttpOut";
private static final Logger log = LoggerFactory.getLogger(LdioHttpOut.class);

private final RequestExecutor requestExecutor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldi.rdf.formatter.LdiRdfWriterProperties.RDF_WRITER;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpOut.NAME;

@Configuration
public class LdioHttpOutAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdioHttpOut")
@Bean(NAME)
public LdioOutputConfigurator ldiHttpOutConfigurator() {
return new LdioHttpOutConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class LdioJsonToLdAdapterAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.JsonToLdAdapter")
@Bean("Ldio:JsonToLdAdapter")
public LdioAdapterConfigurator ldioJsonToLdAdapterConfigurator() {
return new LdioJsonToLdConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.springframework.kafka.listener.MessageListener;

public class LdioKafkaIn extends LdioInput implements MessageListener<String, String> {

public static final String NAME = "Ldio:KafkaIn";
private static final Logger log = LoggerFactory.getLogger(LdioKafkaIn.class);
private final String defaultContentType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.KafkaOutConfigKeys.CONTENT_TYPE;

public class LdioKafkaOut implements LdiOutput {

public static final String NAME = "Ldio:KafkaOut";
private final KafkaTemplate<String, String> kafkaTemplate;
private final Lang lang;
private final String topic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
import java.util.HashMap;
import java.util.Map;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioKafkaIn.NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.KafkaInConfigKeys.*;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.OrchestratorConfig.ORCHESTRATOR_NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.PipelineConfig.PIPELINE_NAME;
import static be.vlaanderen.informatievlaanderen.ldes.ldio.exception.LdiAdapterMissingException.verifyAdapterPresent;

@Configuration
public class LdioKafkaInAutoConfig {
private static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioKafkaIn";

@SuppressWarnings("java:S6830")
@Bean(NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioKafkaOut.NAME;

@Configuration
public class LdioKafkaOutAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldio.LdioKafkaOut")
@Bean(NAME)
public LdioOutputConfigurator ldiKafkaOutConfigurator() {
return new LdioKafkaOutProcessorConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@Configuration
public class LdioLdesClientConnectorAutoConfig {

public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldio.LdioLdesClientConnector";
public static final String NAME = "Ldio:LdesClientConnector";

@Bean(NAME)
public LdioInputConfigurator ldioConfigurator(ApplicationEventPublisher eventPublisher,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class LdioLdesClient extends LdioInput {

public static final String NAME = "be.vlaanderen.informatievlaanderen.ldes.ldi.client.LdioLdesClient";
public static final String NAME = "Ldio:LdesClient";

private final Logger log = LoggerFactory.getLogger(LdioLdesClient.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class LdioNgsiv2ToLdAdapterAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.NgsiV2ToLdAdapter")
@Bean("Ldio:NgsiV2ToLdAdapter")
public LdioAdapterConfigurator ldiHttpOutConfigurator() {
Yalz marked this conversation as resolved.
Show resolved Hide resolved
return new LdioSparqlConstructProcessorConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class LdioRdfAdapterAutoConfig {
public static final String MAX_JSONLD_CACHE_CAPACITY = "max-jsonld-cache-capacity";

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.RdfAdapter")
@Bean("Ldio:RdfAdapter")
public LdioAdapterConfigurator ldiHttpOutConfigurator() {
Yalz marked this conversation as resolved.
Show resolved Hide resolved
return new LdioRdfConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import static be.vlaanderen.informatievlaanderen.ldes.ldio.config.LdioRepositoryMaterialiserProperties.*;

public class LdioRepositoryMaterialiser implements LdiOutput {

public static final String NAME = "Ldio:RepositoryMaterialiser";
private final Materialiser materialiser;

public LdioRepositoryMaterialiser(ComponentProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import static be.vlaanderen.informatievlaanderen.ldes.ldio.LdioRepositoryMaterialiser.NAME;

@Configuration
public class LioRepositoryMaterialiserAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.RepositoryMaterialiser")
@Bean(NAME)
public LdioOutputConfigurator ldiRepoMaterialiserConfigurator() {
return new LdiRepoMaterialiserProcessorConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class LdioRmlAdapterAutoConfig {

@SuppressWarnings("java:S6830")
@Bean("be.vlaanderen.informatievlaanderen.ldes.ldi.RmlAdapter")
@Bean("Ldio:RmlAdapter")
public LdioAdapterConfigurator ldiHttpOutConfigurator() {
Yalz marked this conversation as resolved.
Show resolved Hide resolved
return new LdioRmlAdapterProcessorConfigurator();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package be.vlaanderen.informatievlaanderen.ldes.ldio.config;
package be.vlaanderen.informatievlaanderen.ldes.ldio;

import be.vlaanderen.informatievlaanderen.ldes.ldi.SparqlConstructTransformer;
import be.vlaanderen.informatievlaanderen.ldes.ldio.types.LdioTransformer;
import org.apache.jena.query.Query;
import org.apache.jena.rdf.model.Model;

public class LdioSparqlConstruct extends LdioTransformer {
public static final String NAME = "Ldio:SparqlConstructTransformer";
private final SparqlConstructTransformer transformer;

public LdioSparqlConstruct(Query query, boolean inferMode) {
Expand Down
Loading
Loading