private String modelNamespace;
private String modelNamespaceVersion;
- private Set<String> referencedModelIds = new HashSet<String>();
+ private Set<String> referencedModelIds = new HashSet<>();
public AbstractModelArtifact(ArtifactType type) {
super(type);
import org.onap.aai.modelloader.entity.Artifact;
+@FunctionalInterface
public interface IModelParser {
public List<Artifact> parse(byte[] artifactPayload, String artifactName);
}
// Push the ordered list of model artifacts to A&AI. If one fails, we need to roll back
// the changes.
- List<AbstractModelArtifact> completedModels = new ArrayList<AbstractModelArtifact>();
+ List<AbstractModelArtifact> completedModels = new ArrayList<>();
AaiRestClient aaiClient = new AaiRestClient(config);
for (Artifact art : sortedModelArtifacts) {
-/**
+ /**
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
// load list of models into a map, so we can later replace referenceIds with
// real Models
- HashMap<String, AbstractModelArtifact> versionIdToModelMap = new HashMap<String, AbstractModelArtifact>();
+ HashMap<String, AbstractModelArtifact> versionIdToModelMap = new HashMap<>();
for (Artifact art : models) {
AbstractModelArtifact ma = (AbstractModelArtifact) art;
versionIdToModelMap.put(ma.getUniqueIdentifier(), ma);
@Override
public List<Artifact> parse(byte[] artifactPayload, String artifactName) {
String payload = new String(artifactPayload);
- List<Artifact> modelList = new ArrayList<Artifact>();
+ List<Artifact> modelList = new ArrayList<>();
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();