Package dap4.core.dmr
Class DapType
- java.lang.Object
-
- dap4.core.dmr.DapNode
-
- dap4.core.dmr.DapType
-
- All Implemented Interfaces:
DapDecl
- Direct Known Subclasses:
DapEnumeration,DapStructure
public class DapType extends DapNode implements DapDecl
This reifies all of the atomic types and specifically all enumeration declarations as specific objects denoting a type. Structures and Sequence are specifically excluded WARNING: these DapType instances have a fake parent Dataset group
-
-
Field Summary
Fields Modifier and Type Field Description static DapTypeCHARDefine instances of DapType for every TypeSort.static DapTypeFLOAT32static DapTypeFLOAT64static DapTypeINT16static DapTypeINT32static DapTypeINT64static DapTypeINT8static DapTypeOPAQUEprotected static DapDatasetpseudorootstatic DapTypeSEQUENCEstatic DapTypeSTRINGstatic DapTypeSTRUCTUREprotected TypeSorttypesortstatic DapTypeUINT16static DapTypeUINT32static DapTypeUINT64static DapTypeUINT8static DapTypeURL-
Fields inherited from class dap4.core.dmr.DapNode
annotations, attributes, dataset, escapedname, fqn, index, parent, shortname, sort, xmlattributes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeSortgetAtomicType()Return the lowest possible TypeSort.intgetSize()StringgetTypeName()TypeSortgetTypeSort()booleanisAtomic()booleanisCharType()booleanisCompound()booleanisCompoundType()booleanisEnumType()booleanisFixedSize()booleanisFloatType()booleanisIntegerType()booleanisLegalAttrType()booleanisNumericType()booleanisOpaqueType()booleanisSeqType()booleanisStringType()booleanisStructType()booleanisUnsigned()static DapTypelookup(TypeSort atomic)protected voidsetTypeSort(TypeSort typesort)Objectvector(int n)Objectvectorget(Object vector, int n)-
Methods inherited from class dap4.core.dmr.DapNode
addAttribute, addXMLAttribute, annotate, annotation, computefqn, findAttribute, getAttributes, getContainer, getContainerPath, getDataset, getEscapedShortName, getFQN, getGroup, getGroupPath, getIndex, getParent, getPath, getShortName, getSort, getXMLAttributes, isTopLevel, overrideParent, removeAttribute, removeXMLAttribute, setAttribute, setAttributes, setDataset, setIndex, setParent, setShortName, setSort, toString
-
-
-
-
Field Detail
-
CHAR
public static final DapType CHAR
Define instances of DapType for every TypeSort. Watch out: the static lists must be immutable because they might be shared by the server and client during testing
-
INT8
public static final DapType INT8
-
UINT8
public static final DapType UINT8
-
INT16
public static final DapType INT16
-
UINT16
public static final DapType UINT16
-
INT32
public static final DapType INT32
-
UINT32
public static final DapType UINT32
-
INT64
public static final DapType INT64
-
UINT64
public static final DapType UINT64
-
FLOAT32
public static final DapType FLOAT32
-
FLOAT64
public static final DapType FLOAT64
-
STRING
public static final DapType STRING
-
URL
public static final DapType URL
-
OPAQUE
public static final DapType OPAQUE
-
STRUCTURE
public static final DapType STRUCTURE
-
SEQUENCE
public static final DapType SEQUENCE
-
pseudoroot
protected static final DapDataset pseudoroot
-
typesort
protected TypeSort typesort
-
-
Method Detail
-
getAtomicType
public TypeSort getAtomicType()
Return the lowest possible TypeSort. This is the same as getTypeSort() except for enums, where it returns the basetype of the enum.- Returns:
- lowest level atomic type
-
getTypeSort
public TypeSort getTypeSort()
-
getTypeName
public String getTypeName()
-
setTypeSort
protected void setTypeSort(TypeSort typesort)
-
isUnsigned
public boolean isUnsigned()
-
isAtomic
public boolean isAtomic()
-
isIntegerType
public boolean isIntegerType()
-
isFloatType
public boolean isFloatType()
-
isNumericType
public boolean isNumericType()
-
isStringType
public boolean isStringType()
-
isEnumType
public boolean isEnumType()
-
isCharType
public boolean isCharType()
-
isOpaqueType
public boolean isOpaqueType()
-
isFixedSize
public boolean isFixedSize()
-
isStructType
public boolean isStructType()
-
isSeqType
public boolean isSeqType()
-
isCompoundType
public boolean isCompoundType()
-
isLegalAttrType
public boolean isLegalAttrType()
-
isCompound
public boolean isCompound()
-
getSize
public int getSize()
-
vector
public Object vector(int n)
-
-