@Override
public void setValue(LabelledFrame<DataPropertyFrame> object) {
dirty = false;
displayNameField.setText(object.getDisplayName());
final DataPropertyFrame frame = object.getFrame();
iriField.setText(frame.getSubject().getIRI().toString());
annotations.setValue(frame.getPropertyValueList());
RenderingServiceManager.getManager().execute(new GetRendering(projectId, frame.getDomains()), new AsyncCallback<GetRenderingResponse>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(GetRenderingResponse result) {
List<OWLPrimitiveData> primitiveDatas = new ArrayList<OWLPrimitiveData>();
for (OWLClass cls : frame.getDomains()) {
final Optional<OWLEntityData> entityData = result.getEntityData(cls);
if (entityData.isPresent()) {
primitiveDatas.add(entityData.get());
}
}
domains.setValue(primitiveDatas);
}
});
RenderingServiceManager.getManager().execute(new GetRendering(projectId, frame.getRanges()), new AsyncCallback<GetRenderingResponse>() {
@Override
public void onFailure(Throwable caught) {
}
@Override
public void onSuccess(GetRenderingResponse result) {
List<OWLPrimitiveData> primitiveDatas = new ArrayList<OWLPrimitiveData>();
for (OWLDatatype dt : frame.getRanges()) {
final Optional<OWLEntityData> entityData = result.getEntityData(dt);
if (entityData.isPresent()) {
primitiveDatas.add(entityData.get());
}
}
ranges.setValue(primitiveDatas);
}
});
functionalCheckBox.setValue(frame.isFunctional());
}