Example usage for java.lang Boolean toString

List of usage examples for java.lang Boolean toString

Introduction

In this page you can find the example usage for java.lang Boolean toString.

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Boolean's value.

Usage

From source file:edu.ku.brc.helpers.XMLHelper.java

public static void xmlAttr(final StringBuilder sb, final String attr, final Boolean val) {
    if (val != null || isEmptyAttrOK) {
        xmlAttr(sb, attr, val.toString());
    }//from   w  w  w.  j a va 2  s.com
}

From source file:com.amalto.workbench.utils.HttpClientUtil.java

public static String invokeModelService(String protocol, String host, String port, String contextPath,
        String username, String password, String modelName, String xsd, boolean isUpdate, Boolean force)
        throws XtentisException {
    try {//from  w  ww.j  av  a2  s  .  c  o  m
        String url = protocol + host + ":" + port + contextPath + "/services/rest/system/models/" + modelName; //$NON-NLS-1$ //$NON-NLS-2$ 
        if (force != null) {
            url += "?force=" + force.toString(); //$NON-NLS-1$
        }
        HttpUriRequest request = null;
        request = createModelRequest(url, username, isUpdate, xsd);
        DefaultHttpClient httpClient = wrapAuthClient(url, username, password);
        String errMessage = Messages.Util_21 + "%s" + Messages.Util_22 + "%s"; //$NON-NLS-1$//$NON-NLS-2$
        String content = getTextContent(httpClient, request, null, errMessage);

        return content;
    } catch (UnsupportedEncodingException e) {
        log.error(e.getMessage(), e);
    } catch (SecurityException e) {
        log.error(e.getMessage(), e);
    }
    return null;
}

From source file:org.trustedanalytics.DemoController.java

@RequestMapping("/test-score")
String scoreTest() {/*  w w w .  ja  va  2  s  . c  om*/
    float[] data = { -0.414141f, -0.0246564f, -0.125f, 0.0140301f, -0.474359f, 0.0256049f, -0.0980392f,
            0.463884f, 0.40836f };
    Boolean res = scoring.score(data);
    return res.toString();
}

From source file:uk.ac.ebi.intact.editor.config.property.BooleanPropertyConverter.java

@Override
public String convertToString(Boolean obj) {
    if (obj == null)
        return null;

    return obj.toString();
}

From source file:com.activiti.web.rest.client.modelinfo.AbstractInfoMapper.java

protected void createPropertyNode(String name, Boolean value) {
    if (value != null) {
        createPropertyNode(name, value.toString());
    }/* w  w  w  .j a v a2 s . co  m*/
}

From source file:com.rodaxsoft.mailgun.ListMemberRequest.java

/**
 * Sets the subscribed boolean value//from   w  ww. j  av a2  s  . com
 * @param subscribed The subscribed boolean value 
 * @return ListMemberRequest object
 */
public ListMemberRequest setSubscribed(Boolean subscribed) {
    parameters.put(SUBSCRIBED_KEY, subscribed.toString());
    return this;
}

From source file:de.dkfz.roddy.client.fxuiclient.RoddyUIController.java

public static void setupTitlePaneExpansionProcessing(TitledPane tp, String id, Boolean defaultValue) {
    tp.setExpanded(Boolean.parseBoolean(Roddy.getApplicationProperty(RunMode.UI, id, defaultValue.toString())));
    tp.expandedProperty().addListener(/*from  ww w.j  a v a  2  s.c  om*/
            (obs, oldV, newV) -> Roddy.setApplicationProperty(RunMode.UI, id, "" + tp.isExpanded()));
}

From source file:org.appverse.web.framework.backend.security.xs.autoconfigure.XssFilterProperties.java

private void addInitParameter(String name, Boolean value) {
    if (value != null) {
        this.initParameters.put(name, value.toString());
    }/*from ww w.j  a va  2  s  .c  om*/
}

From source file:com.clicktravel.infrastructure.persistence.aws.cloudsearch.client.BooleanLiteralSerializer.java

@Override
public void serialize(final Boolean value, final JsonGenerator jgen, final SerializerProvider provider)
        throws IOException, JsonProcessingException {
    jgen.writeString(value.toString());
}

From source file:com._8x8.presentation.restfulController.ZPayRestfulController.java

@RequestMapping(value = "/broadcastMsgByQRCode/{qrCode}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<String> broadcastMsgByQRCode(@PathVariable("qrCode") String qrCode) {

    try {//from ww  w .j  av a 2 s  .  c o  m
        Boolean broadcast = _broadcastService.SendBroadcastMsg("SomeMessage", qrCode);
        return new ResponseEntity<String>(broadcast.toString(), HttpStatus.OK);
    } catch (Exception ex) {
        return new ResponseEntity<String>(HttpStatus.BAD_REQUEST);
    }

}