001: /*
002: * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package com.caucho.jcr.svn;
031:
032: import com.caucho.util.L10N;
033:
034: import java.util.Date;
035: import java.util.logging.Logger;
036:
037: /**
038: * Subversion node class.
039: */
040: public class SubversionNode {
041: private final L10N L = new L10N(SubversionNode.class);
042: private final Logger log = Logger.getLogger(SubversionNode.class
043: .getName());;
044:
045: private String _name;
046: private long _version = 1;
047: private Date _lastModified;
048: private String _user = "nobody";
049:
050: public SubversionNode(String name) {
051: _name = name;
052: }
053:
054: /**
055: * Returns the node name.
056: */
057: public String getName() {
058: return _name;
059: }
060:
061: /**
062: * Returns the version.
063: */
064: public long getVersion() {
065: return _version;
066: }
067:
068: /**
069: * Sets the version.
070: */
071: public void setVersion(long version) {
072: _version = version;
073: }
074:
075: /**
076: * Returns the user who updated the node.
077: */
078: public String getUser() {
079: return _user;
080: }
081:
082: /**
083: * Sets the user who updated the node.
084: */
085: public void setUser(String user) {
086: _user = user;
087: }
088:
089: /**
090: * Returns the last-modified time.
091: */
092: public Date getLastModified() {
093: return _lastModified;
094: }
095:
096: /**
097: * Sets teh last-modified date
098: */
099: public void setLastModified(Date lastModified) {
100: _lastModified = lastModified;
101: }
102:
103: public String toString() {
104: return "SubversionNode[" + _name + ",rev=" + _version + ","
105: + _user + "]";
106: }
107: }
|