Support media in DocBook servlet.
[gpl/argeo-suite.git] / publishing / org.argeo.publishing.ui / src / org / argeo / docbook / DbkUtils.java
index 6bcecb7b3e9fec2d3efa61161f8d94acffe57210..44346b25dbb669c5bfb1c88442509c2c25983d11 100644 (file)
@@ -53,6 +53,16 @@ public class DbkUtils {
                return Jcr.getName(node).equals(type.get());
        }
 
+       /** Whether this node is a DocBook type. */
+       public static boolean isDbk(Node node) {
+               String name = Jcr.getName(node);
+               for (DbkType type : DbkType.values()) {
+                       if (name.equals(type.get()))
+                               return true;
+               }
+               return false;
+       }
+
        public static String getTitle(Node node) {
                return JcrxApi.getXmlValue(node, DbkType.title.get());
        }