X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Facr%2FCmsContentTypes.java;h=fff40c1bb117008fc83551d588b9a9009b0f78e1;hb=b8f50d6d8e7b9c9215d156ba33f9dedfcee913a7;hp=67c2063044132fd5b418416933bdf84b054ddc14;hpb=55d1a78150b6be0004f6bcb28703bcdd6daf55a1;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 67c206304..fff40c1bb 100644 --- a/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java +++ b/org.argeo.cms/src/org/argeo/cms/acr/CmsContentTypes.java @@ -7,14 +7,25 @@ import java.util.Objects; import org.argeo.api.acr.CrName; public enum CmsContentTypes { + // + // 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"), // XML_1998("xml", "http://www.w3.org/XML/1998/namespace", "xml.xsd", "http://www.w3.org/2001/xml.xsd"), // XLINK_1999("xlink", "http://www.w3.org/1999/xlink", "xlink.xsd", "http://www.w3.org/XML/2008/06/xlink.xsd"), // + WEBDAV("D", "DAV:", null, "https://raw.githubusercontent.com/lookfirst/sardine/master/webdav.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"), // @@ -33,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/"; @@ -47,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);