gov.nasa.arc.brahms.common.data
Class ValueType

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.data.ValueType
All Implemented Interfaces:
Type, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable

public class ValueType
extends BrahmsObject
implements Type

A ValueType represents a primitive value type used to define the type of atributes, relations, or variables.

Version:
$Revision: 1.3 $ $Date: 2009/11/23 19:08:56 $ $Author: rnado $
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
static ValueType BOOLEAN_TYPE
           
static ValueType BYTE_TYPE
           
static ValueType CHAR_TYPE
           
static ValueType DOUBLE_TYPE
           
static ValueType FLOAT_TYPE
           
static ValueType INT_TYPE
           
static ValueType LONG_TYPE
           
static ValueType SHORT_TYPE
           
static ValueType STRING_TYPE
           
static ValueType SYMBOL_TYPE
           
 
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML
 
Constructor Summary
ValueType()
           
ValueType(int type)
           
 
Method Summary
 boolean compareTypes(Type type, boolean target)
          This method compares this type with the given type and checks based on the target flag whether the types can be converted to one another.
 java.lang.String getFullyQualifiedName()
          Returns the fully qualified name of the value type.
 java.lang.String getName()
          Returns the name or String representation of the type
 int getType()
          Returns the type represented by this type.
static boolean isValidSymbol(java.lang.String value)
          Verifies if the specified value complies with the rules of being a symbol.
static boolean isValueType(int type)
          Indicates whether the type indicated by the specified type constants is a value type.
 void setType(int type)
           
 java.lang.String toString()
          Returns the string representation of this value type
 
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject
delete, export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setID, setLine, setLoaded, setResolved, setSerialNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.arc.brahms.common.data.Type
getSerialNumber
 

Field Detail

INT_TYPE

public static final ValueType INT_TYPE

BYTE_TYPE

public static final ValueType BYTE_TYPE

SHORT_TYPE

public static final ValueType SHORT_TYPE

CHAR_TYPE

public static final ValueType CHAR_TYPE

LONG_TYPE

public static final ValueType LONG_TYPE

FLOAT_TYPE

public static final ValueType FLOAT_TYPE

DOUBLE_TYPE

public static final ValueType DOUBLE_TYPE

BOOLEAN_TYPE

public static final ValueType BOOLEAN_TYPE

SYMBOL_TYPE

public static final ValueType SYMBOL_TYPE

STRING_TYPE

public static final ValueType STRING_TYPE
Constructor Detail

ValueType

public ValueType()

ValueType

public ValueType(int type)
Method Detail

isValueType

public static final boolean isValueType(int type)
Indicates whether the type indicated by the specified type constants is a value type.

Parameters:
type - the type constant to be tested
Returns:
boolean true if the type constant is for a value type

isValidSymbol

public static final boolean isValidSymbol(java.lang.String value)
Verifies if the specified value complies with the rules of being a symbol.

Parameters:
value - the String value to be verified
Returns:
true if the value complies with the symbol rules, false otherwise

setType

public void setType(int type)

getType

public int getType()
Description copied from interface: Type
Returns the type represented by this type.

Specified by:
getType in interface Type
Returns:
int the represented type

getName

public java.lang.String getName()
Description copied from interface: Type
Returns the name or String representation of the type

Specified by:
getName in interface Type
Returns:
String the String representation

getFullyQualifiedName

public java.lang.String getFullyQualifiedName()
Returns the fully qualified name of the value type. This is equal to the name of the type.

Specified by:
getFullyQualifiedName in interface Type
Returns:
String the fully qualified name

compareTypes

public boolean compareTypes(Type type,
                            boolean target)
This method compares this type with the given type and checks based on the target flag whether the types can be converted to one another. If target is true this method checks if the given type can be converted to or is compatible with this type. If target is false this method checks whether this type can be converted to or is compatible with the given type.

Specified by:
compareTypes in interface Type
Parameters:
type - the type to compare this type with
target - true if this type is the target false if the given type ios the target
Returns:
boolean an true if the types are compatible, false otherwise

toString

public java.lang.String toString()
Returns the string representation of this value type

Overrides:
toString in class java.lang.Object
Returns:
String the string representation of this type


Copyright © 1997-2012 All Rights Reserved.