View Javadoc

1   /*
2    * Copyright 2006 The Xanot team
3    */
4   package org.xanot.structure;
5   
6   /***
7    * This rule defines that the current instance of object should contains
8    * reference to parent.
9    * 
10   * @author fneman
11   * 
12   */
13  public class ParentReferenceRule extends XanotRule {
14  
15  	private String attributeName = null;
16  
17  	/***
18  	 * Create new instance of parent reference rule
19  	 * 
20  	 * @param path XML path
21  	 * @param attributeName Attribute of the object.
22  	 */
23  	public ParentReferenceRule(String path, String attributeName) {
24  		super(path);
25  		setAttributeName(attributeName);
26  	}
27  
28  	/***
29  	 * Get the attributeName value.
30  	 * 
31  	 * @return Attribute Name Value.
32  	 */
33  	public String getAttributeName() {
34  		return attributeName;
35  	}
36  
37  	/***
38  	 * Set the attributeName value.
39  	 * 
40  	 * @param attributeName Attribute Name new value
41  	 */
42  	public void setAttributeName(String attributeName) {
43  		this.attributeName = attributeName;
44  	}
45  
46  	/***
47  	 * Get string representation of this object.
48  	 * 
49  	 * @return String representation.
50  	 */
51  	public String toString() {
52  		return "ParentReferenceRule : [path:" + getPath() + "],[attributeName:"
53  				+ attributeName + "]";
54  	}
55  
56  }