View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2009 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.support.editor.xml;
14  
15  import org.apache.xmlbeans.SchemaType;
16  import org.apache.xmlbeans.XmlObject;
17  
18  import com.eviware.soapui.support.editor.EditorLocation;
19  
20  /***
21   * Location in a XmlDocument
22   * 
23   * @author ole.matzura
24   */
25  
26  public class XmlLocation implements EditorLocation<XmlDocument>
27  {
28  	private final int line;
29  	private final int column;
30  	private XmlObject xmlObject;
31  	private final SchemaType schemaType;
32  	private String documentation;
33  
34  	public XmlLocation( int line, int column )
35  	{
36  		this( line, column, null, null, null );
37  	}
38  
39  	public XmlLocation( int line, int column, XmlObject xmlObject, SchemaType schemaType, String documentation )
40  	{
41  		this.line = line;
42  		this.column = column;
43  		this.xmlObject = xmlObject;
44  		this.schemaType = schemaType;
45  		this.documentation = documentation;
46  	}
47  
48  	/*
49  	 * (non-Javadoc)
50  	 * 
51  	 * @see
52  	 * com.eviware.soapui.impl.wsdl.panels.request.components.editor.EditorLocation
53  	 * #getColumn()
54  	 */
55  	public int getColumn()
56  	{
57  		return column;
58  	}
59  
60  	/*
61  	 * (non-Javadoc)
62  	 * 
63  	 * @see
64  	 * com.eviware.soapui.impl.wsdl.panels.request.components.editor.EditorLocation
65  	 * #getLine()
66  	 */
67  	public int getLine()
68  	{
69  		return line;
70  	}
71  
72  	public SchemaType getSchemaType()
73  	{
74  		return schemaType;
75  	}
76  
77  	public XmlObject getXmlObject()
78  	{
79  		return xmlObject;
80  	}
81  
82  	public String getDocumentation()
83  	{
84  		return documentation;
85  	}
86  
87  	public void setDocumentation( String documentation )
88  	{
89  		this.documentation = documentation;
90  	}
91  
92  }