Example usage for java.lang String concat

List of usage examples for java.lang String concat

Introduction

In this page you can find the example usage for java.lang String concat.

Prototype

public String concat(String str) 

Source Link

Document

Concatenates the specified string to the end of this string.

Usage

From source file:com.interacciones.mxcashmarketdata.mama.queue.SendMessageToMama.java

private void msgK(Parser message) {
    if (_pubNormal) {
        mamaMsg.clear();//from   w  w w  .  jav  a  2s  .  c o m
        String emisora = message.Emisora().trim();
        mamaMsg.addString("PublisherTopic", 10002, emisora.concat(message.Serie().concat(message.TypeValue())));
        mamaMsg.addString("QouteTimestamp", 10004, format.format(new Date()));

        publisher = listPublisher.get(_topicNormal);
        publisher.send(mamaMsg);
    }
    if (_pubSetrib) {
        mamaMsgSetrib.clear();
        mamaMsgSetrib.addString("MessageNo", 10001, message.getCompleteMsg());

        publisher = listPublisher.get(_topicSetrib);
        publisher.send(mamaMsgSetrib);
    }
}

From source file:com.interacciones.mxcashmarketdata.mama.queue.SendMessageToMama.java

private void msgX(Parser message) {
    if (_pubNormal) {
        mamaMsg.clear();// ww w.j  ava2 s  .  c  o m
        String emisora = message.Emisora().trim();
        mamaMsg.addString("PublisherTopic", 10002, emisora.concat(message.Serie().concat(message.TypeValue())));
        mamaMsg.addString("QouteTimestamp", 10004, format.format(new Date()));

        publisher = listPublisher.get(_topicNormal);
        publisher.send(mamaMsg);
    }
    if (_pubSetrib) {
        mamaMsgSetrib.clear();
        mamaMsgSetrib.addString("MessageNo", 10001, message.getCompleteMsg());

        publisher = listPublisher.get(_topicSetrib);
        publisher.send(mamaMsgSetrib);
    }
}

From source file:com.uma.diariosur.rellenarformulario.RellenarFormulario.java

public boolean save() throws IOException {

    boolean res = true;

    if (img.getFileName().isEmpty()) {
        res = false;// w  w  w  . java2 s .  c o  m
    } else {
        String ext = sacar_ext(img.getFileName());
        String aux2 = this.nombre.concat(".");
        String filename = aux2.concat(ext);
        img_aux = filename;
        InputStream input = img.getInputstream();

        String path = FacesContext.getCurrentInstance().getExternalContext().getRealPath("/");
        String path_aux = path.substring(0, path.lastIndexOf("build"));

        OutputStream output = new FileOutputStream(new File(path_aux.concat("web//resources"), filename));
        aux_ext = ext;

        try {
            IOUtils.copy(input, output);
        } finally {
            IOUtils.closeQuietly(input);
            IOUtils.closeQuietly(output);
        }
    }

    return res;
}

From source file:jeplus.JEPlusProject.java

/**
 * Read the project from the given JSON file. 
 * @param file The File object associated with the file
 * @return a new project instance from the file
 * @throws java.io.IOException//from  w  ww  . java  2  s .c  o m
 */
public static JEPlusProject loadFromJSON(File file) throws IOException {
    // Read JSON
    ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
    JEPlusProject project = mapper.readValue(file, JEPlusProject.class);
    // Set base dir
    String dir = file.getAbsoluteFile().getParent();
    dir = dir.concat(dir.endsWith(File.separator) ? "" : File.separator);
    // project.updateBaseDir(dir);
    project.setBaseDir(dir);
    // If parameter file is given, use the contents to override the parameters in the project
    if (project.ParamFile != null) {
        // Load parameters from text file, to replace the existing Parameters list and tree
        project.importParameterTableFile(new File(RelativeDirUtil.checkAbsolutePath(project.ParamFile, dir)));
    } else {
        // Reassign reference to project in all parameters, and build param tree
        if (project.getParameters() != null) {
            for (ParameterItem item : project.getParameters()) {
                item.setProject(project);
            }
            project.addParameterListAsBranch(null, project.getParameters());
        }
    }
    // If external RVX file is specified, use its contents for Rvx object
    if (project.RvxFile != null) {
        try {
            project.Rvx = RVX.getRVX(RelativeDirUtil.checkAbsolutePath(project.RvxFile, dir));
        } catch (IOException ioe) {
            logger.error("Cannot read the given RVX file", ioe);
        }
    }
    project.ContentChanged = false;
    // Return
    return project;
}

From source file:com.interacciones.mxcashmarketdata.mama.queue.SendMessageToMama.java

private void msgY(Parser message) {

    if (_pubNormal) {
        mamaMsg.clear();//from   ww  w.  ja  v a2  s  .  c o  m
        String emisora = message.Emisora().trim();
        mamaMsg.addString("PublisherTopic", 10002, emisora.concat(message.Serie().concat(message.TypeValue())));
        mamaMsg.addString("QouteTimestamp", 10004, format.format(new Date()));

        publisher = listPublisher.get(_topicNormal);
        publisher.send(mamaMsg);
    }
    if (_pubSetrib) {
        mamaMsgSetrib.clear();
        mamaMsgSetrib.addString("MessageNo", 10001, message.getCompleteMsg());

        publisher = listPublisher.get(_topicSetrib);
        publisher.send(mamaMsgSetrib);
    }
}

From source file:fr.natoine.model_annotation.Annotation.java

