package org.onap.aai.schemagen.genxsd;
import com.google.common.collect.Multimap;
+
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+
import org.apache.commons.text.similarity.LevenshteinDistance;
import org.onap.aai.edges.EdgeIngestor;
import org.onap.aai.edges.EdgeRule;
this.opId = opId;
this.version = v;
objectName = DeleteOperation.deletePaths.get(apiPath);
- logger.debug(
- "II-apiPath: " + apiPath + "\nPath: " + path + "\nopId=" + opId + "\nobjectName=" +
- objectName);
+ logger.debug("II-apiPath: " + apiPath + "\nPath: " + path + "\nopId=" + opId
+ + "\nobjectName=" + objectName);
}
private void process(EdgeIngestor edgeIngestor) {
}
private void writeRelationsFile() {
- File examplefilePath = new File(
- GenerateXsd.getYamlDir() + "/relations/" + version.toString() + "/" +
- opId.replace("RelationshipListRelationship", "") + ".json");
+ File examplefilePath =
+ new File(GenerateXsd.getYamlDir() + "/relations/" + version.toString() + "/"
+ + opId.replace("RelationshipListRelationship", "") + ".json");
logger.debug(String.join("exampleFilePath: ", examplefilePath.toString()));
try {
if (!examplefilePath.exists()) {
examplefilePath.getParentFile().mkdirs();
- if(!examplefilePath.createNewFile()) {
+ if (!examplefilePath.createNewFile()) {
logger.debug("examplefilePath create file error");
}
}
int targetMaxScore = 0;
for (Map.Entry<String, String> p : DeleteOperation.deletePaths.entrySet()) {
if (p.getValue().equals(obj)) {
- targetScore = (targetScore >= proximity.apply(apiPath, p.getKey())) ?
- proximity.apply(apiPath, p.getKey()) : targetScore;
+ targetScore = (targetScore >= proximity.apply(apiPath, p.getKey()))
+ ? proximity.apply(apiPath, p.getKey())
+ : targetScore;
targetPath =
(targetScore >= proximity.apply(apiPath, p.getKey())) ? p.getKey() : targetPath;
- targetMaxScore = (targetMaxScore <= proximity.apply(apiPath, p.getKey())) ?
- proximity.apply(apiPath, p.getKey()) : targetScore;
+ targetMaxScore = (targetMaxScore <= proximity.apply(apiPath, p.getKey()))
+ ? proximity.apply(apiPath, p.getKey())
+ : targetScore;
logger.trace(proximity.apply(apiPath, p.getKey()) + ":" + p.getKey());
logger.trace(proximity.apply(apiPath, p.getKey()) + ":" + apiPath);
}
}
}
-