2 import "http://www.simantics.org/Layer0-1.1" as L0
5 toResource :: Resource -> Resource
9 fromResource :: Resource -> Resource
12 labelOf :: Resource -> <ReadGraph> String
13 labelOf entity = relatedValue2 entity L0.HasLabel
15 """Renames an entity."""
16 rename :: Resource -> String -> <ReadGraph,WriteGraph> ()
17 rename entity newName = do
18 oldName = (nameOf entity)
19 claimRelatedValue entity L0.HasName newName
20 addCommentMetadata ("Renamed " + oldName + " to " + newName)
22 importJava "org.simantics.db.layer0.util.RemoverUtil" where
23 """Removes a given entity."""
25 remove :: Resource -> <WriteGraph> ()
28 remove_ :: Resource -> <WriteGraph> ()