public String toHTMLMax() {
    String _html = super.toHTMLMax();
    _html = _html.concat(
            "Status : <span class=status title=" + status.getComment() + ">" + status.getLabel() + "</span>");
    return _html;
}

From source file:no.dusken.common.plugin.control.admin.PluginStoreController.java

@RequestMapping("/pluginStore.do")
public ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
        throws Exception {
    Map<String, Object> map = new HashMap<String, Object>();
    if (isFormSubmission(request)) {
        // A map containing messages in the form pluginUid.setting -> value for each setting that is changed.
        Map<String, String> updateMsgMap = new HashMap<String, String>();
        //Check if settings has changed and store the ones that has.
        for (PluginManager<DuskenPlugin> pluginManager : pluginManagers) {
            for (DuskenPlugin plugin : pluginManager.getPlugins()) {
                PluginStore store = pluginStoreProvider.getStore(plugin);
                Set<String> settings = store.getStrings();
                for (String setting : settings) {
                    String settingKey = plugin.getPluginUid().concat("-").concat(setting);
                    String currentValue = ServletRequestUtils.getStringParameter(request, settingKey, null);
                    String oldValue = store.getString(setting, null);
                    if (currentValue != null && oldValue != null && !currentValue.equals(oldValue)) {
                        store.setString(setting, currentValue);
                        updateMsgMap.put(settingKey, oldValue.concat("->").concat(currentValue));
                    }/* w w w. j  av  a2 s  . co m*/
                }
            }
        }
        map.put("updatemap", updateMsgMap);
    }

    Map<DuskenPlugin, Map<String, String>> plugins = new HashMap<DuskenPlugin, Map<String, String>>();
    for (PluginManager<DuskenPlugin> pluginManager : pluginManagers) {
        for (DuskenPlugin plugin : pluginManager.getPlugins()) {
            PluginStore store = pluginStoreProvider.getStore(plugin);
            plugins.put(plugin, getKeyValueMap(store));
        }
    }
    map.put("plugins", plugins);
    map.put("locale", Locale.getDefault());
    return new ModelAndView(view, map);
}

From source file:com.interacciones.mxcashmarketdata.mama.queue.SendMessageToMama.java

private void msg2(Parser message) {
    if (_pubNormal) {
        int i = 11111;
        int i2 = 22222;
        mamaMsg.clear();// w  w w.j a  v a 2 s  .c o  m
        String emisora = message.Emisora().trim();
        mamaMsg.addString("PublisherTopic", 10002, emisora.concat(message.Serie().concat(message.TypeValue())));
        mamaMsg.addString("QouteTimestamp", 10004, format.format(new Date()));
        //TAG de prueba
        mamaMsg.addString("Tag de prueba(askprice-string) ", i, Double.toString(message.AskPrice()));
        mamaMsg.addF64("Tag de prueba (askprice-F64) ", i2, message.AskPrice());

        publisher = listPublisher.get(_topicNormal);
        publisher.send(mamaMsg);
    }
    if (_pubSetrib) {
        mamaMsgSetrib.clear();
        mamaMsgSetrib.addString("MessageNo", 10001, message.getCompleteMsg());

        publisher = listPublisher.get(_topicSetrib);
        publisher.send(mamaMsgSetrib);
    }
}

From source file:jeplus.JEPlusProject.java

/**
 * Read a project from an XML file. The members of this project are not updated.
 * @param fn The File object associated with the file
 * @return a new project instance from the file
 *///from   www.  jav a  2  s . com
public static JEPlusProject loadAsXML(File fn) {
    JEPlusProject proj;
    try (XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream(fn)))) {
        proj = ((JEPlusProject) decoder.readObject());
    } catch (Exception ex) {
        logger.error("Error loading project from file " + fn, ex);
        return null;
    }
    String dir = fn.getAbsoluteFile().getParent();
    dir = dir.concat(dir.endsWith(File.separator) ? "" : File.separator);
    // proj.updateBaseDir(dir);
    proj.setBaseDir(dir);
    if (proj.ParamFile != null) {
        // Load parameters from text file
        proj.importParameterTableFile(new File(RelativeDirUtil.checkAbsolutePath(proj.ParamFile, dir)));
    } else {
        // Reassign reference to project in all parameters
        if (proj.getParamTree() != null) {
            Enumeration params = proj.getParamTree().breadthFirstEnumeration();
            while (params.hasMoreElements()) {
                ((ParameterItem) ((DefaultMutableTreeNode) params.nextElement()).getUserObject())
                        .setProject(proj);
            }
        }
    }
    // Assign the first branch to the Parameters list
    DefaultMutableTreeNode thisleaf = proj.getParamTree().getFirstLeaf();
    Object[] path = thisleaf.getUserObjectPath();
    proj.setParameters(new ArrayList<ParameterItem>());
    for (Object item : path) {
        proj.getParameters().add((ParameterItem) item);
    }
    // Load Rvx if a RVX file is available
    try {
        proj.Rvx = RVX.getRVX(proj.resolveRVIDir() + proj.getRVIFile());
    } catch (IOException ioe) {
        logger.error("Cannot read the project's RVX file", ioe);
    }

    // done            
    return proj;
}

From source file:es.juntadeandalucia.panelGestion.negocio.utiles.Geoserver.java

public String getWMSUrl(String workspace) {
    String wmsUrl = geoserverAUX.getGeoserverUrl().concat("/");
    if (!StringUtils.isEmpty(workspace)) {
        wmsUrl = wmsUrl.concat(workspace).concat("/");
    }//from w w w.  j av  a2  s .co m
    wmsUrl = wmsUrl.concat("wms?");

    return wmsUrl;
}