X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Facr%2FCmsContentTypes.java;h=6a09a8987c873d80367480b147e6efade51f8973;hb=7e464c3cedfa41ece64811fb55ddc9ce740a1050;hp=4c1f82a257fb1021cc34b50284325ba19130a786;hpb=2ff5b17e0065bf0b8d9eca41d7029f4969f44aac;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java b/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java index 4c1f82a25..6a09a8987 100644 --- a/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java +++ b/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java @@ -4,8 +4,19 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Objects; +import org.argeo.api.acr.CrName; + public enum CmsContentTypes { - CR_2("cr", "http://argeo.org/ns/cr", "cr.xsd", null), + // + // ARGEO + // + CR_2(CrName.CR_DEFAULT_PREFIX, CrName.CR_NAMESPACE_URI, "cr.xsd", null), + // + SLC("slc", "http://www.argeo.org/ns/slc", null, null), + // + ARGEO_LEGACY("argeo", "http://www.argeo.org/ns/argeo", null, null), + // + // EXTERNAL // XSD_2001("xs", "http://www.w3.org/2001/XMLSchema", "XMLSchema.xsd", "http://www.w3.org/2001/XMLSchema.xsd"), // @@ -13,12 +24,16 @@ public enum CmsContentTypes { // XLINK_1999("xlink", "http://www.w3.org/1999/xlink", "xlink.xsd", "http://www.w3.org/XML/2008/06/xlink.xsd"), // - XSLT_2_0("xsl", "http://www.w3.org/1999/XSL/Transform", "schema-for-xslt20.xsd", "https://www.w3.org/2007/schema-for-xslt20.xsd"), + XSLT_2_0("xsl", "http://www.w3.org/1999/XSL/Transform", "schema-for-xslt20.xsd", + "https://www.w3.org/2007/schema-for-xslt20.xsd"), // SVG_1_1("svg", "http://www.w3.org/2000/svg", "SVG.xsd", "https://raw.githubusercontent.com/oreillymedia/HTMLBook/master/schema/svg/SVG.xsd"), // - DOCBOOK_5_0_1("dbk","http://docbook.org/ns/docbook","docbook.xsd","http://docbook.org/xml/5.0.1/xsd/docbook.xsd"), + XHTML_1_1("h", "http://www.w3.org/1999/xhtml", "xhtml11.xsd", "https://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"), + // + DOCBOOK_5_0_1("dbk", "http://docbook.org/ns/docbook", "docbook.xsd", + "http://docbook.org/xml/5.0.1/xsd/docbook.xsd"), // XML_EVENTS_2001("ev", "http://www.w3.org/2001/xml-events", "xml-events-attribs-1.xsd", "http://www.w3.org/MarkUp/SCHEMA/xml-events-attribs-1.xsd"), @@ -29,6 +44,22 @@ public enum CmsContentTypes { DSML_v2("dsml", "urn:oasis:names:tc:DSML:2:0:core", "DSMLv2.xsd", "https://www.oasis-open.org/committees/dsml/docs/DSMLv2.xsd"), // + // JCR (to be moved elsewhere) + // + JCR("jcr", "http://www.jcp.org/jcr/1.0", null, + "https://jackrabbit.apache.org/archive/wiki/JCR/NamespaceRegistry_115513459.html"), + // + JCR_MIX("mix", "http://www.jcp.org/jcr/mix/1.0", null, + "https://jackrabbit.apache.org/archive/wiki/JCR/NamespaceRegistry_115513459.html"), + // + JCR_NT("nt", "http://www.jcp.org/jcr/nt/1.0", null, + "https://jackrabbit.apache.org/archive/wiki/JCR/NamespaceRegistry_115513459.html"), + // + JACKRABBIT("rep", "internal", null, + "https://jackrabbit.apache.org/archive/wiki/JCR/NamespaceRegistry_115513459.html"), + // + JCRX("jcrx", "http://www.argeo.org/ns/jcrx", null, null), + // ; private final static String RESOURCE_BASE = "/org/argeo/cms/acr/schemas/"; @@ -43,8 +74,10 @@ public enum CmsContentTypes { this.defaultPrefix = defaultPrefix; Objects.requireNonNull(namespace); this.namespace = namespace; - resource = getClass().getResource(RESOURCE_BASE + resourceFileName); - Objects.requireNonNull(resource); + if (resourceFileName != null) { + resource = getClass().getResource(RESOURCE_BASE + resourceFileName); + Objects.requireNonNull(resource); + } if (publicUrl != null) try { this.publicUrl = new URL(publicUrl);