<commit_before><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>
    <title>ADMIRAL: Display dataset information</title>

    <!-- TODO: move to separate CSS file -->
    <style>
    td {
        background-color: #FFE;
    }
    </style>

    <!-- Import jQuery framework -->
    <script type="text/javascript" src="../../jQuery/js/jquery-1.4.2.js"></script> 

    <!-- Import jQuery additional libraries -->
    <script type="text/javascript" src="../../jQuery/jquery.json-2.2.js"></script> 

    <!-- Import treeview plugin -->
    <link rel="stylesheet" href="../../jQuery/jquery-treeview/jquery.treeview.css" type="text/css" />
    <script type="text/javascript" src="../../jQuery/jquery-treeview/jquery.treeview.js"></script>
    
    <!-- import rdfquery libraries -->
    <script type="text/javascript" src="../../rdfquery/jquery.uri.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.xmlns.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.curie.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.datatype.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdfa.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.datatype.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.js"></script>
    <script type="<div>
     <span><a href="/"><img alt="site_logo" src="../../images/ADMIRALogo96x96.png" border="0"/></a></span>
</div>text/javascript" src="../../rdfquery/jquery.rdf.json.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.xml.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.turtle.js"></script>
<!--
    <script src="../../../rdfquery/jquery.rules.js" type="text/javascript"></script>   
    <script src="../../../rdfquery/jquery.rules.rdfs.js" type="text/javascript"></script>  
-->
 
    <!-- Import MochiKit modules: require MochiKit library functions to be fully qualified -->
    <script type="text/javascript">MochiKit = {__export__: false};</script>
    <script type="text/javascript" src="../../MochiKit/Base.js"></script>
    <script type="text/javascript" src="../../MochiKit/Iter.js"></script>
    <script type="text/javascript" src="../../MochiKit/Logging.js"></script>

    <!-- Import Admiral functions -->
    <script type="text/javascript" src="../../Admiral/admiral-base.js"></script>
    <script type="text/javascript" src="../../Admiral/Error.js"></script>
    <script type="text/javascript" src="../../Admiral/AsyncComputation.js"></script>

    <!-- Import dataset information display code -->
    <script type="text/javascript" src="../DatasetTree.js"></script>
    <link rel="stylesheet" href="../css/DisplayDataset.css" type="text/css" />
    <script type="text/javascript" src="../DisplayDatasetStatus.js"></script>
    <script type="text/javascript" src="../DisplayDatasetManifest.js"></script>

    <script>
    // Use jQuery via jQuery(...)
      jQuery.noConflict();
    </script>

    <!-- Execute the code -->
    <script>
    jQuery(document).ready( function () 
    {
        url = document.URL;
        dirUrl      =   url.split("#");
        dir         =   dirUrl[0].split("=")[1];
        reviseURL   =  "../../SubmitDatasetUI/html/SubmitDatasetDetails.html?dir="+dir
        jQuery("#revise").attr('href', reviseURL);      

        log.debug(admiral.objectString(window.location));
        var datasetName = window.location.hash;
        if( datasetName.length <= 1)
        {
             jQuery("#pageLoadStatus").text('No dataset name specified');
             jQuery("#pageLoadStatus").addClass('error');
        }
        else
        {
            datasetName = datasetName.slice(1);     // Remove '#'
            var dataSet = "/admiral-test/datasets/"+datasetName;
            var unpackedLink = "/admiral-test/datasets/"+datasetName;
            var packedLink = "/admiral-test/datasets/"+datasetName+"-packed";
            jQuery("#unpackedLink").attr('href', unpackedLink);  
            jQuery("#packedLink").attr('href', packedLink);  
            jQuery("#datasetPackedName").text(datasetName+"-packed");  
            jQuery("#datasetUnpackedName").text(datasetName);          

            var m = new admiral.AsyncComputation();
            m.eval(function (val, callback)
            {
               admiral.displayDatasetStatus(dataSet, callback);
            });
            m.eval(function (val, callback)
            {
               admiral.displayDatasetManifest(dataSet, datasetName, callback);
            });
            m.exec(null, admiral.noop);
        }
        
    });
  </script>  

</head>

<body>
    <div>
        <span><a href="/"><img alt="site_logo" src="../../images/ADMIRALogo96x96.png" border="0"/></a></span>
    </div>
   <h1>Dataset Identifier : <a id="datasetLink" href="dummy"><span id="datasetName">...</span></a></h1>
   <div class="dataset">
     <div id="pageLoadStatus"></div>
     <table name="submissionStatus" id = "submissionStatus" >
        <!--<tr><td>Submission identifier</td><td id="submissionIdentifier">...</td></tr> -->
        <tr><td>Title</td><td id="title">...</td></tr>
        <tr><td>Description</td><td id="description">...</td></tr>
        <tr><td>Submitted by</td><td id="createdBy">...</td></tr>
        <tr><td>Submitted on</td><td><span id="lastModified">yyyy-mm-dd</span> (version <span id="currentVersion">nn</span>)</td></tr>
        <tr><td>Status</td>
            <td><span id="embargoed">Embargoed until <span id="embargoExpiryDate">(embargoed)</span></span>
                <span id="published">Published</span>
            </td>
        </tr><commit_msg>Work in progress - Fixup dataset submisison tool display to fetch values from manifest rdf.<commit_after><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>
    <title>ADMIRAL: Display dataset information</title>

    <!-- TODO: move to separate CSS file -->
    <style>
    td {
        background-color: #FFE;
    }
    </style>

    <!-- Import jQuery framework -->
    <script type="text/javascript" src="../../jQuery/js/jquery-1.4.2.js"></script> 

    <!-- Import jQuery additional libraries -->
    <script type="text/javascript" src="../../jQuery/jquery.json-2.2.js"></script> 

    <!-- Import treeview plugin -->
    <link rel="stylesheet" href="../../jQuery/jquery-treeview/jquery.treeview.css" type="text/css" />
    <script type="text/javascript" src="../../jQuery/jquery-treeview/jquery.treeview.js"></script>
    
    <!-- import rdfquery libraries -->
    <script type="text/javascript" src="../../rdfquery/jquery.uri.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.xmlns.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.curie.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.datatype.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdfa.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.datatype.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.js"></script>
    <script type="<div>
     <span><a href="/"><img alt="site_logo" src="../../images/ADMIRALogo96x96.png" border="0"/></a></span>
