Search in sources :

Example 1 with ImmutableStringData

use of net.sourceforge.processdash.data.ImmutableStringData in project processdash by dtuma.

the class ProcessDashboard method registerEnvironmentalData.

private void registerEnvironmentalData() {
    try {
        Map env = new HashMap();
        String os = InternalSettings.getOSPrefix();
        env.put("OS.TYPE", new ImmutableStringData(os, false, true));
        env.put("OS.IS_" + os.toUpperCase(), ImmutableDoubleData.TRUE);
        if (!os.equals("windows"))
            env.put("OS.IS_UNIX", ImmutableDoubleData.TRUE);
        data.mountPhantomData("//Env", env);
    } catch (InvalidDatafileFormat e) {
        logger.log(Level.WARNING, "Unexpected error", e);
    }
}
Also used : LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) InvalidDatafileFormat(net.sourceforge.processdash.data.repository.InvalidDatafileFormat) Map(java.util.Map) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) ImmutableStringData(net.sourceforge.processdash.data.ImmutableStringData)

Example 2 with ImmutableStringData

use of net.sourceforge.processdash.data.ImmutableStringData in project processdash by dtuma.

the class FindLastExpression method caseTStringLiteral.

public void caseTStringLiteral(TStringLiteral node) {
    String stringVal = interpolateResources(trimDelim(node));
    add(new PushConstant(new ImmutableStringData(stringVal)));
}
Also used : EscapeString(net.sourceforge.processdash.util.EscapeString) ImmutableStringData(net.sourceforge.processdash.data.ImmutableStringData)

Example 3 with ImmutableStringData

use of net.sourceforge.processdash.data.ImmutableStringData in project processdash by dtuma.

the class EVTaskDependency method saveDependencies.

public static void saveDependencies(DataContext data, String taskPath, Collection<EVTaskDependency> dependencies) {
    SimpleData value = null;
    if (dependencies != null && !dependencies.isEmpty()) {
        StringBuffer xml = new StringBuffer();
        xml.append("<list>");
        for (EVTaskDependency d : dependencies) {
            d.getAsXML(xml, false);
        }
        if (xml.length() > 6) {
            xml.append("</list>");
            value = new ImmutableStringData(xml.toString());
        }
    }
    String dataName = DataRepository.createDataName(taskPath, TASK_DEPENDENCIES_DATA_NAME);
    data.putValue(dataName, value);
}
Also used : SimpleData(net.sourceforge.processdash.data.SimpleData) ImmutableStringData(net.sourceforge.processdash.data.ImmutableStringData)

Aggregations

ImmutableStringData (net.sourceforge.processdash.data.ImmutableStringData)3 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 SimpleData (net.sourceforge.processdash.data.SimpleData)1 InvalidDatafileFormat (net.sourceforge.processdash.data.repository.InvalidDatafileFormat)1 EscapeString (net.sourceforge.processdash.util.EscapeString)1