001: package edu.indiana.lib.osid.base.repository.http;
002:
003: public class EditionPartStructure implements
004: org.osid.repository.PartStructure {
005:
006: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
007: .getLog(EditionPartStructure.class);
008:
009: private org.osid.shared.Id EDITION_PART_STRUCTURE_ID = null;
010: private org.osid.shared.Type type = new Type("sakaibrary",
011: "partStructure", "edition",
012: "Edition of resource container (i.e. book, 2nd edition)");
013: private String displayName = "Edition";
014: private String description = "Edition of resource container (i.e. book "
015: + "title, 2nd edition)";
016: private boolean mandatory = false;
017: private boolean populatedByRepository = false;
018: private boolean repeatable = false;
019:
020: private static EditionPartStructure editionPartStructure = new EditionPartStructure();
021:
022: protected static EditionPartStructure getInstance() {
023: return editionPartStructure;
024: }
025:
026: /**
027: * Public method to fetch the PartStructure ID
028: */
029: public static org.osid.shared.Id getPartStructureId() {
030: org.osid.shared.Id id = null;
031:
032: try {
033: id = getInstance().getId();
034: } catch (org.osid.repository.RepositoryException ignore) {
035: }
036:
037: return id;
038: }
039:
040: public String getDisplayName()
041: throws org.osid.repository.RepositoryException {
042: return this .displayName;
043: }
044:
045: public String getDescription()
046: throws org.osid.repository.RepositoryException {
047: return this .description;
048: }
049:
050: public boolean isMandatory()
051: throws org.osid.repository.RepositoryException {
052: return this .mandatory;
053: }
054:
055: public boolean isPopulatedByRepository()
056: throws org.osid.repository.RepositoryException {
057: return this .populatedByRepository;
058: }
059:
060: public boolean isRepeatable()
061: throws org.osid.repository.RepositoryException {
062: return this .repeatable;
063: }
064:
065: protected EditionPartStructure() {
066: try {
067: this .EDITION_PART_STRUCTURE_ID = Managers.getIdManager()
068: .getId("09dfgljk2398dfknj98ewh34268000100");
069: } catch (Throwable t) {
070: }
071: }
072:
073: public void updateDisplayName(String displayName)
074: throws org.osid.repository.RepositoryException {
075: throw new org.osid.repository.RepositoryException(
076: org.osid.OsidException.UNIMPLEMENTED);
077: }
078:
079: public org.osid.shared.Id getId()
080: throws org.osid.repository.RepositoryException {
081: return this .EDITION_PART_STRUCTURE_ID;
082: }
083:
084: public org.osid.shared.Type getType()
085: throws org.osid.repository.RepositoryException {
086: return this .type;
087: }
088:
089: public org.osid.repository.RecordStructure getRecordStructure()
090: throws org.osid.repository.RepositoryException {
091: return RecordStructure.getInstance();
092: }
093:
094: public boolean validatePart(org.osid.repository.Part part)
095: throws org.osid.repository.RepositoryException {
096: return true;
097: }
098:
099: public org.osid.repository.PartStructureIterator getPartStructures()
100: throws org.osid.repository.RepositoryException {
101: return new PartStructureIterator(new java.util.Vector());
102: }
103: }
|