*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-package org.openecomp.crud.dao.champ;
+package org.onap.crud.dao.champ;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import org.openecomp.aai.champcore.ChampGraph;
-import org.openecomp.aai.champcore.ChampTransaction;
-import org.openecomp.aai.champcore.exceptions.ChampMarshallingException;
-import org.openecomp.aai.champcore.exceptions.ChampObjectNotExistsException;
-import org.openecomp.aai.champcore.exceptions.ChampRelationshipNotExistsException;
-import org.openecomp.aai.champcore.exceptions.ChampSchemaViolationException;
-import org.openecomp.aai.champcore.exceptions.ChampTransactionException;
-import org.openecomp.aai.champcore.exceptions.ChampUnmarshallingException;
-import org.openecomp.aai.champcore.model.ChampObject;
-import org.openecomp.aai.champcore.model.ChampRelationship;
-import org.openecomp.aai.champcore.model.fluent.object.ObjectBuildOrPropertiesStep;
-import org.openecomp.cl.api.Logger;
-import org.openecomp.cl.eelf.LoggerFactory;
-import org.openecomp.crud.dao.GraphDao;
-import org.openecomp.crud.entity.Edge;
-import org.openecomp.crud.entity.Vertex;
-import org.openecomp.crud.exception.CrudException;
-import org.openecomp.crud.logging.CrudServiceMsgs;
+import org.onap.aai.champcore.ChampGraph;
+import org.onap.aai.champcore.ChampTransaction;
+import org.onap.aai.champcore.exceptions.ChampMarshallingException;
+import org.onap.aai.champcore.exceptions.ChampObjectNotExistsException;
+import org.onap.aai.champcore.exceptions.ChampRelationshipNotExistsException;
+import org.onap.aai.champcore.exceptions.ChampSchemaViolationException;
+import org.onap.aai.champcore.exceptions.ChampTransactionException;
+import org.onap.aai.champcore.exceptions.ChampUnmarshallingException;
+import org.onap.aai.champcore.model.ChampObject;
+import org.onap.aai.champcore.model.ChampRelationship;
+import org.onap.aai.champcore.model.fluent.object.ObjectBuildOrPropertiesStep;
+import org.onap.aai.cl.api.Logger;
+import org.onap.aai.cl.eelf.LoggerFactory;
+import org.onap.crud.dao.GraphDao;
+import org.onap.crud.entity.Edge;
+import org.onap.crud.entity.Vertex;
+import org.onap.crud.exception.CrudException;
+import org.onap.crud.logging.CrudServiceMsgs;
/**
* This is the integration layer between the CRUD API service and the low level
Optional<ChampObject> retrievedVertex = champApi.retrieveObject(idAsLong);
- String nodeType = org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName();
+ String nodeType = org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName();
if (retrievedVertex.isPresent() && retrievedVertex.get().getProperties().get(nodeType) != null) {
return vertexFromChampObject(retrievedVertex.get(),
retrievedVertex.get().getProperties().get(nodeType).toString());
// Did we find it?
if (retrievedVertex.isPresent()
&& retrievedVertex.get().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) != null
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) != null
&& retrievedVertex.get().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()
.equalsIgnoreCase(type)) {
// Yup, convert it to a Vector object and return it.
}
// Add the aai_node_type so that AAI can read the data created by gizmo
- properties.put(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
+ properties.put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
// Create an object to represent our vertex in the format expected by the
// Champ library.
logger.debug("Update vertex with id: " + id + " with properties: " + propertiesMapToString(properties));
}
// Add the aai_node_type so that AAI can read the data created by gizmo
- properties.put(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
+ properties.put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
try {
// Now, build the updated version of the Champ Object...
+ propertiesMapToString(filter));
}
- filter.put(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
+ filter.put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
Stream<ChampObject> retrievedVertices;
try {
Edge.Builder edgeBuilder = new Edge.Builder(relationship.getType()).id(relationshipId.toString());
edgeBuilder.source(vertexFromChampObject(relationship.getSource(),
relationship.getSource().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) == null
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) == null
? relationship.getSource().getType()
: relationship.getSource().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()));
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()));
edgeBuilder.target(vertexFromChampObject(relationship.getTarget(),
relationship.getTarget().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) == null
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()) == null
? relationship.getTarget().getType()
: relationship.getTarget().getProperties()
- .get(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()));
+ .get(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName()).toString()));
for (String key : relationship.getProperties().keySet()) {
edgeBuilder.property(key, relationship.getProperties().get(key).toString());
}
// Add the aai_node_type so that AAI can read the data created by gizmo
- properties.put(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
+ properties.put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
// Create an object to represent our vertex in the format expected by the
// Champ library.
logger.debug("Update vertex with id: " + id + " with properties: " + propertiesMapToString(properties));
}
// Add the aai_node_type so that AAI can read the data created by gizmo
- properties.put(org.openecomp.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
+ properties.put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type);
try {
// Now, build the updated version of the Champ Object...