Changeset 5650 for cats


Ignore:
Timestamp:
09/18/14 09:49:26 (10 years ago)
Author:
Menzo Windhouwer
Message:

M mod-ISOcat-access-data/access/dc_status.acc

  • added parmeter for the successor when the status of a DC is set to superseded
  • set the next field when the DC is superseded

M mod-ISOcat-access-data/access/group_recommendation.acc
M mod-ISOcat-access-data/access/recommenders.acc

  • manage the golden thread for recommenders

M mod-ISOcat-access-system/config/set.acc
A + mod-ISOcat-access-system/config/site-throttle.acc
M mod-ISOcat-access-system/etc/ISOcatConfig.xml
M mod-ISOcat-access-system/module.xml

  • added a throttle to limit the number of concurrent accesses to the site

NOTE: attempt to limit the burden of spam requests which only lead to 404 or 500
NOTE: better recognize the spam requests on the apache level, so they ever reach NK

M mod-ISOcat-interface-rest/etc/XRLLinks.xml
M mod-ISOcat-interface-rest/module.xml

  • handle the representation for PID URLs explicitly

M mod-ISOcat-interface-rest/representations/dcs2/handle.acc
M mod-ISOcat-interface-rest/representations/dcs2/representations.xml
A + mod-ISOcat-interface-rest/representations/dcs2/openskos.xsl

  • added OpenSKOS export format

M mod-ISOcat-manage-access/manage/dc.acc

  • debug info

M mod-ISOcat-manage-system/module.xml
M mod-ISOcat-manage-system/manage/links.xml
A mod-ISOcat-manage-system/manage/dump.acc
M mod-ISOcat-manage-system/manage/dc-status.acc
M mod-ISOcat-manage-system/entrypoints.xml
M mod-ISOcat-manage-system/plugin/dc-status.xhtml
M mod-ISOcat-manage-system/plugin/configure.xsl
M mod-ISOcat-manage-system/plugin/plugin.xml

  • added dump action
  • dc-status can now also handle the superseded status

A mod-ISOcat-site/site/2013-SR/meeting/documents
AM mod-ISOcat-site/site/2013-SR/meeting/documents/ISOcat-and-users-v1.doc
AM mod-ISOcat-site/site/2013-SR/meeting/documents/CLARIN-SemanticRegistry?-Requirements.pdf
AM mod-ISOcat-site/site/2013-SR/meeting/documents/DCR Data Items to Retain or remove in a revised DCR_12-04-2013.docx
A mod-ISOcat-site/site/2013-SR/meeting/presentations
AM mod-ISOcat-site/site/2013-SR/meeting/presentations/CLARIN-SemanticRegistries?-Requirements.pptx
AM mod-ISOcat-site/site/2013-SR/meeting/presentations/ISOcat_TC37Suggestions.pptx
AM mod-ISOcat-site/site/2013-SR/meeting/presentations/TLA-ISOcatRequirements.pptx

  • added documents and presentation for the ISOcat meeting
