X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.interop%2Fsrc%2Forg%2Fsimantics%2Finterop%2Fstubs%2FInteropResource.java;h=a2b7f148597a817ab3c5192fcfcb023d25505abd;hb=3583a0b838febb293cbbcb4be2e619e11cf6ca57;hp=bfa3c47f70d2fe3d6f89497ac22342285fd22a1f;hpb=eb67052eccd9492b4ea18c08524b083c0eef3bfe;p=simantics%2Finterop.git diff --git a/org.simantics.interop/src/org/simantics/interop/stubs/InteropResource.java b/org.simantics.interop/src/org/simantics/interop/stubs/InteropResource.java index bfa3c47..a2b7f14 100644 --- a/org.simantics.interop/src/org/simantics/interop/stubs/InteropResource.java +++ b/org.simantics.interop/src/org/simantics/interop/stubs/InteropResource.java @@ -1,17 +1,5 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ package org.simantics.interop.stubs; - import org.simantics.db.Resource; import org.simantics.db.ReadGraph; import org.simantics.db.request.Read; @@ -20,12 +8,14 @@ import org.simantics.db.exception.DatabaseException; public class InteropResource { + public final Resource HasDestination; + public final Resource HasSource; public final Resource ImportLibrary; - public final Resource InteropFeature; - + public static class URIs { - public static final String ImportLibrary = "http://www.simantics.org/Interoperability-1.0/Types/ImportLibrary"; - public static final String InteropFeature = "http://www.simantics.org/Interoperability-1.0/InteropFeature"; + public static final String HasDestination = "http://www.simantics.org/Interop-1.0/HasDestination"; + public static final String HasSource = "http://www.simantics.org/Interop-1.0/HasSource"; + public static final String ImportLibrary = "http://www.simantics.org/Interop-1.0/ImportLibrary"; } public static Resource getResourceOrNull(ReadGraph graph, String uri) { @@ -38,8 +28,9 @@ public class InteropResource { } public InteropResource(ReadGraph graph) { + HasDestination = getResourceOrNull(graph, URIs.HasDestination); + HasSource = getResourceOrNull(graph, URIs.HasSource); ImportLibrary = getResourceOrNull(graph, URIs.ImportLibrary); - InteropFeature = getResourceOrNull(graph, URIs.InteropFeature); } public static InteropResource getInstance(ReadGraph graph) {