01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/citations/tags/sakai_2-4-1/citations-api/api/src/java/org/sakaiproject/citation/api/Schema.java $
03: * $Id: Schema.java 22437 2007-03-12 18:13:35Z jimeng@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.citation.api;
21:
22: import java.util.List;
23: import java.util.Set;
24:
25: public interface Schema {
26: public static final String LONGTEXT = "longtext";
27: public static final String SHORTTEXT = "shorttext";
28: public static final String NUMBER = "number";
29: public static final String DATE = "date";
30:
31: public static final int UNLIMITED = Integer.MAX_VALUE;
32:
33: public static final String ESCAPE_FIELD_NAME = ":&%~!@#$^*()+=\"'`<>,/? ";
34: public static final char ESCAPE_CHAR = '_';
35:
36: // public static final String AUTHOR = "author";
37: public static final String TITLE = "title";
38: public static final String EDITOR = "editor";
39: public static final String CREATOR = "creator";
40: public static final String VOLUME = "volume";
41: public static final String ISSUE = "issue";
42: public static final String PAGES = "pages";
43: public static final String PUBLISHER = "publisher";
44: public static final String YEAR = "year";
45: public static final String ISN = "isnIdentifier";
46: public static final String SOURCE_TITLE = "sourceTitle";
47:
48: public interface Field {
49: public String getNamespaceAbbreviation();
50:
51: public String getIdentifier();
52:
53: public String getIdentifier(String format);
54:
55: public String getDescription();
56:
57: public String getValueType();
58:
59: public boolean isEditable();
60:
61: public boolean isRequired();
62:
63: public int getMinCardinality();
64:
65: public int getMaxCardinality();
66:
67: public Object getDefaultValue();
68:
69: public String getLabel();
70:
71: public boolean isMultivalued();
72:
73: }
74:
75: public String getNamespaceAbbrev();
76:
77: public String getNamespaceUri(String abbrev);
78:
79: public String getIdentifier();
80:
81: public List getNamespaceAbbreviations();
82:
83: public List getFields();
84:
85: public List getRequiredFields();
86:
87: public Field getField(String name);
88:
89: public Field getField(int index);
90:
91: }
|