Changeset 7936
- Timestamp:
- 11/07/11 11:00:49 (10 years ago)
- Location:
- mauRepo/NewmoonJSP
- Files:
-
- 1 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/NewmoonJSP/.settings/org.eclipse.wst.common.component
r7837 r7936 2 2 <project-modules id="moduleCoreId" project-version="1.5.0"> 3 3 <wb-module deploy-name="NewmoonJSP"> 4 <wb-resource deploy-path="/" source-path="/target/newmoon"/>5 4 </wb-module> 6 5 </project-modules> -
mauRepo/NewmoonJSP/pom.xml
r7934 r7936 4 4 <groupId>ndg.services.newmoon</groupId> 5 5 <artifactId>newmoon-web</artifactId> 6 <version>1.1. 0</version>6 <version>1.1.1</version> 7 7 <packaging>war</packaging> 8 8 … … 110 110 <groupId>ndg.services.newmoon</groupId> 111 111 <artifactId>core</artifactId> 112 <version>1.1. 0</version>112 <version>1.1.1</version> 113 113 <exclusions> 114 114 <exclusion> -
mauRepo/NewmoonJSP/src/main/java/ndg/newmoon/web/NewmoonContextListener.java
r7832 r7936 17 17 public static final String NM_RULES_SCHEMA_ENCODING = "nm.rules.schema.encoding"; 18 18 public static final String NM_REPORT_STYLESHEET = "nm.report.schema"; 19 public static final String WEB_INF = "nm.web.inf"; 19 20 20 21 /** … … 41 42 42 43 String webInfPath = event.getServletContext().getRealPath("/WEB-INF"); 44 event.getServletContext().setAttribute(WEB_INF, webInfPath); 43 45 event.getServletContext().setAttribute(TMP_DIR, webInfPath + "/tmpDir"); 44 46 if (LOG.isInfoEnabled()) { -
mauRepo/NewmoonJSP/src/main/java/ndg/newmoon/web/XMIEncoderHelper.java
r7934 r7936 176 176 xmi = xmis[0]; 177 177 } 178 base= FilenameUtils.getBaseName(xmi.getParent());179 178 String executionPath = FilenameUtils.getBaseName(xmi.getParent()); 179 // = "xmi-samples/zippedSample2"; 180 180 String testDir = (String) sc.getAttribute(NewmoonContextListener.NM_RULES_CONFORMANCE) 181 181 + "/ISO19136-V3.2-AnxE_XMI-V1.1"; 182 182 String encodeDir = (String) sc.getAttribute(NewmoonContextListener.NM_RULES_SCHEMA_ENCODING) + "/xmi11ea"; 183 183 //String workingPath = (String) sc.getAttribute(NewmoonContextListener.TMP_DIR); 184 String workingPath = xmi.getParent();185 184 // the first part of the baseDir contains the uploaded ZIP file, the 186 185 // second is the unpack dir … … 197 196 // ---- mandatory parameters ----// 198 197 // hidden 199 params.put(NM_PARAM.WORKING_DIRECTORY, workingPath); 198 params.put(NM_PARAM.WORKING_DIRECTORY, (String) sc.getAttribute(NewmoonContextListener.WEB_INF)); 199 params.put(NM_PARAM.EXECUTION_DIR, sc.getAttribute(NewmoonContextListener.TMP_DIR) + "/" + executionPath); 200 201 //params.put(NM_PARAM.WORKING_DIRECTORY, workingPath); 200 202 // hidden retrieved from the user uploaded file 201 203 params.put(NM_PARAM.XMI_DOC, sample); -
mauRepo/NewmoonJSP/src/main/webapp/WEB-INF/rules/conformance-test/ISO19136-V3.2-AnxE_XMI-V1.1/pre/pre-001.xq
r7934 r7936 35 35 declare variable $root-collection-path as xs:string external; 36 36 declare variable $working-directory as xs:string external; 37 declare variable $ base-directory as xs:string external;37 declare variable $execution-directory as xs:string external; 38 38 declare variable $query-path as xs:string external; 39 39 declare variable $dependency-register-path as xs:string external; … … 58 58 else if (starts-with($path, "file://")) 59 59 then $path 60 else concat("file://", $working-directory, "/", $path) 60 else if (starts-with($path, "request://")) 61 then concat("file://", $execution-directory, "/", substring-after($path, "request://")) 62 else 63 concat("file://", $working-directory, "/", $path) 61 64 return $ret 62 65 }; … … 66 69 { 67 70 let $collection := mod-db:get-mapping-collection(), 71 $defReg := concat("file://", replace($working-directory, "\\", "/"), "/", $mod-co:default-register-path), 68 72 $registers := ( 69 73 if (empty($dependency-register-path) or $dependency-register-path eq "") then 70 ($ mod-co:default-register-path)74 ($defReg) 71 75 else 72 ( $dependency-register-path, $mod-co:default-register-path)76 (concat("file://", replace($execution-directory, "\\", "/"), "/", $dependency-register-path), $defReg) 73 77 ), 74 78 $registers := ( … … 79 83 $collection, 80 84 concat("Register", $i, ".xml"), 81 xs:anyURI( concat("file://", replace($working-directory, "\\", "/"), "/", $path))85 xs:anyURI($path) 82 86 ) 83 87 ), -
mauRepo/NewmoonJSP/src/main/webapp/WEB-INF/rules/schema-encoding/xmi11ea/process-002.xq
r7934 r7936 32 32 declare variable $xmldb-password as xs:string external; 33 33 declare variable $working-directory as xs:string external; 34 declare variable $execution-directory as xs:string external; 34 35 declare variable $query-path as xs:string external; 35 36 declare variable $dependency-register-path as xs:string external; 36 37 declare variable $gml-version as xs:string external; 38 39 declare function local:resolve-dependency-register-path($paths as xs:string*) as xs:string* 40 { 41 for $path in $paths 42 let $ret := 43 if (starts-with($path, "http://") or starts-with($path, "https://")) 44 then $path 45 else if (starts-with($path, "file://")) 46 then $path 47 else if (starts-with($path, "request://")) 48 then concat("file://", $execution-directory, "/", substring-after($path, "request://")) 49 else 50 concat("file://", $working-directory, "/", $path) 51 return $ret 52 }; 37 53 38 54 (: … … 47 63 { 48 64 let $collection := mod-db:get-mapping-collection(), 65 $defReg := concat("file://", replace($working-directory, "\\", "/"), "/", $mod-co:default-register-path), 49 66 $registers := ( 50 67 if (empty($dependency-register-path) or $dependency-register-path eq "") then 51 ($ mod-co:default-register-path)68 ($defReg) 52 69 else 53 ( $dependency-register-path, $mod-co:default-register-path)70 (concat("file://", replace($execution-directory, "\\", "/"), "/", $dependency-register-path), $defReg) 54 71 ), 55 72 $registers := ( … … 60 77 $collection, 61 78 concat("Register", $i, ".xml"), 62 xs:anyURI( concat("file://", replace($working-directory, "\\", "/"), "/", $path))79 xs:anyURI($path) 63 80 ) 64 81 ), … … 68 85 for $pck in doc($path)//pckr:package 69 86 return ( 70 $pck/pckr:implementation[@binding eq concat("GML ", $gml-version)]/pckr:classMap/@location,71 $pck/pckr:implementation[@binding eq "any"]/pckr:classMap/@location87 local:resolve-dependency-register-path($pck/pckr:implementation[@binding eq concat("GML ", $gml-version)]/pckr:classMap/@location), 88 local:resolve-dependency-register-path($pck/pckr:implementation[@binding eq "any"]/pckr:classMap/@location) 72 89 ) 73 90 ) -
mauRepo/NewmoonJSP/src/main/webapp/pages/encodeXMI.xhtml
r7883 r7936 138 138 </f:facet> 139 139 To learn about the structure of the zip file to upload please check <a 140 href=" toEncode.zip"><b>this</b></a> sample file140 href="myCustomPackage.zip"><b>this</b></a> sample file 141 141 142 142 </pn:panel>
Note: See TracChangeset
for help on using the changeset viewer.