</div>text/javascript" src="../../rdfquery/jquery.rdf.json.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.xml.js"></script>
    <script type="text/javascript" src="../../rdfquery/jquery.rdf.turtle.js"></script>
<!--
    <script src="../../../rdfquery/jquery.rules.js" type="text/javascript"></script>   
    <script src="../../../rdfquery/jquery.rules.rdfs.js" type="text/javascript"></script>  
-->
 
    <!-- Import MochiKit modules: require MochiKit library functions to be fully qualified -->
    <script type="text/javascript">MochiKit = {__export__: false};</script>
    <script type="text/javascript" src="../../MochiKit/Base.js"></script>
    <script type="text/javascript" src="../../MochiKit/Iter.js"></script>
    <script type="text/javascript" src="../../MochiKit/Logging.js"></script>

    <!-- Import Admiral functions -->
    <script type="text/javascript" src="../../Admiral/admiral-base.js"></script>
    <script type="text/javascript" src="../../Admiral/Error.js"></script>
    <script type="text/javascript" src="../../Admiral/AsyncComputation.js"></script>

    <!-- Import dataset information display code -->
    <script type="text/javascript" src="../DatasetTree.js"></script>
    <link rel="stylesheet" href="../css/DisplayDataset.css" type="text/css" />
    <script type="text/javascript" src="../DisplayDatasetStatus.js"></script>
    <script type="text/javascript" src="../DisplayDatasetManifest.js"></script>

    <script>
    // Use jQuery via jQuery(...)
      jQuery.noConflict();
    </script>

    <!-- Execute the code -->
    <script>
    jQuery(document).ready( function () 
    {
        url = document.URL;
        dirUrl      =   url.split("#");
        dir         =   dirUrl[0].split("=")[1];
        reviseURL   =  "../../SubmitDatasetUI/html/SubmitDatasetDetails.html?dir="+dir
        jQuery("#revise").attr('href', reviseURL);      

        log.debug(admiral.objectString(window.location));
        var datasetName = window.location.hash;
        if( datasetName.length <= 1)
        {
             jQuery("#pageLoadStatus").text('No dataset name specified');
             jQuery("#pageLoadStatus").addClass('error');
        }
        else
        {
            datasetName = datasetName.slice(1);     // Remove '#'
            var dataSet = "/admiral-test/datasets/"+datasetName;
            var unpackedLink = "/admiral-test/datasets/"+datasetName;
            var packedLink = "/admiral-test/datasets/"+datasetName+"-packed";
            jQuery("#unpackedLink").attr('href', unpackedLink);  
            jQuery("#packedLink").attr('href', packedLink);  
            jQuery("#datasetPackedName").text(datasetName+"-packed");  
            jQuery("#datasetUnpackedName").text(datasetName);          

            var m = new admiral.AsyncComputation();
            
            // m.eval(function (val, callback)
            // {
            //    admiral.displayDatasetStatus(dataSet, callback);
            // });
            
            m.eval(function (val, callback)
            {
               admiral.displayDatasetManifest(dataSet, datasetName, callback);
            });
            m.exec(null, admiral.noop);
        }
        
    });
  </script>  

</head>

<body>
    <div>
        <span><a href="/"><img alt="site_logo" src="../../images/ADMIRALogo96x96.png" border="0"/></a></span>
    </div>
   <h1>Dataset Identifier : <a id="datasetLink" href="dummy"><span id="datasetName">...</span></a></h1>
   <div class="dataset">
     <div id="pageLoadStatus"></div>
     <table name="submissionStatus" id = "submissionStatus" >
        <!--<tr><td>Submission identifier</td><td id="submissionIdentifier">...</td></tr> -->
        <tr><td>Title</td><td id="title">...</td></tr>
        <tr><td>Description</td><td id="description">...</td></tr>
        <tr><td>Submitted by</td><td id="createdBy">...</td></tr>
        <tr><td>Submitted on</td><td><span id="lastModified">yyyy-mm-dd</span> (version <span id="currentVersion">nn</span>)</td></tr>
        <tr><td>Status</td>
            <td><span id="embargoed">Embargoed until <span id="embargoExpiryDate">(embargoed)</span></span>
                <span id="published">Published</span>
            </td>
        </tr>
{'fraction_non_alphanumeric': 0.2112794612794613, 'fraction_numerical': 0.004545454545454545, 'mean_word_length': 2.661325115562404, 'pattern_counts': {'":': 0, '<': 301, '<?xml version=': 0, '>': 299, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '6428902', 'n_tokens_mistral': 3587, 'n_tokens_neox': 3530, 'n_words': 554}