1 import "Simantics/Model"
2 include "Simantics/Entity" hiding (nameOf)
3 import "http://www.simantics.org/Layer0-1.1" as L0
5 type Library = Resource
7 importJava "org.simantics.modeling.ui.SCLLibrary" where
8 @JavaName createLibrary
10 Creates a new Library under the given Library parameter. Returns the created Library.
12 createLibrary :: Library -> <Proc> Library
14 @Javaname createLibraryInModel
16 Creates a new Library under the given Model parameter. Returns the created Library.
18 createLibraryInModel :: Model -> <Proc> Library
21 getLibrary :: Model -> String -> <ReadGraph> Library
23 librariesOf :: Model -> <ReadGraph> [Library]
24 librariesOf model = recurse L0.Library model
28 libraries = filter isLibrary cs
29 libraryGrp = filter (not . isLibrary) cs
30 libraries + concatMap (recurse t) libraryGrp
31 isLibrary r = isInstanceOf r L0.Library