View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements. See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership. The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License. You may obtain a copy of the License at
    9    *
    10   * http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   * Unless required by applicable law or agreed to in writing,
    13   * software distributed under the License is distributed on an
    14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    15   * KIND, either express or implied. See the License for the
    16   * specific language governing permissions and limitations
    17   * under the License.
    18   */
    19
    20  package org.apache.ws.commons.schema.constants;
    21
    22  import javax.xml.namespace.QName;
    23
    24  /**
    25   * Constants
    26   */
    27  public class Constants {
    28      public static final String XMLNS_URI =
    29              "http://www.w3.org/XML/1998/namespace";
    30
    31      public static final String XMLNS_PREFIX =
    32              "xml";
    33
    34      //
    35      // Schema Namespaces
    36      //
    37      public static final String URI_2001_SCHEMA_XSD =
    38              "http://www.w3.org/2001/XMLSchema";
    39      public static final String URI_2001_SCHEMA_XSI =
    40              "http://www.w3.org/2001/XMLSchema-instance";
    41
    42      // Define qnames for the all of the XSD and SOAP-ENC encodings
    43      public static final QName XSD_STRING = new QName(URI_2001_SCHEMA_XSD, "string");
    44      public static final QName XSD_BOOLEAN = new QName(URI_2001_SCHEMA_XSD, "boolean");
    45      public static final QName XSD_DOUBLE = new QName(URI_2001_SCHEMA_XSD, "double");
    46      public static final QName XSD_FLOAT = new QName(URI_2001_SCHEMA_XSD, "float");
    47      public static final QName XSD_INT = new QName(URI_2001_SCHEMA_XSD, "int");
    48      public static final QName XSD_INTEGER = new QName(URI_2001_SCHEMA_XSD, "integer");
    49      public static final QName XSD_LONG = new QName(URI_2001_SCHEMA_XSD, "long");
    50      public static final QName XSD_SHORT = new QName(URI_2001_SCHEMA_XSD, "short");
    51      public static final QName XSD_BYTE = new QName(URI_2001_SCHEMA_XSD, "byte");
    52      public static final QName XSD_DECIMAL = new QName(URI_2001_SCHEMA_XSD, "decimal");
    53      public static final QName XSD_BASE64 = new QName(URI_2001_SCHEMA_XSD, "base64Binary");
    54      public static final QName XSD_HEXBIN = new QName(URI_2001_SCHEMA_XSD, "hexBinary");
    55      public static final QName XSD_ANYSIMPLETYPE = new QName(URI_2001_SCHEMA_XSD, "anySimpleType");
    56      public static final QName XSD_ANYTYPE = new QName(URI_2001_SCHEMA_XSD, "anyType");
    57      public static final QName XSD_ANY = new QName(URI_2001_SCHEMA_XSD, "any");
    58      public static final QName XSD_QNAME = new QName(URI_2001_SCHEMA_XSD, "QName");
    59      public static final QName XSD_DATETIME = new QName(URI_2001_SCHEMA_XSD, "dateTime");
    60      public static final QName XSD_DATE = new QName(URI_2001_SCHEMA_XSD, "date");
    61      public static final QName XSD_TIME = new QName(URI_2001_SCHEMA_XSD, "time");
    62
    63      public static final QName XSD_NORMALIZEDSTRING = new QName(URI_2001_SCHEMA_XSD, "normalizedString");
    64      public static final QName XSD_TOKEN = new QName(URI_2001_SCHEMA_XSD, "token");
    65
    66      public static final QName XSD_UNSIGNEDLONG = new QName(URI_2001_SCHEMA_XSD, "unsignedLong");
    67      public static final QName XSD_UNSIGNEDINT = new QName(URI_2001_SCHEMA_XSD, "unsignedInt");
    68      public static final QName XSD_UNSIGNEDSHORT = new QName(URI_2001_SCHEMA_XSD, "unsignedShort");
    69      public static final QName XSD_UNSIGNEDBYTE = new QName(URI_2001_SCHEMA_XSD, "unsignedByte");
    70      public static final QName XSD_POSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "positiveInteger");
    71      public static final QName XSD_NEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "negativeInteger");
    72      public static final QName XSD_NONNEGATIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonNegativeInteger");
    73      public static final QName XSD_NONPOSITIVEINTEGER = new QName(URI_2001_SCHEMA_XSD, "nonPositiveInteger");
    74
    75      public static final QName XSD_YEARMONTH = new QName(URI_2001_SCHEMA_XSD, "gYearMonth");
    76      public static final QName XSD_MONTHDAY = new QName(URI_2001_SCHEMA_XSD, "gMonthDay");
    77      public static final QName XSD_YEAR = new QName(URI_2001_SCHEMA_XSD, "gYear");
    78      public static final QName XSD_MONTH = new QName(URI_2001_SCHEMA_XSD, "gMonth");
    79      public static final QName XSD_DAY = new QName(URI_2001_SCHEMA_XSD, "gDay");
    80      public static final QName XSD_DURATION = new QName(URI_2001_SCHEMA_XSD, "duration");
    81
    82      public static final QName XSD_NAME = new QName(URI_2001_SCHEMA_XSD, "Name");
    83      public static final QName XSD_NCNAME = new QName(URI_2001_SCHEMA_XSD, "NCName");
    84      public static final QName XSD_NMTOKEN = new QName(URI_2001_SCHEMA_XSD, "NMTOKEN");
    85      public static final QName XSD_NMTOKENS = new QName(URI_2001_SCHEMA_XSD, "NMTOKENS");
    86      public static final QName XSD_NOTATION = new QName(URI_2001_SCHEMA_XSD, "NOTATION");
    87      public static final QName XSD_ENTITY = new QName(URI_2001_SCHEMA_XSD, "ENTITY");
    88      public static final QName XSD_ENTITIES = new QName(URI_2001_SCHEMA_XSD, "ENTITIES");
    89      public static final QName XSD_IDREF = new QName(URI_2001_SCHEMA_XSD, "IDREF");
    90      public static final QName XSD_IDREFS = new QName(URI_2001_SCHEMA_XSD, "IDREFS");
    91      public static final QName XSD_ANYURI = new QName(URI_2001_SCHEMA_XSD, "anyURI");
    92      public static final QName XSD_LANGUAGE = new QName(URI_2001_SCHEMA_XSD, "language");
    93      public static final QName XSD_ID = new QName(URI_2001_SCHEMA_XSD, "ID");
    94      public static final QName XSD_SCHEMA = new QName(URI_2001_SCHEMA_XSD, "schema");
    95
    96      /**
    97       * All constants that are relevant to the names of the
    98       * schema elements
    99       */
    100     public static class BlockConstants {
    101
    102         public static final String ALL = "all";
    103         public static final String NONE = "none";
    104         public static final String EXTENSION = "extension";
    105         public static final String LIST = "list";
    106         public static final String RESTRICTION = "restriction";
    107         public static final String SUBSITUTION = "substitution";
    108         public static final String UNION = "union";
    109         public static final String EMPTY = "empty";
    110         public static final String ELEMENT_ONLY = "elementOnly";
    111         public static final String MIXED = "mixed";
    112         public static final String TEXT_ONLY = "textOnly";
    113         public static final String LAX = "lax";
    114         public static final String SKIP = "skip";
    115         public static final String STRICT = "strict";
    116         public static final String OPTIONAL = "optional";
    117         public static final String PROHIBITED = "prohibited";
    118         public static final String REQUIRED = "required";
    119         public static final String ERROR = "error";
    120         public static final String WARNING = "warning";
    121     }
    122
    123     /**
    124      * class holding the the constants for meta data storage
    125      */
    126     public static class MetaDataConstants{
    127         public static final String EXTERNAL_ATTRIBUTES = "EXTERNAL_ATTRIBUTES";
    128         public static final String EXTERNAL_ELEMENTS = "EXTERNAL_ELEMENTS";
    129     }
    130
    131     /**
    132      * class holding the the constants for meta data storage
    133      */
    134     public static class SystemConstants{
    135         public static final String EXTENSION_REGISTRY_KEY = "org.apache.ws.commons.extensions.ExtensionRegistry";
    136     }
    137
    138     public static final String XMLNS_ATTRIBUTE_NS_URI =
    139             "http://www.w3.org/2000/xmlns/";
    140
    141     public static final String XMLNS_ATTRIBUTE = "xmlns";
    142
    143     public static final String DEFAULT_NS_PREFIX = "";
    144
    145     public static final String XML_NS_URI =
    146             "http://www.w3.org/XML/1998/namespace";
    147
    148     public static final String XML_NS_PREFIX = "xml";
    149
    150     public static final String NULL_NS_URI = "";
    151 }