dap4/d4servlet/src/main/java/dap4/servlet/DapController.java
void
    setConstraint(DapDataset dmr, CEConstraint ce)
            throws DapException
    {
        if(ce == null) return;
        if(ce.isUniversal()) return;
        DapAttribute a = dmr.findAttribute(DapUtil.CEATTRNAME);
        if(a == null) {
            a = new DapAttribute(DapUtil.CEATTRNAME, DapType.STRING);
            dmr.addAttribute(a);
        }
        String sce = ce.toConstraintString();
        a.setValues(new String[]{sce});
    }
void
    setConstraint(DapDataset dmr, CEConstraint ce)
            throws DapException
    {
        if(ce == null) return;
        if(ce.isUniversal()) return;
        DapAttribute a = dmr.findAttribute(DapUtil.CEATTRNAME);
        if(a == null) {
            a = new DapAttribute(DapUtil.CEATTRNAME, DapType.STRING);
            dmr.addAttribute(a);
        }
        String sce = ce.toConstraintString();
        a.setValues(new String[]{sce});
    }
void setConstraint ( DapDataset dmr , CEConstraint ce ) throws DapException { if ( ce == null ) return ; if ( ce . isUniversal ( ) ) return ; DapAttribute a = dmr . findAttribute ( DapUtil . CEATTRNAME ) ; if ( a == null ) { a = new DapAttribute ( DapUtil . CEATTRNAME , DapType . STRING ) ; dmr . addAttribute ( a ) ; } String sce = ce . toConstraintString ( ) ; a . setValues ( new String [ ] { sce } ) ; }
Set special attribute: constraint : overwrite exiting value

@param dmr dmr to annotate
@param ce  the new constraint
@throws DapException
Set special attribute : constraint : overwrite exiting value