]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.db/scl/Simantics/DB.scl
Rename linked list functions that are overlapping or are too generic
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / DB.scl
1 import "JavaBuiltin" as Java
2 include "http://www.simantics.org/Layer0-1.1" as L0
3 import "Map" as Map
4
5 infixl 5 (#)
6  
7 effect ReadGraph
8     "graph"
9     "org.simantics.db.ReadGraph"
10
11 effect WriteGraph
12     "graph"
13     "org.simantics.db.WriteGraph"
14     
15 importJava "org.simantics.db.Resource" where
16     "A resource is a node in a semantic graph."
17     data Resource
18     
19     "Returns the 64-bit unique identifier of the resource."
20     @JavaName getResourceId
21     resourceId :: Resource -> Long
22     
23     isPersistent :: Resource -> Boolean
24     
25 importJava "org.simantics.db.ReadGraph" where
26     data ReadGraphX
27     
28 instance Ord Resource where
29     compare a b = compare (resourceId a) (resourceId b)
30   
31 instance Show Resource where
32     show r = "#" + show (resourceId r)
33
34 instance Show Statement where
35     show s = "#" + show (resourceId ( subjectOf s)) + "#" + show (resourceId ( predicateOf s)) + "#" + show (resourceId ( objectOf s))
36
37 importJava "org.simantics.db.Statement" where
38     "A statement is an edge in a semantic graph."
39     data Statement
40     
41     @JavaName getSubject
42     subjectOf :: Statement -> Resource
43     @JavaName getPredicate
44     predicateOf :: Statement -> Resource
45     @JavaName getObject
46     objectOf :: Statement -> Resource
47     
48     isAsserted :: Statement -> Resource -> <ReadGraph> Boolean
49     
50 importJava "org.simantics.db.ReadGraph" where
51     "Converts an absolute URI to a resource or returns `Nothing` if there is no such resource."
52     @JavaName getPossibleResource
53     possibleResource :: String -> <ReadGraph> (Maybe Resource)
54     
55     getDataType :: Resource -> <ReadGraph> Datatype
56
57     @JavaName getSupertypes
58     superTypesOf :: Resource -> <ReadGraph> Set.T Resource
59     
60     @private
61     @JavaName getURI
62     uriOfResource :: Resource -> <ReadGraph> String
63
64     @private
65     @JavaName getPossibleURI
66     possibleUriOfResource :: Resource -> <ReadGraph> Maybe String
67     
68     @JavaName getObjects
69     objects_ :: Resource -> Resource -> <ReadGraph> Collection Resource
70     
71     @JavaName getStatements
72     statements_ :: Resource -> Resource -> <ReadGraph> Collection Statement
73     
74     @JavaName hasStatement
75     existsStatement :: Resource -> Resource -> <ReadGraph> Boolean
76     
77     @JavaName hasStatement
78     existsStatement3 :: Resource -> Resource -> Resource -> <ReadGraph> Boolean
79
80     "Assumes that there is exactly one object with the given subject and predicate and returns it."
81     @JavaName getSingleObject
82     singleObject :: Resource -> Resource -> <ReadGraph> Resource
83
84     """
85     If there is exactly one object with the given `subject` and `predicate`,
86     `possibleObject subject predicate` returns it. Otherwise, it returns
87     `Nothing`.
88     """
89     @JavaName getPossibleObject
90     possibleObject :: Resource -> Resource -> <ReadGraph> Maybe Resource
91
92     "Assumes that there is exactly one statement with the given subject and predicate and returns it."
93     @JavaName getSingleStatement
94     singleStatement :: Resource -> Resource -> <ReadGraph> Statement
95
96     @JavaName getPossibleStatement
97     possibleStatement :: Resource -> Resource -> <ReadGraph> Maybe Statement
98
99     @JavaName getRelatedVariantValue
100     relatedVariantValue :: Resource -> Resource -> <ReadGraph> Variant
101
102     @JavaName getRelatedValue
103     relatedValue_ :: Resource -> Resource -> Binding a -> <ReadGraph> a
104     
105     @JavaName getRelatedValue
106     untypedRelatedValue :: Resource -> Resource -> <ReadGraph> a
107
108     @JavaName getRelatedValue2
109     relatedValue2 :: Resource -> Resource -> <ReadGraph> a
110
111     @JavaName getPossibleRelatedValue2
112     possibleRelatedValue2 :: Resource -> Resource -> <ReadGraph> Maybe a
113
114     @JavaName getRelatedVariantValue2
115     relatedVariantValue2 :: Resource -> Resource -> <ReadGraph> Variant
116     
117     @JavaName getPossibleRelatedValue
118     possibleRelatedValue_ :: Resource -> Resource -> Binding a -> <ReadGraph> Maybe a
119     
120     @JavaName getPossibleRelatedValue
121     untypedPossibleRelatedValue :: Resource -> Resource -> <ReadGraph> Maybe a
122     
123     @private
124     @JavaName getValue
125     valueOf_ :: Resource -> Binding a -> <ReadGraph> a
126     
127     @private
128     @JavaName getVariantValue
129     variantValueOf_ :: Resource -> <ReadGraph> Variant
130     
131     @JavaName getValue
132     untypedValueOf :: Resource -> <ReadGraph> Dynamic
133     
134     @JavaName getPossibleValue
135     untypedPossibleValueOf :: Resource -> <ReadGraph> Maybe Dynamic
136     
137     @JavaName getInverse
138     inverseOf :: Resource -> <ReadGraph> Resource
139     @JavaName getPossibleInverse
140     possibleInverseOf :: Resource -> <ReadGraph> Maybe Resource
141     
142     @JavaName getSingleType
143     singleTypeOf :: Resource -> Resource -> <ReadGraph> Resource
144     
145     @JavaName getPossibleType
146     possibleTypeOf :: Resource -> Resource -> <ReadGraph> Maybe Resource
147     
148     "`isInstanceOf r t` returns true, if `r` is an instance of `t`"
149     isInstanceOf :: Resource -> Resource -> <ReadGraph> Boolean
150     isSubrelationOf :: Resource -> Resource -> <ReadGraph> Boolean
151     isInheritedFrom :: Resource -> Resource -> <ReadGraph> Boolean
152     
153     getRootLibrary :: () -> <ReadGraph> Resource
154     
155     @JavaName getPredicates
156     predicatesOf :: Resource -> <ReadGraph> [Resource]
157     
158     isImmutable :: Resource -> <ReadGraph> Boolean
159
160 importJava "org.simantics.db.layer0.util.ExtendedUris" where
161     "Converts an absolute URI to a resource"
162     @JavaName resolveAbsoluteUri    
163     resource :: String -> <ReadGraph> Resource
164     
165     "Converts a relative URI to a resource starting from the given resource"
166     @JavaName resolveRelativeUri
167     relativeResource :: Resource -> String -> <ReadGraph> Resource
168
169 "Reads the value of a literal that is an object with the given subject and predicate"
170 @inline
171 relatedValue :: Serializable a => Resource -> Resource -> <ReadGraph> a
172 relatedValue s p = relatedValue_ s p binding
173
174 @inline
175 possibleRelatedValue :: Serializable a => Resource -> Resource -> <ReadGraph> Maybe a
176 possibleRelatedValue s p = possibleRelatedValue_ s p binding
177
178 class Browsable a where
179     fromUri :: String -> <ReadGraph> a
180
181     "Returns the URI of the given value."
182     uriOf :: a -> <ReadGraph> String
183     
184     "Returns the URI of the given value if it exists or Nothing."
185     possibleUriOf :: a -> <ReadGraph> Maybe String
186     
187     "Reads the name of the value."
188     nameOf :: a -> <ReadGraph> String
189     possibleNameOf :: a -> <ReadGraph> Maybe String
190     
191     valueOf :: Serializable v => a -> <ReadGraph> v
192     
193     genericRelatedValue :: a -> Resource -> <ReadGraph> t
194     genericPossibleRelatedValue :: a -> Resource -> <ReadGraph> Maybe t
195     
196     variantValueOf :: a -> <ReadGraph> Variant 
197     
198     children :: a -> <ReadGraph> [a]
199     parent :: a -> <ReadGraph> a
200     possibleParent :: a -> <ReadGraph> Maybe a
201     
202     child :: a -> String -> <ReadGraph> a
203     possibleChild :: a -> String -> <ReadGraph> Maybe a
204     
205 instance Browsable Resource where
206     fromUri = resource
207     uriOf = uriOfResource
208     possibleUriOf = possibleUriOfResource
209     nameOf r = relatedValue r L0.HasName
210     possibleNameOf r = possibleRelatedValue r L0.HasName
211     @inline
212     valueOf r = valueOf_ r binding
213     variantValueOf = variantValueOf_
214     
215     genericRelatedValue = relatedValue2
216     genericPossibleRelatedValue = possibleRelatedValue2
217     
218     children r = r # L0.ConsistsOf
219     parent r = singleObject r L0.PartOf
220     possibleParent r = possibleObject r L0.PartOf
221     
222     possibleChild = possibleResourceChild
223     child r n = fromJust (possibleResourceChild r n)
224
225 importJava "org.simantics.db.WriteOnlyGraph" where
226     markUndoPoint :: () -> <WriteGraph> ()
227
228 importJava "org.simantics.db.WriteGraph" where
229     "Creates a new resource."
230     newResource :: () -> <WriteGraph> Resource
231     "Adds a statement to the semantic graph."
232     claim :: Resource -> Resource -> Resource -> <WriteGraph> ()
233     @JavaName claim
234     claimWithInverse :: Resource -> Resource -> Maybe Resource -> Resource -> <WriteGraph> ()
235     @JavaName claimLiteral
236     claimRelatedValue_ :: Resource -> Resource -> a -> Binding a -> <WriteGraph> ()
237     @JavaName claimLiteral
238     untypedClaimRelatedValue :: Resource -> Resource -> a -> <WriteGraph> ()
239     @JavaName claimValue
240     untypedClaimValue :: Resource -> a -> <WriteGraph> ()
241     @JavaName claimLiteral
242     claimRelatedValueWithType_ :: Resource -> Resource -> Resource -> a -> Binding a -> <WriteGraph> ()
243     "Removes a statement with the given subject, predicate and object"
244     deny :: Resource -> Resource -> Resource -> <WriteGraph> ()
245     @JavaName deny
246     denyByPredicate :: Resource -> Resource -> <WriteGraph> ()
247     @JavaName deny
248     denyAllStatements :: Resource -> <WriteGraph> ()
249     newClusterSet :: Resource -> <WriteGraph> ()
250     @JavaName denyValue
251     denyValue :: Resource -> <WriteGraph> ()
252
253 claimAssertion :: Resource -> Resource -> Resource -> <WriteGraph> ()
254 claimAssertion type_ predicate object = do
255     ass = newResource ()
256     claim ass L0.HasPredicate predicate
257     claim ass L0.HasObject object
258     claim type_ L0.Asserts ass
259
260 "Sets the value of the literal that is an object with the given subject and predicate."
261 @inline
262 claimRelatedValue :: Serializable a => Resource -> Resource -> a -> <WriteGraph> ()
263 claimRelatedValue s p v = claimRelatedValue_ s p v binding
264
265 @inline
266 claimRelatedValueWithType :: Serializable a => Resource -> Resource -> Resource -> a -> <WriteGraph> ()
267 claimRelatedValueWithType s p t v = claimRelatedValueWithType_ s p t v binding
268
269 importJava "org.simantics.layer0.utils.direct.GraphUtils" where
270     @JavaName getPossibleChild
271     possibleResourceChild :: Resource -> String -> <ReadGraph> (Maybe Resource)
272
273 @deprecated "Use function children instead."
274 resourceChildrenOf :: Resource -> <ReadGraph> [Resource]
275 resourceChildrenOf r = r # L0.ConsistsOf
276
277 importJava "org.simantics.db.common.utils.OrderedSetUtils" where
278     "`addToOrderedSet s e` adds element `e` to ordered set `s`"
279     @JavaName add
280     addToOrderedSet :: Resource -> Resource -> <WriteGraph> Boolean
281     
282     "`addFirstToOrderedSet s e` adds element `e` to ordered set `s` as the first element"
283     @JavaName addFirst
284     addFirstToOrderedSet :: Resource -> Resource -> <WriteGraph> Boolean
285     
286     "`addAfterToOrderedSet s p e` adds element `e` to ordered set `s` after element `p`"
287     @JavaName addAfter
288     addAfterToOrderedSet :: Resource -> Resource -> Resource -> <WriteGraph> Boolean
289     
290     "`addBeforeToOrderedSet s p e` adds element `e` to ordered set `s` before element `p`"
291     @JavaName addBefore
292     addBeforeToOrderedSet :: Resource -> Resource -> Resource -> <WriteGraph> Boolean
293     
294     "`removeFromOrderedSet s e` removes element `e` from ordered set `s`"
295     @JavaName remove
296     removeFromOrderedSet :: Resource -> Resource -> <WriteGraph> Boolean
297     
298     @JavaName set
299     setOrderedSet :: Resource -> [Resource] -> <WriteGraph> Boolean
300     
301     @JavaName getSingleOwnerList
302     parentOrderedSet :: Resource -> <ReadGraph> Resource
303     
304     @JavaName toList
305     elementsOfOrderedSet :: Resource -> <ReadGraph> [Resource]
306     
307 importJava "org.simantics.db.common.utils.ListUtils" where
308     "`elementsOfList l` returns elements of list `l`"
309     @JavaName toList
310     elementsOfList :: Resource -> <ReadGraph> [Resource]
311     
312     "`createList [e]` creates a new list containing elements `[e]`"
313     @JavaName create
314     createList :: [Resource] -> <WriteGraph> Resource
315
316     "`createListWithType t [e]` creates a new list with type `t` containing elements `[e]`"
317     @JavaName create
318     createListWithType :: Resource -> [Resource] -> <WriteGraph> Resource
319     
320     "`insertListBack l [e]` inserts elements `[e]` back to the list `l`"
321     @JavaName insertBack
322     insertListBack :: Resource -> [Resource] -> <WriteGraph> ()
323     
324     "`insertListFront l [e]` inserts elements `[e]` front of the list `l`"
325     @JavaName insertFront
326     insertListFront :: Resource -> [Resource] -> <WriteGraph> ()
327     
328     "`removeListElement l e` removes a element `e` from the list `l`"
329     @JavaName removeElement
330     removeListElement :: Resource -> Resource -> <WriteGraph> Boolean
331     
332     @JavaName swapWithPrevious
333     swapListElementWithPrevious :: Resource -> Resource -> <WriteGraph> Boolean
334
335     @JavaName swapWithNext
336     swapListElementWithNext :: Resource -> Resource -> <WriteGraph> Boolean
337
338
339 importJava "org.simantics.db.common.utils.CommonDBUtils" where
340     isParent :: Resource -> Resource -> <ReadGraph> Boolean
341     possibleRelatedString :: Resource -> Resource -> <ReadGraph> Maybe String
342     possibleRelatedInteger :: Resource -> Resource -> <ReadGraph> Maybe Integer
343     objectsWithType :: Resource -> Resource -> Resource -> <ReadGraph> [Resource]
344     possibleObjectWithType :: Resource -> Resource -> Resource -> <ReadGraph> Maybe Resource
345
346 importJava "org.simantics.db.common.utils.NameUtils" where
347     findFreshName :: String -> Resource -> <ReadGraph> String
348     findFreshEscapedName :: String -> Resource -> <ReadGraph> String
349
350 "`subject # predicate` returns all objects with the given `subject` and `predicate`."
351 (#) :: Resource -> Resource -> <ReadGraph> [Resource]
352 subject # predicate = collectionToList $ objects_ subject predicate
353
354 "statements subject predicate` returns all statements with the given subject and predicate."
355 statements :: Resource -> Resource -> <ReadGraph> [Statement]
356 statements subject predicate = collectionToList $ statements_ subject predicate
357
358 importJava "org.simantics.scl.db.SCLFunctions" where
359     "Executes a read transaction and waits that it completes."
360     syncRead :: (() -> <Proc,ReadGraph> a) -> <Proc> a
361     "Executes a write transaction and waits that it completes."
362     syncWrite :: (() -> <Proc,ReadGraph,WriteGraph> a) -> <Proc> a
363     "Executes a delayed write transaction and waits that it completes."
364     delayedSyncWrite :: (() -> <Proc,WriteGraph> a) -> <Proc> a
365     
366     "Begins a read transaction and immediately returns."
367     asyncRead :: (() -> <Proc,ReadGraph> a) -> <Proc> ()
368     "Begins a write transaction and immediately returns."
369     asyncWrite :: (() -> <Proc,ReadGraph,WriteGraph> a) -> <Proc> ()
370     
371     virtualSyncWriteMem :: String -> (() -> <e,WriteGraph> a) -> <e,WriteGraph> a
372     virtualSyncWriteWS :: String -> (() -> <e,WriteGraph> a) -> <e,WriteGraph> a
373     
374     safeExec :: (() -> <Proc> a) -> <Proc> a
375     activateOnce :: Resource -> <Proc> ()
376     syncActivateOnce :: Resource -> <WriteGraph, Proc> ()
377     resourceFromId :: Long -> <ReadGraph> Resource
378     enableDependencies :: () -> <WriteGraph> ()
379     disableDependencies :: () -> <WriteGraph> ()
380     
381     unaryQuery :: (a -> <ReadGraph,e> b) -> a -> <ReadGraph> b
382     unaryQueryCached :: (a -> <ReadGraph,e> b) -> a -> <ReadGraph> b
383
384     "Makes a new read request with given procedure for calculating the result. The request is cached only if the current request is listened."
385     subquery :: (<ReadGraph,Proc> a) -> <ReadGraph,Proc> a
386     "Makes a new read request with given procedure for calculating the result. The request is always cached."
387     subqueryC :: (<ReadGraph,Proc> a) -> <ReadGraph,Proc> a
388     "Makes a new read asynchronous request with function to handle the request result. The last `isDisposed` function parameter is used to determine if the listener is still alive or not."
389     subqueryL :: (<ReadGraph,Proc> a) -> (a -> <ReadGraph, e> ()) -> (Throwable -> <ReadGraph, e> ()) -> (<e> Boolean) -> <ReadGraph, Proc, e> ()
390     "Tries to convert the given Dynamic value to a value with the inferred type"
391     possibleFromDynamic :: Typeable a => String -> Dynamic -> Maybe a
392
393 importJava "org.simantics.db.layer0.util.Layer0Utils" where
394     undo :: () -> <Proc> String
395     undoOperations :: Integer -> <Proc> String
396     redo :: () -> <Proc> String
397     queryDebugSupport :: String -> <Proc> String
398     queryListSupport :: String -> <Proc> String
399     addCommentMetadata :: String -> <WriteGraph> ()
400     sortByCluster :: [a] -> (a->Resource) -> <ReadGraph> [a]
401     makeSynchronous :: Boolean -> <ReadGraph> ()
402     listOntologies :: () -> <ReadGraph> [Resource]
403     emptyTrashBin :: () -> <Proc> ()
404     purgeDatabase :: () -> <Proc> ()
405     prettyPrintResource :: Resource -> Boolean -> <ReadGraph> String
406
407     @private
408     @JavaName copyTo
409     copyTo_ :: Resource -> Resource -> <WriteGraph> Collection Resource
410     @JavaName getPossiblePredicateByName
411     possiblePredicateByName :: Resource -> String -> <ReadGraph> Maybe Resource
412     @JavaName getPossiblePredicateByNameFromType
413     possiblePredicateByNameFromType :: Resource -> String -> <ReadGraph> Maybe Resource
414     
415     addMetadataListener :: ChangeListener -> <Proc> ()
416     removeMetadataListener :: ChangeListener -> <Proc> ()
417
418 copyTo :: Resource -> Resource -> <WriteGraph> Resource
419 copyTo targetContainer source = do
420     (collectionToList $ copyTo_ targetContainer source)!0
421
422 importJava "org.simantics.db.common.utils.CommonDBUtils" where
423     selectClusterSet :: Resource -> <WriteGraph> () 
424
425 importJava "org.simantics.Simantics" where
426     @JavaName getProjectResource
427     currentProject :: () -> /*<Proc>*/ Resource
428
429 // Move to somewhere more generic module
430 importJava "java.util.Collection" where
431     data Collection a
432
433 importJava "java.util.ArrayList" where
434     @JavaName "<init>"
435     collectionToList :: Collection a -> [a]
436 /*@macro
437 collectionToList :: Collection a -> [a]
438 collectionToList x = Java.unsafeCoerce x
439 */ 
440
441 resourceToCollection :: a -> Collection a
442 resourceToCollection x = Java.unsafeCoerce x
443
444 newEntity :: [Resource -> <ReadGraph,WriteGraph> ()] -> <ReadGraph,WriteGraph> Resource
445 newEntity entitySpecs = do
446     entity = newResource ()
447     for entitySpecs (\spec -> spec entity)
448     entity
449
450 updateEntity :: Resource -> [Resource -> <ReadGraph,WriteGraph> ()] -> <ReadGraph,WriteGraph> Resource
451 updateEntity entity entitySpecs = do
452     for entitySpecs (\spec -> spec entity)
453     entity
454
455 hasStatement predicate object entity = 
456     claim entity predicate object
457 hasProperty relation value entity = 
458     claimRelatedValue entity relation value
459 hasPossibleProperty relation value entity =
460     match value with
461       Just v -> claimRelatedValue entity relation v
462       Nothing -> ()
463 hasTypedProperty relation value t entity = 
464     claimRelatedValueWithType entity relation t value        
465 hasName (n :: String) = hasProperty L0.HasName n
466 hasLabel (l :: String) = hasProperty L0.HasLabel l
467 hasType t = hasStatement L0.InstanceOf t
468 hasParent p = hasStatement L0.PartOf p
469
470 importJava "org.simantics.databoard.util.URIStringUtils" where
471     @JavaName splitURISCL
472     splitURI :: String -> [String]
473     @JavaName escape
474     escapeURI :: String -> String
475     @JavaName unescape
476     unescapeURI :: String -> String
477
478 @private
479 importJava "org.simantics.db.layer0.request.ActiveModels" where
480     @JavaName getPossibleActiveModel
481     activeModel :: Resource -> <ReadGraph> Maybe Resource
482
483 "Gives the current active model."
484 currentModel :: <ReadGraph> Resource
485 currentModel = match activeModel (currentProject ()) with
486     Just model -> model
487     Nothing -> fail "No active model."
488
489 "Gives the current active model if it exists or Nothing otherwise."
490 possibleCurrentModel :: <ReadGraph> Maybe Resource
491 possibleCurrentModel = activeModel (currentProject ())
492     
493 startUndoPoint :: String -> <WriteGraph> ()
494 startUndoPoint string = do
495     markUndoPoint ()
496     addCommentMetadata (string)
497     ()
498
499 @inline
500 lift1Read :: (a -> <ReadGraph,Proc> b) -> (a -> <Proc> b)
501 lift1Read f x = syncRead (\_ -> f x)
502
503 @inline
504 lift2Read :: (a -> b -> <ReadGraph,Proc> c) -> (a -> b -> <Proc> c)
505 lift2Read f x y = syncRead (\_ -> f x y)
506
507 @inline
508 lift3Read :: (a -> b -> c -> <ReadGraph,Proc> d) -> (a -> b -> c -> <Proc> d)
509 lift3Read f x y z = syncRead (\_ -> f x y z)
510
511 @inline
512 lift1Write :: (a -> <WriteGraph,Proc> b) -> (a -> <Proc> b)
513 lift1Write f x = syncWrite (\_ -> f x)
514
515 @inline
516 lift2Write :: (a -> b -> <WriteGraph,Proc> c) -> (a -> b -> <Proc> c)
517 lift2Write f x y = syncWrite (\_ -> f x y)
518
519 @inline
520 lift3Write :: (a -> b -> c -> <WriteGraph,Proc> d) -> (a -> b -> c -> <Proc> d)
521 lift3Write f x y z = syncWrite (\_ -> f x y z)
522
523 """
524 Returns a child Browsable of the specified parent that has that is the child
525 of the specified parent with the specified name path.
526 """
527 childWithPath :: Browsable a => a -> [String] -> <ReadGraph> a
528 childWithPath parent path = 
529     foldl (\r name -> match possibleChild r name with
530               Just c -> c
531               Nothing -> fail ("Didn't find " + name + ".") 
532           ) 
533           parent path
534
535 """
536 Like `childWithPath` but returns Maybe a which will be `Nothing` if no child
537 was found.
538 """
539 possibleChildWithPath :: Browsable a => a -> [String] -> <ReadGraph> Maybe a
540 possibleChildWithPath parent path = 
541     foldl (\r name -> match r with
542               Just c -> possibleChild c name
543               Nothing -> Nothing 
544           ) 
545           (Just parent) path
546
547 importJava "org.simantics.db.MetadataI" where
548     data MetadataI
549
550 importJava "org.simantics.db.event.ChangeListener" where
551     data ChangeListener
552
553 importJava "org.simantics.db.layer0.genericrelation.DependencyChanges" where
554     data DependencyChanges