<commit_before>ExporterManager.MenuItems.push({});//add separator
ExporterManager.MenuItems.push(
		{
			"id" : "exportRdfXml",
          	"label":"RDF as RDF/XML",
          	"click": function() { RdfExporterMenuBar.exportRDF("rdf", "rdf");}
		}
);
ExporterManager.MenuItems.push(
		{
			"id" : "exportRdfTurtle",
        	"label":"RDF as Turtle",
        	"click": function() { RdfExporterMenuBar.exportRDF("Turtle", "ttl"); }
		}
);

RdfExporterMenuBar = {};

RdfExporterMenuBar.exportRDF = function(format, ext) {
    if (!theProject.overlayModels.rdfSchema) {
        alert(
            "You haven't done any RDF schema alignment yet!"
        );
    } else {
        RdfExporterMenuBar.rdfExportRows(format, ext);
    }
};

RdfExporterMenuBar.rdfExportRows = function(format, ext) {
    var name = $.trim(theProject.metadata.name.replace(/\W/g, ' ')).replace(/\s+/g, '-');
    var form = document.createElement("form");
    $(form)
        .css("display", "none")
        .attr("method", "post")
        .attr("action", "command/core/export-rows/" + name + "." + ext)
        .attr("target", "gridworks-export");

    $('<input />')
        .attr("name", "engine")
        .attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
        .appendTo(form);
    $('<input />')
        .attr("name", "project")
        .attr("value", theProject.id)
        .appendTo(form);
    $('<input />')
        .attr("name", "format")
        .attr("value", format)
        .appendTo(form);

    document.body.appendChild(form);

    window.open("about:blank", "gridworks-export");
    form.submit();

    document.body.removeChild(form);
};

RdfExporterMenuBar.editRdfSchema = function(reset) {
    new RdfSchemaAlignmentDialog(reset ? null : theProject.overlayModels.rdfSchema);
};

var RdfReconciliationManager = {};

RdfReconciliationManager.newSparqlService = function(){
	new ReconciliationSparqlServiceDialog();
};
RdfReconciliationManager.newRdfService = function(){
	new ReconciliationRdfServiceDialog();
};
RdfReconciliationManager.newSindiceService = function(){
	new ReconciliationSindiceServiceDialog();
};
RdfReconciliationManager.newStanbolService = function(){
	new ReconciliationStanbolServiceDialog();
};

RdfReconciliationManager.registerService = function(data,level){
	if (data.code === "error"){
		alert('Error:' + data.message)
	}else{
		var url = location.href;  // entire url including querystring - also: window.location.href;
		var baseURL = url.substring(0,url.lastIndexOf('/'));<commit_msg>syntax fixed<commit_after>ExporterManager.MenuItems.push({});//add separator
ExporterManager.MenuItems.push(
		{
			"id" : "exportRdfXml",
          	"label":"RDF as RDF/XML",
          	"click": function() { RdfExporterMenuBar.exportRDF("rdf", "rdf");}
		}
);
ExporterManager.MenuItems.push(
		{
			"id" : "exportRdfTurtle",
        	"label":"RDF as Turtle",
        	"click": function() { RdfExporterMenuBar.exportRDF("Turtle", "ttl"); }
		}
);

RdfExporterMenuBar = {};

RdfExporterMenuBar.exportRDF = function(format, ext) {
    if (!theProject.overlayModels.rdfSchema) {
        alert(
            "You haven't done any RDF schema alignment yet!"
        );
    } else {
        RdfExporterMenuBar.rdfExportRows(format, ext);
    }
};

RdfExporterMenuBar.rdfExportRows = function(format, ext) {
    var name = $.trim(theProject.metadata.name.replace(/\W/g, ' ')).replace(/\s+/g, '-');
    var form = document.createElement("form");
    $(form)
        .css("display", "none")
        .attr("method", "post")
        .attr("action", "command/core/export-rows/" + name + "." + ext)
        .attr("target", "gridworks-export");

    $('<input />')
        .attr("name", "engine")
        .attr("value", JSON.stringify(ui.browsingEngine.getJSON()))
        .appendTo(form);
    $('<input />')
        .attr("name", "project")
        .attr("value", theProject.id)
        .appendTo(form);
    $('<input />')
        .attr("name", "format")
        .attr("value", format)
        .appendTo(form);

    document.body.appendChild(form);

    window.open("about:blank", "gridworks-export");
    form.submit();

    document.body.removeChild(form);
};

RdfExporterMenuBar.editRdfSchema = function(reset) {
    new RdfSchemaAlignmentDialog(reset ? null : theProject.overlayModels.rdfSchema);
};

var RdfReconciliationManager = {};

RdfReconciliationManager.newSparqlService = function(){
	new ReconciliationSparqlServiceDialog();
};
RdfReconciliationManager.newRdfService = function(){
	new ReconciliationRdfServiceDialog();
};
RdfReconciliationManager.newSindiceService = function(){
	new ReconciliationSindiceServiceDialog();
};
RdfReconciliationManager.newStanbolService = function(){
	new ReconciliationStanbolServiceDialog();
};

RdfReconciliationManager.registerService = function(data,level){
	if (data.code === "error"){
		alert('Error: ' + data);
	}else{
		var url = location.href;  // entire url including querystring - also: window.location.href;
		var baseURL = url.substring(0,url.lastIndexOf('/'));
{'fraction_non_alphanumeric': 0.1676956781517626, 'fraction_numerical': 0.00039832702648874725, 'mean_word_length': 3.65, 'pattern_counts': {'":': 8, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5270325', 'n_tokens_mistral': 1670, 'n_tokens_neox': 1614, 'n_words': 256}