Package dap4.core.dmr
Class DapStructure
- java.lang.Object
-
- dap4.core.dmr.DapNode
-
- dap4.core.dmr.DapType
-
- dap4.core.dmr.DapStructure
-
- All Implemented Interfaces:
DapDecl
- Direct Known Subclasses:
DapSequence
public class DapStructure extends DapType
DapStructure is normally used as a singleton type for a variable, but for consistency, we track it as a type rather than a variable and create a separate variable whose basetype points to it. This complicates thigs because in effect a structure type has two parents: 1) the group i which it is declared as a type and 2) the group or structure in which the structure var is declared.
-
-
Field Summary
-
Fields inherited from class dap4.core.dmr.DapType
CHAR, FLOAT32, FLOAT64, INT16, INT32, INT64, INT8, OPAQUE, pseudoroot, SEQUENCE, STRING, STRUCTURE, typesort, UINT16, UINT32, UINT64, UINT8, URL
-
Fields inherited from class dap4.core.dmr.DapNode
annotations, attributes, dataset, escapedname, fqn, index, parent, shortname, sort, xmlattributes
-
-
Constructor Summary
Constructors Constructor Description DapStructure(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addField(DapVariable newfield)
DapVariable
findByName(String shortname)
DapVariable
getField(int i)
List<DapVariable>
getFields()
int
indexByField(DapVariable target)
int
indexByName(String shortname)
boolean
isLeaf()
-
Methods inherited from class dap4.core.dmr.DapType
getAtomicType, getSize, getTypeName, getTypeSort, isAtomic, isCharType, isCompound, isCompoundType, isEnumType, isFixedSize, isFloatType, isIntegerType, isLegalAttrType, isNumericType, isOpaqueType, isSeqType, isStringType, isStructType, isUnsigned, lookup, setTypeSort, vector, vectorget
-
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
-
-
-
-
Constructor Detail
-
DapStructure
public DapStructure(String name)
-
-
Method Detail
-
findByName
public DapVariable findByName(String shortname)
-
indexByName
public int indexByName(String shortname)
-
indexByField
public int indexByField(DapVariable target)
-
getField
public DapVariable getField(int i)
-
getFields
public List<DapVariable> getFields()
-
isLeaf
public boolean isLeaf()
-
addField
public void addField(DapVariable newfield) throws DapException
- Throws:
DapException
-
-