001: /*
002: * WingConstants.java
003: *
004: * Version: $Revision: 1.5 $
005: *
006: * Date: $Date: 2006/07/05 21:39:48 $
007: *
008: * Copyright (c) 2002, Hewlett-Packard Company and Massachusetts
009: * Institute of Technology. All rights reserved.
010: *
011: * Redistribution and use in source and binary forms, with or without
012: * modification, are permitted provided that the following conditions are
013: * met:
014: *
015: * - Redistributions of source code must retain the above copyright
016: * notice, this list of conditions and the following disclaimer.
017: *
018: * - Redistributions in binary form must reproduce the above copyright
019: * notice, this list of conditions and the following disclaimer in the
020: * documentation and/or other materials provided with the distribution.
021: *
022: * - Neither the name of the Hewlett-Packard Company nor the name of the
023: * Massachusetts Institute of Technology nor the names of their
024: * contributors may be used to endorse or promote products derived from
025: * this software without specific prior written permission.
026: *
027: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
028: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
029: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
030: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
031: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
032: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
033: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
034: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
035: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
036: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
037: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
038: * DAMAGE.
039: */
040:
041: package org.dspace.app.xmlui.wing;
042:
043: import org.dspace.app.xmlui.wing.element.Body;
044: import org.dspace.app.xmlui.wing.element.Cell;
045: import org.dspace.app.xmlui.wing.element.Division;
046: import org.dspace.app.xmlui.wing.element.Field;
047: import org.dspace.app.xmlui.wing.element.Figure;
048: import org.dspace.app.xmlui.wing.element.Head;
049: import org.dspace.app.xmlui.wing.element.Help;
050: import org.dspace.app.xmlui.wing.element.Highlight;
051: import org.dspace.app.xmlui.wing.element.Item;
052: import org.dspace.app.xmlui.wing.element.Label;
053: import org.dspace.app.xmlui.wing.element.List;
054: import org.dspace.app.xmlui.wing.element.Meta;
055: import org.dspace.app.xmlui.wing.element.Metadata;
056: import org.dspace.app.xmlui.wing.element.Options;
057: import org.dspace.app.xmlui.wing.element.PageMeta;
058: import org.dspace.app.xmlui.wing.element.Para;
059: import org.dspace.app.xmlui.wing.element.Params;
060: import org.dspace.app.xmlui.wing.element.Row;
061: import org.dspace.app.xmlui.wing.element.Table;
062: import org.dspace.app.xmlui.wing.element.Trail;
063: import org.dspace.app.xmlui.wing.element.UserMeta;
064: import org.dspace.app.xmlui.wing.element.Value;
065: import org.dspace.app.xmlui.wing.element.Instance;
066: import org.dspace.app.xmlui.wing.element.WingDocument;
067: import org.dspace.app.xmlui.wing.element.Xref;
068:
069: /**
070: *
071: * Static constants relating to Wing and the DRI schema.
072: *
073: * @author Scott Phillips
074: */
075: public class WingConstants {
076: /** The DRI schema's namespace */
077: public static final Namespace DRI = new Namespace(
078: "http://di.tamu.edu/DRI/1.0/");
079:
080: /** Cocoon's i18n namespace */
081: public static final Namespace I18N = new Namespace(
082: "http://apache.org/cocoon/i18n/2.1");
083:
084: /** All the DRI mergeable elements */
085: public static final String[] MERGEABLE_ELEMENTS = {
086: WingDocument.E_DOCUMENT, Meta.E_META, UserMeta.E_USER_META,
087: PageMeta.E_PAGE_META, Metadata.E_METADATA, Body.E_BODY,
088: Options.E_OPTIONS, List.E_LIST };
089:
090: /** All the DRI metadata elements */
091: public static final String[] METADATA_ELEMENTS = { Meta.E_META,
092: UserMeta.E_USER_META, PageMeta.E_PAGE_META, Trail.E_TRAIL,
093: Metadata.E_METADATA };
094:
095: /** All the DRI structural elements */
096: public static final String[] STRUCTURAL_ELEMENTS = {
097: Division.E_DIVISION, Head.E_HEAD, Table.E_TABLE, Row.E_ROW,
098: Cell.E_CELL, Para.E_PARA, List.E_LIST, Label.E_LABEL,
099: Item.E_ITEM, Highlight.E_HIGHLIGHT, Xref.E_XREF,
100: Figure.E_FIGURE, Field.E_FIELD, Params.E_PARAMS,
101: Help.E_HELP, Value.E_VALUE, Instance.E_INSTANCE };
102:
103: /** All the DRI text container elements */
104: public static final String[] TEXT_CONTAINERS = {
105: Metadata.E_METADATA, Trail.E_TRAIL, Head.E_HEAD,
106: Xref.E_XREF, Figure.E_FIGURE, Help.E_HELP, Value.E_VALUE,
107: Label.E_LABEL, Cell.E_CELL, Para.E_PARA,
108: Highlight.E_HIGHLIGHT, Item.E_ITEM };
109:
110: /** All the DRI rich text container elements */
111: public static final String[] RICH_TEXT_CONTAINERS = { Cell.E_CELL,
112: Para.E_PARA, Highlight.E_HIGHLIGHT, Item.E_ITEM,
113: Value.E_VALUE };
114: }
|