001: /**********************************************************************************
002: * $URL: $
003: * $Id: $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.component.osid.repository.srw;
021:
022: /**
023: * @author Massachusetts Institute of Techbology, Sakai Software Development Team
024: * @version
025: */
026: public class RightsPartStructure implements
027: org.osid.repository.PartStructure {
028: private org.osid.shared.Id RIGHTS_PART_STRUCTURE_ID = null;
029: private org.osid.shared.Type type = new Type("mit.edu",
030: "partStructure", "rights", "Rights");
031: private String displayName = "Rights";
032: private String description = "Typically, Rights will contain a rights management statement for the resource, or reference a service providing such information. Rights information often encompasses Intellectual Property Rights (IPR), Copyright, and various Property Rights. If the Rights element is absent, no assumptions may be made about any rights held in or over the resource.";
033: private boolean mandatory = false;
034: private boolean populatedByRepository = false;
035: private boolean repeatable = true;
036: private static RightsPartStructure rightsPartStructure = new RightsPartStructure();
037:
038: protected static RightsPartStructure getInstance() {
039: return rightsPartStructure;
040: }
041:
042: public String getDisplayName()
043: throws org.osid.repository.RepositoryException {
044: return this .displayName;
045: }
046:
047: public String getDescription()
048: throws org.osid.repository.RepositoryException {
049: return this .description;
050: }
051:
052: public boolean isMandatory()
053: throws org.osid.repository.RepositoryException {
054: return this .mandatory;
055: }
056:
057: public boolean isPopulatedByRepository()
058: throws org.osid.repository.RepositoryException {
059: return this .populatedByRepository;
060: }
061:
062: public boolean isRepeatable()
063: throws org.osid.repository.RepositoryException {
064: return this .repeatable;
065: }
066:
067: protected RightsPartStructure() {
068: try {
069: this .RIGHTS_PART_STRUCTURE_ID = Managers.getIdManager()
070: .getId("5492741f201080006d751920168000100");
071: } catch (Throwable t) {
072: }
073: }
074:
075: public void updateDisplayName(String displayName)
076: throws org.osid.repository.RepositoryException {
077: throw new org.osid.repository.RepositoryException(
078: org.osid.OsidException.UNIMPLEMENTED);
079: }
080:
081: public org.osid.shared.Id getId()
082: throws org.osid.repository.RepositoryException {
083: return this .RIGHTS_PART_STRUCTURE_ID;
084: }
085:
086: public org.osid.shared.Type getType()
087: throws org.osid.repository.RepositoryException {
088: return this .type;
089: }
090:
091: public org.osid.repository.RecordStructure getRecordStructure()
092: throws org.osid.repository.RepositoryException {
093: return RecordStructure.getInstance();
094: }
095:
096: public boolean validatePart(org.osid.repository.Part part)
097: throws org.osid.repository.RepositoryException {
098: return true;
099: }
100:
101: public org.osid.repository.PartStructureIterator getPartStructures()
102: throws org.osid.repository.RepositoryException {
103: return new PartStructureIterator(new java.util.Vector());
104: }
105: }
|