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

organise imports in all source files #164

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* #L%
*/

import org.apache.lucene.document.Document;
import org.eclipse.opensmartclide.context.monitoring.analyser.webservice.WebServiceAnalyser;
import org.eclipse.opensmartclide.context.monitoring.config.models.DataSource;
import org.eclipse.opensmartclide.context.monitoring.config.models.InterpreterConfiguration;
Expand All @@ -24,7 +25,6 @@
import org.eclipse.opensmartclide.context.monitoring.models.IWebService;
import org.eclipse.opensmartclide.context.tools.ontology.AmIMonitoringConfiguration;
import org.eclipse.opensmartclide.contexthandling.services.GitlabApiClient;
import org.apache.lucene.document.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* #L%
*/

import org.eclipse.opensmartclide.context.monitoring.config.models.DataSource;
import lombok.NoArgsConstructor;
import org.eclipse.opensmartclide.context.monitoring.config.models.DataSource;
import thewebsemantic.Namespace;
import thewebsemantic.RdfType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
* #L%
*/

import lombok.Getter;
import lombok.Setter;
import org.apache.jena.rdf.model.Model;
import org.eclipse.opensmartclide.context.common.Version;
import org.eclipse.opensmartclide.context.common.util.ApplicationScenario;
import org.eclipse.opensmartclide.context.common.util.BusinessCase;
import org.eclipse.opensmartclide.context.monitoring.config.models.datasources.WebServiceDataSource;
import org.eclipse.opensmartclide.context.monitoring.rdf.RdfHelper;
import org.eclipse.opensmartclide.context.persistence.ModelOutputLanguage;
import lombok.Getter;
import lombok.Setter;
import org.apache.jena.rdf.model.Model;
import org.simpleframework.xml.Root;
import thewebsemantic.Id;
import thewebsemantic.Namespace;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* #L%
*/

import org.eclipse.opensmartclide.context.common.util.BusinessCase;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.eclipse.opensmartclide.context.common.util.BusinessCase;
import thewebsemantic.Namespace;
import thewebsemantic.RdfType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
* #L%
*/

import org.apache.lucene.document.Document;
import org.eclipse.opensmartclide.context.monitoring.config.models.DataSource;
import org.eclipse.opensmartclide.context.monitoring.config.models.InterpreterConfiguration;
import org.eclipse.opensmartclide.context.monitoring.config.models.datasources.GitlabDataSource;
import org.eclipse.opensmartclide.context.monitoring.index.Indexer;
import org.eclipse.opensmartclide.context.monitoring.models.IWebService;
import org.eclipse.opensmartclide.context.monitoring.parser.webservice.WebServiceParser;
import org.eclipse.opensmartclide.context.tools.ontology.AmIMonitoringConfiguration;
import org.apache.lucene.document.Document;

public class GitlabCommitParser extends WebServiceParser {
public GitlabCommitParser(final DataSource dataSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
* #L%
*/

import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Properties;

import org.eclipse.opensmartclide.context.common.ContextPathUtils;
import org.eclipse.opensmartclide.context.monitoring.models.IMonitoringDataModel;
import org.eclipse.opensmartclide.context.services.AmIMonitoringService;
Expand All @@ -31,6 +26,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Properties;

public class ServiceMain {

private static final Logger LOGGER = LoggerFactory.getLogger(ServiceMain.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package org.eclipse.opensmartclide.contexthandling.dle.listener;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeoutException;

/*-
* #%L
* SmartCLIDE Monitoring
Expand All @@ -19,10 +15,8 @@
*/

import com.rabbitmq.client.Channel;

import org.apache.commons.lang3.StringUtils;
import org.apache.lucene.document.Document;

import org.eclipse.opensmartclide.context.monitoring.config.models.datasources.GitlabDataSource;
import org.eclipse.opensmartclide.context.monitoring.config.models.datasources.MessageBrokerDataSourceOptions;
import org.eclipse.opensmartclide.context.monitoring.events.MonitoringProgressListener;
Expand All @@ -33,6 +27,10 @@
import org.eclipse.opensmartclide.context.monitoring.monitors.messagebroker.util.MessageBrokerUtil;
import org.eclipse.opensmartclide.contexthandling.dle.model.CommitMessage;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeoutException;

public class DleGitlabCommitMonitorProgressListener
implements MonitoringProgressListener<IWebService, IMonitoringDataModel<?, ?>> {

Expand Down Expand Up @@ -81,10 +79,10 @@ public void documentAnalysed(final List<IMonitoringDataModel<?, ?>> analysed,

private CommitMessage convertToCommitMessage(final GitlabCommitMessage gitlabCommitMessage) {
return CommitMessage.builder()
.repoId(gitlabCommitMessage.getRepository())
.user(gitlabCommitMessage.getUser())
.branch(gitlabCommitMessage.getBranch())
.timeSinceLastCommit(gitlabCommitMessage.getTimeSinceLastCommit())
.repoId(gitlabCommitMessage.getRepository())
.user(gitlabCommitMessage.getUser())
.branch(gitlabCommitMessage.getBranch())
.timeSinceLastCommit(gitlabCommitMessage.getTimeSinceLastCommit())
.numberOfFilesModified(gitlabCommitMessage.getNoOfModifiedFiles())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import org.eclipse.opensmartclide.context.monitoring.models.GitlabCommitMessage;
import org.apache.http.HttpStatus;
import org.eclipse.opensmartclide.context.monitoring.models.GitlabCommitMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package org.eclipse.opensmartclide.context.monitoring;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.opensmartclide.context.monitoring.models.GitlabCommitMessage;
import org.eclipse.opensmartclide.contexthandling.services.GitlabApiClient;
import org.junit.Before;
import org.junit.Test;

import org.eclipse.opensmartclide.contexthandling.services.GitlabApiClient;
import java.util.List;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

public class GitlabApiClientTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
import org.eclipse.opensmartclide.context.services.manager.ServiceManager;
import org.eclipse.opensmartclide.context.services.wrapper.AmIMonitoringDataRepositoryServiceWrapper;
import org.eclipse.opensmartclide.contexthandling.ServiceMain;
import org.junit.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.simpleframework.xml.core.Persister;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.eclipse.opensmartclide.context.monitoring.analyser;

import org.apache.lucene.document.Document;
import org.eclipse.opensmartclide.context.monitoring.config.models.DataSource;
import org.eclipse.opensmartclide.context.monitoring.config.models.InterpreterConfiguration;
import org.eclipse.opensmartclide.context.monitoring.index.Indexer;
import org.eclipse.opensmartclide.context.monitoring.models.GitlabCommitDataModel;
import org.eclipse.opensmartclide.context.monitoring.models.GitlabCommitMessage;
import org.eclipse.opensmartclide.context.monitoring.models.IWebService;
import org.eclipse.opensmartclide.context.tools.ontology.AmIMonitoringConfiguration;
import org.apache.lucene.document.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.atb-bremen.de" xmlns="http://www.atb-bremen.de">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.atb-bremen.de"
xmlns="http://www.atb-bremen.de">
<xs:element name="config">
<xs:complexType>
<xs:sequence>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.atb-bremen.de" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.atb-bremen.de"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="config">
<xs:complexType>
<xs:sequence>
Expand Down