001: /*
002: * Copyright (C) 2001, 2002 Robert MacGrogan
003: *
004: * This library is free software; you can redistribute it and/or
005: * modify it under the terms of the GNU Lesser General Public
006: * License as published by the Free Software Foundation; either
007: * version 2.1 of the License, or (at your option) any later version.
008: *
009: * This library is distributed in the hope that it will be useful,
010: * but WITHOUT ANY WARRANTY; without even the implied warranty of
011: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012: * Lesser General Public License for more details.
013: *
014: * You should have received a copy of the GNU Lesser General Public
015: * License along with this library; if not, write to the Free Software
016: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017: *
018: *
019: * $Archive: SourceJammer$
020: * $FileName: ViewNode.java$
021: * $FileID: 4345$
022: *
023: * Last change:
024: * $AuthorName: Rob MacGrogan$
025: * $Date: 5/1/03 5:33 PM$
026: * $Comment: $
027: *
028: * $KeyWordsOff: $
029: */
030:
031: package org.sourcejammer.project.view;
032:
033: import org.sourcejammer.project.Node;
034: import org.sourcejammer.util.SJDate;
035:
036: /**
037: * Title: SourceJammer v 0.1.0
038: * Description:
039: * Copyright: Copyright (c) 2001
040: * Company:
041: * @author Robert MacGrogan
042: * @version $Revision: 1.3 $
043: */
044:
045: public abstract class ViewNode implements Node {
046:
047: private SJDate mdCreatedDate;
048: private boolean mbShared;
049: private long mlUniqueID;
050: private String msName;
051: private long mlParentID;
052:
053: public String getNodeName() {
054: return msName;
055: }
056:
057: public void setNodeName(String s) {
058: msName = s;
059: }
060:
061: /**
062: * Returns the date the Node was added to the archive.
063: */
064: public SJDate getCreatedDate() {
065: return mdCreatedDate;
066: }
067:
068: public void setCreatedDate(SJDate d) {
069: mdCreatedDate = d;
070: }
071:
072: /**
073: * Returns true if the Node is shared to another location in the archive.
074: */
075: public boolean isShared() {
076: return mbShared;
077: }
078:
079: public void setShared(boolean b) {
080: mbShared = b;
081: }
082:
083: /**
084: * Returns count of number of child of this Node.
085: */
086: public abstract int childCount();
087:
088: /**
089: * Returns the unique ID of the underlying node on the server.
090: */
091: public long getUniqueID() {
092: return mlUniqueID;
093: }
094:
095: public void setUniqueID(long l) {
096: mlUniqueID = l;
097: }
098:
099: public long getParentID() {
100: return mlParentID;
101: }
102:
103: /**
104: * Provided for convenience of client. Client can set the parent ID when a
105: * file or project ViewNode is retrieved to make it easier to keep track
106: * of parent/child releationships.
107: */
108: public void setParentID(long l) {
109: mlParentID = l;
110: }
111:
112: }
|