|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tuscany.spi.model.ModelObject
org.apache.tuscany.spi.model.DataType<L>
public class DataType<L>
Representation of the type of data associated with an operation. Data is represented in two forms: the physical form
used by the runtime and a logical form used by the assembly. The physical form is a Java Type because the runtime is
written in Java. This may be the same form used by the application but it may not; for example, an application that
is performing stream processing may want a physical form such as an InputStream
to
semantially operate on application data such as a purchase order. The logical description is that used by the
assembly model and is an identifier into some well-known type space; examples may be a Java type represented by its
Class or an XML type represented by its QName. Every data type may also contain metadata describing the expected
data; for example, it could specify a preferred data binding technology or the size of a typical instance.
Constructor Summary | |
---|---|
DataType(String dataBinding,
Type physical,
L logical)
|
|
DataType(Type physical,
L logical)
Construct a data type specifying the physical and logical types. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getDataBinding()
|
L |
getLogical()
Returns the logical identifier used by the assembly. |
Map<String,?> |
getMetadata()
Returns all metadata about this type. |
Object |
getMetadata(String name)
Returns the specified metadata item or null if not present. |
Type |
getPhysical()
Returns the physical type used by the runtime. |
int |
hashCode()
|
void |
setDataBinding(String dataBinding)
|
Object |
setMetadata(String name,
Object value)
Sets the specified metadata value. |
String |
toString()
|
Methods inherited from class org.apache.tuscany.spi.model.ModelObject |
---|
getExtensions |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataType(Type physical, L logical)
physical
- the physical class used by the runtimelogical
- the logical typegetLogical()
public DataType(String dataBinding, Type physical, L logical)
Method Detail |
---|
public Type getPhysical()
public L getLogical()
public Map<String,?> getMetadata()
public Object getMetadata(String name)
name
- the name of the metadata item
public Object setMetadata(String name, Object value)
name
- the name of the metadata itemvalue
- the value, or null to undefine
public String getDataBinding()
public void setDataBinding(String dataBinding)
dataBinding
- the dataBinding to setpublic int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
|
Apache Tuscany SCA Kernel Sub-Project | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |