<commit_before>
<!-- doing it like this makes it amenable to using sparql instead -->

<!-- should change the encoding to charset=ISO-8859-1  -->
<!-- should hard code rather than pass literals as parameter ->

<?xml version="1.0" encoding="windows-1252"?>
<rdf:RDF 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:skos="http://www.w3.org/2004/02/skos/core#" 
xmlns:dc="http://purl.org/dc/elements/1.1/" 
xmlns:dcterms="http://purl.org/dc/terms/" 
xmlns:foaf="http://xmlns.com/foaf/0.1/">

    
<% for @conceptScheme in @conn.exec(
  'select * from _rdf 
    where predicate = $$rdf:type$$ 
    and object = $$skos:ConceptScheme$$ 
    and subject = $1',
    ['http://vocab.aodn.org.au/def/ClassScheme/parameter1']
  ) %>
<skos:ConceptScheme rdf:about="<%= @conceptScheme['subject'] %>">

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:title$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:title><%= @e['object'] %></dc:title>
  <% end%>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:description$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:description><%= @e['object'] %></dc:description>
  <% end %>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:creator$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:creator>
      <foaf:Organisation>
        <foaf:name><%= @e['object'] %></foaf:name>
      <foaf:/Organisation>
    </dc:creator>
  <% end %>

  <!-- element is repeated twice -->
  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:publisher$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:publisher>
      <foaf:Organisation>
        <foaf:name><%= @e['object'] %></foaf:name>
      <foaf:/Organisation>
    </dc:publisher>
  <% end %>

  <dc:rights>Freely Available For Reuse</dc:rights>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dcterms:issued$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
  <dcterms:issued><%= @e['object'] %></dcterms:issued>
  <% end %>

</skos:ConceptScheme>
<% end %>





<% for @topConcept in @conn.exec(
  'select * from _rdf 
    where predicate = $$rdf:type$$ 
    and object = $$skos:TopConcept$$' 
  ) %>
<skos:TopConcept rdf:about="<%= @topConcept['subject'] %>">

    <% for @e in @conn.exec(
      'select * from _rdf where predicate = $$Skos:prefLabel$$ and subject = $1',
      [@topConcept['subject']]  
    ) %>
    <Skos:prefLabel><%= @e['object'] %></Skos:prefLabel>
    <% end %>

    <% for @e in @conn.exec(
      'select * from _rdf where predicate = $$Skos:definition$$ and subject = $1',
      [@topConcept['subject']]  
    ) %>
    <Skos:definition><%= @e['object'] %></Skos:definition>
    <% end %>




</skos:TopConcept>
<% end %>




<commit_msg>update skos<commit_after>
<!-- doing it like this makes it amenable to using sparql instead -->

<!-- should change the encoding to charset=ISO-8859-1  -->
<!-- should hard code rather than pass literals as parameter -->

<!-- an element  dc publisher thats getting repeated twice probably because of the rp person outside join -->



<?xml version="1.0" encoding="windows-1252"?>
<rdf:RDF 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:skos="http://www.w3.org/2004/02/skos/core#" 
xmlns:dc="http://purl.org/dc/elements/1.1/" 
xmlns:dcterms="http://purl.org/dc/terms/" 
xmlns:foaf="http://xmlns.com/foaf/0.1/">

    
<% for @conceptScheme in @conn.exec(
  'select * from _rdf 
    where predicate = $$rdf:type$$ 
    and object = $$skos:ConceptScheme$$ 
    and subject = $$http://vocab.aodn.org.au/def/ClassScheme/parameter1$$'
  ) %>
<skos:ConceptScheme rdf:about="<%= @conceptScheme['subject'] %>">

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:title$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:title><%= @e['object'] %></dc:title>
  <% end%>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:description$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:description><%= @e['object'] %></dc:description>
  <% end %>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:creator$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:creator>
      <foaf:Organisation>
        <foaf:name><%= @e['object'] %></foaf:name>
      <foaf:/Organisation>
    </dc:creator>
  <% end %>

  <!-- element is repeated twice -->
  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dc:publisher$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
    <dc:publisher>
      <foaf:Organisation>
        <foaf:name><%= @e['object'] %></foaf:name>
      <foaf:/Organisation>
    </dc:publisher>
  <% end %>

  <dc:rights>Freely Available For Reuse</dc:rights>

  <% for @e in @conn.exec(
    'select * from _rdf where predicate = $$dcterms:issued$$ and subject = $1',
    [@conceptScheme['subject']]  
  ) %>
  <dcterms:issued><%= @e['object'] %></dcterms:issued>
  <% end %>

</skos:ConceptScheme>
<% end %>





<% for @topConcept in @conn.exec(
  'select * from _rdf 
    where predicate = $$rdf:type$$ 
    and object = $$skos:TopConcept$$' 
  ) %>
<skos:TopConcept rdf:about="<%= @topConcept['subject'] %>">

    <% for @e in @conn.exec(
      'select * from _rdf where predicate = $$Skos:prefLabel$$ and subject = $1',
      [@topConcept['subject']]  
    ) %>
    <Skos:prefLabel><%= @e['object'] %></Skos:prefLabel>
    <% end %>

    <% for @e in @conn.exec(
      'select * from _rdf where predicate = $$Skos:definition$$ and subject = $1',
      [@topConcept['subject']]  
    ) %>
    <Skos:definition><%= @e['object'] %></Skos:definition>
    <% end %>




</skos:TopConcept>
<% end %>





{'fraction_non_alphanumeric': 0.20891938250428815, 'fraction_numerical': 0.013550600343053174, 'mean_word_length': 3.256204379562044, 'pattern_counts': {'":': 0, '<': 126, '<?xml version=': 2, '>': 126, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 14}, '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': '7262297', 'n_tokens_mistral': 2359, 'n_tokens_neox': 2111, 'n_words': 452}