net.groboclown.xml.xdstates.v1.impl
Class AttributeX

java.lang.Object
  |
  +--net.groboclown.xml.xdstates.v1.impl.AttributeX
All Implemented Interfaces:
IAttribute

public class AttributeX
extends Object
implements IAttribute

In its most basic form, an Attribute is a name-value pair. However, in the DataStates collection, an Attribute may be parsable, which means that it is of the form:

      <tag name="%type:replace%" ... >
 

The type text above refers to the location to retrieve the value. Right now, the only types are:

The default is prop:.

Version:
Alpha 0.9.0 - JDK 1.0+
Author:
Matt Albrecht

Field Summary
private  String data
           
private static int DEFAULT_TYPE
           
private  String innerName
           
private  int innerType
           
private static int MACRO_TYPE
           
private  IAttributeModule module
           
private  String name
           
private static int NO_TYPE
           
private static int PROP_TYPE
           
private static String[] TYPES
           
 
Constructor Summary
protected AttributeX(AttributeX attr)
           
  AttributeX(String name, String value)
           
 
Method Summary
 IAttribute copy()
           
 boolean equals(Object o)
           
 IAttributeModule getModule()
           
 String getName()
           
 String getRawValue()
           
private  int getType(String typeName)
           
 String getValue(IDataList list)
           
 int hashCode()
           
 void setupModule(IAttributeMap map)
           
 void setValue(String data)
          Sets the data to be the unparsible value set here.
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

name

private String name

data

private String data

innerName

private String innerName

innerType

private int innerType

module

private IAttributeModule module

TYPES

private static final String[] TYPES

NO_TYPE

private static final int NO_TYPE

MACRO_TYPE

private static final int MACRO_TYPE

PROP_TYPE

private static final int PROP_TYPE

DEFAULT_TYPE

private static final int DEFAULT_TYPE
Constructor Detail

AttributeX

protected AttributeX(AttributeX attr)

AttributeX

public AttributeX(String name,
                  String value)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

getName

public String getName()
Specified by:
getName in interface IAttribute

getValue

public String getValue(IDataList list)
Specified by:
getValue in interface IAttribute

getRawValue

public String getRawValue()
Specified by:
getRawValue in interface IAttribute

getModule

public IAttributeModule getModule()
Specified by:
getModule in interface IAttribute

setupModule

public void setupModule(IAttributeMap map)
Specified by:
setupModule in interface IAttribute

copy

public IAttribute copy()
Specified by:
copy in interface IAttribute

setValue

public void setValue(String data)
Sets the data to be the unparsible value set here.

toString

public String toString()
Overrides:
toString in class Object

getType

private int getType(String typeName)


Written under the LGPL