001: package edu.indiana.lib.osid.base.repository.http;
002:
003: /**********************************************************************************
004: * $URL: https://source.sakaiproject.org/svn/citations/tags/sakai_2-4-1/citations-osid/web2bridge/src/java/edu/indiana/lib/osid/base/repository/http/CreatorPartStructure.java $
005: * $Id: CreatorPartStructure.java 22657 2007-03-15 13:21:23Z jimeng@umich.edu $
006: **********************************************************************************
007: *
008: * Copyright (c) 2003, 2004, 2005 The Regents of the University of Michigan, Trustees of Indiana University,
009: * Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
010: *
011: * Licensed under the Educational Community License Version 1.0 (the "License");
012: * By obtaining, using and/or copying this Original Work, you agree that you have read,
013: * understand, and will comply with the terms and conditions of the Educational Community License.
014: * You may obtain a copy of the License at:
015: *
016: * http://cvs.sakaiproject.org/licenses/license_1_0.html
017: *
018: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
019: * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
020: * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
021: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
022: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
023: *
024: **********************************************************************************/
025: /**
026: * @author Massachusetts Institute of Techbology, Sakai Software Development Team
027: * @version
028: */
029: public class CreatorPartStructure extends
030: edu.indiana.lib.osid.base.repository.PartStructure {
031: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
032: .getLog(CreatorPartStructure.class);
033:
034: private org.osid.shared.Id CREATOR_PART_STRUCTURE_ID = null;
035: private org.osid.shared.Type type = new Type("mit.edu",
036: "partStructure", "creator", "creator");
037: private String displayName = "Creator";
038: private String description = "Examples of Creator include a person, an organization, or a service. Typically, the name of a Creator should be used to indicate the entity.";
039: private boolean mandatory = false;
040: private boolean populatedByRepository = false;
041: private boolean repeatable = true;
042: private static CreatorPartStructure creatorPartStructure = new CreatorPartStructure();
043:
044: protected static CreatorPartStructure getInstance() {
045: return creatorPartStructure;
046: }
047:
048: /**
049: * Public method to fetch the PartStructure ID
050: */
051: public static org.osid.shared.Id getPartStructureId() {
052: org.osid.shared.Id id = null;
053:
054: try {
055: id = getInstance().getId();
056: } catch (org.osid.repository.RepositoryException ignore) {
057: }
058:
059: return id;
060: }
061:
062: public String getDisplayName()
063: throws org.osid.repository.RepositoryException {
064: return this .displayName;
065: }
066:
067: public String getDescription()
068: throws org.osid.repository.RepositoryException {
069: return this .description;
070: }
071:
072: public boolean isMandatory()
073: throws org.osid.repository.RepositoryException {
074: return this .mandatory;
075: }
076:
077: public boolean isPopulatedByRepository()
078: throws org.osid.repository.RepositoryException {
079: return this .populatedByRepository;
080: }
081:
082: public boolean isRepeatable()
083: throws org.osid.repository.RepositoryException {
084: return this .repeatable;
085: }
086:
087: protected CreatorPartStructure() {
088: try {
089: this .CREATOR_PART_STRUCTURE_ID = Managers.getIdManager()
090: .getId("b197541f201080006d751920168000100");
091:
092: } catch (Throwable t) {
093: }
094: }
095:
096: public org.osid.shared.Id getId()
097: throws org.osid.repository.RepositoryException {
098: return this .CREATOR_PART_STRUCTURE_ID;
099: }
100:
101: public org.osid.shared.Type getType()
102: throws org.osid.repository.RepositoryException {
103: return this .type;
104: }
105:
106: public org.osid.repository.RecordStructure getRecordStructure()
107: throws org.osid.repository.RepositoryException {
108: return RecordStructure.getInstance();
109: }
110:
111: public boolean validatePart(org.osid.repository.Part part)
112: throws org.osid.repository.RepositoryException {
113: return true;
114: }
115:
116: public org.osid.repository.PartStructureIterator getPartStructures()
117: throws org.osid.repository.RepositoryException {
118: return new PartStructureIterator(new java.util.Vector());
119: }
120: }
|