Skip to content

Commit

Permalink
feat: update cached dspace jsonld document (#4292)
Browse files Browse the repository at this point in the history
* feat: update cached dspace jsonld document

* dependencies

* improve log
  • Loading branch information
ndr-brt committed Jun 20, 2024
1 parent 0a4aa73 commit caad302
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ public void registerDestinationValidator(String type, Validator<DataAddress> val

@Override
public ValidationResult validateSource(DataAddress dataAddress) {
return sourceValidators.getOrDefault(dataAddress.getType(), d -> warning("source")).validate(dataAddress);
return sourceValidators.getOrDefault(dataAddress.getType(), d -> warning("source", dataAddress)).validate(dataAddress);
}

@Override
public ValidationResult validateDestination(DataAddress dataAddress) {
return destinationValidators.getOrDefault(dataAddress.getType(), d -> warning("destination")).validate(dataAddress);
return destinationValidators.getOrDefault(dataAddress.getType(), d -> warning("destination", dataAddress)).validate(dataAddress);
}

@NotNull
private ValidationResult warning(String type) {
monitor.warning("No %s DataAddress validator has been registered, please register one as it is strongly recommended.".formatted(type));
private ValidationResult warning(String type, DataAddress dataAddress) {
monitor.warning("No %s DataAddress validator has been registered for type %s, please register one as it is strongly recommended.".formatted(type, dataAddress.getType()));
return ValidationResult.success();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"odrl:leftOperand": { "@type": "@id" },
"odrl:operator": { "@type": "@id" },
"odrl:rightOperandReference": { "@type": "@id" },
"odrl:profile": { "@container": "@set" }
"odrl:profile": { "@container": "@set" },
"odrl:assigner": { "@type": "@id" },
"odrl:assignee": { "@type": "@id" }
}
Expand Down

0 comments on commit caad302

Please sign in to comment.