Changeset 4289


Ignore:
Timestamp:
01/20/14 12:08:14 (10 years ago)
Author:
mwindhouwer
Message:

M various/import/csv2dcif.xsl

  • now generated DCIF version 1.3

M various/import/ISOcat-data-categories.xlsx

  • ??

M mod-ISOcat-interface-gi*
M mod-ISOcat-interface-rest
*

  • extended search with a filter on recommendations

M mod-ISOcat-access-data/dbx/tree-include.xml

  • fixed looking up of the super simple DC is a member of the selection
Location:
cats/ISOcat/trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • cats/ISOcat/trunk/mod-ISOcat-access-data/dbx/tree-include.xml

    r2029 r4289  
    5252       
    5353        <xsl:template match="super">
    54             <xsl:if test="empty(../dc[super=current()/id])">
    55                 <xsl:comment>super simple DC[<xsl:value-of select="."/>] doesn't exist in this profile/DCS or value domain</xsl:comment>
     54            <xsl:variable name="super" select="."/>
     55            <xsl:if test="empty(../../dc[id=$super])">
     56                <xsl:comment>super simple DC[<xsl:value-of select="$super"/>] doesn't exist in this profile/DCS or value domain</xsl:comment>
    5657            </xsl:if>
    5758        </xsl:template>
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/components/WorkspaceViewer.xml

    r2288 r4289  
    8787            <dynamics jsxborder="@No jsxborder" jsxbgcolor="@Transparent BG"></dynamics>
    8888            <object type="jsx3.gui.Block">
    89               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="2"></variants>
    90               <strings jsxname="optionsLabel" jsxtext="Search options" jsxfontweight="bold" jsxdisplay="" jsxwidth="100%"></strings>
     89              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="2" jsxwidth="150"></variants>
     90              <strings jsxname="optionsLabel" jsxtext="Search options" jsxfontweight="bold" jsxdisplay=""></strings>
    9191              <dynamics jsxborder="ISOcat border bottom"></dynamics>
    9292            </object>
    9393            <object type="jsx3.gui.Block">
    9494              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="20"></variants>
     95              <strings jsxname="recommenderLabel" jsxtext="Recommended by" jsxdisplay=""></strings>
     96            </object>
     97            <object type="jsx3.gui.Block">
     98              <variants jsxwidth="150" jsxheight="60" jsxoverflow="2" jsxleft="8" jsxtop="35" jsxrelativeposition="0"></variants>
     99              <strings jsxname="recommenderSelect" jsxmargin="0 4 0 0" jsxbgcolor="#FFFFFF" jsxdisplay=""></strings>
     100              <dynamics jsxborder="@Inset"></dynamics>
     101              <object type="jsx3.gui.Block">
     102                <variants jsxoverflow="3"></variants>
     103                <strings jsxname="block" jsxwidth="100%" jsxheight="100%"></strings>
     104                <object type="jsx3.gui.Matrix">
     105                  <variants jsxselectionmodel="2" jsxscalewidth="1" jsxjsxxmlasync="1" jsxheaderheight="0"></variants>
     106                  <strings jsxname="recommenderField" jsxfocusstyle="." jsxxmlid="ws-recom-_jsx_1_t8"></strings>
     107                  <object type="jsx3.gui.Matrix.Column">
     108                    <variants></variants>
     109                    <strings jsxname="column" jsxcellpadding="2" jsxpath="jsxtext"></strings>
     110                  </object>
     111                </object>
     112              </object>
     113            </object>
     114            <object type="jsx3.gui.Block">
     115              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="100"></variants>
    95116              <strings jsxname="languageLabel" jsxtext="Keywords language" jsxdisplay=""></strings>
    96117            </object>
    97118            <object type="jsx3.gui.Select">
    98               <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxtop="35" jsxleft="8" jsxrelativeposition="0" _isfocusing="true"></variants>
    99               <strings jsxname="languageField" jsxmargin="0 4 0 0" jsxdisplay="" jsxvalue="en" jsxxmlid="ws-language-_jsx_1_6u"></strings>
     119              <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxtop="115" jsxleft="8" jsxrelativeposition="0" _isfocusing="true"></variants>
     120              <strings jsxname="languageField" jsxmargin="0 4 0 0" jsxdisplay="" jsxvalue="en" jsxxmlid="ws-language-_jsx_1_t8"></strings>
    100121            </object>
    101122            <object type="jsx3.gui.Block">
    102               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="60"></variants>
     123              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="140"></variants>
    103124              <strings jsxname="fieldsLabel" jsxtext="Fields to search" jsxdisplay=""></strings>
    104125            </object>
    105126            <object type="jsx3.gui.Block">
    106               <variants jsxwidth="150" jsxheight="60" jsxoverflow="2" jsxleft="8" jsxtop="75" jsxrelativeposition="0"></variants>
     127              <variants jsxwidth="150" jsxheight="60" jsxoverflow="2" jsxleft="8" jsxtop="155" jsxrelativeposition="0"></variants>
    107128              <strings jsxname="fieldsSelect" jsxmargin="0 4 0 0" jsxbgcolor="#FFFFFF" jsxdisplay=""></strings>
    108129              <dynamics jsxborder="@Inset"></dynamics>
     
    121142            </object>
    122143            <object type="jsx3.gui.Block">
    123               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="140"></variants>
     144              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="220"></variants>
    124145              <strings jsxname="profilesLabel" jsxtext="Profiles to search" jsxdisplay=""></strings>
    125146            </object>
    126147            <object type="jsx3.gui.Block">
    127               <variants jsxwidth="150" jsxheight="60" jsxoverflow="2" jsxrelativeposition="0" jsxleft="8" jsxtop="155"></variants>
     148              <variants jsxwidth="150" jsxheight="60" jsxoverflow="2" jsxrelativeposition="0" jsxleft="8" jsxtop="240"></variants>
    128149              <strings jsxname="profilesSelect" jsxmargin="0 4 0 0" jsxbgcolor="#FFFFFF" jsxdisplay=""></strings>
    129150              <dynamics jsxborder="@Inset"></dynamics>
     
    133154                <object type="jsx3.gui.Matrix">
    134155                  <variants jsxselectionmodel="2" jsxscalewidth="1" jsxjsxxmlasync="1" jsxheaderheight="0"></variants>
    135                   <strings jsxname="profilesField" jsxfocusstyle="." jsxxmlid="ws-profile-_jsx_1_6u"></strings>
     156                  <strings jsxname="profilesField" jsxfocusstyle="." jsxxmlid="ws-profile-_jsx_1_t8"></strings>
    136157                  <object type="jsx3.gui.Matrix.Column">
    137158                    <variants></variants>
     
    142163            </object>
    143164            <object type="jsx3.gui.Block">
    144               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="220"></variants>
     165              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="310"></variants>
    145166              <strings jsxname="scopeLabel" jsxtext="Scopes to search" jsxdisplay=""></strings>
    146167            </object>
    147168            <object type="jsx3.gui.Select">
    148               <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxrelativeposition="0" jsxleft="8" jsxtop="235" _isfocusing="true"></variants>
     169              <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxrelativeposition="0" jsxleft="8" jsxtop="325" _isfocusing="true"></variants>
    149170              <strings jsxname="scopeField" jsxmargin="0 4 0 0" jsxdisplay="" jsxvalue="both" jsxxmlurl="xml/search-scopes.xml"></strings>
    150171            </object>
    151172            <object type="jsx3.gui.Block">
    152               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="260"></variants>
     173              <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="350"></variants>
    153174              <strings jsxname="matchLabel" jsxtext="Match method" jsxdisplay=""></strings>
    154175            </object>
    155176            <object type="jsx3.gui.Select">
    156               <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxrelativeposition="0" jsxleft="8" jsxtop="275" _isfocusing="true"></variants>
     177              <variants jsxwidth="150" jsxheight="18" jsxxmlasync="1" jsxrelativeposition="0" jsxleft="8" jsxtop="365" _isfocusing="true"></variants>
    157178              <strings jsxname="matchField" jsxmargin="0 4 0 0" jsxdisplay="" jsxvalue="like" jsxxmlurl="xml/search-match.xml"></strings>
    158179            </object>
    159180            <object type="jsx3.gui.Block">
    160               <variants jsxrelativeposition="0" jsxoverflow="3" jsxleft="8" jsxtop="300"></variants>
    161               <strings jsxname="label" jsxtext="" jsxdisplay="" jsxwidth="100%"></strings>
     181              <variants jsxrelativeposition="0" jsxoverflow="3" jsxtop="380" jsxleft="8" jsxwidth="150"></variants>
     182              <strings jsxname="label" jsxtext="" jsxdisplay=""></strings>
    162183              <dynamics jsxborder="ISOcat border bottom"></dynamics>
    163184            </object>
    164185            <object type="jsx3.gui.ToolbarButton">
    165               <variants jsxrelativeposition="0" jsxleft="50" jsxtop="315"></variants>
     186              <variants jsxrelativeposition="0" jsxleft="50" jsxtop="395"></variants>
    166187              <strings jsxname="defaultOptionsButton" jsximage="http://isocat:8080/Tango/16x16/actions/edit-undo.png" jsxtext="Reset" jsxdisplay="" jsxtip="Reset to the default settings."></strings>
    167188              <events jsxexecute="this.getAncestorOfName(&quot;WorkspaceViewer&quot;).controller.resetOptions();"></events>
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/components/appCanvas.xml

    r2635 r4289  
    3232              <object type="jsx3.gui.Menu">
    3333                <variants></variants>
    34                 <strings jsxname="userMenu" jsxtext="Welcome Menzo Windhouwer" jsxxmlurl="xml/welcome-user.xml" jsxxml=""></strings>
     34                <strings jsxname="userMenu" jsxtext="Welcome Guest" jsxxmlurl="xml/welcome-guest.xml" jsxxml=""></strings>
    3535                <dynamics jsximage="menu icon: user" jsxtip="menu tooltip: help"></dynamics>
    3636              </object>
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/config.xml

    r2636 r4289  
    870870      <record jsxid="src" type="string">components/Password.xml</record>
    871871    </record>
     872    <record jsxid="142" type="map">
     873      <record jsxid="id" type="string">SearchRecommenders2CDF_xsl</record>
     874      <record jsxid="type" type="string">xsl</record>
     875      <record jsxid="load" type="number">0</record>
     876      <record jsxid="src" type="string">xsl/SearchRecommenders2CDF.xsl</record>
     877    </record>
    872878  </record>
    873879  <record jsxid="bodyhotkeys" type="boolean">false</record>
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/JSXAPPS/ISOcat/js/org/isocat/gui/WSViewer.js

    r2343 r4289  
    4242        WSViewer_prototype.scope;
    4343        WSViewer_prototype.match;
     44        WSViewer_prototype.recom;
    4445       
    4546        /**
     
    8485                this.match = this.view.getDescendantOfName("matchField");
    8586                org.isocat.gui.WSViewer.log.info("- match["+this.match+"]");
     87                this.recom = this.view.getDescendantOfName("recommenderField");
     88                org.isocat.gui.WSViewer.log.info("- recom["+this.recom+"]");
    8689               
    8790                // initialize some variables
     
    9598                var profs = org.isocat.loadDynamicCDFDocument(new jsx3.net.URI("http://isocat:8080/isocat/rest/info/profiles.xml"),"SearchProfiles2CDF_xsl",null,cacheId);
    9699                this.profiles.setXMLId(cacheId);
     100
     101                cacheId = "ws-recom-"+this.view.getId();
     102                var recoms = org.isocat.loadDynamicCDFDocument(new jsx3.net.URI("http://isocat:8080/isocat/rest/info/recommenders.xml"),"SearchRecommenders2CDF_xsl",null,cacheId);
     103                this.recom.setXMLId(cacheId);
    97104
    98105                org.isocat.gui.WSViewer.log.info("initialized DC viewer["+this+"]");
     
    178185                var ebg = this.options.getChild("ebg");
    179186               
    180                                 this.profiles.repaint();
     187                this.profiles.repaint();
    181188
    182189                if (show) {
    183                         if (this.options.getDisplay() != jsx3.gui.Block.DISPLAYBLOCK)
    184                                 this.options.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
    185 
    186                         this.optionsButton.setState(jsx3.gui.ToolbarButton.STATEON,true);
     190                        if (this.options.getDisplay() != jsx3.gui.Block.DISPLAYBLOCK)
     191                                this.options.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
     192
     193                        this.optionsButton.setState(jsx3.gui.ToolbarButton.STATEON,true);
    187194                       
    188195                        var d = this.viewer.getAbsolutePosition();
     
    209216
    210217                        if (d.H > 0) {
    211                                 var overlay = this.options;
     218                                var overlay = this.options;
    212219
    213220                                var transition = com.bwalsh.gi.gui.Transition.Resize(w,h,main);
     
    219226                                                if (overlay.getDisplay() != jsx3.gui.Block.DISPLAYNONE)
    220227                                                        overlay.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
    221                                         }
     228                                        }
    222229                                );
    223230                                transition.run();
     
    251258                options.match = this.match.getValue();
    252259               
     260                if (!this.recom.getSelectedIds().contains("any")) {
     261                        for (var iter = jsx3.util.List.wrap(this.recom.getSelectedIds()).iterator();iter.hasNext();)
     262                                options["recommender-"+o++] = this.recom.getRecord(iter.next()).jsxtext;
     263                }
     264               
    253265                return options;
    254266        };
     
    260272                this.scope.setValue("both");
    261273                this.match.setValue("like");
     274                this.recom.setValue("any");
    262275        };
    263276       
  • cats/ISOcat/trunk/mod-ISOcat-interface-gi/interface/settings/builder.xml

    r3447 r4289  
    33  <record jsxid="window" type="map">
    44    <record jsxid="splitters" type="map">
    5       <record jsxid="jsx_ide_splitter1" type="string">95.56962025316456%</record>
     5      <record jsxid="jsx_ide_splitter1" type="string">91.04665825977301%</record>
    66      <record jsxid="jsx_ide_splitter2" type="string">21.369047619047617%</record>
    77      <record jsxid="jsx_ide_splitter3" type="string">41.20734908136483%</record>
     
    5454    <record jsxid="JSXAPPS/ISOcat" type="map">
    5555      <record jsxid="recentFiles" type="array">
    56         <record jsxid="0" type="string">components/DataCategoryEditor.xml</record>
     56        <record jsxid="0" type="string">components/WorkspaceViewer.xml</record>
    5757        <record jsxid="1" type="string">components/appCanvas.xml</record>
    58         <record jsxid="2" type="string">jss/locale.xml</record>
    59         <record jsxid="3" type="string">components/Scope.xml</record>
    60         <record jsxid="4" type="string">components/User.xml</record>
    61         <record jsxid="5" type="string">components/ExplorerView.xml</record>
    62         <record jsxid="6" type="string">components/WorkspaceViewer.xml</record>
    63         <record jsxid="7" type="string">components/GroupEditor.xml</record>
    64         <record jsxid="8" type="string">components/DataCategoryViewer.xml</record>
    65         <record jsxid="9" type="string">components/DCSViewer.xml</record>
    66         <record jsxid="10" type="string">components/DataCategorySelectionViewer.xml</record>
    67         <record jsxid="11" type="string">components/ProfilesInput.xml</record>
    68         <record jsxid="12" type="string">xml/dc.xml</record>
    69         <record jsxid="13" type="string">components/SaveDC.xml</record>
    70         <record jsxid="14" type="string">components/Password.xml</record>
     58        <record jsxid="2" type="string">xsl/SearchRecommenders2CDF.xsl</record>
     59        <record jsxid="3" type="string">js/org/isocat/gui/WSViewer.js</record>
     60        <record jsxid="4" type="string">js/org/isocat/data/Search.js</record>
     61        <record jsxid="5" type="string">components/DataCategoryEditor.xml</record>
     62        <record jsxid="6" type="string">jss/locale.xml</record>
     63        <record jsxid="7" type="string">components/Scope.xml</record>
     64        <record jsxid="8" type="string">components/User.xml</record>
     65        <record jsxid="9" type="string">components/ExplorerView.xml</record>
     66        <record jsxid="10" type="string">components/GroupEditor.xml</record>
     67        <record jsxid="11" type="string">components/DataCategoryViewer.xml</record>
     68        <record jsxid="12" type="string">components/DCSViewer.xml</record>
     69        <record jsxid="13" type="string">components/DataCategorySelectionViewer.xml</record>
     70        <record jsxid="14" type="string">components/ProfilesInput.xml</record>
    7171      </record>
    7272      <record jsxid="openFiles" type="array">
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/etc/XRLLinks.xml

    r4036 r4289  
    115115        </link>
    116116       
    117         <!-- which groups have recommendations -->
    118         <link>
    119                 <ext>/info/recommenders</ext>
    120                 <int>active:ISOcat.manage.dm.recommenders</int>
    121         </link>
    122 
    123117        <!-- session service interface -->
    124118        <link>
     
    509503                <int>active:ISOcat.manage.system.config.authentication</int>
    510504        </link>
     505        <link>
     506                <ext>/info/recommenders.xml</ext>
     507                <int>active:ISOcat.manage.dm.recommenders</int>
     508        </link>
     509       
    511510       
    512511        <!-- schemas -->
  • cats/ISOcat/trunk/mod-ISOcat-interface-rest/interface/search.acc

    r3121 r4289  
    1 <accessor debug="false" trace="false">
     1<accessor debug="true" trace="false">
    22        <name>/rest/search</name>
    33        <descr>Search the users workspace.</descr>
     
    8080        </param>
    8181        <param>
     82                <name>recommenders</name>
     83                <descr>the recommender of the DCs</descr>
     84                <type canonical="true" join="|">string-join</type>
     85                <source>
     86                        <nvp name="recommender"/>
     87                        <default>
     88                                <string/>
     89                        </default>
     90                </source>
     91        </param>
     92        <param>
    8293                <name>limit</name>
    8394                <descr>limit the number of matches returned</descr>
     
    161172        <params/>
    162173        <idoc>
     174                <accessor-debug>
     175                        <instr>
     176                                <type>log</type>
     177                                <operand>var:params</operand>
     178                        </instr>
     179                </accessor-debug>
    163180                <!-- determine the requested representation -->
    164181                <instr>
     
    168185                        <target>var:representation</target>
    169186                </instr>
    170                 <accessor-debug>
    171                         <instr>
    172                                 <type>log</type>
    173                                 <operand>var:params</operand>
    174                         </instr>
    175                 </accessor-debug>
    176187                <!-- if no keywords then return an error -->
    177188                <if>
     
    489500                                                        <xsl:param name="profiles" select="''"/>
    490501                                                        <xsl:param name="types" select="''"/>
     502                                                        <xsl:param name="recommenders" select="()"/>
    491503
    492504                                                        <!-- globals -->
     
    497509                                                        <xsl:variable name="all-types" select="('container','simple','complex',$all-complex-types)"/>
    498510                                                        <xsl:variable name="all-language" select="document('active:ISOcat.manage.dm.languages')"/>
    499 
     511                                                       
    500512                                                        <xsl:variable name="def-fields" select="$all-fields"/>
    501513                                                        <xsl:variable name="def-scope" select="'public'"/>
     
    503515                                                        <xsl:variable name="def-language" select="'und'"/>
    504516                                                        <xsl:variable name="def-types" select="$all-types"/>
     517                                                        <xsl:variable name="def-recommenders" select="()"/>
    505518                                                       
    506519                                                        <xsl:variable name="def-normalize" select="'8|32'"/> <!-- see http://www.postgresql.org/docs/8.4/interactive/textsearch-controls.html#TEXTSEARCH-RANKING -->
     
    588601                                                                </xsl:choose>
    589602                                                        </xsl:variable>
     603                                                        <xsl:variable name="use-recommenders" select="$recommenders/tokenize(.,'\|')[normalize-space(.)!='']"/>
    590604                                                       
    591605                                                        <xsl:variable name="use-normalize" select="$def-normalize"/>
     
    609623                                                                        <xsl:message>DBG:use-types[<xsl:value-of select="count($use-types)"/>][<xsl:value-of select="string-join($use-types,', ')"/>]</xsl:message>
    610624                                                                        <xsl:message>DBG:use-match[<xsl:value-of select="$use-match"/>]</xsl:message>
     625                                                                        <xsl:message>DBG:use-recommenders[<xsl:value-of select="count($use-recommenders)"/>][<xsl:value-of select="string-join($use-recommenders,', ')"/>]</xsl:message>
    611626                                                                        <xsl:message>DBG:use-language[<xsl:value-of select="$use-language"/>]</xsl:message>
    612627                                                                        <xsl:message>DBG:use-language-id[<xsl:value-of select="$use-language-id"/>]</xsl:message>
     
    963978                                                                                                )
    964979                                                                                        </xsl:if>
     980                                                                                        <xsl:if test="exists($use-recommenders)">
     981                                                                                        JOIN
     982                                                                                                core_recommendation
     983                                                                                        ON
     984                                                                                                core_recommendation.dc = core_data_category.id
     985                                                                                        JOIN
     986                                                                                                core_adhoc_group
     987                                                                                        ON
     988                                                                                                core_recommendation."group" = core_adhoc_group.id
     989                                                                                        AND
     990                                                                                                core_adhoc_group.name IN (
     991                                                                                                <xsl:for-each select="$use-recommenders">
     992                                                                                                        '<xsl:value-of select="replace(.,'''','\\''')"/>'
     993                                                                                                        <xsl:if test="position()!=last()">
     994                                                                                                        ,
     995                                                                                                        </xsl:if>
     996                                                                                                </xsl:for-each>
     997                                                                                                )
     998                                                                                        </xsl:if>
    965999                                                                                        <xsl:choose>
    9661000                                                                                                <xsl:when test="$use-scope='public'">
     
    9921026                                        <match>var:match</match>
    9931027                                        <types>var:types</types>
     1028                                        <recommenders>var:recommenders</recommenders>
    9941029                                        <target>var:sql</target>
    9951030                                </instr>
  • cats/ISOcat/trunk/various/import/csv2dcif.xsl

    r3515 r4289  
    316316
    317317    <xsl:template match="csvFile">
    318         <dcif:dataCategorySelection dcif-version="1.2">
     318        <dcif:dataCategorySelection dcif-version="1.3">
    319319            <xsl:variable name="map" select="dcif:map(.)"/>
    320320            <xsl:result-document href="map.xml">
Note: See TracChangeset for help on using the changeset viewer.