Simple-file-repository/1.2

From WebLab Wiki
Jump to navigationJump to search
Transparent Resource Container using file system
Details
Service Interfaces ResourceContainer, DataOperator
Exchange model: WebLab 1.2.2
Versions: <ListSubPages />
Licence LGPL 2.1
Supported OS Windows/Linux/MacOS
Binary simple-file-repository-1.2.war
Sources simple-file-repository-1.2-sources.jar
Javadoc simple-file-repository-1.2-javadoc.jar
SVN simple-file-repository
Maven Artifact

<groupId>org.ow2.weblab.webservices</groupId>

<artifactId>simple-file-repository</artifactId>

<version>1.2</version>
Release Note


It's a file system repository. Just configure the file system folder and the component will save and load resources from files in this folder.

When you save a resource, the component check if the resource's uri exists and if it's exists, the existing resource will be overwritten.

This service will never change uris of send resources.

Configuration

Configuration is done in cxf-servlet.xml, value of the constructor's argument is the path to the system folder used to save resources (simple-repo by default)

	<bean id="data" class="org.ow2.weblab.service.FullDataManagment">
		<constructor-arg value="simple-repo" />
	</bean>

UsageContext effects

Usage context has no effect.

Examples of SOAP Input/Output

  • SaveResource Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://weblab.ow2.org/core/1.2/services/resourcecontainer">
   <soapenv:Header/>
   <soapenv:Body>
      <res:saveResourceArgs>
         <resource xsi:type="ns13:Document" uri="weblab://example-made-document/anyuri/1327592136291/-784092873" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns13="http://weblab.ow2.org/core/1.2/model#">
            <annotation uri="weblab://example-made-document/anyuri/1327592136291/-784092873#a0">
               <data xmlns:ns10="http://weblab.ow2.org/core/1.2/services/trainable" xmlns:ns11="http://weblab.ow2.org/core/1.2/services/exception" xmlns:ns12="http://weblab.ow2.org/core/1.2/services/reportprovider" xmlns:ns2="http://weblab.ow2.org/core/1.2/model#" xmlns:ns3="http://weblab.ow2.org/core/1.2/services/indexer" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/sourcereader" xmlns:ns6="http://weblab.ow2.org/core/1.2/services/resourcecontainer" xmlns:ns8="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ns9="http://weblab.ow2.org/core/1.2/services/queuemanager">
                  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wp="http://weblab.ow2.org/core/1.2/ontology/processing#">
                     <rdf:Description rdf:about="weblab://example-made-document/anyuri/1327592136291/-784092873" xmlns:dc="http://purl.org/dc/elements/1.1/">
                        <dc:source>http://weblab-project.org</dc:source>
                        <dc:title>Document Title</dc:title>
                        <dc:date>2012-01-26T16:35:48+0100</dc:date>
                     </rdf:Description>
                  </rdf:RDF>
               </data>
            </annotation>
            <mediaUnit xsi:type="ns13:Text" uri="weblab://example-made-document/anyuri/1327592136291/-784092873#t1">
               <content>any text</content>
            </mediaUnit>
         </resource>
      </res:saveResourceArgs>
   </soapenv:Body>
</soapenv:Envelope>
  • SaveResource Result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns10:saveResourceReturn xmlns:ns2="http://weblab.ow2.org/core/1.2/services/reportprovider" xmlns:ns3="http://weblab.ow2.org/core/1.2/services/trainable" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/sourcereader" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns6="http://weblab.ow2.org/core/1.2/services/exception" xmlns:ns7="http://weblab.ow2.org/core/1.2/services/searcher" xmlns:ns8="http://weblab.ow2.org/core/1.2/services/queuemanager" xmlns:ns9="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ns10="http://weblab.ow2.org/core/1.2/services/resourcecontainer" xmlns:ns11="http://weblab.ow2.org/core/1.2/services/indexer">
         <resourceId>weblab://example-made-document/anyuri/1327592136291/-784092873</resourceId>
      </ns10:saveResourceReturn>
   </soap:Body>
</soap:Envelope>
  • LoadResource Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:res="http://weblab.ow2.org/core/1.2/services/resourcecontainer">
   <soapenv:Header/>
   <soapenv:Body>
      <res:loadResourceArgs>
         <resourceId>weblab://example-made-document/anyuri/1327592136291/-784092873</resourceId>
      </res:loadResourceArgs>
   </soapenv:Body>
</soapenv:Envelope>
  • LoadResource Result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns10:loadResourceReturn xmlns:ns2="http://weblab.ow2.org/core/1.2/services/reportprovider" xmlns:ns3="http://weblab.ow2.org/core/1.2/services/trainable" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/sourcereader" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns6="http://weblab.ow2.org/core/1.2/services/exception" xmlns:ns7="http://weblab.ow2.org/core/1.2/services/searcher" xmlns:ns8="http://weblab.ow2.org/core/1.2/services/queuemanager" xmlns:ns9="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ns10="http://weblab.ow2.org/core/1.2/services/resourcecontainer" xmlns:ns11="http://weblab.ow2.org/core/1.2/services/indexer">
         <resource xsi:type="ns13:Document" uri="weblab://example-made-document/anyuri/1327592136291/-784092873" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns13="http://weblab.ow2.org/core/1.2/model#">
            <annotation uri="weblab://example-made-document/anyuri/1327592136291/-784092873#a0">
               <data xmlns:ns10="http://weblab.ow2.org/core/1.2/services/trainable" xmlns:ns11="http://weblab.ow2.org/core/1.2/services/exception" xmlns:ns12="http://weblab.ow2.org/core/1.2/services/reportprovider" xmlns:ns2="http://weblab.ow2.org/core/1.2/model#" xmlns:ns3="http://weblab.ow2.org/core/1.2/services/indexer" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/sourcereader" xmlns:ns6="http://weblab.ow2.org/core/1.2/services/resourcecontainer" xmlns:ns8="http://weblab.ow2.org/core/1.2/services/analyser" xmlns:ns9="http://weblab.ow2.org/core/1.2/services/queuemanager">
                  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wp="http://weblab.ow2.org/core/1.2/ontology/processing#">
                     <rdf:Description rdf:about="weblab://example-made-document/anyuri/1327592136291/-784092873" xmlns:dc="http://purl.org/dc/elements/1.1/">
                        <dc:source>http://weblab-project.org</dc:source>
                        <dc:title>Document Title</dc:title>
                        <dc:date>2012-01-26T16:35:48+0100</dc:date>
                     </rdf:Description>
                  </rdf:RDF>
               </data>
            </annotation>
            <mediaUnit xsi:type="ns13:Text" uri="weblab://example-made-document/anyuri/1327592136291/-784092873#t1">
               <content>any text</content>
            </mediaUnit>
         </resource>
      </ns10:loadResourceReturn>
   </soap:Body>
</soap:Envelope>

Known Limitations

N/A

Dependencies

List off all dependencies of this service:

org.ow2.weblab.webservices:simple-file-repository:war:1.2
+- commons-codec:commons-codec:jar:1.5:compile
+- log4j:log4j:jar:1.2.12:compile
+- org.ow2.weblab.services:dataoperator:jar:1.2.2:compile
+- org.ow2.weblab.core:model:jar:1.2.2:compile
+- org.ow2.weblab.core:extended:jar:1.2.2:compile
+- org.ow2.weblab.core:annotator:jar:1.2.4:compile
|  \- joda-time:joda-time:jar:1.6.2:compile
+- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.4.0:compile
|  +- xml-resolver:xml-resolver:jar:1.2:compile
|  +- asm:asm:jar:3.3:compile
|  +- org.apache.cxf:cxf-api:jar:2.4.0:compile
|  |  +- org.apache.cxf:cxf-common-utilities:jar:2.4.0:compile
|  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0:compile
|  |  \- org.apache.neethi:neethi:jar:3.0.0:compile
|  |     +- wsdl4j:wsdl4j:jar:1.6.2:compile
|  |     \- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.1:compile
|  |        \- org.codehaus.woodstox:stax2-api:jar:3.0.2:compile
|  +- org.apache.cxf:cxf-rt-core:jar:2.4.0:compile
|  |  +- com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
|  |  \- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
|  +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.4.0:compile
|  |  +- org.apache.cxf:cxf-tools-common:jar:2.4.0:compile
|  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.4.0:compile
|  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.4.0:compile
|  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.4.0:compile
|  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.4.0:compile
+- org.apache.cxf:cxf-rt-transports-http:jar:2.4.0:compile
|  +- org.apache.cxf:cxf-rt-transports-common:jar:2.4.0:compile
|  \- org.springframework:spring-web:jar:3.0.5.RELEASE:compile
|     +- aopalliance:aopalliance:jar:1.0:compile
|     +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
|     +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
|     |  +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
|     |  +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
|     |  \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
|     \- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
+- xalan:xalan:jar:2.7.1:compile
|  \- xalan:serializer:jar:2.7.1:compile
|     \- xml-apis:xml-apis:jar:1.3.04:compile
+- commons-logging:commons-logging:jar:1.1.1:compile
+- junit:junit:jar:4.8.2:test
\- javax.servlet:servlet-api:jar:2.4:provided