Changeset 1621


Ignore:
Timestamp:
11/17/11 23:07:41 (13 years ago)
Author:
gaba
Message:

new lib hierarchy

Location:
MDService2/branches/MDService_simple3/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/DCRProxyAction.java

    r1613 r1621  
    55import eu.clarin.cmdi.mdservice.model.Termset;
    66import eu.clarin.cmdi.mdservice.proxy.BasicProxy;
    7 import eu.clarin.cmdi.mdservice.proxy.DCRProxy;
     7//import eu.clarin.cmdi.mdservice.proxy.DCRProxy;
    88
    99/**
     
    8080        public void setTargetProxy(){
    8181               
    82                 setTargetProxy(new DCRProxy());
     82                //setTargetProxy(new DCRProxy());
    8383               
    8484        }
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/GenericAction.java

    r1613 r1621  
    66import java.util.HashMap;
    77import java.util.Map;
     8import java.util.Properties;
     9import java.util.jar.*;
    810
    911import javax.servlet.http.HttpServletRequest;
     12
    1013import org.apache.log4j.Logger;
    1114import org.apache.struts2.interceptor.ServletRequestAware;
     
    1316
    1417import com.opensymphony.xwork2.ActionSupport;
     18import com.sun.xml.internal.ws.util.StringUtils;
    1519
    1620import eu.clarin.cmdi.mdservice.internal.CQLParseException;
     
    200204         
    201205       
     206        public GenericAction() {
     207                //configure
     208                Utils.loadConfig("mdservice", "mdservice.properties", this.getClass().getClassLoader());
     209
     210        }
    202211        /**
    203212         * Is used in struts.xml to dynamically set the mime-type of the result, depending on the format-parameter
     
    522531                       
    523532                try{
     533                       
    524534                        loadParams();
    525535                       
     
    574584                        }else {
    575585                                MDTransformer transformer = new MDTransformer();
     586                                transformer.configure(Utils.getConfig(), this.getClass().getClassLoader());
    576587                                // set URL as srcFile (for MDTransformer to pass to xsl-scripts)
    577588                                // TODO: WHY??
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/action/WorkspaceAction.java

    r1540 r1621  
    160160        public WorkspaceAction () {     
    161161                this.elementtype = WorkspaceAction.SE_WORKSPACE;
    162                 workspacefilename = Utils.getConfig().getProperty("workspaceprofile.path") + Utils.getConfig().getProperty("workspace.file");
     162                //workspacefilename = Utils.getConfig().getProperty("workspaceprofile.path") + Utils.getConfig().getProperty("workspace.file");
     163                workspacefilename = Utils.getConfig("workspaceprofile.path") + Utils.getConfig("workspace.file");
    163164                if (workspace_doc == null){
    164165                        //workspacefilename = Utils.getConfig().getProperty("workspace.path") + Utils.getConfig().getProperty("workspace.file");
     
    224225        public String getBasePath() {           
    225226                if (base_path == null) {
    226                         base_path = Utils.getConfig().getProperty(getProxyKey() + ".path");
     227                        //base_path = Utils.getConfig().getProperty(getProxyKey() + ".path");
     228                        base_path = Utils.getConfig(getProxyKey() + ".path");
    227229                }
    228230                return base_path;
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/model/WorkspaceProfile.java

    r1540 r1621  
    134134
    135135        public WorkspaceProfile() {
     136                //configure
     137                Utils.loadConfig(this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "mdservice.properties", this.getClass().getClassLoader());
     138
    136139        }
    137140       
     
    218221
    219222        public static JSONArray createRepositories() throws IOException, InterruptedException, TransformerException, NoStylesheetException{
    220                 String path = Utils.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;
     223                String path = Utils.getConfig("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;
    221224                File file=new File(path);
    222225                InputStream in  = new BufferedInputStream( new FileInputStream(path));;
    223226               
    224227                MDTransformer transformer = new MDTransformer();
     228                transformer.configure(Utils.getAppConfig(WorkspaceProfile.class.getProtectionDomain().getCodeSource().getLocation().getPath()), WorkspaceProfile.class.getClassLoader());
    225229                transformer.setSrcFile(file.toURI().toURL());
    226230                transformer.setParams(MDTransformer.createParamsMap("xml2json"));
  • MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/proxy/SMCProxy.java

    r1614 r1621  
    55import java.net.MalformedURLException;
    66import java.net.URL;
    7 import java.net.URLConnection;
     7//import java.net.URLConnection;
    88import java.util.Map;
    99
     
    1212import eu.clarin.cmdi.mdservice.internal.CQLParseException;
    1313import eu.clarin.cmdi.mdservice.internal.NoStylesheetException;
    14 import eu.clarin.cmdi.mdservice.internal.Utils;
     14//import eu.clarin.cmdi.mdservice.internal.Utils;
    1515import eu.clarin.cmdi.smc.SMC;
    1616
  • MDService2/branches/MDService_simple3/src/mdservice.properties

    r1613 r1621  
    2323//cache.path = /srv/tomcat6/webapps/MDService2_cache/
    2424//workspaceprofile.path = /srv/tomcat6/webapps/MDService2_profiles/
    25 cache.path = C:/apps/apache-tomcat/webapps/MDService2_cache/
    26 workspaceprofile.path = C:/apps/apache-tomcat/webapps/MDService2_profiles/
    27 //cache.path = C:/apache-tomcat-6.0.26/webapps/MDService2_cache/
    28 //workspaceprofile.path = C:/apache-tomcat-6.0.26/webapps/MDService2_profiles/
     25//cache.path = C:/apps/apache-tomcat/webapps/MDService2_cache/
     26//workspaceprofile.path = C:/apps/apache-tomcat/webapps/MDService2_profiles/
     27cache.path = C:/apache-tomcat-6.0.26/webapps/MDService2_cache/
     28workspaceprofile.path = C:/apache-tomcat-6.0.26/webapps/MDService2_profiles/
    2929workspace.file = WorkspaceProfile.xml
    3030
Note: See TracChangeset for help on using the changeset viewer.