+\r
+ public static boolean isImmutable(ReadGraph graph, Resource r) throws DatabaseException {\r
+ StructuralResource2 STR = StructuralResource2.getInstance(graph);\r
+ Resource uc = graph.syncRequest(new PossibleTypedParent(r, STR.ComponentType));\r
+ return graph.isImmutable(r)\r
+ // Anything under a published or locked user component is published as well\r
+ || (uc != null && (Layer0Utils.isPublished(graph, uc)\r
+ || graph.hasStatement(uc, STR.ComponentType_Locked)))\r
+ // Anything under a published container (shared library) is published as well\r
+ || Layer0Utils.isContainerPublished(graph, r)\r
+ ;\r
+ }\r