use of edu.stanford.bmir.protege.web.shared.frame.PropertyValueList in project webprotege by protegeproject.
the class AnnotationsViewImpl method setValue.
@Override
public void setValue(Set<PropertyAnnotationValue> object) {
List<PropertyAnnotationValue> values = new ArrayList<>();
for (PropertyAnnotationValue annotation : object) {
values.add(new PropertyAnnotationValue(annotation.getProperty(), annotation.getValue(), State.ASSERTED));
}
editor.setValue(new PropertyValueList(values));
}
use of edu.stanford.bmir.protege.web.shared.frame.PropertyValueList in project webprotege by protegeproject.
the class NamedIndividualFrameEditor method getValue.
@Override
public Optional<LabelledFrame<NamedIndividualFrame>> getValue() {
GWT.log("[NamedIndividualFrameEditor] Get value: Dirty: " + isDirty() + " Edited frame: " + editedFrame);
if (!editedFrame.isPresent()) {
return Optional.empty();
}
PropertyValueList propertyValueList = assertions.getValue().get();
Set<OWLClassData> rawTypes = getRawTypes();
Set<OWLNamedIndividualData> sameAs = getRawSameAs();
NamedIndividualFrame reference = new NamedIndividualFrame(editedFrame.get().getFrame().getSubject(), rawTypes, propertyValueList, sameAs);
return Optional.of(new LabelledFrame<>(editedFrame.get().getDisplayName(), reference));
}
use of edu.stanford.bmir.protege.web.shared.frame.PropertyValueList in project webprotege by protegeproject.
the class PropertyValueListEditor method getValue.
@Override
public Optional<PropertyValueList> getValue() {
Optional<List<PropertyValueDescriptor>> value = editor.getValue();
if (!value.isPresent()) {
return Optional.empty();
}
List<PropertyValue> propertyValues = Lists.newArrayList();
for (PropertyValueDescriptor val : value.get()) {
java.util.Optional<PropertyValue> propertyValue = val.toPropertyValue();
if (propertyValue.isPresent()) {
propertyValues.add(propertyValue.get());
}
}
return Optional.of(new PropertyValueList(propertyValues));
}
use of edu.stanford.bmir.protege.web.shared.frame.PropertyValueList in project webprotege by protegeproject.
the class AnnotationsViewImpl method getValue.
@Override
public Optional<Set<PropertyAnnotationValue>> getValue() {
Optional<PropertyValueList> valueList = editor.getValue();
if (!valueList.isPresent()) {
return Optional.empty();
}
Set<PropertyAnnotationValue> result = new HashSet<PropertyAnnotationValue>();
for (PropertyAnnotationValue value : valueList.get().getAnnotationPropertyValues()) {
result.add(value);
}
return Optional.of(result);
}
Aggregations