1 /*******************************************************************************
\r
2 * Copyright (c) 2013 Association for Decentralized Information Management in
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * Semantum Oy - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.sysdyn.ui.validation;
\r
14 import org.simantics.db.Resource;
\r
15 import org.simantics.db.WriteGraph;
\r
16 import org.simantics.db.common.issue.StandardIssue;
\r
17 import org.simantics.db.exception.DatabaseException;
\r
18 import org.simantics.issues.ontology.IssueResource;
\r
20 public class ModuleStandardIssue extends StandardIssue {
\r
22 public ModuleStandardIssue(Resource type, Resource ... contexts) {
\r
23 super(type, contexts);
\r
27 public void writeAdditionalContext(WriteGraph graph, Resource issue) throws DatabaseException {
\r
28 super.writeAdditionalContext(graph, issue);
\r
30 if(contexts.length >= 2) {
\r
31 IssueResource IR = IssueResource.getInstance(graph);
\r
32 // Input / output context
\r
33 graph.claim(issue, IR.Issue_HasContext, IR.Issue_HasContext_Inverse, contexts[1]);
\r