1 package org.simantics.db.common.issue;
3 import java.util.Collection;
5 import org.simantics.databoard.Bindings;
6 import org.simantics.db.Resource;
7 import org.simantics.db.WriteGraph;
8 import org.simantics.db.exception.DatabaseException;
9 import org.simantics.layer0.Layer0;
12 public class IssueWithDescription extends AnonymousIssue {
14 public final String description;
16 public IssueWithDescription(Resource type, String description, Collection<Resource> contexts) {
17 super(type, contexts);
18 this.description = description;
21 public IssueWithDescription(Resource type, String description, Resource... contexts) {
22 super(type, contexts);
23 this.description = description;
27 public Resource write(WriteGraph graph, Resource source)
28 throws DatabaseException {
29 Resource issue = super.write(graph, source);
30 Layer0 L0 = Layer0.getInstance(graph);
31 graph.claimLiteral(issue, L0.HasDescription, description, Bindings.STRING);