From WebLab Wiki
If your question is not answered here, then please ask for help in our [[email protected] mailing list].
What is the licence of the WebLab platform ?
WebLab is distributed under the terms of the GNU LESSER GENERAL PUBLIC LICENSE or simply LGPL version 2.1 (as provided on the source repository).
It's open source but you still have mention of copyrights, isn't it a problem ?
Not really. The copyright are just telling you who are the original author of the code. That's fully compatible with LGPGL 2.1.
Are the tools used open source too ?
The tools proposed in the WebLab (namely Tomcat as an application server, Liferay as a web portal, PEtALS as an ESB and finally Orchestra as a BPEL orchestrator) are indeed open source under their own licensing model. However these are just the recommended ones and you are free to use others that are compatible with the standard we use (more information in technical pages). On top of that, we are using a lot of third party librairies, their licences are mentionned on a dedicated Wiki page WebLab_Third_Party_Licenses.
What about the components: are they all open sources ?
Not all of them are. You can find the ones provided by the WebLab team on the source repository which are all under LGPL 2.1 too.
Is it mandatory to provide all new WebLab components as open source ?
Among the multiple research projects in which the WebLab has been used, more than 100 services and or user interface component have been develop by our partners. However only them are the right person to decide whether they want to open their source or not. And it's the same for any new component.
How can I create WebLab Resources, Video, Annotation, Document ?
You can use WebLab Factory, from the WebLab Model Extended project.
How can I annotate a WebLab Resource using my ontology ?
You can either use either WebLab Model Annotator to annotate Resource:
DublinCoreAnnotator dca = new DublinCoreAnnotator(document); //Set the title dca.writeTitle("My New Document");
Or RDF Helpers that allow more control on RDF selection and writing:
PoKHelper helper = RDFHelperFactory.getPoKHelper(pok); // Set the creator helper.createLitStat(pok.getUri(), DublinCore.CREATOR_PROPERTY_NAME, "John Smith");
Can I get an Annotator from my ontology ?
Yes you can ! See Annotator generation from an ontology.
Annotator and Helpers
The rational for the annotators creation is to simplify the process of adding and retrieving properties on WebLab resources. For example, WebLab users deserve an easy way to set and get title on a document.
For the moment, one must use helper this way:
// we create a WebLab Document Document document = ResourceFactory.createResource("example_factory", "exampledoc", Document.class); // we create an annotation on the WebLab Document Annotation metadata = AnnotationFactory.createAndLinkAnnotation(document); // we create a helper to manage annotation PoKHelper metadataHelper = RDFHelperFactory.getPoKHelper(metadata); // we write a rdf statement in the annotation metadataHelper.createLitStat(doc.getUri(), "http://purl.org/dc/elements/1.1/title","My New Document");
Using the annotator, you could write:
// we create a WebLab Document Document document = ResourceFactory.createResource("example_factory", "exampledoc", Document.class); // we create a DublinCore annotator DublinCoreAnnotator annotator = new DublinCoreAnnotator(document); // we set the title annotator.writeTitle("My New Document");
How must I throw a Soap Fault inside a Web Service ?
In Java, SoapFault are mapped automatically to Java Exceptions, so it seems to be easy to throw a correct SoapFault, but be carefull:
- the SoapFault detail element is not automatically generated
- the SoapFault detail element is used to map the SoapFault to the correct exception type
So when you thow an exception in Java always use this (it's an EmpyQueueException, but it's true for any SaopFault mapped exception):
throw new EmptyQueueException("Server error", "Detailed error");
throw new EmptyQueueException("Server error");
because it will generate (with no detail):
<soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Server error</faultstring> </soap:Fault>
<soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Server error</faultstring> <detail> <ns5:emptyQueueMessage xsi:nil="true" xmlns:ns2="http://weblab.ow2.org/core/1.2/services/queuemanager" xmlns:ns3="http://weblab.ow2.org/core/1.2/model#" xmlns:ns4="http://weblab.ow2.org/core/1.2/services/configurable" xmlns:ns5="http://weblab.ow2.org/core/1.2/services/exception" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Detailed error</ns5:emptyQueueMessage> </detail> </soap:Fault>
Do I have to build the WebLab Core from sources to use the WebLab Model in my application ?
No, we provide WebLab Core artifacts and packages available in the OW2 Maven repository.
To access Weblab OW2 repository, you can add the following lines in your settings.xml:
<repository> <id>WebLab OW2 repository</id> <url>http://maven.ow2.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository>
When compiling WebLab Exchange Model, why do I get an error ?
When compiling WebLab sources, you can encounter the following error:
org.codehaus.classworlds.NoSuchRealmException: plexus.core at org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:434) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
This error appears when you try to generate Java classes from the WebLab Exchange Model. This process is a little bit memory consuming. To avoid this problem, you could allow a bigger PermSize for the JVM:
With your favorite terminal:
user@machine$ export MAVEN_OPTS=-XX:MaxPermSize=1024m
With your Windows prompt:
C:> SET MAVEN_OPTS=-XX:MaxPermSize=1024m
Why results are not shown when I search for a document in the WebLab demonstration ?
There is a solution: to disable cache within Liferay. To do this, you have to add some options in the properties file that defines root configurations:
Why portlets do not correctly work with my own Liferay installation ?
To install jQuery in your own portal, please refers to your portal documentation: