/******************************************************************************* * Copyright (c) 2007 VTT Technical Research Centre of Finland and others. * 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.processeditor.stubs; import org.simantics.db.Resource; import org.simantics.db.Graph; import org.simantics.db.Session; import org.simantics.db.exceptions.Layer0MissingException; import org.simantics.db.exceptions.ResourceNotFoundException; public class Plant3DResource { public final Resource BranchControlPoint; public final Resource BranchEndControlPoint; public final Resource BranchSplitComponent; public final Resource CodedComponent; public final Resource ConcentricReducer; public final Resource ControlPointOf; public final Resource ControlPointOfPipeRun; public final Resource DirectedControlPoint; public final Resource DualConnectedComponent; public final Resource DualInlineControlPoint; public final Resource DualSubControlPoint; public final Resource EccentricReducer; public final Resource Elbow; public final Resource EndComponent; public final Resource EndComponentControlPoint; public final Resource Equipment; public final Resource FixedAngleTurnComponent; public final Resource FixedAngleTurnControlPoint; public final Resource FixedLengthControlPoint; public final Resource FixedLengthInlineComponent; public final Resource HasChildStructure; public final Resource HasControlPoint; public final Resource HasControlPoints; public final Resource HasGraphics; public final Resource HasHeight; public final Resource HasLength; public final Resource HasNext; public final Resource HasNozzle; public final Resource HasNozzleDefinition; public final Resource HasNozzleRestriction; public final Resource HasOffset; public final Resource HasParentStructure; public final Resource HasPipeDiameter; public final Resource HasPrevious; public final Resource HasRotationAngle; public final Resource HasSubPoint; public final Resource HasTurnAngle; public final Resource HasTurnAxis; public final Resource HasTurnRadius; public final Resource HorizontalVessel; public final Resource InlineComponent; public final Resource InlineControlPoint; public final Resource IsReversed; public final Resource LibraryComponent; public final Resource MultiConnectedComponent; public final Resource NPortControlPoint; public final Resource NonVisibleComponent; public final Resource Nozzle; public final Resource NozzleControlPoint; public final Resource NozzleOf; public final Resource OffsetComponent; public final Resource OffsettingPoint; public final Resource P3DNode; public final Resource PBSNode; public final Resource PathLegEndControlPoint; public final Resource PipeControlPoint; public final Resource PipeRun; public final Resource PipelineComponent; public final Resource Plant; public final Resource Plant3DProjectType; public final Resource Reducer; public final Resource RunEndControlPoint; public final Resource SingleConnectedComponent; public final Resource SizeChangeComponent; public final Resource SizeChangeControlPoint; public final Resource Straight; public final Resource SubPointOf; public final Resource TurnComponent; public final Resource TurnControlPoint; public final Resource UndirectedControlPoint; public final Resource VariableAngleTurnComponent; public final Resource VariableAngleTurnControlPoint; public final Resource VariableLengthControlPoint; public final Resource VariableLengthInlineComponent; public final Resource VerticalVessel; public final Resource Vessel; public static class URIs { public static final String BranchControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#BranchControlPoint"; public static final String BranchEndControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#BranchEndControlPoint"; public static final String BranchSplitComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0#BranchSplitComponent"; public static final String CodedComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#CodedComponent"; public static final String ConcentricReducer = "http://www.vtt.fi/Simantics/Plant3D/1.0#ConcentricReducer"; public static final String ControlPointOf = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#ControlPointOf"; public static final String ControlPointOfPipeRun = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#ControlPointOfPipeRun"; public static final String DirectedControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#DirectedControlPoint"; public static final String DualConnectedComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#DualConnectedComponent"; public static final String DualInlineControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#DualInlineControlPoint"; public static final String DualSubControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#DualSubControlPoint"; public static final String EccentricReducer = "http://www.vtt.fi/Simantics/Plant3D/1.0#EccentricReducer"; public static final String Elbow = "http://www.vtt.fi/Simantics/Plant3D/1.0#Elbow"; public static final String EndComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#EndComponent"; public static final String EndComponentControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#EndComponentControlPoint"; public static final String Equipment = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Equipment"; public static final String FixedAngleTurnComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#FixedAngleTurnComponent"; public static final String FixedAngleTurnControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#FixedAngleTurnControlPoint"; public static final String FixedLengthControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#FixedLengthControlPoint"; public static final String FixedLengthInlineComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#FixedLengthInlineComponent"; public static final String HasChildStructure = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasChildStructure"; public static final String HasControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasControlPoint"; public static final String HasControlPoints = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasControlPoints"; public static final String HasGraphics = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasGraphics"; public static final String HasHeight = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasHeight"; public static final String HasLength = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasLength"; public static final String HasNext = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasNext"; public static final String HasNozzle = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasNozzle"; public static final String HasNozzleDefinition = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasNozzleDefinition"; public static final String HasNozzleRestriction = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasNozzleRestriction"; public static final String HasOffset = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasOffset"; public static final String HasParentStructure = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasParentStructure"; public static final String HasPipeDiameter = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasPipeDiameter"; public static final String HasPrevious = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasPrevious"; public static final String HasRotationAngle = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasRotationAngle"; public static final String HasSubPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasSubPoint"; public static final String HasTurnAngle = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasTurnAngle"; public static final String HasTurnAxis = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasTurnAxis"; public static final String HasTurnRadius = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#HasTurnRadius"; public static final String HorizontalVessel = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#HorizontalVessel"; public static final String InlineComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#InlineComponent"; public static final String InlineControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#InlineControlPoint"; public static final String IsReversed = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#IsReversed"; public static final String LibraryComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#LibraryComponent"; public static final String MultiConnectedComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#MultiConnectedComponent"; public static final String NPortControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#NPortControlPoint"; public static final String NonVisibleComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#NonVisibleComponent"; public static final String Nozzle = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Nozzle"; public static final String NozzleControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#NozzleControlPoint"; public static final String NozzleOf = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#NozzleOf"; public static final String OffsetComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#OffsetComponent"; public static final String OffsettingPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#OffsettingPoint"; public static final String P3DNode = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#P3DNode"; public static final String PBSNode = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#PBSNode"; public static final String PathLegEndControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#PathLegEndControlPoint"; public static final String PipeControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#PipeControlPoint"; public static final String PipeRun = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#PipeRun"; public static final String PipelineComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#PipelineComponent"; public static final String Plant = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Plant"; public static final String Plant3DProjectType = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Plant3DProjectType"; public static final String Reducer = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Reducer"; public static final String RunEndControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#RunEndControlPoint"; public static final String SingleConnectedComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#SingleConnectedComponent"; public static final String SizeChangeComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#SizeChangeComponent"; public static final String SizeChangeControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#SizeChangeControlPoint"; public static final String Straight = "http://www.vtt.fi/Simantics/Plant3D/1.0#Straight"; public static final String SubPointOf = "http://www.vtt.fi/Simantics/Plant3D/1.0/Relations#SubPointOf"; public static final String TurnComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#TurnComponent"; public static final String TurnControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#TurnControlPoint"; public static final String UndirectedControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#UndirectedControlPoint"; public static final String VariableAngleTurnComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#VariableAngleTurnComponent"; public static final String VariableAngleTurnControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#VariableAngleTurnControlPoint"; public static final String VariableLengthControlPoint = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#VariableLengthControlPoint"; public static final String VariableLengthInlineComponent = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#VariableLengthInlineComponent"; public static final String VerticalVessel = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#VerticalVessel"; public static final String Vessel = "http://www.vtt.fi/Simantics/Plant3D/1.0/Types#Vessel"; } public Plant3DResource(Graph graph) throws Layer0MissingException { try { BranchControlPoint = graph.getResourceByURI(URIs.BranchControlPoint); BranchEndControlPoint = graph.getResourceByURI(URIs.BranchEndControlPoint); BranchSplitComponent = graph.getResourceByURI(URIs.BranchSplitComponent); CodedComponent = graph.getResourceByURI(URIs.CodedComponent); ConcentricReducer = graph.getResourceByURI(URIs.ConcentricReducer); ControlPointOf = graph.getResourceByURI(URIs.ControlPointOf); ControlPointOfPipeRun = graph.getResourceByURI(URIs.ControlPointOfPipeRun); DirectedControlPoint = graph.getResourceByURI(URIs.DirectedControlPoint); DualConnectedComponent = graph.getResourceByURI(URIs.DualConnectedComponent); DualInlineControlPoint = graph.getResourceByURI(URIs.DualInlineControlPoint); DualSubControlPoint = graph.getResourceByURI(URIs.DualSubControlPoint); EccentricReducer = graph.getResourceByURI(URIs.EccentricReducer); Elbow = graph.getResourceByURI(URIs.Elbow); EndComponent = graph.getResourceByURI(URIs.EndComponent); EndComponentControlPoint = graph.getResourceByURI(URIs.EndComponentControlPoint); Equipment = graph.getResourceByURI(URIs.Equipment); FixedAngleTurnComponent = graph.getResourceByURI(URIs.FixedAngleTurnComponent); FixedAngleTurnControlPoint = graph.getResourceByURI(URIs.FixedAngleTurnControlPoint); FixedLengthControlPoint = graph.getResourceByURI(URIs.FixedLengthControlPoint); FixedLengthInlineComponent = graph.getResourceByURI(URIs.FixedLengthInlineComponent); HasChildStructure = graph.getResourceByURI(URIs.HasChildStructure); HasControlPoint = graph.getResourceByURI(URIs.HasControlPoint); HasControlPoints = graph.getResourceByURI(URIs.HasControlPoints); HasGraphics = graph.getResourceByURI(URIs.HasGraphics); HasHeight = graph.getResourceByURI(URIs.HasHeight); HasLength = graph.getResourceByURI(URIs.HasLength); HasNext = graph.getResourceByURI(URIs.HasNext); HasNozzle = graph.getResourceByURI(URIs.HasNozzle); HasNozzleDefinition = graph.getResourceByURI(URIs.HasNozzleDefinition); HasNozzleRestriction = graph.getResourceByURI(URIs.HasNozzleRestriction); HasOffset = graph.getResourceByURI(URIs.HasOffset); HasParentStructure = graph.getResourceByURI(URIs.HasParentStructure); HasPipeDiameter = graph.getResourceByURI(URIs.HasPipeDiameter); HasPrevious = graph.getResourceByURI(URIs.HasPrevious); HasRotationAngle = graph.getResourceByURI(URIs.HasRotationAngle); HasSubPoint = graph.getResourceByURI(URIs.HasSubPoint); HasTurnAngle = graph.getResourceByURI(URIs.HasTurnAngle); HasTurnAxis = graph.getResourceByURI(URIs.HasTurnAxis); HasTurnRadius = graph.getResourceByURI(URIs.HasTurnRadius); HorizontalVessel = graph.getResourceByURI(URIs.HorizontalVessel); InlineComponent = graph.getResourceByURI(URIs.InlineComponent); InlineControlPoint = graph.getResourceByURI(URIs.InlineControlPoint); IsReversed = graph.getResourceByURI(URIs.IsReversed); LibraryComponent = graph.getResourceByURI(URIs.LibraryComponent); MultiConnectedComponent = graph.getResourceByURI(URIs.MultiConnectedComponent); NPortControlPoint = graph.getResourceByURI(URIs.NPortControlPoint); NonVisibleComponent = graph.getResourceByURI(URIs.NonVisibleComponent); Nozzle = graph.getResourceByURI(URIs.Nozzle); NozzleControlPoint = graph.getResourceByURI(URIs.NozzleControlPoint); NozzleOf = graph.getResourceByURI(URIs.NozzleOf); OffsetComponent = graph.getResourceByURI(URIs.OffsetComponent); OffsettingPoint = graph.getResourceByURI(URIs.OffsettingPoint); P3DNode = graph.getResourceByURI(URIs.P3DNode); PBSNode = graph.getResourceByURI(URIs.PBSNode); PathLegEndControlPoint = graph.getResourceByURI(URIs.PathLegEndControlPoint); PipeControlPoint = graph.getResourceByURI(URIs.PipeControlPoint); PipeRun = graph.getResourceByURI(URIs.PipeRun); PipelineComponent = graph.getResourceByURI(URIs.PipelineComponent); Plant = graph.getResourceByURI(URIs.Plant); Plant3DProjectType = graph.getResourceByURI(URIs.Plant3DProjectType); Reducer = graph.getResourceByURI(URIs.Reducer); RunEndControlPoint = graph.getResourceByURI(URIs.RunEndControlPoint); SingleConnectedComponent = graph.getResourceByURI(URIs.SingleConnectedComponent); SizeChangeComponent = graph.getResourceByURI(URIs.SizeChangeComponent); SizeChangeControlPoint = graph.getResourceByURI(URIs.SizeChangeControlPoint); Straight = graph.getResourceByURI(URIs.Straight); SubPointOf = graph.getResourceByURI(URIs.SubPointOf); TurnComponent = graph.getResourceByURI(URIs.TurnComponent); TurnControlPoint = graph.getResourceByURI(URIs.TurnControlPoint); UndirectedControlPoint = graph.getResourceByURI(URIs.UndirectedControlPoint); VariableAngleTurnComponent = graph.getResourceByURI(URIs.VariableAngleTurnComponent); VariableAngleTurnControlPoint = graph.getResourceByURI(URIs.VariableAngleTurnControlPoint); VariableLengthControlPoint = graph.getResourceByURI(URIs.VariableLengthControlPoint); VariableLengthInlineComponent = graph.getResourceByURI(URIs.VariableLengthInlineComponent); VerticalVessel = graph.getResourceByURI(URIs.VerticalVessel); Vessel = graph.getResourceByURI(URIs.Vessel); } catch(ResourceNotFoundException e) { throw new Layer0MissingException(e); } } public static Plant3DResource getInstance(Graph graph) { Session session = graph.getSession(); Plant3DResource ret = session.getService(Plant3DResource.class); if(ret == null) { ret = new Plant3DResource(graph); session.registerService(Plant3DResource.class, ret); } return ret; } }