Location:
cats/ISOcat/trunk
Files:
9 added
18 edited
2 copied

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-access-data/access/dc_status.acc

    r2686 r5650  
    2424                </source>
    2525        </param>
    26         <param>
     26    <param>
     27        <name>next</name>
     28        <descr>the next DC (when registration status is set to superseded)</descr>
     29        <type canonical="true">string</type>
     30        <source>
     31            <param/>
     32            <default>
     33                <string/>
     34            </default>
     35        </source>
     36    </param>
     37    <param>
    2738                <name>administration</name>
    2839                <descr>the new administration status (explicit)</descr>
     
    192203                                                        <xsl:param name="user"/>
    193204                                                        <xsl:param name="message"/>
     205                                                    <xsl:param name="next"/>
    194206                                                        <xsl:template match="/status">
    195207                                                                <xsl:message>INF: <xsl:value-of select="current-dateTime()"/>:DC[<xsl:value-of select="@dc"/>] administration[<xsl:value-of select="administration"/>] registration[<xsl:value-of select="registration"/>] user[<xsl:value-of select="$user"/>] comment[<xsl:value-of select="$message"/>]</xsl:message>
     
    208220                                                                                        registration_status = '<xsl:value-of select="registration"/>'
    209221                                                                                </xsl:if>
    210                                                                                 WHERE
     222                                                                            <xsl:if test="registration='superseded' and normalize-space($next)!=''">
     223                                                                                , next = <xsl:value-of select="$next"/>
     224                                                                            </xsl:if>
     225                                                                            WHERE
    211226                                                                                        core_data_category.id = <xsl:value-of select="@dc"/>
    212227                                                                                ;
     
    260275                                        </operator>
    261276                                        <user>var:user</user>
     277                                    <next>var:next</next>
    262278                                        <message>var:message</message>
    263279                                        <target>var:sql</target>
  • cats/ISOcat/trunk/mod-ISOcat-access-data/access/group_recommendation.acc

    r2686 r5650  
    9494                                        <target>var:void</target>
    9595                                </instr>
    96                                
     96                            <!-- invalidate the recommenders list -->
     97                            <instr>
     98                                <type>sloot.cutGoldenThread</type>
     99                                <param>
     100                                    <string>goldenthread:/recommenders/</string>
     101                                </param>
     102                            </instr>
    97103                        </else>
    98104                </if>
  • cats/ISOcat/trunk/mod-ISOcat-access-data/access/recommenders.acc

    r4642 r5650  
    99                        <target>this:response</target>
    1010                </instr>
     11            <instr>
     12                <type>sloot.attachGoldenThread</type>
     13                <operand>this:response</operand>
     14                <param>
     15                    <string>goldenthread:/recommenders/</string>
     16                </param>
     17                <target>this:response</target>
     18            </instr>
    1119        </idoc>
    1220        <exception>
  • cats/ISOcat/trunk/mod-ISOcat-access-system/config/set.acc

    r4462 r5650  
    4949                                                                </concurrency>
    5050                                                        </database>
     51                                                    <site>
     52                                                        <concurrency>
     53                                                            <xsl:value-of select="site_concurrency"/>
     54                                                        </concurrency>
     55                                                    </site>
    5156                                                        <email>
    5257                                                                <server>
  • cats/ISOcat/trunk/mod-ISOcat-access-system/config/site-throttle.acc

    r2583 r5650  
    11<accessor>
    2         <name>ISOcat.access.system.config.database.throttle</name>
    3         <descr>Get the ISOcat database throttle.</descr>
     2        <name>ISOcat.access.system.config.site.throttle</name>
     3        <descr>Get the ISOcat site throttle.</descr>
    44        <params/>
    55        <idoc>
     
    1515                                        <xsl:variable name="threads">
    1616                                                <xsl:choose>
    17                                                         <xsl:when test="normalize-space(database/concurrency)!=''">
    18                                                                 <xsl:sequence select="number(database/concurrency)"/>
     17                                                        <xsl:when test="normalize-space(site/concurrency)!=''">
     18                                                                <xsl:sequence select="number(site/concurrency)"/>
    1919                                                        </xsl:when>
    2020                                                        <xsl:otherwise>
  • cats/ISOcat/trunk/mod-ISOcat-access-system/etc/ISOcatConfig.xml

    r4462 r5650  
    11<config>
    2         <admin>
    3                 <site>http://localhost:8080/</site>
    4                 <static>http://localhost:8080/</static>
    5                 <email>isocat@example.com</email>
    6                 <pid>http://localhost:8080/</pid>
    7         </admin>
    8         <database>
    9                 <host>localhost</host>
    10                 <port/>
    11                 <name>isocat</name>
    12                 <user>isocat</user>
    13                 <password>isocat</password>
    14                 <pool>10</pool>
    15                 <concurrency>5</concurrency>
    16         </database>
    17         <email>
    18                 <server>mailhost.example.com</server>
    19                 <user/>
    20                 <password/>
    21         </email>
    22         <forum>
    23                 <site/>
    24                 <dir/>
    25                 <user/>
    26                 <password/>
    27         </forum>
    28         <authentication>
    29                 <basic priority="1"/>
    30                 <shibboleth priority="2">
    31                         <!-- leave empty to disable Shibboleth-based authentication
     2    <admin>
     3        <site>http://localhost:8080/</site>
     4        <static>http://localhost:8080/</static>
     5        <email>isocat@example.com</email>
     6        <pid>http://localhost:8080/</pid>
     7    </admin>
     8    <database>
     9        <host>localhost</host>
     10        <port/>
     11        <name>isocat</name>
     12        <user>isocat</user>
     13        <password>isocat</password>
     14        <pool>10</pool>
     15        <concurrency>5</concurrency>
     16    </database>
     17    <site>
     18        <concurrency>5</concurrency>
     19    </site>
     20    <email>
     21        <server>mailhost.example.com</server>
     22        <user/>
     23        <password/>
     24    </email>
     25    <forum>
     26        <site/>
     27        <dir/>
     28        <user/>
     29        <password/>
     30    </forum>
     31    <authentication>
     32        <basic priority="1"/>
     33        <shibboleth priority="2">
     34            <!-- leave empty to disable Shibboleth-based authentication
    3235                                <sso>http://www.example.com/Shibboleth.sso/Login</sso>
    3336                                <slo>http://www.example.com/Shibboleth.sso/Logout</slo>
    3437                                <token/>
    3538                        -->
    36                         <header>oid-eduPersonPrincipalName mace-eduPersonPrincipalName eduPersonPrincipalName oid-eduPersonTargetedID mace-eduPersonTargetedID eduPersonTargetedID</header>
    37                 </shibboleth>
    38         </authentication>
     39            <header>oid-eduPersonPrincipalName mace-eduPersonPrincipalName eduPersonPrincipalName oid-eduPersonTargetedID mace-eduPersonTargetedID eduPersonTargetedID</header>
     40        </shibboleth>
     41    </authentication>
    3942</config>
  • cats/ISOcat/trunk/mod-ISOcat-access-system/module.xml

    r2265 r5650  
    6969            <match>active:ISOcat.access.system.config.database.throttle</match>
    7070            <to>active:sloot.accessor+operand@ffcpl:/config/db-throttle.acc</to>
     71        </rewrite>
     72        <rewrite>
     73            <match>active:ISOcat.access.system.config.site.throttle</match>
     74            <to>active:sloot.accessor+operand@ffcpl:/config/site-throttle.acc</to>
    7175        </rewrite>
    7276        <rewrite>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/etc/XRLLinks.xml

    r4893 r5650  
    433433                <ext>/resolve</ext>
    434434                <int>active:ISOcat.interface.rest.resolve</int>
    435                 <args>method,credentials,pid,param</args>
    436         </link>
    437         <link>
    438                 <ext>/resolve.xml</ext>
    439                 <int>active:ISOcat.interface.rest.resolve+representation@data:text/plain,xml</int>
    440                 <args>method,credentials,pid,param</args>
    441         </link>
    442         <link>
    443                 <ext>/resolve.html</ext>
    444                 <int>active:ISOcat.interface.rest.resolve+representation@data:text/plain,html</int>
    445                 <args>method,credentials,pid,param</args>
    446         </link>
    447         <link>
    448                 <ext>/resolve.dcif</ext>
    449                 <int>active:ISOcat.interface.rest.resolve+representation@data:text/plain,dcif</int>
    450                 <args>method,credentials,pid,param</args>
     435                <args>method,credentials,pid,representation,param</args>
    451436        </link>
    452437
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/module.xml

    r2029 r5650  
    8282                        <to>ffcpl:/rest/resolve/pid/$1</to>
    8383                </rule>
    84                 <!-- encode all special chars -->
     84            <rule>
     85                <match>ffcpl:/rest/resolve/pid/(.*?)\.(.*)</match>
     86                <to>ffcpl:/rest/resolve/pid/$1+representation@data:text/plain,$2</to>
     87            </rule>
     88            <!-- encode all special chars -->
    8589                <rule>
    8690                        <match>ffcpl:([^+]+)(.*)</match>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/handle.acc

    r2612 r5650  
    515515                                                </accessor-trace>
    516516                                        </then>
    517                                         <cond>
     517                                    <cond>
     518                                        <instr>
     519                                            <type>sloot.xpath2eval</type>
     520                                            <operand>var:representation</operand>
     521                                            <operator>
     522                                                <xpath>.='skos'</xpath>
     523                                            </operator>
     524                                            <target>this:cond</target>
     525                                        </instr>
     526                                    </cond>
     527                                    <then>
     528                                        <accessor-trace name="OpenSKOS">
     529                                            <if>
     530                                                <cond>
     531                                                    <instr>
     532                                                        <type>sloot.xpath2eval</type>
     533                                                        <operand>var:id</operand>
     534                                                        <operator>
     535                                                            <xpath>.!='0'</xpath>
     536                                                        </operator>
     537                                                        <target>this:cond</target>
     538                                                    </instr>
     539                                                </cond>
     540                                                <then>
     541                                                    <instr>
     542                                                        <type>sloot.xquery</type>
     543                                                        <operator>
     544                                                            <string>{string($props//site)}rest/{string($tpe)}/{string($dcs)}.skos</string>
     545                                                        </operator>
     546                                                        <props>active:ISOcat.manage.system.properties</props>
     547                                                        <tpe>var:dcs-type</tpe>
     548                                                        <dcs>var:id</dcs>
     549                                                        <target>var:base</target>
     550                                                    </instr>
     551                                                    <accessor-debug>
     552                                                        <instr>
     553                                                            <type>log</type>
     554                                                            <operand>var:base</operand>
     555                                                        </instr>
     556                                                    </accessor-debug>
     557                                                </then>
     558                                                <else>
     559                                                    <instr>
     560                                                        <type>copy</type>
     561                                                        <operand>
     562                                                            <string/>
     563                                                        </operand>
     564                                                        <target>var:base</target>
     565                                                    </instr>
     566                                                </else>
     567                                            </if>
     568                                            <instr>
     569                                                <type>xslt2</type>
     570                                                <operand>var:dcif</operand>
     571                                                <operator>openskos.xsl</operator>
     572                                                <props>active:ISOcat.manage.system.properties</props>
     573                                                <base>var:base</base>
     574                                                <target>this:response</target>
     575                                            </instr>
     576                                            <instr>
     577                                                <type>cast</type>
     578                                                <operand>this:response</operand>
     579                                                <operator>
     580                                                    <cast>
     581                                                        <mimetype>application/rdf+xml</mimetype>
     582                                                    </cast>
     583                                                </operator>
     584                                                <target>this:response</target>
     585                                            </instr>
     586                                        </accessor-trace>
     587                                    </then>
     588                                    <cond>
    518589                                                <instr>
    519590                                                        <type>sloot.xpath2eval</type>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/openskos.xsl

    r3925 r5650  
    1818-->
    1919<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">
    20     <xsl:output method="xml" encoding="utf-8" indent="yes"/>
     20    <xsl:output method="xml" encoding="utf-8"/>
    2121    <xsl:param name="base"/>
    2222    <xsl:param name="props"/>
    23     <xsl:variable name="NL" select="system-property('line.separator')"/>
    24     <xsl:variable name="indent" select="'&#160;&#160;&#160;&#160;'"/>
    2523    <xsl:template match="text()"/>
    26     <xsl:key name="scheme" match="dcif:dataCategory[@type='complex'][dcif:conceptualDomain/@type='closed']" use=".//dcif:value/@pid"/>
    2724    <xsl:template match="dcif:dataCategorySelection">
    2825        <rdf:RDF>
     
    3027                <xsl:attribute name="xml:base" select="concat($base,'#')"/>
    3128            </xsl:if>
     29            <xsl:for-each select="distinct-values(//dcif:profile)">
     30                <skos:ConceptScheme rdf:about="tmp:P-{replace(.,'\s','')}">
     31                    <dc:title>
     32                        <xsl:value-of select="."/>
     33                    </dc:title>
     34                </skos:ConceptScheme>
     35            </xsl:for-each>
    3236            <xsl:apply-templates/>
    3337        </rdf:RDF>
    3438    </xsl:template>
    35     <xsl:template match="dcif:dataCategory[@type='complex'][dcif:conceptualDomain/@type='closed']">
    36         <skos:ConceptScheme>
    37             <xsl:choose>
    38                 <xsl:when test="normalize-space($base)!=''">
    39                     <xsl:attribute name="rdf:ID" select="concat('DC-',substring-after(@pid,'DC-'))"/>
    40                 </xsl:when>
    41                 <xsl:otherwise>
    42                     <xsl:attribute name="rdf:about" select="@pid"/>
    43                 </xsl:otherwise>
    44             </xsl:choose>
    45             <dcr:datcat>
    46                 <xsl:value-of select="@pid"/>
    47             </dcr:datcat>
    48             <dcterms:source>
    49                 <xsl:value-of select="@pid"/>
    50             </dcterms:source>
    51             <dc:title xml:lang="en">
    52                 <xsl:value-of select="@isocat:name"/>
    53             </dc:title>
    54             <xsl:if test="exists(dcif:descriptionSection/dcif:languageSection[dcif:language='en']/dcif:definitionSection/dcif:definition)">
    55                 <dc:description xml:lang="en">
    56                     <xsl:value-of select="(dcif:descriptionSection/dcif:languageSection[dcif:language='en']/dcif:definitionSection/dcif:definition)[1]"/>
    57                 </dc:description>
    58             </xsl:if>
    59         </skos:ConceptScheme>
    60     </xsl:template>
    61     <xsl:template match="dcif:dataCategory[@type='simple'][exists(key('scheme',@pid))]">
     39    <xsl:template match="dcif:dataCategory">
    6240        <xsl:variable name="name" select="@isocat:name"/>
    63         <skos:Concept>
    64             <xsl:choose>
    65                 <xsl:when test="exists($base) and normalize-space($base)!=''">
    66                     <xsl:attribute name="rdf:ID" select="concat('DC-',substring-after(@pid,'DC-'))"/>
    67                 </xsl:when>
    68                 <xsl:otherwise>
    69                     <xsl:attribute name="rdf:about" select="@pid"/>
    70                 </xsl:otherwise>
    71             </xsl:choose>
    72             <dcr:datcat>
    73                 <xsl:value-of select="@pid"/>
    74             </dcr:datcat>
    75             <dcterms:source>
    76                 <xsl:value-of select="@pid"/>
    77             </dcterms:source>
    78             <skos:notation>
    79                 <xsl:text>DC-</xsl:text>
    80                 <xsl:value-of select="substring-after(@pid,'DC-')"/>
    81             </skos:notation>
    82            
    83             <!-- administration section:
    84             dcif:identifier -> skos:notation           
    85             dcif:version
    86             dcif:registrationStatus
    87             dcif:origin -> skos:note
    88             dcif:justification -> skos:note
    89             dcif:explanatoryComment -> skos:editorialNote
    90             dcif:unresolvedIssue
    91             dcif:effectiveDate
    92             dcif:untilDate
    93             dcif:creation -> skos:changeNote
    94             dcif:lastChange -> skos:changeNote
    95             -->
    96            
    97             <!-- xsl:for-each to change context, but there will be only one Administration Record -->
    98             <xsl:for-each select="dcif:administrationInformationSection/dcif:administrationRecord">
    99                
    100                 <skos:notation>
    101                     <xsl:value-of select="dcif:identifier"/>
    102                 </skos:notation>
    103                
    104                 <xsl:if test="normalize-space(dcif:origin)">
    105                     <skos:note>
    106                         <xsl:copy-of select="@xml:lang"/>
    107                         <xsl:value-of select="normalize-space(dcif:origin)"/>
    108                     </skos:note>
    109                 </xsl:if>
    110                
    111                 <xsl:if test="normalize-space(dcif:justification)">
    112                     <skos:note>
    113                         <xsl:copy-of select="@xml:lang"/>
    114                         <xsl:value-of select="normalize-space(dcif:justification)"/>
    115                     </skos:note>
    116                 </xsl:if>
    117                
    118                 <xsl:for-each select="dcif:explanatoryComment">
    119                     <skos:editorialNote>
    120                         <xsl:copy-of select="@xml:lang"/>
    121                         <xsl:value-of select="normalize-space(.)"/>
    122                     </skos:editorialNote>
    123                 </xsl:for-each>
    124                
     41        <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>
     47                <!-- changeNote ok to satisfy the CC-BY license -->
    12548                <skos:changeNote>
    126                     <xsl:copy-of select="@xml:lang"/>
    127                     <xsl:value-of select="normalize-space(dcif:creation/dcif:changeDescription)"/>
     49                    <xsl:text>This concept is based on the ISOcat data category: </xsl:text>
     50                    <xsl:value-of select="@pid"/>
    12851                </skos:changeNote>
    129                
    130                 <xsl:if test="exists(dcif:lastChange)">
    131                     <skos:changeNote>
    132                         <xsl:copy-of select="dcif:lastChange/@xml:lang"/>
    133                         <xsl:value-of select="normalize-space(dcif:lastChange/dcif:changeDescription)"/>
    134                     </skos:changeNote>
    135                 </xsl:if>
    136                
    137             </xsl:for-each>
    138 
    139             <!-- description section:
    140             dcif:profile
    141             -->
    142            
    143             <!-- xsl:for-each to change context, but there will be only one Description Section -->
    144             <xsl:for-each select="dcif:descriptionSection">
    145                
    146                 <!-- data element names:
    147                dcif:dataElementName -> skos:notation
    148                -->
    149                    
    150                 <xsl:for-each select="dcif:dataElementNameSection">
     52
     53                <!-- administration section:
     54                dcif:identifier -> skos:notation
     55                dcif:version
     56                dcif:registrationStatus
     57                dcif:origin -> skos:note (DELETE?)
     58                dcif:justification -> skos:note (DELETE?)
     59                dcif:explanatoryComment -> skos:editorialNote (DELETE?)
     60                dcif:unresolvedIssue
     61                dcif:effectiveDate
     62                dcif:untilDate
     63                dcif:creation -> skos:changeNote (DELETE)
     64                dcif:lastChange -> skos:changeNote (DELETE)
     65                -->
     66
     67                <!-- xsl:for-each to change context, but there will be only one Administration Record -->
     68                <xsl:for-each select="dcif:administrationInformationSection/dcif:administrationRecord">
    15169                    <skos:notation>
    152                         <xsl:value-of select="normalize-space(dcif:dataElementName)"/>
     70                        <xsl:value-of select="dcif:identifier"/>
    15371                    </skos:notation>
    15472                </xsl:for-each>
    155                
    156                 <!-- language sections:
    157                 dcif:name (preferred) -> skos:prefLabel
    158                 dcif:name (standardized) -> skos:prefLabel
    159                 dcif:name (admitted) -> skos:altLabel
    160                 dcif:name (deprecated) -> skos:hiddenLabel
    161                 dcif:name (superseded) -> skos:hiddenLabel
    162                 dcif:definition -> skos:definition
    163                 dcif:example -> skos:example
    164                 dcif:explanation -> skos:scopeNote
    165                 dcif:note -> skos:note
    166                 -->
    167                
    168                 <xsl:for-each select="dcif:languageSection">
    169                     <xsl:variable name="lang" select="dcif:language"/>
    170                    
    171                     <xsl:if test="$lang='en'">
    172                         <skos:prefLabel  xml:lang="{$lang}">
    173                             <xsl:value-of select="normalize-space($name)"/>
    174                         </skos:prefLabel>
    175                     </xsl:if>
    176                    
    177                     <xsl:for-each-group select="dcif:nameSection[not($lang='en' and dcif:name=$name)]" group-by="dcif:nameStatus">
    178                         <xsl:choose>
    179                             <xsl:when test="current-grouping-key()='preferred name'">
    180                                 <xsl:variable name="pref" select="if ($lang='en') then () else (current-group()[1])"/>
    181                                 <xsl:if test="exists($pref)">
    182                                     <skos:prefLabel xml:lang="{$lang}">
    183                                         <xsl:value-of select="normalize-space(dcif:name)"/>
    184                                     </skos:prefLabel>
    185                                 </xsl:if>
    186                                 <xsl:for-each select="current-group()[dcif:name ne $pref/dcif:name]">
    187                                     <skos:altLabel xml:lang="{$lang}">
    188                                         <xsl:value-of select="normalize-space(dcif:name)"/>
    189                                     </skos:altLabel>
    190                                 </xsl:for-each>
    191                             </xsl:when>
    192                             <xsl:when test="current-grouping-key()='standardized name'">
    193                                 <xsl:for-each select="current-group()">
    194                                     <skos:altLabel xml:lang="{$lang}">
    195                                         <xsl:value-of select="normalize-space(dcif:name)"/>
    196                                     </skos:altLabel>
    197                                 </xsl:for-each>
    198                             </xsl:when>
    199                             <xsl:when test="current-grouping-key()='admitted name'">
    200                                 <xsl:for-each select="current-group()">
    201                                     <skos:altLabel xml:lang="{$lang}">
    202                                         <xsl:value-of select="normalize-space(dcif:name)"/>
    203                                     </skos:altLabel>
    204                                 </xsl:for-each>
    205                             </xsl:when>
    206                             <xsl:otherwise>
    207                                 <xsl:for-each select="current-group()">
    208                                     <skos:hiddenLabel xml:lang="{$lang}">
    209                                         <xsl:value-of select="normalize-space(dcif:name)"/>
    210                                     </skos:hiddenLabel>
    211                                 </xsl:for-each>
    212                             </xsl:otherwise>
    213                         </xsl:choose>
    214                     </xsl:for-each-group>
    215                    
    216                     <xsl:for-each select="dcif:definitionSection">
    217                         <skos:definition xml:lang="{$lang}">
    218                             <xsl:value-of select="normalize-space(dcif:definition)"/>
    219                         </skos:definition>
     73
     74                <!-- xsl:for-each to change context, but there will be only one Description Section -->
     75                <xsl:for-each select="dcif:descriptionSection">
     76
     77                    <!-- description section:
     78                    dcif:profile -> skos:inScheme
     79                    dcif:dataElementName -> skos:notation
     80                    -->
     81                    <xsl:for-each select="dcif:profile">
     82                        <skos:inScheme rdf:resource="tmp:P-{replace(.,'\s','')}"/>
    22083                    </xsl:for-each>
    22184                   
    222                     <xsl:for-each select="dcif:exampleSection">
    223                         <skos:example xml:lang="{$lang}">
    224                             <xsl:value-of select="normalize-space(dcif:example)"/>
    225                         </skos:example>
     85                    <xsl:for-each-group select="dcif:dataElementNameSection" group-by="dcif:dataElementName">
     86                        <xsl:if test="normalize-space(current-grouping-key())!=''">
     87                            <skos:notation>
     88                                <xsl:value-of select="normalize-space(current-grouping-key())"/>
     89                            </skos:notation>
     90                        </xsl:if>
     91                    </xsl:for-each-group>
     92
     93                    <!-- language sections:
     94                    dcif:name (preferred) -> skos:prefLabel
     95                    dcif:name (standardized) -> skos:prefLabel
     96                    dcif:name (admitted) -> skos:altLabel
     97                    dcif:name (deprecated) -> skos:hiddenLabel
     98                    dcif:name (superseded) -> skos:hiddenLabel
     99                    dcif:definition -> skos:definition
     100                    dcif:example -> skos:example
     101                    dcif:explanation -> skos:scopeNote
     102                    dcif:note -> skos:note
     103                    -->
     104
     105                    <xsl:for-each select="dcif:languageSection[dcif:language='en']">
     106                        <xsl:variable name="lang" select="dcif:language"/>
     107
     108                        <xsl:if test="$lang='en'">
     109                            <skos:prefLabel xml:lang="{$lang}">
     110                                <xsl:value-of select="normalize-space($name)"/>
     111                            </skos:prefLabel>
     112                        </xsl:if>
     113
     114                        <xsl:for-each-group select="dcif:nameSection[not($lang='en' and dcif:name=$name)]" group-by="dcif:nameStatus">
     115                            <xsl:choose>
     116                                <xsl:when test="current-grouping-key()='preferred name'">
     117                                    <xsl:variable name="pref" select="if ($lang='en') then () else (current-group()[1])"/>
     118                                    <xsl:if test="exists($pref)">
     119                                        <skos:prefLabel xml:lang="{$lang}">
     120                                            <xsl:value-of select="normalize-space(dcif:name)"/>
     121                                        </skos:prefLabel>
     122                                    </xsl:if>
     123                                    <xsl:for-each select="current-group()[dcif:name ne $pref/dcif:name]">
     124                                        <skos:altLabel xml:lang="{$lang}">
     125                                            <xsl:value-of select="normalize-space(dcif:name)"/>
     126                                        </skos:altLabel>
     127                                    </xsl:for-each>
     128                                </xsl:when>
     129                                <xsl:when test="current-grouping-key()='standardized name'">
     130                                    <xsl:for-each select="current-group()">
     131                                        <skos:altLabel xml:lang="{$lang}">
     132                                            <xsl:value-of select="normalize-space(dcif:name)"/>
     133                                        </skos:altLabel>
     134                                    </xsl:for-each>
     135                                </xsl:when>
     136                                <xsl:when test="current-grouping-key()='admitted name'">
     137                                    <xsl:for-each select="current-group()">
     138                                        <skos:altLabel xml:lang="{$lang}">
     139                                            <xsl:value-of select="normalize-space(dcif:name)"/>
     140                                        </skos:altLabel>
     141                                    </xsl:for-each>
     142                                </xsl:when>
     143                                <xsl:otherwise>
     144                                    <xsl:for-each select="current-group()">
     145                                        <skos:hiddenLabel xml:lang="{$lang}">
     146                                            <xsl:value-of select="normalize-space(dcif:name)"/>
     147                                        </skos:hiddenLabel>
     148                                    </xsl:for-each>
     149                                </xsl:otherwise>
     150                            </xsl:choose>
     151                        </xsl:for-each-group>
     152
     153                        <xsl:for-each select="dcif:definitionSection">
     154                            <skos:definition xml:lang="{$lang}">
     155                                <xsl:value-of select="normalize-space(dcif:definition)"/>
     156                                <xsl:if test="normalize-space(dcif:source)!=''">
     157                                    <xsl:text> (source: </xsl:text>
     158                                    <xsl:value-of select="normalize-space(dcif:source)"/>
     159                                    <xsl:text>)</xsl:text>
     160                                </xsl:if>
     161                            </skos:definition>
     162                        </xsl:for-each>
     163
     164                        <xsl:for-each select="dcif:exampleSection">
     165                            <skos:example xml:lang="{$lang}">
     166                                <xsl:value-of select="normalize-space(dcif:example)"/>
     167                                <xsl:if test="normalize-space(dcif:source)!=''">
     168                                    <xsl:text> (source: </xsl:text>
     169                                    <xsl:value-of select="normalize-space(dcif:source)"/>
     170                                    <xsl:text>)</xsl:text>
     171                                </xsl:if>
     172                            </skos:example>
     173                        </xsl:for-each>
     174
     175                        <xsl:for-each select="dcif:explanationSection">
     176                            <skos:scopeNote xml:lang="{$lang}">
     177                                <xsl:value-of select="normalize-space(dcif:explanation)"/>
     178                                <xsl:if test="normalize-space(dcif:source)!=''">
     179                                    <xsl:text> (source: </xsl:text>
     180                                    <xsl:value-of select="normalize-space(dcif:source)"/>
     181                                    <xsl:text>)</xsl:text>
     182                                </xsl:if>
     183                            </skos:scopeNote>
     184                        </xsl:for-each>
     185
     186                        <xsl:for-each select="dcif:note">
     187                            <skos:note xml:lang="{$lang}">
     188                                <xsl:value-of select="normalize-space(.)"/>
     189                            </skos:note>
     190                        </xsl:for-each>
     191
    226192                    </xsl:for-each>
    227                    
    228                     <xsl:for-each select="dcif:explanationSection">
    229                         <skos:scopeNote xml:lang="{$lang}">
    230                             <xsl:value-of select="normalize-space(dcif:explanation)"/>
    231                         </skos:scopeNote>
    232                     </xsl:for-each>
    233                    
    234                     <xsl:for-each select="dcif:note">
    235                         <skos:note xml:lang="{$lang}">
    236                             <xsl:value-of select="normalize-space(.)"/>
    237                         </skos:note>
    238                     </xsl:for-each>
    239                    
     193
    240194                </xsl:for-each>
    241                
    242                
    243             </xsl:for-each>
    244            
    245             <!-- conceptual domains:           
    246             isA -> skos:broader
    247             -->
    248            
    249             <xsl:if test="exists(dcif:isA)">
    250                 <skos:broaderTransitive>
    251                     <xsl:choose>
    252                         <xsl:when test="normalize-space($base)!=''">
    253                             <xsl:attribute name="rdf:resource" select="concat($base,'#DC-',substring-after(@pid,'DC-'))"/>
    254                         </xsl:when>
    255                         <xsl:otherwise>
    256                             <xsl:attribute name="rdf:resource" select="@pid"/>
    257                         </xsl:otherwise>
    258                     </xsl:choose>
    259                 </skos:broaderTransitive>
    260             </xsl:if>
    261            
    262             <!-- memberships:
    263             is in a closed value domain -> skos:inScheme
    264             -->
    265            
    266             <xsl:for-each select="key('scheme',@pid)">
    267                 <skos:inScheme>
    268                     <xsl:choose>
    269                         <xsl:when test="normalize-space($base)!=''">
    270                             <xsl:attribute name="rdf:resource" select="concat($base,'#DC-',substring-after(@pid,'DC-'))"/>
    271                         </xsl:when>
    272                         <xsl:otherwise>
    273                             <xsl:attribute name="rdf:resource" select="@pid"/>
    274                         </xsl:otherwise>
    275                     </xsl:choose>
    276                 </skos:inScheme>
    277             </xsl:for-each>
    278            
    279         </skos:Concept>
     195
     196                <!-- conceptual domains:           
     197                isA -> skos:broader (DELETE)
     198                -->
     199
     200                <!-- memberships:
     201                is in a closed value domain -> skos:inScheme (DELETE)
     202                -->
     203
     204            </skos:Concept>
     205        </xsl:variable>
     206        <xsl:apply-templates select="$concept" mode="cleanup"/>
     207    </xsl:template>
     208    <xsl:template match="@*|node()" mode="cleanup">
     209        <xsl:copy>
     210            <xsl:apply-templates select="@*|node()" mode="#current"/>
     211        </xsl:copy>
     212    </xsl:template>
     213    <xsl:template match="skos:notation" mode="cleanup">
     214        <xsl:if test="not(preceding-sibling::skos:notation=current())">
     215            <xsl:copy>
     216                <xsl:apply-templates select="@*|node()" mode="#current"/>
     217            </xsl:copy>
     218        </xsl:if>
     219    </xsl:template>
     220    <xsl:template match="skos:prefLabel" mode="cleanup">
     221        <xsl:if test="not(preceding-sibling::skos:prefLabel=current())">
     222            <xsl:copy>
     223                <xsl:apply-templates select="@*|node()" mode="#current"/>
     224            </xsl:copy>
     225        </xsl:if>
     226    </xsl:template>
     227    <xsl:template match="skos:altLabel" mode="cleanup">
     228        <xsl:if test="not(preceding-sibling::skos:altLabel=current())">
     229            <xsl:copy>
     230                <xsl:apply-templates select="@*|node()" mode="#current"/>
     231            </xsl:copy>
     232        </xsl:if>
     233    </xsl:template>
     234    <xsl:template match="skos:hiddenLabel" mode="cleanup">
     235        <xsl:if test="not(preceding-sibling::skos:hiddenLabel=current())">
     236            <xsl:copy>
     237                <xsl:apply-templates select="@*|node()" mode="#current"/>
     238            </xsl:copy>
     239        </xsl:if>
    280240    </xsl:template>
    281241</xsl:stylesheet>
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/representations/dcs2/representations.xml

    r2612 r5650  
    3232    </representation>
    3333    <representation>
     34        <name>OpenSKOS</name>
     35        <description>OpenSKOS</description>
     36        <extension>skos</extension>
     37        <mime>application/rdf+xml</mime>
     38    </representation>
     39    <representation>
    3440        <name>RNG</name>
    3541        <description>Relax NG (XML syntax)</description>
  • cats/ISOcat/trunk/mod-ISOcat-manage-access/manage/dc.acc

    r2029 r5650  
    1 <accessor debug="false" trace="false">
     1<accessor debug="true" trace="false">
    22        <name>ISOcat.manage.access.dc</name>
    33        <descr>Check if the user indicated by the credentials is allowed to access this DC.</descr>
     
    4747                                <target>var:access</target>
    4848                        </instr>
     49                    <accessor-debug>
     50                        <instr>
     51                            <type>log</type>
     52                            <operand>var:access</operand>
     53                        </instr>
     54                    </accessor-debug>
    4955                </accessor-trace>
    5056                <!-- check if the user has access to the DC -->
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/entrypoints.xml

    r3335 r5650  
    142142        <icon>ffcpl:/mod_ISOcat_manage_system/plugin/icon.png</icon>
    143143    </entrypoint>
     144    <entrypoint>
     145        <name>mod_ISOcat_manage_system_plugin_dump</name>
     146        <uri>ffcpl:/mod_ISOcat_manage_system/plugin/dump.xhtml</uri>
     147        <indexable>
     148            <title>ISOcat dump</title>
     149            <desc>Make a static dump of all DCs</desc>
     150            <keywords/>
     151        </indexable>
     152        <fullTextIndex/>
     153        <categories>app</categories>
     154        <group>ISOcat manage system plugin</group>
     155        <icon>ffcpl:/mod_ISOcat_manage_system/plugin/icon.png</icon>
     156    </entrypoint>
    144157</entrypoints>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/manage/dc-status.acc

    r3337 r5650  
    4848                </source>
    4949        </param>
    50         <param>
     50    <param>
     51        <name>next</name>
     52        <descr>which next DC</descr>
     53        <type canonical="true">string</type>
     54        <source>
     55            <nvp/>
     56            <default>
     57                <string/>
     58            </default>
     59        </source>
     60    </param>
     61    <param>
    5162                <name>message</name>
    5263                <descr>informative message</descr>
     
    200211                                        </operand>
    201212                                </instr>
     213                            <if>
     214                                <cond>
     215                                    <instr>
     216                                        <type>sloot.xpath2eval</type>
     217                                        <operand>var:status</operand>
     218                                        <operator>
     219                                            <xpath>normalize-space(.)='superseded'</xpath>
     220                                        </operator>
     221                                        <target>this:cond</target>
     222                                    </instr>
     223                                </cond>
     224                                <then>
     225                                    <if>
     226                                        <cond>
     227                                            <instr>
     228                                                <type>sloot.xpath2eval</type>
     229                                                <operand>var:next</operand>
     230                                                <operator>
     231                                                    <xpath>normalize-space(.)=''</xpath>
     232                                                </operator>
     233                                                <target>this:cond</target>
     234                                            </instr>
     235                                        </cond>
     236                                        <then>
     237                                            <!-- ERROR: status is superseded, but no next DC found -->
     238                                            <instr>
     239                                                <type>throw</type>
     240                                                <operand>
     241                                                    <ex>
     242                                                        <id>ISOcat[BAD REQUEST]</id>
     243                                                        <message>No next DC specified!</message>
     244                                                    </ex>
     245                                                </operand>
     246                                            </instr>
     247                                        </then>
     248                                        <else>
     249                                            <!-- noop -->
     250                                            <instr>
     251                                                <type>copy</type>
     252                                                <operand>
     253                                                    <null/>
     254                                                </operand>
     255                                                <target>var:void</target>
     256                                            </instr>
     257                                        </else>
     258                                    </if>
     259                                </then>
     260                                <else>
     261                                    <!-- noop -->
     262                                    <instr>
     263                                        <type>copy</type>
     264                                        <operand>
     265                                            <null/>
     266                                        </operand>
     267                                        <target>var:void</target>
     268                                    </instr>
     269                                </else>
     270                            </if>
    202271                        </then>
    203272                        <else>
     
    302371                                                                                <string>{string($status)}</string>
    303372                                                                        </status>
    304                                                                         <message>
     373                                                                    <next>
     374                                                                        <string>{string($next)}</string>
     375                                                                    </next>
     376                                                                    <message>
    305377                                                                                <string>{string($message)}</string>
    306378                                                                        </message>
     
    366438                        <user>var:user</user>
    367439                        <status>var:status</status>
     440                    <next>var:next</next>
    368441                        <message>var:message</message>
    369442                        <target>var:dpml</target>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/manage/links.xml

    r3335 r5650  
    3333        <args>param</args>
    3434    </link>
     35    <link>
     36        <ext>/dump</ext>
     37        <int>active:sloot.accessor+operand@ffcpl:/manage/dump.acc</int>
     38        <args>param</args>
     39    </link>
    3540</links>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/module.xml

    r4036 r5650  
    121121            <to>active:ISOcat.access.system.config.shibboleth</to>
    122122        </rule>
     123        <rule>
     124            <match>active:ISOcat.manage.system.config.site.throttle</match>
     125            <to>active:ISOcat.access.system.config.site.throttle</to>
     126        </rule>
    123127    </rewrite>
    124128    <mapping>
     
    127131            <to>active:sloot.accessor+operand@ffcpl:/manage/import-batch.acc$1</to>
    128132        </rewrite>
     133        <import>
     134            <uri>urn:isocat:interface:rest</uri>
     135        </import>
    129136        <this>
    130137            <match>ffcpl:/.*</match>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/plugin/configure.xsl

    r4462 r5650  
    104104                                                        <td colspan="3">&#160;</td>
    105105                                                </tr>
    106                                                 <tr>
     106                                            <tr>
     107                                                <th colspan="3" align="left">Site settings</th>
     108                                            </tr>
     109                                            <tr>
     110                                                <td>concurrent thread count</td>
     111                                                <td>
     112                                                    <input name="site_concurrency" value="{site/concurrency}"/>
     113                                                </td>
     114                                                <td/>
     115                                            </tr>
     116                                            <tr>
     117                                                <td colspan="3">&#160;</td>
     118                                            </tr>
     119                                            <tr>
    107120                                                        <th colspan="3" align="left">SMTP settings</th>
    108121                                                </tr>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/plugin/dc-status.xhtml

    r3338 r5650  
    4444                                                        <option value="standard"      >standard       (a=accepted,       r=standard)</option>
    4545                                                        <option value="deprecated"    >deprecated     (                  r=deprecated)</option>
    46                                                         <!--<option value="superseded"    >superseded     (                  r=superseded)</option>-->
     46                                                        <option value="superseded"    >superseded     (                  r=superseded)</option>
    4747                                                        <option value="external"      >external       (a=external)</option>
    4848                                                </select>
     
    5757                                        <td/>
    5858                                </tr>
     59                            <tr>
     60                                <td valign="top">Next DC</td>
     61                                <td valign="top">
     62                                    <input type="text" name="next"/>
     63                                </td>
     64                                <td>The superseding DC when status is set to superseded</td>
     65                            </tr>
    5966                                <tr>
    6067                                        <td valign="top">Message</td>
  • cats/ISOcat/trunk/mod-ISOcat-manage-system/plugin/plugin.xml

    r3335 r5650  
    2020        <entrypoint>mod_ISOcat_manage_system_plugin_forumsync</entrypoint>
    2121        <entrypoint>mod_ISOcat_manage_system_plugin_dc-status</entrypoint>
     22        <entrypoint>mod_ISOcat_manage_system_plugin_dump</entrypoint>
    2223    </entrypoints>
    2324</list>
Note: See TracChangeset for help on using the changeset viewer.