XHtmlResource.java

  1. /*
  2.  * #%L
  3.  * wcm.io
  4.  * %%
  5.  * Copyright (C) 2014 wcm.io
  6.  * %%
  7.  * Licensed under the Apache License, Version 2.0 (the "License");
  8.  * you may not use this file except in compliance with the License.
  9.  * You may obtain a copy of the License at
  10.  *
  11.  *      http://www.apache.org/licenses/LICENSE-2.0
  12.  *
  13.  * Unless required by applicable law or agreed to in writing, software
  14.  * distributed under the License is distributed on an "AS IS" BASIS,
  15.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16.  * See the License for the specific language governing permissions and
  17.  * limitations under the License.
  18.  * #L%
  19.  */
  20. package io.wcm.handler.richtext.util;

  21. import org.jetbrains.annotations.NotNull;

  22. /**
  23.  * Definition of XHTML resources.
  24.  */
  25. enum XHtmlResource {

  26.   /**
  27.    * DTD XHTML 1.0 Strict
  28.    */
  29.   XHTML1_STRICT("-//W3C//DTD XHTML 1.0 Strict//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd", "xhtml1-strict.dtd"),

  30.   /**
  31.    * DTD XHTML 1.0 Transitional
  32.    */
  33.   XHTML1_TRANSITIONAL("-//W3C//DTD XHTML 1.0 Transitional//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd", "xhtml1-transitional.dtd"),

  34.   /**
  35.    * DTD XHTML 1.0 Frameset
  36.    */
  37.   XHTML1_FRAMESET("-//W3C//DTD XHTML 1.0 Frameset//EN", "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd", "xhtml1-frameset.dtd"),

  38.   /**
  39.    * ENTITIES Latin 1 for XHTML
  40.    */
  41.   ENTITIES_LAT1("-//W3C//ENTITIES Latin 1 for XHTML//EN", "xhtml-lat1.ent", "xhtml-lat1.ent"),

  42.   /**
  43.    * ENTITIES Symbols for XHTML
  44.    */
  45.   ENTITIES_SYMBOL("-//W3C//ENTITIES Symbols for XHTML//EN", "xhtml-symbol.ent", "xhtml-symbol.ent"),

  46.   /**
  47.    * ENTITIES Special for XHTML
  48.    */
  49.   ENTITIES_SPECIAL("-//W3C//ENTITIES Special for XHTML//EN", "xhtml-special.ent", "xhtml-special.ent");

  50.   private final String publicId;
  51.   private final String systemId;
  52.   private final String filename;

  53.   XHtmlResource(String publicId, String systemId, String filename) {
  54.     this.publicId = publicId;
  55.     this.systemId = systemId;
  56.     this.filename = filename;
  57.   }

  58.   /**
  59.    * Public Id
  60.    * @return Public Id
  61.    */
  62.   public @NotNull String getPublicId() {
  63.     return this.publicId;
  64.   }

  65.   /**
  66.    * System Id
  67.    * @return System Id
  68.    */
  69.   public @NotNull String getSystemId() {
  70.     return this.systemId;
  71.   }

  72.   /**
  73.    * Local filename
  74.    * @return Local filename
  75.    */
  76.   public @NotNull String getFilename() {
  77.     return this.filename;
  78.   }

  79. }