001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/glossary/api/src/java/org/theospi/portfolio/help/model/GlossaryEntry.java $
003: * $Id: GlossaryEntry.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 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.theospi.portfolio.help.model;
021:
022: public class GlossaryEntry extends GlossaryBase {
023: private String term;
024: private String description;
025: private String worksiteId;
026:
027: private GlossaryDescription longDescriptionObject = new GlossaryDescription();
028:
029: public GlossaryEntry() {
030: }
031:
032: public GlossaryEntry(String term, String description) {
033: this .term = term;
034: this .description = description;
035: }
036:
037: public String getTerm() {
038: return term;
039: }
040:
041: public void setTerm(String term) {
042: this .term = term.trim();
043: }
044:
045: public String getDescription() {
046: return description;
047: }
048:
049: public void setDescription(String description) {
050: this .description = description;
051: }
052:
053: public String getWorksiteId() {
054: return worksiteId;
055: }
056:
057: public void setWorksiteId(String worksiteId) {
058: this .worksiteId = worksiteId;
059: }
060:
061: public String getLongDescription() {
062: return longDescriptionObject.getLongDescription();
063: }
064:
065: public void setLongDescriptionObject(
066: GlossaryDescription longDescriptionObject) {
067: this .longDescriptionObject = longDescriptionObject;
068: }
069:
070: public GlossaryDescription getLongDescriptionObject() {
071: return longDescriptionObject;
072: }
073:
074: public void setLongDescription(String longDescription) {
075: this .longDescriptionObject.setLongDescription(longDescription);
076: }
077:
078: /**
079: * Returns a string representation of the object. In general, the
080: * <code>toString</code> method returns a string that
081: * "textually represents" this object. The result should
082: * be a concise but informative representation that is easy for a
083: * person to read.
084: * It is recommended that all subclasses override this method.
085: * <p/>
086: * The <code>toString</code> method for class <code>Object</code>
087: * returns a string consisting of the name of the class of which the
088: * object is an instance, the at-sign character `<code>@</code>', and
089: * the unsigned hexadecimal representation of the hash code of the
090: * object. In other words, this method returns a string equal to the
091: * value of:
092: * <blockquote>
093: * <pre>
094: * getClass().getName() + '@' + Integer.toHexString(hashCode())
095: * </pre></blockquote>
096: *
097: * @return a string representation of the object.
098: */
099: public String toString() {
100: return getTerm();
101: }
102:
103: }
|