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/FormatPartStructure.java $
005: * $Id: FormatPartStructure.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 FormatPartStructure 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(FormatPartStructure.class);
033:
034: private org.osid.shared.Id FORMAT_PART_STRUCTURE_ID = null;
035: private org.osid.shared.Type type = new Type("mit.edu",
036: "partStructure", "format");
037: private String displayName = "Format";
038: private String description = "Typically, Format may include the media-type or dimensions of the resource. Format may be used to identify the software, hardware, or other equipment needed to display or operate the resource. Examples of dimensions include size and duration.";
039: private boolean mandatory = false;
040: private boolean populatedByRepository = false;
041: private boolean repeatable = true;
042: private static FormatPartStructure formatPartStructure = new FormatPartStructure();
043:
044: protected static FormatPartStructure getInstance() {
045: return formatPartStructure;
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 FormatPartStructure() {
088: try {
089: this .FORMAT_PART_STRUCTURE_ID = Managers.getIdManager()
090: .getId("e46d541f201080006d751920168000100");
091: } catch (Throwable t) {
092: }
093: }
094:
095: public org.osid.shared.Id getId()
096: throws org.osid.repository.RepositoryException {
097: return this .FORMAT_PART_STRUCTURE_ID;
098: }
099:
100: public org.osid.shared.Type getType()
101: throws org.osid.repository.RepositoryException {
102: return this .type;
103: }
104:
105: public org.osid.repository.RecordStructure getRecordStructure()
106: throws org.osid.repository.RepositoryException {
107: return RecordStructure.getInstance();
108: }
109:
110: public boolean validatePart(org.osid.repository.Part part)
111: throws org.osid.repository.RepositoryException {
112: return true;
113: }
114:
115: public org.osid.repository.PartStructureIterator getPartStructures()
116: throws org.osid.repository.RepositoryException {
117: return new PartStructureIterator(new java.util.Vector());
118: }
119: }
|