summaryrefslogtreecommitdiffstats
path: root/aai-schema-ingest/src/main/java/org
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:35:37 +0000
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2022-11-07 08:38:19 +0000
commitfbb02159b84435cf37221ae8ae5e0045167be15a (patch)
tree78196f6a3e5e4d0b1e5ca6ecadec0f9e9a623303 /aai-schema-ingest/src/main/java/org
parent58f0fd2f6ef58de52e1f9a73540c1bb895c0d6e6 (diff)
Reduce the number of problems in aai-common by removing unused imports
- run mvn spotless:apply across aai-commmon to remove unused imports - run mvn formatter:format across aai-common Issue-ID: AAI-3583 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de> Change-Id: I2dfeb395eafa2824ce8369bba3a18db3e1845522
Diffstat (limited to 'aai-schema-ingest/src/main/java/org')
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java5
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java4
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java6
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java17
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java4
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java3
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java8
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java1
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java5
-rw-r--r--aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java2
12 files changed, 34 insertions, 37 deletions
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java b/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
index 2e6847d2..c4f951a3 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/config/NodesConfiguration.java
@@ -22,9 +22,6 @@
package org.onap.aai.config;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -32,6 +29,8 @@ import java.util.Set;
import org.onap.aai.nodes.NodeIngestor;
import org.onap.aai.setup.Translator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
index 207f7e0a..c3222168 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeIngestor.java
@@ -23,8 +23,6 @@ package org.onap.aai.edges;
import static com.jayway.jsonpath.Criteria.where;
import static com.jayway.jsonpath.Filter.filter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
@@ -51,6 +49,8 @@ import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
import org.onap.aai.setup.SchemaVersion;
import org.onap.aai.setup.SchemaVersions;
import org.onap.aai.setup.Translator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
index 8861c5cc..40761372 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRule.java
@@ -20,12 +20,12 @@
package org.onap.aai.edges;
-import org.apache.tinkerpop.gremlin.structure.Direction;
-import org.onap.aai.edges.enums.*;
-
import java.util.EnumMap;
import java.util.Map;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.onap.aai.edges.enums.*;
+
/**
* Container for A&AI edge rule information
*/
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
index 893ebad5..f7a2b9a7 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/EdgeRuleQuery.java
@@ -22,6 +22,10 @@
package org.onap.aai.edges;
+import com.jayway.jsonpath.Criteria;
+import com.jayway.jsonpath.Filter;
+import com.jayway.jsonpath.Predicate;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -34,10 +38,6 @@ import org.onap.aai.edges.enums.EdgeProperty;
import org.onap.aai.edges.enums.EdgeType;
import org.onap.aai.setup.SchemaVersion;
-import com.jayway.jsonpath.Criteria;
-import com.jayway.jsonpath.Filter;
-import com.jayway.jsonpath.Predicate;
-
/**
* For querying the edge rules schema (not the database)
*
@@ -57,7 +57,6 @@ public class EdgeRuleQuery {
public static class Builder {
-
// required
private String nodeA;
@@ -244,9 +243,11 @@ public class EdgeRuleQuery {
private Predicate addDirection(AAIDirection direction) {
if (direction == AAIDirection.OUT) {
- return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.OUT.toString(), AAIDirection.BOTH.toString());
+ return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.OUT.toString(),
+ AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.IN) {
- return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.IN.toString(), AAIDirection.BOTH.toString());
+ return Criteria.where(EdgeField.DIRECTION.toString()).in(AAIDirection.IN.toString(),
+ AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.BOTH) {
return Criteria.where(EdgeField.DIRECTION.toString()).is(AAIDirection.BOTH.toString());
} else if (direction == AAIDirection.NONE) {
@@ -333,7 +334,7 @@ public class EdgeRuleQuery {
@Override
public int hashCode() {
return v.map(schemaVersion -> Objects.hash(schemaVersion, nodeA, nodeB, label, direction, type, isPrivate))
- .orElseGet(() -> Objects.hash(nodeA, nodeB, label, direction, type, isPrivate));
+ .orElseGet(() -> Objects.hash(nodeA, nodeB, label, direction, type, isPrivate));
}
}
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
index 9b1f0bd9..ec0e850b 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/edges/JsonIngestor.java
@@ -20,8 +20,6 @@
package org.onap.aai.edges;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.jayway.jsonpath.DocumentContext;
import com.jayway.jsonpath.JsonPath;
@@ -35,6 +33,8 @@ import java.util.Map;
import java.util.Map.Entry;
import org.onap.aai.setup.SchemaVersion;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* JsonIngestor produces DocumentContexts from json files
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java b/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
index 014a4442..a3d477ee 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/nodes/NodeIngestor.java
@@ -23,6 +23,7 @@
package org.onap.aai.nodes;
import com.google.common.base.CaseFormat;
+
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -34,12 +35,14 @@ import java.util.Map;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+
import javax.annotation.PostConstruct;
import javax.xml.XMLConstants;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+
import org.eclipse.persistence.jaxb.JAXBContextProperties;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
index a92005ea..e764dda6 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceNoAuthClient.java
@@ -20,6 +20,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -27,10 +31,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceNoAuthClient extends NoAuthRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceNoAuthClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
index 1ab0999e..1f04bff1 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceOneWayClient.java
@@ -20,6 +20,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -27,10 +31,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceOneWayClient extends OneWaySSLRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceOneWayClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
index 62f4b68b..f7bdf6d7 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/restclient/SchemaServiceRestClient.java
@@ -22,6 +22,10 @@
package org.onap.aai.restclient;
+import java.util.Collections;
+import java.util.Map;
+import java.util.UUID;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
@@ -29,10 +33,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.MultiValueMap;
-import java.util.Collections;
-import java.util.Map;
-import java.util.UUID;
-
public class SchemaServiceRestClient extends TwoWaySSLRestClient {
private static Logger logger = LoggerFactory.getLogger(SchemaServiceRestClient.class);
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
index 10f1f542..27148a44 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+
import org.onap.aai.restclient.RestClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
index 0094a161..1d140ea6 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaVersions.java
@@ -21,14 +21,9 @@
package org.onap.aai.setup;
import java.util.List;
-import java.util.stream.Collectors;
-
-import javax.annotation.PostConstruct;
import org.onap.aai.validation.AAISchemaValidationException;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
-import org.springframework.stereotype.Component;
@PropertySource(value = "classpath:schema-ingest.properties", ignoreResourceNotFound = true)
@PropertySource(value = "file:${schema.ingest.file}", ignoreResourceNotFound = true)
diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
index 39efde54..3d415e62 100644
--- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
+++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/Translator.java
@@ -23,8 +23,6 @@ package org.onap.aai.setup;
import java.io.*;
import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-
/**
* Converts the contents of the schema config file
* (which lists which schema files to be loaded) to