}
- public static void claimAdaptedValue(WriteGraph graph, Resource objectResource, Object value, Binding binding, Datatype datatype) throws DatabaseException {
+ public static void claimAdaptedValue(WriteGraph graph, Resource objectResource, Object value, Binding binding, Datatype targetDatatype) throws DatabaseException {
try {
- Datatype source = binding.type();
- if(source.equals(datatype)) {
+ Datatype sourceDatatype = binding.type();
+ if(sourceDatatype.equals(targetDatatype)) {
graph.claimValue(objectResource, value, binding);
} else {
- Binding target = Bindings.getBinding(datatype);
- Adapter adapter = Bindings.getAdapter(binding, target);
+ Binding target = Bindings.getBinding(targetDatatype);
+ Adapter adapter = Bindings.getTypeAdapter(binding, target);
graph.claimValue(objectResource, adapter.adapt(value), target);
}