KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > scriptella > configuration > Location


1 /*
2  * Copyright 2006-2007 The Scriptella Project Team.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 scriptella.configuration;
17
18 import java.io.Serializable JavaDoc;
19
20
21 /**
22  * Defines xml element location.
23  * <p>TODO: add support for row/columns
24  *
25  * @author Fyodor Kupolov
26  * @version 1.0
27  */

28 public class Location implements Serializable JavaDoc {
29     private static final long serialVersionUID = 1;
30     private int row;
31     private int column;
32     private String JavaDoc xpath;
33
34
35     public Location(int row, int column) {
36         this.row = row;
37         this.column = column;
38     }
39
40     public Location(String JavaDoc xpath) {
41         this.xpath = xpath;
42     }
43
44     public int getRow() {
45         return row;
46     }
47
48     void setRow(final int row) {
49         this.row = row;
50     }
51
52     public int getColumn() {
53         return column;
54     }
55
56     void setColumn(final int column) {
57         this.column = column;
58     }
59
60     public String JavaDoc getXPath() {
61         return xpath;
62     }
63
64     public String JavaDoc toString() {
65         return getXPath();
66     }
67 }
68
Popular Tags