|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.xml.AbstractXmlBuilder
diva.sketch.recognition.SimpleData
public final class SimpleData
An instance of typed data that represents dynamic, user-defined types. If you are writing a low-level recognizer and that recognizes strokes based on a feature vector and knows nothing about the semantics of the recognition, other than a string representation of the type, then this is the class for you (e.g. new SimpleData("scribble")). However, if you have semantic knowledge of the data that is being represented, e.g. the number of sides on the polygon that you just recognized, then you should probably be a statically-typed form of TypedData (e.g. PolygonData).
Type
,
TypedData
Constructor Summary | |
---|---|
SimpleData()
Used in the builder interface--do not call this constructor from code! |
|
SimpleData(String typeId)
Construct a simple data with the given dynamic identifier. |
Method Summary | |
---|---|
Object |
build(XmlElement in,
String type)
Build a SimpleData from the given XmlElement |
boolean |
equals(Object o)
Equality test: are the types equal? |
XmlElement |
generate(Object in)
Generate an XML element from this instance |
Type |
getType()
Construct a simple data with the given dynamic identifier. |
String |
getTypeID()
Return the dynamic type identifier of this data item. |
String |
toString()
Print the dynamic type of this data in brackets as short hand to denote that it is a dynamic type. |
Methods inherited from class diva.util.xml.AbstractXmlBuilder |
---|
getDelegate, setDelegate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface diva.util.xml.XmlBuilder |
---|
setDelegate |
Constructor Detail |
---|
public SimpleData()
public SimpleData(String typeId)
Type.isStaticType(String)
Method Detail |
---|
public Type getType()
getType
in interface TypedData
public String getTypeID()
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
public XmlElement generate(Object in)
generate
in interface XmlBuilder
generate
in class AbstractXmlBuilder
public Object build(XmlElement in, String type)
build
in interface XmlBuilder
build
in class AbstractXmlBuilder
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |