01: /*
02: * Copyright 2007 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.outerj.daisy.diff.html.modification;
17:
18: public class Modification implements Cloneable {
19:
20: private ModificationType type;
21: private long id = -1;
22: private Modification prevMod = null;
23: private Modification nextMod = null;
24: private boolean firstOfID = false;
25:
26: public Modification(ModificationType type) {
27: this .type = type;
28: }
29:
30: public Modification clone() {
31: Modification newM = new Modification(this .getType());
32: newM.setID(getID());
33: newM.setChanges(getChanges());
34: newM.setFirstOfID(isFirstOfID());
35: newM.setNext(getNext());
36: newM.setPrevious(getPrevious());
37: return newM;
38: }
39:
40: public ModificationType getType() {
41: return type;
42: }
43:
44: public void setID(long id) {
45: this .id = id;
46: }
47:
48: public long getID() {
49: return id;
50: }
51:
52: public void setPrevious(Modification m) {
53: this .prevMod = m;
54: }
55:
56: public Modification getPrevious() {
57: return prevMod;
58: }
59:
60: public void setNext(Modification m) {
61: this .nextMod = m;
62: }
63:
64: public Modification getNext() {
65: return nextMod;
66: }
67:
68: private String changes;
69:
70: public void setChanges(final String changes) {
71: this .changes = changes;
72: }
73:
74: public String getChanges() {
75: return changes;
76: }
77:
78: public boolean isFirstOfID() {
79: return firstOfID;
80: }
81:
82: public void setFirstOfID(boolean firstOfID) {
83: this.firstOfID = firstOfID;
84: }
85:
86: }
|