001: package edu.indiana.lib.osid.base.repository.http;
002:
003: public class PublicationLocationPartStructure implements
004: org.osid.repository.PartStructure {
005: private static org.apache.commons.logging.Log _log = edu.indiana.lib.twinpeaks.util.LogUtils
006: .getLog(PublicationLocationPartStructure.class);
007:
008: private org.osid.shared.Id PUBLICATION_LOCATION_PART_STRUCTURE_ID = null;
009: private org.osid.shared.Type type = new Type("sakaibrary",
010: "partStructure", "publicationLocation",
011: "Publication Location");
012: private String displayName = "Publication Location";
013: private String description = "Publication Location is usually a city name "
014: + "or a geographical region indicating the place where a resource "
015: + "has been published.";
016: private boolean mandatory = false;
017: private boolean populatedByRepository = false;
018: private boolean repeatable = true;
019:
020: private static PublicationLocationPartStructure publicationLocationPartStructure = new PublicationLocationPartStructure();
021:
022: protected static PublicationLocationPartStructure getInstance() {
023: return publicationLocationPartStructure;
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 PublicationLocationPartStructure() {
066: try {
067: this .PUBLICATION_LOCATION_PART_STRUCTURE_ID = Managers
068: .getIdManager().getId(
069: "9jk234ff201080005465hg2f168342540");
070: } catch (Throwable t) {
071: }
072: }
073:
074: public void updateDisplayName(String displayName)
075: throws org.osid.repository.RepositoryException {
076: throw new org.osid.repository.RepositoryException(
077: org.osid.OsidException.UNIMPLEMENTED);
078: }
079:
080: public org.osid.shared.Id getId()
081: throws org.osid.repository.RepositoryException {
082: return this .PUBLICATION_LOCATION_PART_STRUCTURE_ID;
083: }
084:
085: public org.osid.shared.Type getType()
086: throws org.osid.repository.RepositoryException {
087: return this .type;
088: }
089:
090: public org.osid.repository.RecordStructure getRecordStructure()
091: throws org.osid.repository.RepositoryException {
092: return RecordStructure.getInstance();
093: }
094:
095: public boolean validatePart(org.osid.repository.Part part)
096: throws org.osid.repository.RepositoryException {
097: return true;
098: }
099:
100: public org.osid.repository.PartStructureIterator getPartStructures()
101: throws org.osid.repository.RepositoryException {
102: return new PartStructureIterator(new java.util.Vector());
103: }
104: }
|