Ignore:
Timestamp:
06/10/11 22:49:05 (13 years ago)
Author:
gaba
Message:

htmlsimple - paging, details
options(withSummary) - corrections
profile reading - corrections

Location:
MDService2/trunk/MDService2
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js

    r1392 r1417  
    345345        } else {
    346346                if (json.options != "null"){
    347                         $.each(json.options,function(i,item){
     347                        var opts = json.options.split(',');
     348                        $.each(opts,function(i,item){
    348349                                options_text = options_text + "," + item;
    349350                        });
  • MDService2/trunk/MDService2/WebContent/simple_index.jsp

    r1393 r1417  
    1212<body>
    1313<form action="recordset/htmlsimple/" method="get">
    14 <input type="text" name="squery" />
    15 <input type="submit" value="Submit" />
    16 </form>
     14                                <input type="text" name="q" ></input>
     15                               
     16                                <input type="submit" value="Submit" > </input><br/>
     17                                <label>startItem: </label><input type="text" name="startItem" ></input><br/>
     18                                <label> maxItems: </label><input type="text" name="maximumItems" ></input>
     19        </form>
    1720</body>
    1821
  • MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/GenericProxyAction.java

    r1392 r1417  
    445445       
    446446        public static JSONArray createRepositories() throws IOException, InterruptedException, TransformerException{
    447                 String path = Admin.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.PROFILENAME_SERVER;
     447                String path = Admin.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;
    448448                File file=new File(path);
    449449                InputStream in  = new BufferedInputStream( new FileInputStream(path));;
     
    455455               
    456456                JSONObject json = JSONObject.fromObject(convertStreamToString(jsonstream));
    457                 JSONArray array = json.getJSONObject("WorkspaceProfile").getJSONArray("Repositories"); 
     457                JSONArray wparray = json.getJSONObject("Profiles").getJSONArray("WorkspaceProfiles");
     458                JSONArray array = null;
     459                for (int i = 0; i < wparray.size(); ++i) {     
     460                        JSONObject wp = wparray.getJSONObject(i);
     461                        if (wp.get("Repositories") != null){
     462                                array = wp.getJSONArray("Repositories");
     463                                break;
     464                        }
     465                }       
    458466               
    459467                // repository as static variable
  • MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java

    r1388 r1417  
    105105        public static String ADMINISTRATION_FILENAME = "Administration.xml";
    106106       
    107         private String workspace_filename = "WorkspaceProfile.xml";
     107        public static String WORKSPACE_FILENAME = "WorkspaceProfile.xml";
    108108        /**
    109109         * Properties to be filled by Struts with according request-parameters
     
    133133       
    134134        public String Workspace_filename(){
    135                 return workspace_filename;
     135                return WORKSPACE_FILENAME;
    136136        }
    137137
    138138        public void setWorkspace_filename(String workspace_filename) {
    139                 this.workspace_filename = workspace_filename;
     139                this.WORKSPACE_FILENAME = workspace_filename;
    140140        }
    141141       
     
    300300                        profilename =  ADMINISTRATION_FILENAME;
    301301                } else if (type.toLowerCase().equals(FILENAME)){
    302                         profilename = this.workspace_filename;
     302                        profilename = this.WORKSPACE_FILENAME;
    303303                }
    304304               
     
    331331       
    332332        public String getPath() {
    333                 String targetPath = getBasePath() + this.workspace_filename;//getWorkspaceProfile();       
     333                String targetPath = getBasePath() + this.WORKSPACE_FILENAME;//getWorkspaceProfile();       
    334334        Admin.notifyUser("WorkspaceAction TARGETPATH: " + targetPath);             
    335335        return targetPath;
  • MDService2/trunk/MDService2/src/mdservice.properties

    r1406 r1417  
    1717//cache.path = /srv/tomcat6/webapps/MDService2_cache/
    1818//workspaceprofile.path = /srv/tomcat6/webapps/MDService2_profiles/
    19 cache.path = C:/apps/apache-tomcat/webapps/MDService2_cache/
    20 workspaceprofile.path = C:/apps/apache-tomcat/webapps/MDService2_profiles/
    21 //cache.path = C:/apache-tomcat-6.0.26/webapps/MDService2_cache/
    22 //workspaceprofile.path = C:/apache-tomcat-6.0.26/webapps/MDService2_profiles/
     19//cache.path = C:/apps/apache-tomcat/webapps/MDService2_cache/
     20//workspaceprofile.path = C:/apps/apache-tomcat/webapps/MDService2_profiles/
     21cache.path = C:/apache-tomcat-6.0.26/webapps/MDService2_cache/
     22workspaceprofile.path = C:/apache-tomcat-6.0.26/webapps/MDService2_profiles/
    2323workspace.file = WorkspaceProfile.xml
    2424
  • MDService2/trunk/MDService2/src/xsl/mdset2view.xsl

    r1392 r1417  
    335335                        <xsl:choose>
    336336                                <xsl:when test="exists(.//MdSelfLink)" >
    337                                 <a class="internal" href="{concat('record/htmldetail/', my:encodePID(.//MdSelfLink), '?repository=', $repository_name)}" >
    338                                                 <xsl:value-of select="$absolute_position" />
    339                                 </a>
    340                                 <span class="cmd cmd_detail" ></span>                           
    341                                 <span class="cmd cmd_save" ></span>                                             
     337                                        <xsl:choose>
     338                                                <xsl:when test="contains($format, 'htmlsimple')" >
     339                                                <a class="internal" href="{concat('../../record/htmldetail/', my:encodePID(.//MdSelfLink), '?repository=', $repository_name)}" >
     340                                                                <xsl:value-of select="$absolute_position" />
     341                                                </a>                                           
     342                                                </xsl:when>
     343                                                <xsl:otherwise>
     344                                                <a class="internal" href="{concat('record/htmldetail/', my:encodePID(.//MdSelfLink), '?repository=', $repository_name)}" >
     345                                                                <xsl:value-of select="$absolute_position" />
     346                                                </a>
     347                                                </xsl:otherwise>
     348                                        </xsl:choose>
     349                                        <span class="cmd cmd_detail" ></span>                           
     350                                        <span class="cmd cmd_save" ></span>                                             
    342351                                </xsl:when>
    343352                                <xsl:otherwise><xsl:value-of select="$absolute_position" /></xsl:otherwise>
     
    358367   
    359368    <form action="" method="get">
    360                                 <input type="text" name="squery" > </input>
    361                                 <input type="submit" value="Submit" > </input>
     369                                <input type="text" name="q" ><xsl:attribute name="value"><xsl:value-of select="$q"/></xsl:attribute> </input>
     370                               
     371                                <input type="submit" value="Submit" > </input><br/>
     372                                <label>startItem: </label><input type="text" name="startItem" ><xsl:attribute name="value"><xsl:value-of select="$startItem"/></xsl:attribute> </input><br/>
     373                                <label> maxItems: </label><input type="text" name="maximumItems" ><xsl:attribute name="value"><xsl:value-of select="$maximumItems"/></xsl:attribute> </input>
    362374        </form>
    363375        <table class="show">           
  • MDService2/trunk/MDService2/src/xsl/params.xsl

    r1406 r1417  
    2828                       
    2929        <xsl:param name="repository_name" select="''" />
     30        <xsl:param name="q" select="''" />
    3031       
    3132        <!--  for resolving components by suffixing with @ComponentId -->
Note: See TracChangeset for help on using the changeset viewer.