]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics/src/org/simantics/DatabaseBaselines.java
Added graph.tg hash caching to FixExportedOntology
[simantics/platform.git] / bundles / org.simantics / src / org / simantics / DatabaseBaselines.java
index 96db5ed72f46339fb869cbaa25c9bc1f26b8ec5c..ca272be6b3029b6593242df0ddf46b3e00b89ebb 100644 (file)
@@ -123,6 +123,17 @@ public class DatabaseBaselines {
                }
        }
 
+       public static void initializeWorkspaceWithBaseline(Path baseline, Path workspaceLocation, Path indicatorPath) throws PlatformException {
+               try {
+                       Files.createDirectories(workspaceLocation);
+                       FileUtils.extractZip(baseline.toFile(), workspaceLocation.toFile());
+                       if (indicatorPath != null)
+                               Files.write(indicatorPath, DatabaseBaselines.baselineIndicatorContents(indicatorPath));
+               } catch (IOException e) {
+                       throw new PlatformException(e);
+               }
+       }
+
        public static void main(String[] args) throws IOException {
                packageBaseline(Paths.get("D:/temp/desktop/workspace"), Paths.get("d:/temp/desktop/workspace/baseline.zip"));
        }