@Override
public void setValue(LabelledFrame<AnnotationPropertyFrame> object) {
dirty = false;
displayNameField.setText(object.getDisplayName());
final AnnotationPropertyFrame 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 (OWLEntity 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 (OWLEntity dt : frame.getRanges()) {
final Optional<OWLEntityData> entityData = result.getEntityData(dt);
if (entityData.isPresent()) {
primitiveDatas.add(entityData.get());
}
}