001: //=============================================================================
002: //=== Copyright (C) 2001-2007 Food and Agriculture Organization of the
003: //=== United Nations (FAO-UN), United Nations World Food Programme (WFP)
004: //=== and United Nations Environment Programme (UNEP)
005: //===
006: //=== This program is free software; you can redistribute it and/or modify
007: //=== it under the terms of the GNU General Public License as published by
008: //=== the Free Software Foundation; either version 2 of the License, or (at
009: //=== your option) any later version.
010: //===
011: //=== This program is distributed in the hope that it will be useful, but
012: //=== WITHOUT ANY WARRANTY; without even the implied warranty of
013: //=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: //=== General Public License for more details.
015: //===
016: //=== You should have received a copy of the GNU General Public License
017: //=== along with this program; if not, write to the Free Software
018: //=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
019: //===
020: //=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2,
021: //=== Rome - Italy. email: geonetwork@osgeo.org
022: //==============================================================================
023:
024: package org.fao.geonet.constants;
025:
026: import org.jdom.*;
027:
028: //=============================================================================
029:
030: /** Constants for editing attribs
031: */
032:
033: public class Edit {
034: //--------------------------------------------------------------------------
035: //---
036: //--- Namespace used for editing
037: //---
038: //--------------------------------------------------------------------------
039:
040: public static final String NS_PREFIX = "geonet";
041: public static final String NS_URI = "http://www.fao.org/geonetwork";
042:
043: public static final Namespace NAMESPACE = Namespace.getNamespace(
044: NS_PREFIX, NS_URI);
045:
046: //--------------------------------------------------------------------------
047: //---
048: //--- Elements and attribs used to expand a metadata
049: //---
050: //--------------------------------------------------------------------------
051:
052: public class RootChild {
053: public static final String INFO = "info";
054: public static final String ELEMENT = "element";
055: public static final String ATTRIBUTE = "attribute";
056: public static final String CHILD = "child";
057: public static final String CHOICE = "CHOICE_ELEMENT";
058: public static final String SEQUENCE = "SEQUENCE_ELEMENT";
059: public static final String GROUP = "GROUP_ELEMENT";
060: }
061:
062: //--------------------------------------------------------------------------
063:
064: public class Info {
065: public class Elem {
066: public static final String ID = "id";
067: public static final String UUID = "uuid";
068: public static final String VERSION = "version";
069: public static final String SCHEMA = "schema";
070: public static final String CREATE_DATE = "createDate";
071: public static final String CHANGE_DATE = "changeDate";
072: public static final String SOURCE = "source";
073: public static final String SCORE = "score";
074: public static final String CATEGORY = "category";
075: public static final String SERVER = "server";
076: public static final String IS_TEMPLATE = "isTemplate";
077: public static final String TITLE = "title";
078: public static final String IS_HARVESTED = "isHarvested";
079: public static final String HARVEST_INFO = "harvestInfo";
080: public static final String POPULARITY = "popularity";
081: public static final String RATING = "rating";
082:
083: //--- privileges
084:
085: public static final String ADMIN = "admin";
086: public static final String EDIT = "edit";
087: public static final String NOTIFY = "notify";
088: public static final String DOWNLOAD = "download";
089: public static final String DYNAMIC = "dynamic";
090: public static final String FEATURED = "featured";
091: public static final String VIEW = "view";
092: }
093: }
094:
095: //--------------------------------------------------------------------------
096:
097: public class Element {
098: public class Attr {
099: public static final String REF = "ref";
100: public static final String DEL = "del";
101: public static final String UP = "up";
102: public static final String DOWN = "down";
103: }
104:
105: public class Child {
106: public static final String TEXT = "text";
107: public static final String CHOOSE = "choose";
108: }
109: }
110:
111: //--------------------------------------------------------------------------
112:
113: public class Attribute {
114: public class Attr {
115: public static final String NAME = "name";
116: public static final String ADD = "add";
117: public static final String DEL = "del";
118: public static final String VALUE = "value";
119: }
120:
121: public class Child {
122: public static final String TEXT = "text";
123: public static final String DEFAULT = "default";
124: }
125: }
126:
127: //--------------------------------------------------------------------------
128:
129: public class ChildElem {
130: public class Attr {
131: public static final String NAME = "name";
132: public static final String PREFIX = "prefix";
133: public static final String NAMESPACE = "namespace";
134: }
135:
136: public class Child {
137: public static final String CHOOSE = "choose";
138: }
139: }
140:
141: //--------------------------------------------------------------------------
142:
143: public class Choose {
144: public class Attr {
145: public static final String NAME = "name";
146: }
147: }
148:
149: //--------------------------------------------------------------------------
150:
151: public class Value {
152: public static final String TRUE = "true";
153: public static final String FALSE = "false";
154: }
155: }
156:
157: //=============================================================================
|