001: package edu.indiana.lib.osid.base.repository.http;
002:
003: public class DateRetrievedPartStructure implements
004: org.osid.repository.PartStructure {
005:
006: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
007: .getLog(DateRetrievedPartStructure.class);
008:
009: private org.osid.shared.Id DATE_RETRIEVED_PART_STRUCTURE_ID = null;
010: private org.osid.shared.Type type = new Type("sakaibrary",
011: "partStructure", "dateRetrieved", "Date Retrieved");
012: private String displayName = "Date Retrieved";
013: private String description = "Date Retrieved indicates the date this "
014: + "resource was retrieved.";
015: private boolean mandatory = false;
016: private boolean populatedByRepository = false;
017: private boolean repeatable = false;
018:
019: private static DateRetrievedPartStructure dateRetrievedPartStructure = new DateRetrievedPartStructure();
020:
021: protected static DateRetrievedPartStructure getInstance() {
022: return dateRetrievedPartStructure;
023: }
024:
025: public String getDisplayName()
026: throws org.osid.repository.RepositoryException {
027: return this .displayName;
028: }
029:
030: /**
031: * Public method to fetch the PartStructure ID
032: */
033: public static org.osid.shared.Id getPartStructureId() {
034: org.osid.shared.Id id = null;
035:
036: try {
037: id = getInstance().getId();
038: } catch (org.osid.repository.RepositoryException ignore) {
039: }
040:
041: return id;
042: }
043:
044: public String getDescription()
045: throws org.osid.repository.RepositoryException {
046: return this .description;
047: }
048:
049: public boolean isMandatory()
050: throws org.osid.repository.RepositoryException {
051: return this .mandatory;
052: }
053:
054: public boolean isPopulatedByRepository()
055: throws org.osid.repository.RepositoryException {
056: return this .populatedByRepository;
057: }
058:
059: public boolean isRepeatable()
060: throws org.osid.repository.RepositoryException {
061: return this .repeatable;
062: }
063:
064: protected DateRetrievedPartStructure() {
065: try {
066: this .DATE_RETRIEVED_PART_STRUCTURE_ID = Managers
067: .getIdManager().getId(
068: "b1asbd8f09s3450909751910168500100");
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 .DATE_RETRIEVED_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: }
|