}
private boolean checkFirstItem(String left, String right) {
- if (left != null && left.equals(right)) {
- return true;
- }
- return false;
+ return left != null && left.equals(right);
}
private String buildStringForMatch(List<String> pathOfInstances, int level) {
if (dataTypeUidstoModels != null) {
log.trace("Number of data types to load is {}", dataTypeUidstoModels.size());
- for (Map.Entry<String, List<String>> entry : dataTypeUidstoModels.entrySet()) {
- log.trace("Going to fetch data type with uid {}", entry.getKey());
- Either<DataTypeDefinition, JanusGraphOperationStatus> dataTypeByUid = this
- .getAndAddDataTypeByUid(entry.getKey(), allDataTypesFound);
+ for (final Map.Entry<String, List<String>> entry : dataTypeUidstoModels.entrySet()) {
+ final String key = entry.getKey();
+ log.trace("Going to fetch data type with uid {}", key);
+ final Either<DataTypeDefinition, JanusGraphOperationStatus> dataTypeByUid = this.getAndAddDataTypeByUid(key, allDataTypesFound);
if (dataTypeByUid.isRight()) {
JanusGraphOperationStatus status = dataTypeByUid.right().value();
if (status == JanusGraphOperationStatus.NOT_FOUND) {
}
for (final String model : entry.getValue()) {
if (!dataTypes.containsKey(model)) {
- dataTypes.put(model, new HashMap<String, DataTypeDefinition>());
+ dataTypes.put(model, new HashMap<>());
}
DataTypeDefinition dataTypeDefinition = allDataTypesFound.get(entry.getKey());
dataTypes.get(model).put(dataTypeDefinition.getName(), dataTypeDefinition);
}
}
-
}
if (log.isTraceEnabled()) {
if (result.isRight()) {
return getDerivedResult == StorageOperationStatus.NOT_FOUND;
}
- /*
- * @Override public PropertyOperation getPropertyOperation() { return this; }
- */
public JanusGraphOperationStatus fillPropertiesList(String uniqueId, NodeTypeEnum nodeType, Consumer<List<PropertyDefinition>> propertySetter) {
Either<Map<String, PropertyDefinition>, JanusGraphOperationStatus> findPropertiesRes = findPropertiesifExist(uniqueId, nodeType);
if (findPropertiesRes.isRight()) {