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