- public void setLayerActive(Resource layer, boolean active) throws ManyObjectsForFunctionalRelationException, ServiceException {
- graph.claimLiteral(layer, dia.IsActive, Boolean.valueOf(active));
+ public static void setLayerActive(WriteGraph graph, DiagramResource DIA, Resource layer, boolean active) throws ManyObjectsForFunctionalRelationException, ServiceException {
+ graph.claimLiteral(layer, DIA.IsActive, Boolean.valueOf(active));
+ }
+
+ @Override
+ public GraphLayer loadLayer(ReadGraph graph, Resource layer) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(graph);
+ DiagramResource DIA = DiagramResource.getInstance(graph);
+ String name = graph.getRelatedValue(layer, L0.HasName);
+ Resource visible = graph.getSingleObject(layer, DIA.HasVisibleTag);
+ Resource focusable = graph.getSingleObject(layer, DIA.HasFocusableTag);
+
+ Map<String, Resource> properties = new HashMap<>();
+ properties.put(GraphLayer.PROP_FOCUSABLE, focusable);
+ properties.put(GraphLayer.PROP_VISIBLE, visible);
+
+ return new GraphLayer(name, layer, properties);