001 package com.mockrunner.tag; 002 003 /** 004 * This class encapsulates the data for a dynamic tag attribute. 005 * You can add it to the paramater map of any 006 * {@link com.mockrunner.tag.NestedTag} instance. 007 * It is not necessary to use an instance of this class to set dynamic 008 * attributes. If the attribute is set directly (like normal attributes), 009 * the URI will be set to <code>null</code>, i.e. the attribute has 010 * the default namespace. 011 */ 012 public class DynamicAttribute 013 { 014 private String uri; 015 private Object value; 016 017 public DynamicAttribute() 018 { 019 020 } 021 022 public DynamicAttribute(String uri, Object value) 023 { 024 this.uri = uri; 025 this.value = value; 026 } 027 028 /** 029 * Returns the namespace of the attribute. 030 * @return the namespace of the attribute 031 */ 032 public String getUri() 033 { 034 return uri; 035 } 036 037 /** 038 * Sets the namespace of the attribute. 039 * @param uri the namespace of the attribute 040 */ 041 public void setUri(String uri) 042 { 043 this.uri = uri; 044 } 045 046 /** 047 * Returns the value of the attribute. 048 * @return the value of the attribute 049 */ 050 public Object getValue() 051 { 052 return value; 053 } 054 055 /** 056 * Sets the value of the attribute. 057 * @param value the value of the attribute 058 */ 059 public void setValue(Object value) 060 { 061 this.value = value; 062 } 063 }