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/ContributorPartStructure.java $
005: * $Id: ContributorPartStructure.java 22624 2007-03-14 20:17:21Z 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:
030: public class ContributorPartStructure extends
031: edu.indiana.lib.osid.base.repository.PartStructure {
032:
033: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
034: .getLog(ContributorPartStructure.class);
035:
036: private org.osid.shared.Id CONTRIBUTOR_PART_STRUCTURE_ID = null;
037: private org.osid.shared.Type type = new Type("mit.edu",
038: "partStructure", "contributor", "Contributor");
039: private String displayName = "Contributor";
040: private String description = "Examples of Contributor include a person, an organization, or a service. Typically, the name of a Contributor should be used to indicate the entity.";
041: private boolean mandatory = false;
042: private boolean populatedByRepository = false;
043: private boolean repeatable = true;
044: private static ContributorPartStructure contributorPartStructure = new ContributorPartStructure();
045:
046: protected static ContributorPartStructure getInstance() {
047: return contributorPartStructure;
048: }
049:
050: /**
051: * Public method to fetch the PartStructure ID
052: */
053: public static org.osid.shared.Id getPartStructureId() {
054: org.osid.shared.Id id = null;
055:
056: try {
057: id = getInstance().getId();
058: } catch (org.osid.repository.RepositoryException ignore) {
059: }
060:
061: return id;
062: }
063:
064: public String getDisplayName()
065: throws org.osid.repository.RepositoryException {
066: return this .displayName;
067: }
068:
069: public String getDescription()
070: throws org.osid.repository.RepositoryException {
071: return this .description;
072: }
073:
074: public boolean isMandatory()
075: throws org.osid.repository.RepositoryException {
076: return this .mandatory;
077: }
078:
079: public boolean isPopulatedByRepository()
080: throws org.osid.repository.RepositoryException {
081: return this .populatedByRepository;
082: }
083:
084: public boolean isRepeatable()
085: throws org.osid.repository.RepositoryException {
086: return this .repeatable;
087: }
088:
089: protected ContributorPartStructure() {
090: try {
091: this .CONTRIBUTOR_PART_STRUCTURE_ID = Managers
092: .getIdManager().getId(
093: "18a4541f201080006d751920168000100");
094: } catch (Throwable t) {
095: }
096: }
097:
098: public org.osid.shared.Id getId()
099: throws org.osid.repository.RepositoryException {
100: return this .CONTRIBUTOR_PART_STRUCTURE_ID;
101: }
102:
103: public org.osid.shared.Type getType()
104: throws org.osid.repository.RepositoryException {
105: return this .type;
106: }
107:
108: public org.osid.repository.RecordStructure getRecordStructure()
109: throws org.osid.repository.RepositoryException {
110: return RecordStructure.getInstance();
111: }
112:
113: public boolean validatePart(org.osid.repository.Part part)
114: throws org.osid.repository.RepositoryException {
115: return true;
116: }
117:
118: public org.osid.repository.PartStructureIterator getPartStructures()
119: throws org.osid.repository.RepositoryException {
120: return new PartStructureIterator(new java.util.Vector());
121: }
122: }
|