dap4/d4servlet/src/main/java/dap4/servlet/DapSerializer.java
protected void
    writeStructure1(DataCursor instance, SerialWriter dst)
            throws IOException
    {
        assert instance.getScheme() == DataCursor.Scheme.STRUCTURE;
        DapVariable template = (DapVariable) instance.getTemplate();
        assert (this.ce.references(template));
        DapStructure ds = (DapStructure) template.getBaseType();

        List<DapVariable> fields = ds.getFields();
        for(int i = 0; i < fields.size(); i++) {
            DapVariable field = fields.get(i);
            if(!this.ce.references(field)) continue; // not in the view
            DataCursor df = (DataCursor) instance.readField(i);
            writeVariable(df, dst);
        }
    }
protected void
    writeStructure1(DataCursor instance, SerialWriter dst)
            throws IOException
    {
        assert instance.getScheme() == DataCursor.Scheme.STRUCTURE;
        DapVariable template = (DapVariable) instance.getTemplate();
        assert (this.ce.references(template));
        DapStructure ds = (DapStructure) template.getBaseType();

        List<DapVariable> fields = ds.getFields();
        for(int i = 0; i < fields.size(); i++) {
            DapVariable field = fields.get(i);
            if(!this.ce.references(field)) continue; // not in the view
            DataCursor df = (DataCursor) instance.readField(i);
            writeVariable(df, dst);
        }
    }
protected void writeStructure1 ( DataCursor instance , SerialWriter dst ) throws IOException { assert instance . getScheme ( ) == DataCursor . Scheme . STRUCTURE ; DapVariable template = ( DapVariable ) instance . getTemplate ( ) ; assert ( this . ce . references ( template ) ) ; DapStructure ds = ( DapStructure ) template . getBaseType ( ) ; List < DapVariable > fields = ds . getFields ( ) ; for ( int i = 0 ; i < fields . size ( ) ; i ++ ) { DapVariable field = fields . get ( i ) ; if ( ! this . ce . references ( field ) ) continue ; // not in the view DataCursor df = ( DataCursor ) instance . readField ( i ) ; writeVariable ( df , dst ) ; } }
Write out a single structure instance

@param instance
@param dst      - where to write
@throws dap4.core.util.DapException
Write out a single structure instance