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.dom.helper;
17:
18: import org.outerj.daisy.diff.html.dom.TagNode;
19:
20: /**
21: * When detecting the last common parent of two nodes, all results are stored as
22: * a {@link LastCommonParentResult}.
23: */
24: public class LastCommonParentResult {
25:
26: public LastCommonParentResult() {
27:
28: }
29:
30: //Parent
31: private TagNode parent;
32:
33: public TagNode getLastCommonParent() {
34: return parent;
35: }
36:
37: public void setLastCommonParent(TagNode parent) {
38: this .parent = parent;
39: }
40:
41: //Splitting
42: private boolean splittingNeeded = false;
43:
44: public boolean isSplittingNeeded() {
45: return splittingNeeded;
46: }
47:
48: public void setSplittingNeeded() {
49: splittingNeeded = true;
50: }
51:
52: //Depth
53: private int lastCommonParentDepth = -1;
54:
55: public int getLastCommonParentDepth() {
56: return lastCommonParentDepth;
57: }
58:
59: public void setLastCommonParentDepth(int depth) {
60: lastCommonParentDepth = depth;
61: }
62:
63: //Index
64: private int indexInLastCommonParent = -1;
65:
66: public int getIndexInLastCommonParent() {
67: return indexInLastCommonParent;
68: }
69:
70: public void setIndexInLastCommonParent(int index) {
71: indexInLastCommonParent = index;
72: }
73:
74: }
|