org.infolayer.model
Class UmlDataType

java.lang.Object
  extended byorg.infolayer.model.UmlModelElement
      extended byorg.infolayer.model.UmlClassifier
          extended byorg.infolayer.model.UmlDataType
All Implemented Interfaces:
org.ksoap2.serialization.KvmSerializable, Typed
Direct Known Subclasses:
UmlEnumeration

public class UmlDataType
extends UmlClassifier

For a description of the OCL methods available, please refer to org.infolayer.model.op.*


Field Summary
 
Fields inherited from class org.infolayer.model.UmlClassifier
PERMISSION_CREATE, PERMISSION_EXEC, PERMISSION_NONE, PERMISSION_QUERY, PERMISSION_READ, PERMISSION_WRITE
 
Fields inherited from class org.infolayer.model.UmlModelElement
PRIVATE, PROTECTED, PUBLIC
 
Constructor Summary
UmlDataType()
           
UmlDataType(UmlModel model, java.lang.String name, java.lang.Class javaClass)
           
 
Method Summary
 java.lang.Object createInstance()
          Creates a new instance.
 java.lang.Object fromString(java.lang.String s)
          Generates instance of the Java class denoted by this DataType from the given String.
 java.lang.Object fromString(java.lang.String s, java.lang.String format, java.lang.String lang)
          Converts a String to an instance of getJavaClass(), using the given format and language settings.
 OclCollection instances()
           
 java.lang.String toOclLiteral(java.lang.Object obj)
          Please note that -- in contrast to "toString", this method adds sufficient typing inforamtion to reconstruct the object with an ocl parser.
static java.lang.String toString(java.lang.Object o)
          Converts the given object to a plain text String, as used in forms.
static java.lang.String toString(java.lang.Object o, java.lang.String format, java.lang.String lang)
          Converst an object to a plain text string with the given format and locale
 
Methods inherited from class org.infolayer.model.UmlClassifier
addOperation, addOperation, addProperty, addProperty, allInstances, checkConstraints, compile, compile, equals, findOperation, findProperty, getActualType, getAllSubtypes, getAllSupertypes, getAttribute, getBehavior, getCommonSupertype, getDynamicOperation, getInstanceJavaClass, getLabel, getModel, getOperation, getOwnedAttribute, getOwnedOperation, getPermission, getProperty, getPropertyCount, getPropertyInfo, getStateProperty, getSubtypes, getSupertype, getTaggedValueRecursive, getType, init, isAbstract, isAssignableFrom, lookUpOperation, setProperty, toOclLiteral, toString, typeDistance
 
Methods inherited from class org.infolayer.model.UmlModelElement
getComment, getLabel, getName, getTaggedValue, getTaggedValue, getVisibility, setName, setTaggedValue, setVisibility, setVisibility
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UmlDataType

public UmlDataType()

UmlDataType

public UmlDataType(UmlModel model,
                   java.lang.String name,
                   java.lang.Class javaClass)
Method Detail

instances

public OclCollection instances()
Overrides:
instances in class UmlClassifier

toString

public static java.lang.String toString(java.lang.Object o)
Converts the given object to a plain text String, as used in forms. In contrast to toOclLiteral, type information may be lost. In contrast to Object.toString, the ISO format is used for date objects.


toString

public static java.lang.String toString(java.lang.Object o,
                                        java.lang.String format,
                                        java.lang.String lang)
Converst an object to a plain text string with the given format and locale

Parameters:
o - The object to convert
format - The format (see SimpleDateFormat or NumberFormat JavaDoc)
lang - The locale identification string (e.g. 'de').
Returns:

fromString

public java.lang.Object fromString(java.lang.String s)
Generates instance of the Java class denoted by this DataType from the given String. In contrast to fromOclLiteral(), the String is in a plain format, as returned for instance from a web form. This method can only handle an international default format. For different formats, please use fromString(String s, String format, String lang).


fromString

public java.lang.Object fromString(java.lang.String s,
                                   java.lang.String format,
                                   java.lang.String lang)
Converts a String to an instance of getJavaClass(), using the given format and language settings.

Parameters:
s - The string to be converted
format - The format String
lang - An ISO language code
Returns:
s converted to an instance of getJavaClass()

createInstance

public java.lang.Object createInstance()
Description copied from class: UmlClassifier
Creates a new instance. This method will throw an exception. It is overwritten in UmlClass. TODO: Check where this is called, why, and how to make it consistent with datatype (from string) constructors

Overrides:
createInstance in class UmlClassifier

toOclLiteral

public java.lang.String toOclLiteral(java.lang.Object obj)
Description copied from class: UmlClassifier
Please note that -- in contrast to "toString", this method adds sufficient typing inforamtion to reconstruct the object with an ocl parser.

Overrides:
toOclLiteral in class UmlClassifier