import org.simantics.db.exception.ServiceException;\r
import org.simantics.db.exception.ValidationException;\r
import org.simantics.objmap.IMappingRule;\r
+import org.simantics.objmap.annotations.OptionalRelatedElements;\r
import org.simantics.objmap.annotations.RelatedElements;\r
import org.simantics.objmap.rules.MappedElementsRule;\r
import org.simantics.objmap.rules.domain.RelatedObjectsAccessor;\r
\r
@Override\r
public IMappingRule create(ReadGraph g, Annotation _annotation, Field field) throws ResourceNotFoundException, ValidationException, ServiceException {\r
- RelatedElements annotation = (RelatedElements)_annotation;\r
+ OptionalRelatedElements annotation = (OptionalRelatedElements)_annotation;\r
return new MappedElementsRule(\r
new RelatedObjectsAccessor(g.getResource(annotation.value()),\r
annotation.composition()),\r