Changeset 5761 for cats


Ignore:
Timestamp:
10/30/14 14:00:44 (10 years ago)
Author:
Menzo Windhouwer
Message:

M mod-ISOcat-manage-system/manage/dump.acc

  • dump more representations of a DC

M mod-ISOcat-interface-rest/representations/dcs2/openskos.xsl

  • added openskos:skosCollection and openskos:status
Location:
cats/ISOcat/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/openskos.xsl

    r5650 r5761  
    1717  along with ISOcat. If not, see <http://www.gnu.org/licenses/>.
    1818-->
    19 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:dcif="http://www.isocat.org/ns/dcif" xmlns:dcr="http://www.isocat.org/ns/dcr.rdf#" xmlns:isocat="http://www.isocat.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 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/" exclude-result-prefixes="dcif isocat">
     19<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:dcif="http://www.isocat.org/ns/dcif" xmlns:dcr="http://www.isocat.org/ns/dcr.rdf#" xmlns:isocat="http://www.isocat.org/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 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:openskos="https://openskos.meertens.knaw.nl" exclude-result-prefixes="dcif isocat">
    2020    <xsl:output method="xml" encoding="utf-8"/>
    2121    <xsl:param name="base"/>
    2222    <xsl:param name="props"/>
     23        <xsl:param name="recommenders" select="('CLARIN-NL/VL')"/>
    2324    <xsl:template match="text()"/>
    2425    <xsl:template match="dcif:dataCategorySelection">
     
    2728                <xsl:attribute name="xml:base" select="concat($base,'#')"/>
    2829            </xsl:if>
     30                <openskos:skosCollection rdf:about="tmp:S-{replace(@owner,'\s','')}-{replace(@name,'\s','')}">
     31                        <dc:title>
     32                                <xsl:value-of select="@name"/>
     33                        </dc:title>
     34                        <xsl:for-each select="dcif:dataCategory">
     35                                <openskos:member rdf:resource="tmp:C-{substring-after(@pid,'DC-')}"/>
     36                        </xsl:for-each>
     37                </openskos:skosCollection>
    2938            <xsl:for-each select="distinct-values(//dcif:profile)">
    3039                <skos:ConceptScheme rdf:about="tmp:P-{replace(.,'\s','')}">
     
    4049        <xsl:variable name="name" select="@isocat:name"/>
    4150        <xsl:variable name="concept">
    42             <skos:Concept rdf:about="{concat('tmp:C-',substring-after(@pid,'DC-'))}">
    43                 <!-- for now keep also dcr:datcat -->
    44                 <dcr:datcat>
    45                     <xsl:value-of select="@pid"/>
    46                 </dcr:datcat>
     51                <skos:Concept rdf:about="tmp:C-{substring-after(@pid,'DC-')}">
     52                        <xsl:if test="isocat:recommendedBy=$recommenders">
     53                                <openskos:status>approved</openskos:status>
     54                        </xsl:if>
    4755                <!-- changeNote ok to satisfy the CC-BY license -->
    4856                <skos:changeNote>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/manage/dump.acc

    r5650 r5761  
    9292                <idoc>{
    9393                    for $id in $dcs//row/id return
    94                     <instr>
    95                         <type>copy</type>
    96                         <operand>ffcpl:/isocat/rest/dc/{string($id)}.dcif+method@data:text/plain,GET</operand>
    97                         <target>file://{string($dir)}/datcat/DC-{string($id)}.dcif</target>
    98                     </instr>
     94                        for $ext in ('.dcif','.html','.rdf') return
     95                            <instr>
     96                                <type>copy</type>
     97                                <operand>ffcpl:/isocat/rest/dc/{string($id)}{$ext}+method@data:text/plain,GET</operand>
     98                                <target>file://{string($dir)}/datcat/DC-{string($id)}{$ext}</target>
     99                            </instr>
    99100                }</idoc>
    100101            </operator>
Note: See TracChangeset for help on using the changeset viewer.