}
+ public static boolean isMarkedReadOnly(ReadGraph graph, Resource r) throws DatabaseException {
+ return Boolean.TRUE.equals( graph.getPossibleRelatedValue(r, graph.<Layer0>l0().readOnly, Bindings.BOOLEAN) );
+ }
+
private static TransferableGraph1 makeTG(ReadGraph graph, Resource r) throws DatabaseException {
SimanticsClipboardImpl cp = new SimanticsClipboardImpl();
}
public static boolean isImmutable(ReadGraph graph, Resource r) throws DatabaseException {
+ // Marking a resource L0.readOnly also makes it immutable
+ if (graph.isImmutable(r) || Layer0Utils.isMarkedReadOnly(graph, r))
+ return true;
StructuralResource2 STR = StructuralResource2.getInstance(graph);
Resource uc = graph.syncRequest(new PossibleTypedParent(r, STR.ComponentType));
- return graph.isImmutable(r)
- // Anything under a published or locked user component is published as well
- || (uc != null && (Layer0Utils.isPublished(graph, uc)
+ return // Anything under a published or locked user component is published as well
+ (uc != null && (Layer0Utils.isPublished(graph, uc)
|| graph.hasStatement(uc, STR.ComponentType_Locked)))
// Anything under a published container (shared library) is published as well
|| Layer0Utils.isContainerPublished(graph, r)