From fd4f0601db6962e81b0242690a5857dd6344dd71 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Mon, 12 Aug 2019 08:52:14 +0300 Subject: [PATCH] Repository clean-up. * Remove graph.tg files from the repository * Update changed ontology classes * Remove src directories from classpaths of binary fragments Change-Id: I47bbf5f05fa59763bb99df976f2185482109bfd9 --- org.simantics.g3d.csg.ontology/.gitignore | 1 + org.simantics.g3d.csg.ontology/graph.tg | Bin 13109 -> 0 bytes .../org/simantics/g3d/csg/ontology/CSG.java | 487 +++++++++--------- org.simantics.g3d.ontology/.gitignore | 1 + org.simantics.g3d.ontology/graph.tg | Bin 4535 -> 0 bytes .../src/org/simantics/g3d/ontology/G3D.java | 295 +++++------ org.simantics.g3d/build.properties | 3 +- org.simantics.plant3d.ontology/.gitignore | 1 + .../simantics/plant3d/ontology/Plant3D.java | 3 + pom.xml | 25 + vtk.rendering.win32.win32.x86_64/.classpath | 13 +- vtk.rendering.win32.win32.x86_64/.gitignore | 1 + vtk.win32.win32.x86_64/.classpath | 13 +- 13 files changed, 426 insertions(+), 417 deletions(-) delete mode 100644 org.simantics.g3d.csg.ontology/graph.tg delete mode 100644 org.simantics.g3d.ontology/graph.tg create mode 100644 vtk.rendering.win32.win32.x86_64/.gitignore diff --git a/org.simantics.g3d.csg.ontology/.gitignore b/org.simantics.g3d.csg.ontology/.gitignore index ae3c1726..e696a218 100644 --- a/org.simantics.g3d.csg.ontology/.gitignore +++ b/org.simantics.g3d.csg.ontology/.gitignore @@ -1 +1,2 @@ /bin/ +/graph.tg diff --git a/org.simantics.g3d.csg.ontology/graph.tg b/org.simantics.g3d.csg.ontology/graph.tg deleted file mode 100644 index 525ba1366927f5b541031e0a19455a2c199387ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13109 zcmcJVcUV+M_s3~VM~Z-8Frt7W2#SrOB2__(G?j=7%d)~E?BW)RVg$PeB1&Qn5la;8 zn#3;pYAg}E#EM;#s3=iliAMRIGkZtJNuK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5W(yJlZ>?qy%8*OvZi zjl=cFEWC8s(SJd^-sAV%)Q<9Z@U}B~bD=HyS>>}k3-&m^TX{t>!`d|A#>R4k)43=5 ze`((SJA;aib-~`pnjYTpJQ5bXLTnh}@I#kY&t6egCDt3yMh6y-yYr^S_K(=kdXMCO zeXN(rN`HCz%E_>_!E5ci%&6TH`;UE68$#OfA@ zjMuxC$G$Q;UoyP3v0!IoRF{T_XI@VEIZ$$S=A^95<4;%E>GxQ-^^iwu>BuULtV_2} zo;Ui}#`i1;IDhwUvqXQ8+o7?8=D5h_n|WRR+e5Te`bO1#u@egH{7rrmw2s>X>gdGtia6deg731GD-y%^h~|52;(83% z6YA^3XC&V}f_Dt%9pStqOzZe?Ss}b4n0Ewe9nGik2miGb$SVf(j)A-*fOq(79UsQw z%Pacxj()tOFYm}Evu7v6x6oC+;AKSN4RP;0@*>VO64u2(7EUEiGdGoUN^odWFVTcXPJhW87}Yf#?s z(kfJu5v`SwOoOki3t7g0w7=&4&-Pb6dfvytd2coA;3t&>&aaKzn7cO3#h~nyC3`2W zy1n}D*`Yb2jmBHL&aFvGv5j=D2@i`~yJ*(j8fW(`TfJ*BH8~k`oQ>X`>MV}Rz1`G z;pD8_QN1FX&-Uz<|N5^ku)pqFbjZx5v;W)d#ozn->V&PYZV^jPG`P)mIuM;2uvIf; zlivhCgS8c#9)9tAT3JZS)hCy#Ht*cAMzT26_e_O4UGL!Sw@&Z+IXvlP>r{L95jItuc3U~625#-+Y<7Ri%$VD{6Q|eKtaAAK_~^@C zI>n3KuRgmkE7C1%5#K%;`L5r*@U8p5s8P)p2Uo6{GWzkKyPuT0`u+XNV&Ki}$H_^@ zpR^`f8U8rq)6!pqS1k6jDVug=+ScHbEur6Ch#95#_V6^lqzxu*<_&wNAG%bXZSyuQ zU*l6%+ivU_y)C*2Y>eFM_L() { - public CSG perform(ReadGraph graph) throws DatabaseException { - QueryControl qc = graph.getService(QueryControl.class); - return new CSG(qc.getIndependentGraph(graph)); - } - }); - session.registerService(CSG.class, ret); - } - return ret; - } - -} - +package org.simantics.g3d.csg.ontology; + +import org.simantics.db.RequestProcessor; +import org.simantics.db.Resource; +import org.simantics.db.ReadGraph; +import org.simantics.db.request.Read; +import org.simantics.db.Session; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.service.QueryControl; + +public class CSG { + + public final Resource Barrel; + public final Resource BooleanOperation; + public final Resource Box; + public final Resource CSGBrowseContext; + public final Resource CSGBrowseContext_ActiveLabelDecorationRule; + public final Resource CSGBrowseContext_RunLabelRule; + public final Resource CSGBrowseContext_ShapeTabContribution; + public final Resource Cone; + public final Resource Cylinder; + public final Resource Difference; + public final Resource EllipticCylinder; + public final Resource HasBottomRadius; + public final Resource HasBottomRadius_Inverse; + public final Resource HasCorners; + public final Resource HasCorners_Inverse; + public final Resource HasHeight; + public final Resource HasHeight_Inverse; + public final Resource HasMajorRadius; + public final Resource HasMajorRadius_Inverse; + public final Resource HasMinorRadius; + public final Resource HasMinorRadius_Inverse; + public final Resource HasRadius; + public final Resource HasRadius_Inverse; + public final Resource HasSizingProperty; + public final Resource HasSizingProperty_Inverse; + public final Resource HasTopRadius; + public final Resource HasTopRadius_Inverse; + public final Resource HasXAxisMaximumSize; + public final Resource HasXAxisMaximumSize_Inverse; + public final Resource HasXAxisMinimumSize; + public final Resource HasXAxisMinimumSize_Inverse; + public final Resource HasXAxisSize; + public final Resource HasXAxisSize_Inverse; + public final Resource HasYAxisSize; + public final Resource HasYAxisSize_Inverse; + public final Resource HasZAxisMaximumSize; + public final Resource HasZAxisMaximumSize_Inverse; + public final Resource HasZAxisMinimumSize; + public final Resource HasZAxisMinimumSize_Inverse; + public final Resource HasZAxisSize; + public final Resource HasZAxisSize_Inverse; + public final Resource Images; + public final Resource Images_Difference; + public final Resource Images_Intersection; + public final Resource Images_Ruby; + public final Resource Images_Union; + public final Resource Intersection; + public final Resource Model; + public final Resource Primitive; + public final Resource RectangularSolid; + public final Resource RegularPrism; + public final Resource Shape; + public final Resource Sphere; + public final Resource Torus; + public final Resource Union; + public final Resource hasChildShape; + public final Resource hasChildShape_Inverse; + public final Resource hasPrimaryShape; + public final Resource hasPrimaryShape_Inverse; + public final Resource hasSecondaryShape; + public final Resource hasSecondaryShape_Inverse; + + public static class URIs { + public static final String Barrel = "http://www.simantics.org/CSG-0.1/Barrel"; + public static final String BooleanOperation = "http://www.simantics.org/CSG-0.1/BooleanOperation"; + public static final String Box = "http://www.simantics.org/CSG-0.1/Box"; + public static final String CSGBrowseContext = "http://www.simantics.org/CSG-0.1/CSGBrowseContext"; + public static final String CSGBrowseContext_ActiveLabelDecorationRule = "http://www.simantics.org/CSG-0.1/CSGBrowseContext/ActiveLabelDecorationRule"; + public static final String CSGBrowseContext_RunLabelRule = "http://www.simantics.org/CSG-0.1/CSGBrowseContext/RunLabelRule"; + public static final String CSGBrowseContext_ShapeTabContribution = "http://www.simantics.org/CSG-0.1/CSGBrowseContext/ShapeTabContribution"; + public static final String Cone = "http://www.simantics.org/CSG-0.1/Cone"; + public static final String Cylinder = "http://www.simantics.org/CSG-0.1/Cylinder"; + public static final String Difference = "http://www.simantics.org/CSG-0.1/Difference"; + public static final String EllipticCylinder = "http://www.simantics.org/CSG-0.1/EllipticCylinder"; + public static final String HasBottomRadius = "http://www.simantics.org/CSG-0.1/HasBottomRadius"; + public static final String HasBottomRadius_Inverse = "http://www.simantics.org/CSG-0.1/HasBottomRadius/Inverse"; + public static final String HasCorners = "http://www.simantics.org/CSG-0.1/HasCorners"; + public static final String HasCorners_Inverse = "http://www.simantics.org/CSG-0.1/HasCorners/Inverse"; + public static final String HasHeight = "http://www.simantics.org/CSG-0.1/HasHeight"; + public static final String HasHeight_Inverse = "http://www.simantics.org/CSG-0.1/HasHeight/Inverse"; + public static final String HasMajorRadius = "http://www.simantics.org/CSG-0.1/HasMajorRadius"; + public static final String HasMajorRadius_Inverse = "http://www.simantics.org/CSG-0.1/HasMajorRadius/Inverse"; + public static final String HasMinorRadius = "http://www.simantics.org/CSG-0.1/HasMinorRadius"; + public static final String HasMinorRadius_Inverse = "http://www.simantics.org/CSG-0.1/HasMinorRadius/Inverse"; + public static final String HasRadius = "http://www.simantics.org/CSG-0.1/HasRadius"; + public static final String HasRadius_Inverse = "http://www.simantics.org/CSG-0.1/HasRadius/Inverse"; + public static final String HasSizingProperty = "http://www.simantics.org/CSG-0.1/HasSizingProperty"; + public static final String HasSizingProperty_Inverse = "http://www.simantics.org/CSG-0.1/HasSizingProperty/Inverse"; + public static final String HasTopRadius = "http://www.simantics.org/CSG-0.1/HasTopRadius"; + public static final String HasTopRadius_Inverse = "http://www.simantics.org/CSG-0.1/HasTopRadius/Inverse"; + public static final String HasXAxisMaximumSize = "http://www.simantics.org/CSG-0.1/HasXAxisMaximumSize"; + public static final String HasXAxisMaximumSize_Inverse = "http://www.simantics.org/CSG-0.1/HasXAxisMaximumSize/Inverse"; + public static final String HasXAxisMinimumSize = "http://www.simantics.org/CSG-0.1/HasXAxisMinimumSize"; + public static final String HasXAxisMinimumSize_Inverse = "http://www.simantics.org/CSG-0.1/HasXAxisMinimumSize/Inverse"; + public static final String HasXAxisSize = "http://www.simantics.org/CSG-0.1/HasXAxisSize"; + public static final String HasXAxisSize_Inverse = "http://www.simantics.org/CSG-0.1/HasXAxisSize/Inverse"; + public static final String HasYAxisSize = "http://www.simantics.org/CSG-0.1/HasYAxisSize"; + public static final String HasYAxisSize_Inverse = "http://www.simantics.org/CSG-0.1/HasYAxisSize/Inverse"; + public static final String HasZAxisMaximumSize = "http://www.simantics.org/CSG-0.1/HasZAxisMaximumSize"; + public static final String HasZAxisMaximumSize_Inverse = "http://www.simantics.org/CSG-0.1/HasZAxisMaximumSize/Inverse"; + public static final String HasZAxisMinimumSize = "http://www.simantics.org/CSG-0.1/HasZAxisMinimumSize"; + public static final String HasZAxisMinimumSize_Inverse = "http://www.simantics.org/CSG-0.1/HasZAxisMinimumSize/Inverse"; + public static final String HasZAxisSize = "http://www.simantics.org/CSG-0.1/HasZAxisSize"; + public static final String HasZAxisSize_Inverse = "http://www.simantics.org/CSG-0.1/HasZAxisSize/Inverse"; + public static final String Images = "http://www.simantics.org/CSG-0.1/Images"; + public static final String Images_Difference = "http://www.simantics.org/CSG-0.1/Images/Difference"; + public static final String Images_Intersection = "http://www.simantics.org/CSG-0.1/Images/Intersection"; + public static final String Images_Ruby = "http://www.simantics.org/CSG-0.1/Images/Ruby"; + public static final String Images_Union = "http://www.simantics.org/CSG-0.1/Images/Union"; + public static final String Intersection = "http://www.simantics.org/CSG-0.1/Intersection"; + public static final String Model = "http://www.simantics.org/CSG-0.1/Model"; + public static final String Primitive = "http://www.simantics.org/CSG-0.1/Primitive"; + public static final String RectangularSolid = "http://www.simantics.org/CSG-0.1/RectangularSolid"; + public static final String RegularPrism = "http://www.simantics.org/CSG-0.1/RegularPrism"; + public static final String Shape = "http://www.simantics.org/CSG-0.1/Shape"; + public static final String Sphere = "http://www.simantics.org/CSG-0.1/Sphere"; + public static final String Torus = "http://www.simantics.org/CSG-0.1/Torus"; + public static final String Union = "http://www.simantics.org/CSG-0.1/Union"; + public static final String hasChildShape = "http://www.simantics.org/CSG-0.1/hasChildShape"; + public static final String hasChildShape_Inverse = "http://www.simantics.org/CSG-0.1/hasChildShape/Inverse"; + public static final String hasPrimaryShape = "http://www.simantics.org/CSG-0.1/hasPrimaryShape"; + public static final String hasPrimaryShape_Inverse = "http://www.simantics.org/CSG-0.1/hasPrimaryShape/Inverse"; + public static final String hasSecondaryShape = "http://www.simantics.org/CSG-0.1/hasSecondaryShape"; + public static final String hasSecondaryShape_Inverse = "http://www.simantics.org/CSG-0.1/hasSecondaryShape/Inverse"; + } + + public static Resource getResourceOrNull(ReadGraph graph, String uri) { + try { + return graph.getResource(uri); + } catch(DatabaseException e) { + System.err.println(e.getMessage()); + return null; + } + } + + public CSG(ReadGraph graph) { + Barrel = getResourceOrNull(graph, URIs.Barrel); + BooleanOperation = getResourceOrNull(graph, URIs.BooleanOperation); + Box = getResourceOrNull(graph, URIs.Box); + CSGBrowseContext = getResourceOrNull(graph, URIs.CSGBrowseContext); + CSGBrowseContext_ActiveLabelDecorationRule = getResourceOrNull(graph, URIs.CSGBrowseContext_ActiveLabelDecorationRule); + CSGBrowseContext_RunLabelRule = getResourceOrNull(graph, URIs.CSGBrowseContext_RunLabelRule); + CSGBrowseContext_ShapeTabContribution = getResourceOrNull(graph, URIs.CSGBrowseContext_ShapeTabContribution); + Cone = getResourceOrNull(graph, URIs.Cone); + Cylinder = getResourceOrNull(graph, URIs.Cylinder); + Difference = getResourceOrNull(graph, URIs.Difference); + EllipticCylinder = getResourceOrNull(graph, URIs.EllipticCylinder); + HasBottomRadius = getResourceOrNull(graph, URIs.HasBottomRadius); + HasBottomRadius_Inverse = getResourceOrNull(graph, URIs.HasBottomRadius_Inverse); + HasCorners = getResourceOrNull(graph, URIs.HasCorners); + HasCorners_Inverse = getResourceOrNull(graph, URIs.HasCorners_Inverse); + HasHeight = getResourceOrNull(graph, URIs.HasHeight); + HasHeight_Inverse = getResourceOrNull(graph, URIs.HasHeight_Inverse); + HasMajorRadius = getResourceOrNull(graph, URIs.HasMajorRadius); + HasMajorRadius_Inverse = getResourceOrNull(graph, URIs.HasMajorRadius_Inverse); + HasMinorRadius = getResourceOrNull(graph, URIs.HasMinorRadius); + HasMinorRadius_Inverse = getResourceOrNull(graph, URIs.HasMinorRadius_Inverse); + HasRadius = getResourceOrNull(graph, URIs.HasRadius); + HasRadius_Inverse = getResourceOrNull(graph, URIs.HasRadius_Inverse); + HasSizingProperty = getResourceOrNull(graph, URIs.HasSizingProperty); + HasSizingProperty_Inverse = getResourceOrNull(graph, URIs.HasSizingProperty_Inverse); + HasTopRadius = getResourceOrNull(graph, URIs.HasTopRadius); + HasTopRadius_Inverse = getResourceOrNull(graph, URIs.HasTopRadius_Inverse); + HasXAxisMaximumSize = getResourceOrNull(graph, URIs.HasXAxisMaximumSize); + HasXAxisMaximumSize_Inverse = getResourceOrNull(graph, URIs.HasXAxisMaximumSize_Inverse); + HasXAxisMinimumSize = getResourceOrNull(graph, URIs.HasXAxisMinimumSize); + HasXAxisMinimumSize_Inverse = getResourceOrNull(graph, URIs.HasXAxisMinimumSize_Inverse); + HasXAxisSize = getResourceOrNull(graph, URIs.HasXAxisSize); + HasXAxisSize_Inverse = getResourceOrNull(graph, URIs.HasXAxisSize_Inverse); + HasYAxisSize = getResourceOrNull(graph, URIs.HasYAxisSize); + HasYAxisSize_Inverse = getResourceOrNull(graph, URIs.HasYAxisSize_Inverse); + HasZAxisMaximumSize = getResourceOrNull(graph, URIs.HasZAxisMaximumSize); + HasZAxisMaximumSize_Inverse = getResourceOrNull(graph, URIs.HasZAxisMaximumSize_Inverse); + HasZAxisMinimumSize = getResourceOrNull(graph, URIs.HasZAxisMinimumSize); + HasZAxisMinimumSize_Inverse = getResourceOrNull(graph, URIs.HasZAxisMinimumSize_Inverse); + HasZAxisSize = getResourceOrNull(graph, URIs.HasZAxisSize); + HasZAxisSize_Inverse = getResourceOrNull(graph, URIs.HasZAxisSize_Inverse); + Images = getResourceOrNull(graph, URIs.Images); + Images_Difference = getResourceOrNull(graph, URIs.Images_Difference); + Images_Intersection = getResourceOrNull(graph, URIs.Images_Intersection); + Images_Ruby = getResourceOrNull(graph, URIs.Images_Ruby); + Images_Union = getResourceOrNull(graph, URIs.Images_Union); + Intersection = getResourceOrNull(graph, URIs.Intersection); + Model = getResourceOrNull(graph, URIs.Model); + Primitive = getResourceOrNull(graph, URIs.Primitive); + RectangularSolid = getResourceOrNull(graph, URIs.RectangularSolid); + RegularPrism = getResourceOrNull(graph, URIs.RegularPrism); + Shape = getResourceOrNull(graph, URIs.Shape); + Sphere = getResourceOrNull(graph, URIs.Sphere); + Torus = getResourceOrNull(graph, URIs.Torus); + Union = getResourceOrNull(graph, URIs.Union); + hasChildShape = getResourceOrNull(graph, URIs.hasChildShape); + hasChildShape_Inverse = getResourceOrNull(graph, URIs.hasChildShape_Inverse); + hasPrimaryShape = getResourceOrNull(graph, URIs.hasPrimaryShape); + hasPrimaryShape_Inverse = getResourceOrNull(graph, URIs.hasPrimaryShape_Inverse); + hasSecondaryShape = getResourceOrNull(graph, URIs.hasSecondaryShape); + hasSecondaryShape_Inverse = getResourceOrNull(graph, URIs.hasSecondaryShape_Inverse); + } + + public static CSG getInstance(ReadGraph graph) { + Session session = graph.getSession(); + CSG ret = session.peekService(CSG.class); + if(ret == null) { + QueryControl qc = graph.getService(QueryControl.class); + ret = new CSG(qc.getIndependentGraph(graph)); + session.registerService(CSG.class, ret); + } + return ret; + } + + public static CSG getInstance(RequestProcessor session) throws DatabaseException { + CSG ret = session.peekService(CSG.class); + if(ret == null) { + ret = session.syncRequest(new Read() { + public CSG perform(ReadGraph graph) throws DatabaseException { + QueryControl qc = graph.getService(QueryControl.class); + return new CSG(qc.getIndependentGraph(graph)); + } + }); + session.registerService(CSG.class, ret); + } + return ret; + } + +} + diff --git a/org.simantics.g3d.ontology/.gitignore b/org.simantics.g3d.ontology/.gitignore index ae3c1726..e696a218 100644 --- a/org.simantics.g3d.ontology/.gitignore +++ b/org.simantics.g3d.ontology/.gitignore @@ -1 +1,2 @@ /bin/ +/graph.tg diff --git a/org.simantics.g3d.ontology/graph.tg b/org.simantics.g3d.ontology/graph.tg deleted file mode 100644 index ed0e5d348c7dfae8e25161e17491e74d34668739..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4535 zcmeHKX;T|V5Jf`AO5z6Jj*agtU~KHfS7LM8vN6JdgXrYIkMAKgqvM-s{~) zgHo=1Pi3oG%5=C<>@}5RYgS70vAAlMLHBz&uP}mN`6_{F{(S~Tp~<{a z{O4=}n>rITQ@S~MbaXTy`-cXNX~y$m)CMC@Q?9yUj%~Cs_h|kR;39STk#{EEifqeo zqA(~nL_5CI>)I%?9mAlAwzV6=`>dF1()6^A zP(Bi6bp_|ckCRyHc_F$ft+C&1@L!2-0{kZSG&+#3GAtiydF532M5q1(bG@$Pc(Re-u0x19hy{3;hqNQ({P35a6wb zhsIC0<2BKY)Z>-#up7pnPtf#R7ccsQI5t-G;7<1?qro5HTind2)*5)Ti9 zl`FqpT%B8x^LmMj;o1StYZ%Lm40w&oOHQoY!t$0)Y&XLex9c6zOto!zXp_h}cd(rk z+YDlEhQV%Rf_OiS4&~6px=iaiC-}WIc=N#TwD9JG^{Qwl5a3G~by`kkZ)v&eIL`=m zTynMCm0qG@#$nzNW;K1gX0y02y6lY${$0T{|D2UHZ%(Wp-|day}gbfA6TBp zI#myyycOY;cYEEAU0j86RushmjikebV}C;XWl>D)>>H7fH@kLkoyN;f_-SF+PP5L7 zauOl_(f$>h&N~6-g@@{7V^j`Lw(I zpB?-dW8x=}ZOCMX7x8xoG79+#qW{06s_k$hM(i_dkA|;yJD^t zb7*}x2k<-KS;u}Y!`xS#J7dj4v>wJH)_ORmT!egpkbf1T{p8*xRzAlRpP!e z%}4*s5RJE7((NFeX;MV&$KOjWz0in!uQIR$Re&5~Am8 z9Ak3S&M$J}r;tw&o>iVXm(Lh3pIG@ktGoax|24+LkTPToLL0HxPhS@^w~JZ3i#azJ zvllLAZ(Yo_aWU7<#oP-n=H7BK_qK~?2k?yn%=6;%`7UrV&%cZB4dD9&nC~W+&v%!L z`K}|@eit#$LA1ZLQM?j>)E`<$A`=M5N>?v-q`wj72XYXW|5a|QLu zdH8@aEqsV`{nBfoB=DAx6RYfejW@2gjZPHaMi{hDP-VRnn&bplS3`Uf^u4R;hiTuw zZJS}#Qq07;N@Vx(p$E4@67?)p`R|ohZSwOpIJxk-^U3$`jB?Xt6LOWMC^E-xI;Q+? z{Lz#6bdd<() { - public G3D perform(ReadGraph graph) throws DatabaseException { - QueryControl qc = graph.getService(QueryControl.class); - return new G3D(qc.getIndependentGraph(graph)); - } - }); - session.registerService(G3D.class, ret); - } - return ret; - } - -} - +package org.simantics.g3d.ontology; + +import org.simantics.db.RequestProcessor; +import org.simantics.db.Resource; +import org.simantics.db.ReadGraph; +import org.simantics.db.request.Read; +import org.simantics.db.Session; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.service.QueryControl; + +public class G3D { + + public final Resource BaseNode; + public final Resource Node; + public final Resource Orientation; + public final Resource Position; + public final Resource RootNode; + public final Resource Tuple3D; + public final Resource Tuple4D; + public final Resource children; + public final Resource geometryDefinition; + public final Resource geometryDefinitionOf; + public final Resource hasNodeProperty; + public final Resource hasNodeProperty_Inverse; + public final Resource hasNonTransformation; + public final Resource hasNonTransformation_Inverse; + public final Resource hasOrientation; + public final Resource hasOrientation_Inverse; + public final Resource hasPosition; + public final Resource hasPosition_Inverse; + public final Resource hasTransformation; + public final Resource hasTransformation_Inverse; + public final Resource hasWorldOrientation; + public final Resource hasWorldOrientation_Inverse; + public final Resource hasWorldPosition; + public final Resource hasWorldPosition_Inverse; + public final Resource nodes; + public final Resource parent; + public final Resource parentNode; + public final Resource publishes; + public final Resource publishes_Inverse; + + public static class URIs { + public static final String BaseNode = "http://www.simantics.org/G3D-0.1/BaseNode"; + public static final String Node = "http://www.simantics.org/G3D-0.1/Node"; + public static final String Orientation = "http://www.simantics.org/G3D-0.1/Orientation"; + public static final String Position = "http://www.simantics.org/G3D-0.1/Position"; + public static final String RootNode = "http://www.simantics.org/G3D-0.1/RootNode"; + public static final String Tuple3D = "http://www.simantics.org/G3D-0.1/Tuple3D"; + public static final String Tuple4D = "http://www.simantics.org/G3D-0.1/Tuple4D"; + public static final String children = "http://www.simantics.org/G3D-0.1/children"; + public static final String geometryDefinition = "http://www.simantics.org/G3D-0.1/geometryDefinition"; + public static final String geometryDefinitionOf = "http://www.simantics.org/G3D-0.1/geometryDefinitionOf"; + public static final String hasNodeProperty = "http://www.simantics.org/G3D-0.1/hasNodeProperty"; + public static final String hasNodeProperty_Inverse = "http://www.simantics.org/G3D-0.1/hasNodeProperty/Inverse"; + public static final String hasNonTransformation = "http://www.simantics.org/G3D-0.1/hasNonTransformation"; + public static final String hasNonTransformation_Inverse = "http://www.simantics.org/G3D-0.1/hasNonTransformation/Inverse"; + public static final String hasOrientation = "http://www.simantics.org/G3D-0.1/hasOrientation"; + public static final String hasOrientation_Inverse = "http://www.simantics.org/G3D-0.1/hasOrientation/Inverse"; + public static final String hasPosition = "http://www.simantics.org/G3D-0.1/hasPosition"; + public static final String hasPosition_Inverse = "http://www.simantics.org/G3D-0.1/hasPosition/Inverse"; + public static final String hasTransformation = "http://www.simantics.org/G3D-0.1/hasTransformation"; + public static final String hasTransformation_Inverse = "http://www.simantics.org/G3D-0.1/hasTransformation/Inverse"; + public static final String hasWorldOrientation = "http://www.simantics.org/G3D-0.1/hasWorldOrientation"; + public static final String hasWorldOrientation_Inverse = "http://www.simantics.org/G3D-0.1/hasWorldOrientation/Inverse"; + public static final String hasWorldPosition = "http://www.simantics.org/G3D-0.1/hasWorldPosition"; + public static final String hasWorldPosition_Inverse = "http://www.simantics.org/G3D-0.1/hasWorldPosition/Inverse"; + public static final String nodes = "http://www.simantics.org/G3D-0.1/nodes"; + public static final String parent = "http://www.simantics.org/G3D-0.1/parent"; + public static final String parentNode = "http://www.simantics.org/G3D-0.1/parentNode"; + public static final String publishes = "http://www.simantics.org/G3D-0.1/publishes"; + public static final String publishes_Inverse = "http://www.simantics.org/G3D-0.1/publishes/Inverse"; + } + + public static Resource getResourceOrNull(ReadGraph graph, String uri) { + try { + return graph.getResource(uri); + } catch(DatabaseException e) { + System.err.println(e.getMessage()); + return null; + } + } + + public G3D(ReadGraph graph) { + BaseNode = getResourceOrNull(graph, URIs.BaseNode); + Node = getResourceOrNull(graph, URIs.Node); + Orientation = getResourceOrNull(graph, URIs.Orientation); + Position = getResourceOrNull(graph, URIs.Position); + RootNode = getResourceOrNull(graph, URIs.RootNode); + Tuple3D = getResourceOrNull(graph, URIs.Tuple3D); + Tuple4D = getResourceOrNull(graph, URIs.Tuple4D); + children = getResourceOrNull(graph, URIs.children); + geometryDefinition = getResourceOrNull(graph, URIs.geometryDefinition); + geometryDefinitionOf = getResourceOrNull(graph, URIs.geometryDefinitionOf); + hasNodeProperty = getResourceOrNull(graph, URIs.hasNodeProperty); + hasNodeProperty_Inverse = getResourceOrNull(graph, URIs.hasNodeProperty_Inverse); + hasNonTransformation = getResourceOrNull(graph, URIs.hasNonTransformation); + hasNonTransformation_Inverse = getResourceOrNull(graph, URIs.hasNonTransformation_Inverse); + hasOrientation = getResourceOrNull(graph, URIs.hasOrientation); + hasOrientation_Inverse = getResourceOrNull(graph, URIs.hasOrientation_Inverse); + hasPosition = getResourceOrNull(graph, URIs.hasPosition); + hasPosition_Inverse = getResourceOrNull(graph, URIs.hasPosition_Inverse); + hasTransformation = getResourceOrNull(graph, URIs.hasTransformation); + hasTransformation_Inverse = getResourceOrNull(graph, URIs.hasTransformation_Inverse); + hasWorldOrientation = getResourceOrNull(graph, URIs.hasWorldOrientation); + hasWorldOrientation_Inverse = getResourceOrNull(graph, URIs.hasWorldOrientation_Inverse); + hasWorldPosition = getResourceOrNull(graph, URIs.hasWorldPosition); + hasWorldPosition_Inverse = getResourceOrNull(graph, URIs.hasWorldPosition_Inverse); + nodes = getResourceOrNull(graph, URIs.nodes); + parent = getResourceOrNull(graph, URIs.parent); + parentNode = getResourceOrNull(graph, URIs.parentNode); + publishes = getResourceOrNull(graph, URIs.publishes); + publishes_Inverse = getResourceOrNull(graph, URIs.publishes_Inverse); + } + + public static G3D getInstance(ReadGraph graph) { + Session session = graph.getSession(); + G3D ret = session.peekService(G3D.class); + if(ret == null) { + QueryControl qc = graph.getService(QueryControl.class); + ret = new G3D(qc.getIndependentGraph(graph)); + session.registerService(G3D.class, ret); + } + return ret; + } + + public static G3D getInstance(RequestProcessor session) throws DatabaseException { + G3D ret = session.peekService(G3D.class); + if(ret == null) { + ret = session.syncRequest(new Read() { + public G3D perform(ReadGraph graph) throws DatabaseException { + QueryControl qc = graph.getService(QueryControl.class); + return new G3D(qc.getIndependentGraph(graph)); + } + }); + session.registerService(G3D.class, ret); + } + return ret; + } + +} + diff --git a/org.simantics.g3d/build.properties b/org.simantics.g3d/build.properties index 0016b86a..3d85ef02 100644 --- a/org.simantics.g3d/build.properties +++ b/org.simantics.g3d/build.properties @@ -13,4 +13,5 @@ source.. = src/ output.. = bin/ bin.includes = META-INF/,\ .,\ - plugin.xml + plugin.xml,\ + adapters.xml diff --git a/org.simantics.plant3d.ontology/.gitignore b/org.simantics.plant3d.ontology/.gitignore index ae3c1726..e696a218 100644 --- a/org.simantics.plant3d.ontology/.gitignore +++ b/org.simantics.plant3d.ontology/.gitignore @@ -1 +1,2 @@ /bin/ +/graph.tg diff --git a/org.simantics.plant3d.ontology/src/org/simantics/plant3d/ontology/Plant3D.java b/org.simantics.plant3d.ontology/src/org/simantics/plant3d/ontology/Plant3D.java index e8558f28..818b497e 100644 --- a/org.simantics.plant3d.ontology/src/org/simantics/plant3d/ontology/Plant3D.java +++ b/org.simantics.plant3d.ontology/src/org/simantics/plant3d/ontology/Plant3D.java @@ -102,6 +102,7 @@ public class Plant3D { public final Resource PipelineComponentTag; public final Resource Plant; public final Resource PreviousInverse; + public final Resource ReverseComponent; public final Resource RotateComponent; public final Resource SingleConnectedComponent; public final Resource SizeChangeComponent; @@ -207,6 +208,7 @@ public class Plant3D { public static final String PipelineComponentTag = "http://www.simantics.org/Plant3D-0.1/PipelineComponentTag"; public static final String Plant = "http://www.simantics.org/Plant3D-0.1/Plant"; public static final String PreviousInverse = "http://www.simantics.org/Plant3D-0.1/PreviousInverse"; + public static final String ReverseComponent = "http://www.simantics.org/Plant3D-0.1/ReverseComponent"; public static final String RotateComponent = "http://www.simantics.org/Plant3D-0.1/RotateComponent"; public static final String SingleConnectedComponent = "http://www.simantics.org/Plant3D-0.1/SingleConnectedComponent"; public static final String SizeChangeComponent = "http://www.simantics.org/Plant3D-0.1/SizeChangeComponent"; @@ -322,6 +324,7 @@ public class Plant3D { PipelineComponentTag = getResourceOrNull(graph, URIs.PipelineComponentTag); Plant = getResourceOrNull(graph, URIs.Plant); PreviousInverse = getResourceOrNull(graph, URIs.PreviousInverse); + ReverseComponent = getResourceOrNull(graph, URIs.ReverseComponent); RotateComponent = getResourceOrNull(graph, URIs.RotateComponent); SingleConnectedComponent = getResourceOrNull(graph, URIs.SingleConnectedComponent); SizeChangeComponent = getResourceOrNull(graph, URIs.SizeChangeComponent); diff --git a/pom.xml b/pom.xml index 0abf255b..e278711e 100644 --- a/pom.xml +++ b/pom.xml @@ -23,8 +23,33 @@ + + + graph-builder-snapshot + Graph Builder Repository + https://repo.simupedia.com/repository/graph-builder-release + default + + never + + + always + + + + + + org.simantics + graph-builder-maven-plugin + 0.0.9 + + + compile-graphs + + + org.eclipse.tycho tycho-compiler-plugin diff --git a/vtk.rendering.win32.win32.x86_64/.classpath b/vtk.rendering.win32.win32.x86_64/.classpath index eca7bdba..dbc0de13 100644 --- a/vtk.rendering.win32.win32.x86_64/.classpath +++ b/vtk.rendering.win32.win32.x86_64/.classpath @@ -1,7 +1,6 @@ - - - - - - - + + + + + + diff --git a/vtk.rendering.win32.win32.x86_64/.gitignore b/vtk.rendering.win32.win32.x86_64/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/vtk.rendering.win32.win32.x86_64/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/vtk.win32.win32.x86_64/.classpath b/vtk.win32.win32.x86_64/.classpath index eca7bdba..dbc0de13 100644 --- a/vtk.win32.win32.x86_64/.classpath +++ b/vtk.win32.win32.x86_64/.classpath @@ -1,7 +1,6 @@ - - - - - - - + + + + + + -- 2.45.2