All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.insee.vtl.prov.utils.ProvenanceUtils Maven / Gradle / Ivy

There is a newer version: 1.7.0
Show newest version
package fr.insee.vtl.prov.utils;

import java.util.Map;
import java.util.UUID;

public class ProvenanceUtils {

    public static String getOrBuildUUID(Map availableUUID, String label) {
        if (null != availableUUID.get(label)) {
            return availableUUID.get(label);
        }
        return UUID.randomUUID().toString();
    }

    //public static List toBusinessModel(ProvenanceListener listener) {
    //    // TODO: @nico te graph needs to be refactored. I'll try to fix it before monday.
    //
    //    ArrayList model = new ArrayList<>();
    //    LinkedHashMap variables = listener.variables;
    //    variables.values().forEach(node -> {
    //        String name = node.name;
    //        Map parents = node.parents;
    //        VTLDataset vtlDataset = new VTLDataset(name);
    //        model.add(vtlDataset);
    //    });
    //    return model;
    //}
    //
    //public static void toJSON(ProvenanceListener.Node node) {
    //
    //}
    //
    //public static void toRDF(ProvenanceListener.Node node) {
    //
    //}
}