Changeset 1540 for MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/model/WorkspaceProfile.java
- Timestamp:
- 09/19/11 10:39:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
MDService2/branches/MDService_simple3/src/eu/clarin/cmdi/mdservice/model/WorkspaceProfile.java
r1538 r1540 11 11 import net.sf.json.JSONArray; 12 12 import net.sf.json.JSONObject; 13 import eu.clarin.cmdi.mdservice.internal.Admin;14 import eu.clarin.cmdi.mdservice.action.GenericProxyAction;15 import eu.clarin.cmdi.mdservice.internal.Helpers;16 13 import eu.clarin.cmdi.mdservice.internal.MDTransformer; 14 import eu.clarin.cmdi.mdservice.internal.Utils; 17 15 import eu.clarin.cmdi.mdservice.action.WorkspaceAction; 18 16 import eu.clarin.cmdi.mdservice.internal.NoStylesheetException; … … 220 218 221 219 public static JSONArray createRepositories() throws IOException, InterruptedException, TransformerException, NoStylesheetException{ 222 String path = Admin.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;220 String path = Utils.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER; 223 221 File file=new File(path); 224 222 InputStream in = new BufferedInputStream( new FileInputStream(path));; … … 229 227 InputStream jsonstream = transformer.transformXML(in); 230 228 231 JSONObject json = JSONObject.fromObject( Helpers.convertStreamToString(jsonstream));229 JSONObject json = JSONObject.fromObject(Utils.streamToString(jsonstream)); 232 230 JSONArray wparray = json.getJSONObject("Profiles").getJSONArray("WorkspaceProfiles"); 233 231 JSONArray array = null; … … 254 252 255 253 public static JSONObject createOptions() throws IOException, InterruptedException, TransformerException, NoStylesheetException{ 256 String path = Admin.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;254 String path = Utils.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER; 257 255 File file=new File(path); 258 256 InputStream in = new BufferedInputStream( new FileInputStream(path));; … … 263 261 InputStream jsonstream = transformer.transformXML(in); 264 262 265 JSONObject json = JSONObject.fromObject( Helpers.convertStreamToString(jsonstream));263 JSONObject json = JSONObject.fromObject(Utils.streamToString(jsonstream)); 266 264 JSONArray wparray = json.getJSONObject("Profiles").getJSONArray("WorkspaceProfiles"); 267 265 JSONObject obj = null; … … 306 304 307 305 public static JSONArray createTermsets() throws IOException, InterruptedException, TransformerException, NoStylesheetException{ 308 String path = Admin.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER;306 String path = Utils.getConfig().getProperty("workspaceprofile.path") + WorkspaceAction.WORKSPACE_FILENAME;//PROFILENAME_SERVER; 309 307 File file=new File(path); 310 308 InputStream in = new BufferedInputStream( new FileInputStream(path));; … … 315 313 InputStream jsonstream = transformer.transformXML(in); 316 314 317 JSONObject json = JSONObject.fromObject( Helpers.convertStreamToString(jsonstream));315 JSONObject json = JSONObject.fromObject(Utils.streamToString(jsonstream)); 318 316 JSONArray wparray = json.getJSONObject("Profiles").getJSONArray("WorkspaceProfiles"); 319 317 JSONArray array = null;
Note: See TracChangeset
for help on using the changeset viewer.