|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object viper.descriptors.attributes.Attributes
Some static methods for dealing with Viper Attributes.
Field Summary | |
static java.lang.String |
DEFAULT_NAMESPACE_QUALIFIER
The default namespace qualifier to use with viper data. |
static java.lang.String |
DEFAULT_NAMESPACE_URI
The viper data URI |
Constructor Summary | |
Attributes()
|
Method Summary | |
static void |
addAttributeType(java.lang.String name,
java.lang.Class type)
|
static java.lang.Class |
getClassForAttribute(java.lang.String type)
|
static boolean |
isComposable(java.lang.String type)
Tests to see if the given attribute type is composible. |
static boolean |
isGoodValue(Attribute type,
java.lang.String value)
Tests to see if the string represents a possible value of the given attribute type. |
static boolean |
isType(java.lang.String type)
Determines if the specified string is a possible Attribute data type. |
static java.lang.Object |
parseValue(Attribute type,
java.lang.Object value)
Converts from a String into the internal data type used by the attribute. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_NAMESPACE_URI
public static final java.lang.String DEFAULT_NAMESPACE_QUALIFIER
Constructor Detail |
public Attributes()
Method Detail |
public static void addAttributeType(java.lang.String name, java.lang.Class type)
name
- type
- public static java.lang.Class getClassForAttribute(java.lang.String type)
type
-
java.lang.IllegalArgumentException
- If the given type isn't registered.public static boolean isComposable(java.lang.String type)
type
- the type of attribute to check
false
if it is not composable.
java.lang.UnsupportedOperationException
- if the type is improperly defined
java.lang.IllegalStateException
- if the isComposable
method of the type throws an exception.public static boolean isType(java.lang.String type)
type
- The string to be tested.
public static boolean isGoodValue(Attribute type, java.lang.String value)
Attribute.possibleValueOf(String)
method.
type
- the attribute to checkvalue
- the value to check
false
if it is a bad value or an unknown type.
java.lang.UnsupportedOperationException
- if possibleValueOf is not defined
for the given type
java.lang.IllegalStateException
- if the possibleValueOf
method of the type throws an exception.public static java.lang.Object parseValue(Attribute type, java.lang.Object value)
type
- The attribute to test against.value
- The data to test. A String in the old format, or a
org.w3c.dom.Element in the new format.
java.lang.UnsupportedOperationException
- if parseValue is not defined
for the given attribute or value type
java.lang.IllegalStateException
- if the parseValue
method of the type throws an exception.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |