protected boolean
    isWholeCompound(DapStructure dstruct)
    {
        int processed = 0;
        List<DapVariable> fields = dstruct.getFields();
        for(DapVariable field : fields) {
            // not contractable if this field has non-original dimensions
            Segment seg = findSegment(field);
            if(seg == null)
                break; // this compound is not whole
            List<Slice> slices = seg.slices;
            if(slices != null) {
                for(Slice slice : slices) {
                    if(slice.isConstrained())
                        break;
                }
            }
            DapType base = field.getBaseType();
            if(base.getTypeSort().isCompound()) {
                if(!isWholeCompound((DapStructure) base))
                    break; // this compound is not whole

            }
            processed++;
        }
        return (processed == fields.size());
    }
protected boolean
    isWholeCompound(DapStructure dstruct)
    {
        int processed = 0;
        List<DapVariable> fields = dstruct.getFields();
        for(DapVariable field : fields) {
            
            Segment seg = findSegment(field);
            if(seg == null)
                break; 
            List<Slice> slices = seg.slices;
            if(slices != null) {
                for(Slice slice : slices) {
                    if(slice.isConstrained())
                        break;
                }
            }
            DapType base = field.getBaseType();
            if(base.getTypeSort().isCompound()) {
                if(!isWholeCompound((DapStructure) base))
                    break; 

            }
            processed++;
        }
        return (processed == fields.size());
    }
protected boolean isWholeCompound ( DapStructure dstruct ) { int processed = 0 ; List < DapVariable > fields = dstruct . getFields ( ) ; for ( DapVariable field : fields ) { // not contractable if this field has non-original dimensions Segment seg = findSegment ( field ) ; if ( seg == null ) break ; // this compound is not whole List < Slice > slices = seg . slices ; if ( slices != null ) { for ( Slice slice : slices ) { if ( slice . isConstrained ( ) ) break ; } } DapType base = field . getBaseType ( ) ; if ( base . getTypeSort ( ) . isCompound ( ) ) { if ( ! isWholeCompound ( ( DapStructure ) base ) ) break ; // this compound is not whole } processed ++ ; } return ( processed == fields . size ( ) ) ; }
See if a structure is "whole", which
means that none of its fields is missing from the
constraint, all of fields use default (non-constrained)
dimension), and all of its fields are also whole.
This must be done recursively.

@param dstruct to test
@return true if this structure is whole.
See if a structure is whole which means that none of its fields is missing from the constraint all of fields use default ( non - constrained ) dimension ) and all of its fields are also whole . This must be done recursively .