You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by su...@apache.org on 2011/04/30 13:18:34 UTC

svn commit: r1098099 [5/5] - in /incubator/stanbol/trunk/cmsadapter: ./ core/ core/src/ core/src/main/ core/src/main/java/ core/src/main/java/org/ core/src/main/java/org/apache/ core/src/main/java/org/apache/stanbol/ core/src/main/java/org/apache/stanb...

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertyDefinition.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertyDefinition.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertyDefinition.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertyDefinition.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,307 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.29 at 11:44:48 AM EEST 
+//
+
+
+package org.apache.stanbol.cmsadapter.servicesapi.model.web;
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for propertyDefinition element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="propertyDefinition">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}sourceObjectTypeRef" minOccurs="0"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}localname"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}namespace" minOccurs="0"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}uniqueRef"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}propertyType"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}cardinality" minOccurs="0"/>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}required" minOccurs="0"/>
+ *           &lt;sequence>
+ *             &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}valueConstraint" maxOccurs="unbounded" minOccurs="0"/>
+ *           &lt;/sequence>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}annotation" minOccurs="0"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "sourceObjectTypeRef",
+    "localname",
+    "namespace",
+    "uniqueRef",
+    "propertyType",
+    "cardinality",
+    "required",
+    "valueConstraint",
+    "annotation"
+})
+@XmlRootElement(name = "propertyDefinition")
+public class PropertyDefinition {
+
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+    protected String sourceObjectTypeRef;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org", required = true)
+    protected String localname;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+    protected String namespace;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org", required = true)
+    protected String uniqueRef;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org", required = true)
+    protected PropType propertyType;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+    protected BigInteger cardinality;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+    protected Boolean required;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org", required = true)
+    protected List<String> valueConstraint;
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+    protected AnnotationType annotation;
+
+    /**
+     * Gets the value of the sourceObjectTypeRef property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getSourceObjectTypeRef() {
+        return sourceObjectTypeRef;
+    }
+
+    /**
+     * Sets the value of the sourceObjectTypeRef property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setSourceObjectTypeRef(String value) {
+        this.sourceObjectTypeRef = value;
+    }
+
+    /**
+     * Gets the value of the localname property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getLocalname() {
+        return localname;
+    }
+
+    /**
+     * Sets the value of the localname property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setLocalname(String value) {
+        this.localname = value;
+    }
+
+    /**
+     * Gets the value of the namespace property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getNamespace() {
+        return namespace;
+    }
+
+    /**
+     * Sets the value of the namespace property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setNamespace(String value) {
+        this.namespace = value;
+    }
+
+    /**
+     * Gets the value of the uniqueRef property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getUniqueRef() {
+        return uniqueRef;
+    }
+
+    /**
+     * Sets the value of the uniqueRef property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setUniqueRef(String value) {
+        this.uniqueRef = value;
+    }
+
+    /**
+     * Gets the value of the propertyType property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link PropType }
+     *     
+     */
+    public PropType getPropertyType() {
+        return propertyType;
+    }
+
+    /**
+     * Sets the value of the propertyType property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link PropType }
+     *     
+     */
+    public void setPropertyType(PropType value) {
+        this.propertyType = value;
+    }
+
+    /**
+     * Gets the value of the cardinality property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getCardinality() {
+        return cardinality;
+    }
+
+    /**
+     * Sets the value of the cardinality property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setCardinality(BigInteger value) {
+        this.cardinality = value;
+    }
+
+    /**
+     * Gets the value of the required property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link Boolean }
+     *     
+     */
+    public Boolean isRequired() {
+        return required;
+    }
+
+    /**
+     * Sets the value of the required property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link Boolean }
+     *     
+     */
+    public void setRequired(Boolean value) {
+        this.required = value;
+    }
+
+    /**
+     * Gets the value of the valueConstraint property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the valueConstraint property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getValueConstraint().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link String }
+     * 
+     * 
+     */
+    public List<String> getValueConstraint() {
+        if (valueConstraint == null) {
+            valueConstraint = new ArrayList<String>();
+        }
+        return this.valueConstraint;
+    }
+
+    /**
+     * Gets the value of the annotation property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link AnnotationType }
+     *     
+     */
+    public AnnotationType getAnnotation() {
+        return annotation;
+    }
+
+    /**
+     * Sets the value of the annotation property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link AnnotationType }
+     *     
+     */
+    public void setAnnotation(AnnotationType value) {
+        this.annotation = value;
+    }
+
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertySemantics.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertySemantics.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertySemantics.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/PropertySemantics.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,80 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.29 at 11:44:48 AM EEST 
+//
+
+
+package org.apache.stanbol.cmsadapter.servicesapi.model.web;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for propertySemantics element declaration.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;element name="propertySemantics">
+ *   &lt;complexType>
+ *     &lt;complexContent>
+ *       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *         &lt;sequence>
+ *           &lt;element ref="{web.model.servicesapi.cmsadapter.stanbol.apache.org}propertyAnnotation" maxOccurs="unbounded"/>
+ *         &lt;/sequence>
+ *       &lt;/restriction>
+ *     &lt;/complexContent>
+ *   &lt;/complexType>
+ * &lt;/element>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "propertyAnnotation"
+})
+@XmlRootElement(name = "propertySemantics")
+public class PropertySemantics {
+
+    @XmlElement(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org", required = true)
+    protected List<PropertyAnnotation> propertyAnnotation;
+
+    /**
+     * Gets the value of the propertyAnnotation property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * not a snapshot. Therefore any modification you make to the
+     * returned list will be present inside the JAXB object.
+     * This is why there is not a <CODE>set</CODE> method for the propertyAnnotation property.
+     * 
+     * <p>
+     * For example, to add a new item, do as follows:
+     * <pre>
+     *    getPropertyAnnotation().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {@link PropertyAnnotation }
+     * 
+     * 
+     */
+    public List<PropertyAnnotation> getPropertyAnnotation() {
+        if (propertyAnnotation == null) {
+            propertyAnnotation = new ArrayList<PropertyAnnotation>();
+        }
+        return this.propertyAnnotation;
+    }
+
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DChildObjectType.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DChildObjectType.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DChildObjectType.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DChildObjectType.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,14 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ChildObjectDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+
+public interface DChildObjectType {
+
+    boolean isRequired();
+
+    DObjectType getAllowedObjectDefinitions() throws RepositoryAccessException;
+
+    ChildObjectDefinition getInstance();
+    
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObject.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObject.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObject.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObject.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,30 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import java.util.List;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+
+public interface DObject {
+
+	String getID();
+	
+	String getPath();
+	
+	String getName();
+	
+	String getNamespace();
+	
+	CMSObject getInstance();
+	
+	List<DObject> getChildren() throws RepositoryAccessException;
+	
+	//Make list?
+	DObject getParent() throws RepositoryAccessException;
+	
+	//Make list?
+	DObjectType getObjectType() throws RepositoryAccessException;
+	
+	List<DProperty> getProperties() throws RepositoryAccessException;
+	
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectAdapter.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectAdapter.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectAdapter.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectAdapter.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,23 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ChildObjectDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ObjectTypeDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.Property;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.PropertyDefinition;
+
+public interface DObjectAdapter {
+
+	DObject wrapAsDObject(CMSObject node);
+	
+	DObjectType wrapAsDObjectType(ObjectTypeDefinition definition);
+	
+	DPropertyDefinition wrapAsDPropertyDefinition(PropertyDefinition propertyDefinition);
+	
+	DChildObjectType wrapAsDChildObjectType(ChildObjectDefinition childObjectDefinition);
+	
+	DProperty wrapAsDProperty(Property property);
+	
+	Object getSession();
+	
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectType.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectType.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectType.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DObjectType.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,24 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import java.util.List;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ObjectTypeDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+
+public interface DObjectType {
+
+	String getID();
+	
+	String getName();
+	
+	String getNamespace();
+	
+	List<DPropertyDefinition> getPropertyDefinitions() throws RepositoryAccessException;
+	
+	List<DObjectType> getParentDefinitions() throws RepositoryAccessException;
+	
+	List<DChildObjectType> getChildDefinitions() throws RepositoryAccessException;
+	
+	ObjectTypeDefinition getInstance();
+	
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DProperty.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DProperty.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DProperty.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DProperty.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,23 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import java.util.List;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.PropType;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.Property;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+
+public interface DProperty {
+
+    String getName();
+
+    PropType getType();
+
+    DPropertyDefinition getDefinition() throws RepositoryAccessException;
+
+    DObject getSourceObject() throws RepositoryAccessException;
+
+    List<String> getValue();
+
+    Property getInstance();
+
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DPropertyDefinition.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DPropertyDefinition.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DPropertyDefinition.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/decorated/DPropertyDefinition.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,30 @@
+package org.apache.stanbol.cmsadapter.servicesapi.model.web.decorated;
+
+import java.math.BigInteger;
+import java.util.List;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.AnnotationType;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.PropType;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.PropertyDefinition;
+
+public interface DPropertyDefinition {
+
+    String getUniqueRef();
+
+    String getName();
+
+    String getNamespace();
+
+    AnnotationType getAnnotations();
+
+    BigInteger getCardinality();
+
+    PropType getPropertyType();
+
+    // TODO getSourceObjectTypeRef ne
+
+    List<String> getValueConstraints();
+    
+    PropertyDefinition getInstance();
+
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/package-info.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/package-info.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/package-info.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/model/web/package-info.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2011.04.29 at 11:44:48 AM EEST 
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "web.model.servicesapi.cmsadapter.stanbol.apache.org")
+package org.apache.stanbol.cmsadapter.servicesapi.model.web;

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccess.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccess.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccess.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccess.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,163 @@
+package org.apache.stanbol.cmsadapter.servicesapi.repository;
+
+import java.util.List;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ChildObjectDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ConnectionInfo;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ObjectTypeDefinition;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.Property;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.PropertyDefinition;
+
+public interface RepositoryAccess {
+    Object getSession(ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Opens a new connection using connection info and retrieves the item identified by path.
+     * 
+     * @param path
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    List<CMSObject> getNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Opens a new connection using connection info and retrieves the item identified by id.
+     * 
+     * @param id
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    List<CMSObject> getNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Uses an already established Session if, it is not desired to open a new connection.
+     * 
+     * @param path
+     * @param Session
+     * @return
+     * @throws RepositoryAccessException
+     */
+
+    List<CMSObject> getNodeByPath(String path, Object session) throws RepositoryAccessException;
+
+    /**
+     * Uses an already established Session if, it is not desired to open a new connection.
+     * 
+     * @param id
+     * @param Session
+     * @return
+     * @throws RepositoryAccessException
+     */
+    List<CMSObject> getNodeById(String id, Object session) throws RepositoryAccessException;
+
+    /**
+     * Returns all nodes by name. Uses existing connection
+     * 
+     * @param name
+     * @param session
+     * @return
+     * @throws RepositoryAccessException
+     */
+    List<CMSObject> getNodeByName(String name, Object session) throws RepositoryAccessException;
+
+    /**
+     * Returns all nodes by name, through a newly opened connection.
+     * 
+     * @param name
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    List<CMSObject> getNodeByName(String name, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Opens a new connection using connection info and retrieves the item identified by path.
+     * 
+     * @param path
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    CMSObject getFirstNodeByPath(String path, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Opens a new connection using connection info and retrieves the item identified by id.
+     * 
+     * @param id
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    CMSObject getFirstNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    /**
+     * Uses an already established Session if, it is not desired to open a new connection.
+     * 
+     * @param path
+     * @param Session
+     * @return
+     * @throws RepositoryAccessException
+     */
+
+    CMSObject getFirstNodeByPath(String path, Object session) throws RepositoryAccessException;
+
+    /**
+     * Uses an already established Session if, it is not desired to open a new connection.
+     * 
+     * @param id
+     * @param Session
+     * @return
+     * @throws RepositoryAccessException
+     */
+    CMSObject getFirstNodeById(String id, Object session) throws RepositoryAccessException;
+
+    /**
+     * Returns all nodes by name. Uses existing connection
+     * 
+     * @param name
+     * @param session
+     * @return
+     * @throws RepositoryAccessException
+     */
+    CMSObject getFirstNodeByName(String name, Object session) throws RepositoryAccessException;
+
+    /**
+     * Returns all nodes by name, through a newly opened connection.
+     * 
+     * @param name
+     * @param connectionInfo
+     * @return
+     * @throws RepositoryAccessException
+     */
+    CMSObject getFirstNodeByName(String name, ConnectionInfo connectionInfo) throws RepositoryAccessException;
+
+    List<CMSObject> getChildren(CMSObject node, Object session) throws RepositoryAccessException;
+
+    ObjectTypeDefinition getObjectTypeDefinition(String typeRef, Object session) throws RepositoryAccessException;
+
+    List<Property> getProperties(CMSObject node, Object session) throws RepositoryAccessException;
+
+    List<PropertyDefinition> getPropertyDefinitions(ObjectTypeDefinition instance, Object session) throws RepositoryAccessException;
+
+    List<ObjectTypeDefinition> getParentTypeDefinitions(ObjectTypeDefinition instance, Object session) throws RepositoryAccessException;
+
+    List<ChildObjectDefinition> getChildObjectTypeDefinitions(ObjectTypeDefinition instance, Object session) throws RepositoryAccessException;
+
+    ObjectTypeDefinition getAllowableTypeDef(ChildObjectDefinition instance, Object session) throws RepositoryAccessException;
+
+    CMSObject getContainerObject(Property instance, Object session) throws RepositoryAccessException;
+
+    PropertyDefinition getPropertyDefinition(Property instance, Object session) throws RepositoryAccessException;
+
+    String getNamespaceURI(String prefix, Object session) throws RepositoryAccessException;
+
+    boolean canRetrieve(ConnectionInfo connectionInfo);
+
+    boolean canRetrieve(Object session);
+
+    CMSObject getParentByNode(CMSObject instance, Object session) throws RepositoryAccessException;
+
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessException.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessException.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessException.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessException.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,14 @@
+package org.apache.stanbol.cmsadapter.servicesapi.repository;
+
+public class RepositoryAccessException extends Exception{
+
+	/**
+     * 
+     */
+    private static final long serialVersionUID = -3142627349833142549L;
+
+    public RepositoryAccessException(String message, Throwable throwable){
+		super(message, throwable);
+	}
+	
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessManager.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessManager.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessManager.java (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/java/org/apache/stanbol/cmsadapter/servicesapi/repository/RepositoryAccessManager.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,12 @@
+package org.apache.stanbol.cmsadapter.servicesapi.repository;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ConnectionInfo;
+
+public interface RepositoryAccessManager {
+
+	RepositoryAccess getRepositoryAccessor(ConnectionInfo connectionInfo);
+	
+	RepositoryAccess getRepositoryAccess(Object session);
+	
+	
+}

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CMSObjectModel.xsd
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CMSObjectModel.xsd?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CMSObjectModel.xsd (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CMSObjectModel.xsd Sat Apr 30 11:18:30 2011
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:iksps="web.model.servicesapi.cmsadapter.stanbol.apache.org"
+	targetNamespace="web.model.servicesapi.cmsadapter.stanbol.apache.org"
+	elementFormDefault="qualified" attributeFormDefault="qualified">
+	<!-- enums -->
+	<xsd:simpleType name="propType">
+		<xsd:annotation>
+			<xsd:documentation>Possible property types for JCR and CMIS
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:restriction base="xsd:NMTOKEN">
+			<xsd:enumeration value="STRING" />
+			<xsd:enumeration value="BOOLEAN" />
+			<xsd:enumeration value="DECIMAL" />
+			<xsd:enumeration value="INTEGER" />
+			<xsd:enumeration value="DATE" />
+			<xsd:enumeration value="URI" />
+			<xsd:enumeration value="HTML" />
+			<xsd:enumeration value="REFERENCE" />
+			<xsd:enumeration value="WEAKREFERENCE" />
+			<xsd:enumeration value="LONG" />
+			<xsd:enumeration value="DOUBLE" />
+			<xsd:enumeration value="BINARY" />
+			<xsd:enumeration value="PATH" />
+			<xsd:enumeration value="NAME" />
+			<xsd:enumeration value="UNDEFINED" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="annotationType">
+		<xsd:annotation>
+			<xsd:documentation>Possible annotations types for properties
+				represented in scope of Ontology Generator</xsd:documentation>
+		</xsd:annotation>
+		<xsd:restriction base="xsd:NMTOKEN">
+			<xsd:enumeration value="subsumption" />
+			<xsd:enumeration value="transitive" />
+			<xsd:enumeration value="inverseFunctional" />
+			<xsd:enumeration value="instanceOf" />
+			<xsd:enumeration value="equivalentClass" />
+			<xsd:enumeration value="disjointWith" />
+			<xsd:enumeration value="functional" />
+			<xsd:enumeration value="symmetric" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<!-- types -->
+	<xsd:element name="objectTypeDefinition">
+		<xsd:annotation>
+			<xsd:documentation>defines a fixed and non-hierarchical set of
+				properties (“schema”) that all objects of that type have
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:localname" />
+				<xsd:element ref="iksps:namespace" minOccurs="0" />
+				<xsd:element ref="iksps:uniqueRef" />
+				<xsd:element ref="iksps:parentRef" minOccurs="0"
+					maxOccurs="unbounded" />
+				<xsd:sequence>
+					<xsd:element ref="iksps:propertyDefinition" minOccurs="0"
+						maxOccurs="unbounded" />
+				</xsd:sequence>
+				<xsd:sequence>
+					<xsd:element ref="iksps:childObjectDefinition"
+						minOccurs="0" maxOccurs="unbounded" />
+				</xsd:sequence>
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="propertyDefinition">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:sourceObjectTypeRef" minOccurs="0" />
+				<xsd:element ref="iksps:localname" />
+				<xsd:element ref="iksps:namespace" minOccurs="0" />
+				<xsd:element ref="iksps:uniqueRef" />
+				<xsd:element ref="iksps:propertyType" />
+				<xsd:element ref="iksps:cardinality" minOccurs="0" />
+				<xsd:element ref="iksps:required" minOccurs="0" />
+				<xsd:sequence>
+					<xsd:element ref="iksps:valueConstraint" minOccurs="0"
+						maxOccurs="unbounded" />
+				</xsd:sequence>
+				<xsd:element ref="iksps:annotation" minOccurs="0" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="childObjectDefinition">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:allowedObjectTypeDefRef" />
+				<xsd:element ref="iksps:required" minOccurs="0" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:complexType name="CMSObject">
+		<xsd:sequence>
+			<xsd:element ref="iksps:uniqueRef" />
+			<xsd:element ref="iksps:localname" />
+			<xsd:element ref="iksps:namespace" minOccurs="0" />
+			<xsd:element ref="iksps:objectTypeRef" />
+			<xsd:element ref="iksps:parentRef" minOccurs="0" />
+			<xsd:element ref="iksps:path" />
+			<xsd:sequence>
+				<xsd:element ref="iksps:property" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xsd:sequence>
+			<xsd:sequence>
+				<xsd:element name="children" type="iksps:CMSObject"
+					minOccurs="0" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:element name="property">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:localname" />
+				<xsd:element ref="iksps:sourceObjectTypeRef" />
+				<xsd:element ref="iksps:containerObjectRef" minOccurs="0" />
+				<xsd:element ref="iksps:value" maxOccurs="unbounded" />
+				<xsd:element ref="iksps:propertyDefinition" minOccurs="0" />
+			</xsd:sequence>
+			<xsd:attribute ref="iksps:type" />
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="propertySemantics">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:propertyAnnotation" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="propertyAnnotation">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:uniqueRef" />
+				<xsd:element ref="iksps:annotation" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="objectTypeDefinitions">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:objectTypeDefinition" minOccurs="0"
+					maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="classificationObjects">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:classificationObject" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	<xsd:element name="contentObjects">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:contentObject" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="CMSObjects">
+		<xsd:annotation>
+			<xsd:documentation>This element was created to use object types as a
+				list in general, regardless of being a content or classification
+				object.  
+			</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="CMSObject" type="iksps:CMSObject"
+					maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="connectionInfo">
+		<xsd:annotation>
+			<xsd:documentation>defines repository paramaters</xsd:documentation>
+		</xsd:annotation>
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element ref="iksps:repositoryURL" />
+				<xsd:element ref="iksps:workspaceName" />
+				<xsd:element ref="iksps:username" />
+				<xsd:element ref="iksps:password" />
+				<xsd:element ref="iksps:connectionType" />
+				<xsd:element ref="iksps:ontologyURI" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="localname" type="xsd:string" />
+	<xsd:element name="namespace" type="xsd:string" />
+	<xsd:element name="uniqueRef" type="xsd:string" />
+	<xsd:element name="parentRef" type="xsd:string" />
+	<xsd:element name="path" type="xsd:string" />
+
+	<xsd:element name="annotation" type="iksps:annotationType" />
+	<xsd:element name="contentObject" type="iksps:CMSObject" />
+	<xsd:element name="classificationObject" type="iksps:CMSObject" />
+	<xsd:element name="objectTypeRef" type="xsd:string" />
+	<xsd:element name="allowedObjectTypeDefRef" type="xsd:string" />
+
+	<xsd:element name="containerObjectRef" type="xsd:string" />
+	<xsd:element name="sourceObjectTypeRef" type="xsd:string" />
+	<xsd:element name="propertyType" type="iksps:propType" />
+	<xsd:element name="valueConstraint" type="xsd:string" />
+	<xsd:element name="value" type="xsd:string" />
+	<xsd:element name="cardinality" type="xsd:integer" />
+	<xsd:element name="required" type="xsd:boolean" />
+	<xsd:attribute name="type" type="iksps:propType" />
+
+	<!-- TODO restrict repositoryURL type -->
+	<xsd:element name="repositoryURL" type="xsd:string" />
+	<xsd:element name="workspaceName" type="xsd:string" />
+	<xsd:element name="username" type="xsd:string" />
+	<xsd:element name="password" type="xsd:string" />
+	<xsd:element name="connectionType" type="xsd:string" />
+	<xsd:element name="ontologyURI" type="xsd:anyURI" />
+</xsd:schema>

Propchange: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CMSObjectModel.xsd
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CR2OntologyMap.xsd
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CR2OntologyMap.xsd?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CR2OntologyMap.xsd (added)
+++ incubator/stanbol/trunk/cmsadapter/servicesapi/src/main/resources/model/CR2OntologyMap.xsd Sat Apr 30 11:18:30 2011
@@ -0,0 +1,89 @@
+<xsd:schema
+	targetNamespace="mapping.model.servicesapi.cmsadapter.stanbol.apache.org"	
+	attributeFormDefault="unqualified" 
+	elementFormDefault="qualified" 
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:tns="mapping.model.servicesapi.cmsadapter.stanbol.apache.org">
+
+	<xsd:element name="BridgeDefinitions">
+		<xsd:complexType>
+			<xsd:choice maxOccurs="unbounded">
+					<xsd:element ref="tns:ConceptBridge" />
+					<xsd:element ref="tns:SubsumptionBridge" />
+					<xsd:element ref="tns:PropertyBridge" />
+					<xsd:element ref="tns:InstanceBridge" />
+			</xsd:choice>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:element name="ConceptBridge">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="Query" type="tns:QueryType" />
+				<xsd:element ref="tns:SubsumptionBridge" minOccurs="0" maxOccurs="unbounded"/>
+				<xsd:element ref="tns:PropertyBridge" minOccurs="0" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	
+	<xsd:element name="SubsumptionBridge">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="PredicateName" type="tns:QueryType" />
+				<xsd:element name="SubjectQuery" type="tns:QueryType" minOccurs="0" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	
+	<xsd:element name="PropertyBridge">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="PredicateName" type="tns:QueryType" />
+				<xsd:element name="SubjectQuery" type="tns:QueryType" minOccurs="0" /> 
+				<xsd:element ref="tns:PropertyAnnotation" minOccurs="0" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+	
+	<xsd:element name="InstanceBridge">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="Query" type="tns:QueryType" />
+				<xsd:element ref="tns:PropertyBridge" minOccurs="0" maxOccurs="unbounded" />
+			</xsd:sequence>
+		</xsd:complexType>	
+	</xsd:element>
+	
+	<xsd:element name="PropertyAnnotation">
+		<xsd:complexType>
+			<xsd:sequence>
+				<xsd:element name="Annotation" type="tns:AnnotationType" />
+			</xsd:sequence>
+		</xsd:complexType>
+	</xsd:element>
+
+	<xsd:complexType name="NameType">
+		<xsd:choice>
+			<xsd:element name="PropertyName" type="xsd:string" />
+		</xsd:choice>
+	</xsd:complexType>
+	
+	<xsd:simpleType name="QueryType">
+		<xsd:restriction base="xsd:string">
+			<xsd:minLength value="1" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	
+	<xsd:simpleType name = "AnnotationType">
+		<xsd:restriction base = "xsd:NMTOKEN">
+			<xsd:enumeration value = "subsumption" />
+			<xsd:enumeration value = "transitive" />
+			<xsd:enumeration value = "inverseFunctional" />
+			<xsd:enumeration value = "instanceOf" />
+			<xsd:enumeration value = "equivalentClass" />
+			<xsd:enumeration value = "disjointWith" />
+			<xsd:enumeration value = "functional" />
+			<xsd:enumeration value = "symmetric" />
+		</xsd:restriction>
+	</xsd:simpleType>
+</xsd:schema>

Added: incubator/stanbol/trunk/cmsadapter/web/pom.xml
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/pom.xml?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/pom.xml (added)
+++ incubator/stanbol/trunk/cmsadapter/web/pom.xml Sat Apr 30 11:18:30 2011
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.stanbol</groupId>
+		<artifactId>org.apache.stanbol.cmsadapter.parent</artifactId>
+		<version>0.9-SNAPSHOT</version>
+		<relativePath>../parent</relativePath>
+	</parent>
+
+	<groupId>org.apache.stanbol</groupId>
+	<artifactId>org.apache.stanbol.cmsadapter.web</artifactId>
+	<packaging>bundle</packaging>
+
+	<name>Apache Stanbol CMS Adapter Web Bundle</name>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-scr-plugin</artifactId>
+				<configuration>
+					<excludes>
+						org/apache/stanbol/cmsadapter/web/mapping/**
+					</excludes>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.stanbol</groupId>
+			<artifactId>org.apache.stanbol.commons.web.base</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.stanbol</groupId>
+			<artifactId>org.apache.stanbol.ontologymanager.store.rest.client</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.stanbol</groupId>
+			<artifactId>org.apache.stanbol.ontologymanager.store.api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.stanbol</groupId>
+			<artifactId>org.apache.stanbol.cmsadapter.servicesapi</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.stanbol</groupId>
+			<artifactId>org.apache.stanbol.cmsadapter.core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-server</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>com.hp.hpl.jena</groupId>
+			<artifactId>jena</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.scr.annotations</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.osgi.core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.freemarker</groupId>
+			<artifactId>freemarker</artifactId>
+		</dependency>
+	</dependencies>
+</project>
+

Propchange: incubator/stanbol/trunk/cmsadapter/web/pom.xml
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/CMSAdapterWebFragment.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,102 @@
+package org.apache.stanbol.cmsadapter.web;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Service;
+import org.apache.stanbol.cmsadapter.web.resources.BridgeDefinitionsResource;
+import org.apache.stanbol.cmsadapter.web.resources.NotifyResource;
+import org.apache.stanbol.cmsadapter.web.resources.RootResource;
+import org.apache.stanbol.commons.web.base.LinkResource;
+import org.apache.stanbol.commons.web.base.NavigationLink;
+import org.apache.stanbol.commons.web.base.ScriptResource;
+import org.apache.stanbol.commons.web.base.WebFragment;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import freemarker.cache.ClassTemplateLoader;
+import freemarker.cache.TemplateLoader;
+
+@Component(immediate = true, metatype = true)
+@Service
+public class CMSAdapterWebFragment implements WebFragment {
+
+    private static final Logger logger = LoggerFactory.getLogger(CMSAdapterWebFragment.class);
+
+    private static final String NAME = "cmsadapter";
+
+    private static final String STATIC_RESOURCE_PATH = "/org/apache/stanbol/cmsadapter/web/static";
+    private static final String TEMPLATE_PATH = "/org/apache/stanbol/cmsadapter/web/templates";
+
+    private BundleContext bundleContext;
+
+    @Activate
+    protected void activate(ComponentContext ctx) {
+        this.bundleContext = ctx.getBundleContext();
+    }
+
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
+    @Override
+    public String getStaticResourceClassPath() {
+        return STATIC_RESOURCE_PATH;
+    }
+
+    @Override
+    public Set<Class<?>> getJaxrsResourceClasses() {
+        Set<Class<?>> classes = new HashSet<Class<?>>();
+        classes.add(BridgeDefinitionsResource.class);
+        classes.add(NotifyResource.class);
+        classes.add(RootResource.class);
+        return classes;
+    }
+
+    @Override
+    public Set<Object> getJaxrsResourceSingletons() {
+        Set<Object> singletons = new HashSet<Object>();
+        try {
+            singletons.add(new JAXBProvider());
+        } catch (Exception e) {
+            logger.warn("Error in creating JAXB provider, ", e);
+        }
+        return singletons;
+    }
+
+    @Override
+    public TemplateLoader getTemplateLoader() {
+        return new ClassTemplateLoader(getClass(), TEMPLATE_PATH);
+    }
+
+    @Override
+    public List<LinkResource> getLinkResources() {
+        return new ArrayList<LinkResource>();
+    }
+
+    @Override
+    public List<ScriptResource> getScriptResources() {
+        return new ArrayList<ScriptResource>();
+    }
+
+    @Override
+    public List<NavigationLink> getNavigationLinks() {
+        List<NavigationLink> links = new ArrayList<NavigationLink>();
+        links.add(new NavigationLink("cmsadapter", "/cmsadapter", "/imports/cmsadapterDescription.ftl",
+                80));
+        return links;
+    }
+
+    @Override
+    public BundleContext getBundleContext() {
+        return bundleContext;
+    }
+
+}

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/JAXBProvider.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/JAXBProvider.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/JAXBProvider.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/JAXBProvider.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,127 @@
+package org.apache.stanbol.cmsadapter.web;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.List;
+import java.util.Vector;
+
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWriter;
+import javax.ws.rs.ext.Provider;
+import javax.xml.XMLConstants;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+
+import org.apache.stanbol.cmsadapter.servicesapi.model.mapping.ObjectFactory;
+import org.xml.sax.SAXException;
+
+import com.sun.jersey.spi.resource.Singleton;
+
+@Singleton
+@Provider
+@Produces(MediaType.APPLICATION_XML)
+public class JAXBProvider implements MessageBodyReader, MessageBodyWriter {
+
+	private Marshaller marshaller;
+
+	private Unmarshaller unmarshaller;
+
+	public JAXBProvider() throws JAXBException, SAXException {
+		ClassLoader cl = ObjectFactory.class.getClassLoader();
+		JAXBContext jc = JAXBContext.newInstance(
+				ObjectFactory.class.getPackage().getName(), cl);
+		marshaller = jc.createMarshaller();
+		unmarshaller = jc.createUnmarshaller();
+		String schemaLocations[] = { "model/CMSObjectModel.xsd",
+				"model/CR2OntologyMap.xsd" };
+		SchemaFactory schemaFactory = SchemaFactory
+				.newInstance(
+						XMLConstants.W3C_XML_SCHEMA_NS_URI,
+						"com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory",
+						JAXBProvider.class.getClassLoader());
+
+		List<StreamSource> streamSourceList = new Vector<StreamSource>();
+		for (String schemaLocation : schemaLocations) {
+			InputStream is = cl.getResourceAsStream(schemaLocation);
+			StreamSource streamSource = new StreamSource(is);
+			streamSourceList.add(streamSource);
+		}
+		StreamSource sources[] = new StreamSource[streamSourceList.size()];
+		Schema schema = schemaFactory.newSchema(streamSourceList
+				.toArray(sources));
+		marshaller.setSchema(schema);
+		marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
+		unmarshaller.setSchema(schema);
+	}
+
+	@Override
+	public long getSize(Object t, Class type, Type genericType,
+			Annotation[] annotations, MediaType mediaType) {
+		return -1;
+	}
+
+	@Override
+	public boolean isWriteable(Class type, Type genericType,
+			Annotation[] annotations, MediaType mediaType) {
+		String className = type.getName();
+		if (className.startsWith(ObjectFactory.class.getPackage().getName())
+				|| className
+						.startsWith(org.apache.stanbol.cmsadapter.servicesapi.model.web.ObjectFactory.class
+								.getPackage().getName())) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	@Override
+	public void writeTo(Object t, Class type, Type genericType,
+			Annotation[] annotations, MediaType mediaType,
+			MultivaluedMap httpHeaders, OutputStream entityStream)
+			throws IOException, WebApplicationException {
+		try {
+			marshaller.marshal(t, entityStream);
+		} catch (Exception e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+	@Override
+	public boolean isReadable(Class type, Type genericType,
+			Annotation[] annotations, MediaType mediaType) {
+		String className = type.getName();
+		if (className.startsWith(ObjectFactory.class.getPackage().getName())
+				|| className
+						.startsWith(org.apache.stanbol.cmsadapter.servicesapi.model.web.ObjectFactory.class
+								.getPackage().getName())) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	@Override
+	public Object readFrom(Class type, Type genericType,
+			Annotation[] annotations, MediaType mediaType,
+			MultivaluedMap httpHeaders, InputStream entityStream)
+			throws IOException, WebApplicationException {
+		try {
+			return unmarshaller.unmarshal(entityStream);
+		} catch (JAXBException e) {
+			throw new RuntimeException(e);
+		}
+	}
+
+}

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/BridgeDefinitionsResource.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,125 @@
+package org.apache.stanbol.cmsadapter.web.resources;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Hashtable;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.stanbol.cmsadapter.servicesapi.helper.OntologyResourceHelper;
+import org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngine;
+import org.apache.stanbol.cmsadapter.servicesapi.model.mapping.BridgeDefinitions;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.ConnectionInfo;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+import org.apache.stanbol.cmsadapter.web.utils.RestURIHelper;
+import org.apache.stanbol.commons.web.base.ContextHelper;
+import org.apache.stanbol.commons.web.base.resource.BaseStanbolResource;
+import org.apache.stanbol.ontologymanager.store.rest.client.RestClient;
+import org.apache.stanbol.ontologymanager.store.rest.client.RestClientException;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentFactory;
+import org.osgi.service.component.ComponentInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.hp.hpl.jena.ontology.OntModel;
+
+@Path("/cmsadapter/bridgeDefinitions")
+public class BridgeDefinitionsResource extends BaseStanbolResource {
+    private static final Logger logger = LoggerFactory.getLogger(BridgeDefinitionsResource.class);
+
+    private static final String MAPPING_ENGINE_COMPONENT_FACTORY_FILTER = "(component.factory=org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngineFactory)";
+
+    private RestClient storeClient;
+
+    private MappingEngine engine;
+
+    @SuppressWarnings("rawtypes")
+    public BridgeDefinitionsResource(@Context ServletContext context) {
+        this.storeClient = ContextHelper.getServiceFromContext(RestClient.class, context);
+        try {
+            BundleContext bundleContext = (BundleContext) context.getAttribute(BundleContext.class.getName());
+            ServiceReference serviceReference = bundleContext.getServiceReferences(null,
+                MAPPING_ENGINE_COMPONENT_FACTORY_FILTER)[0];
+            ComponentFactory componentFactory = (ComponentFactory) bundleContext.getService(serviceReference);
+            ComponentInstance componentInstance = componentFactory.newInstance(new Hashtable());
+            this.engine = (MappingEngine) componentInstance.getInstance();
+
+        } catch (InvalidSyntaxException e) {
+            logger.warn("Mapping engine instance could not be instantiated", e);
+            throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    /**
+     * Takes connection information to access the content managament system and executes the bridge
+     * definitions. After completing processing of bridges, generated ontology is stored through <b>Store</b>
+     * component.
+     * 
+     * @param connectionInfo
+     *            Information to access content management system when needed. It also includes the URI of the
+     *            ontology to be generated
+     * @param bridgeDefinitions
+     * @return
+     */
+    @POST
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    public Response registeBridgeDefinitions(@FormParam("connectionInfo") ConnectionInfo connectionInfo,
+                                             @FormParam("bridgeDefinitions") BridgeDefinitions bridgeDefinitions) {
+
+        String ontologyURI = connectionInfo.getOntologyURI();
+        try {
+            engine.mapCR(bridgeDefinitions, connectionInfo, ontologyURI);
+            return Response.status(Status.OK).build();
+
+        } catch (RepositoryAccessException e) {
+            logger.warn("Cannot access to repository", e);
+        }
+
+        return Response.status(Status.INTERNAL_SERVER_ERROR).build();
+    }
+
+    /**
+     * Simply executes new bridge definitions and as a result new generated ontology overwrites the existing
+     * one.
+     * 
+     * @param ontologyURI
+     *            URI of the ontology for which the bridge definitions are defined
+     * @param bridgeDefinitions
+     *            New bridge definitions
+     * @return
+     */
+    @PUT
+    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
+    public Response updateBridgeDefinitions(@FormParam("ontologyURI") String ontologyURI,
+                                            @FormParam("bridgeDefinitions") BridgeDefinitions bridgeDefinitions) {
+        try {
+            OntModel model = OntologyResourceHelper.getOntModel(storeClient, ontologyURI,
+                RestURIHelper.getOntologyHref(ontologyURI));
+
+            ConnectionInfo connectionInfo = OntologyResourceHelper.getConnectionInfo(model);
+            engine.mapCR(bridgeDefinitions, connectionInfo, ontologyURI);
+            return Response.status(Status.OK).build();
+
+        } catch (UnsupportedEncodingException e) {
+            logger.warn("Ontology content could not be transformed to bytes", e);
+        } catch (RestClientException e) {
+            logger.warn("Error occured while interacting with store", e);
+        } catch (RepositoryAccessException e) {
+            logger.warn("Cannot access to repository", e);
+        }
+
+        return Response.status(Status.INTERNAL_SERVER_ERROR).build();
+    }
+}
\ No newline at end of file

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/NotifyResource.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,82 @@
+package org.apache.stanbol.cmsadapter.web.resources;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.FormParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.stanbol.cmsadapter.servicesapi.helper.OntologyResourceHelper;
+import org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngine;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObject;
+import org.apache.stanbol.cmsadapter.servicesapi.model.web.CMSObjects;
+import org.apache.stanbol.cmsadapter.servicesapi.repository.RepositoryAccessException;
+import org.apache.stanbol.cmsadapter.web.utils.RestURIHelper;
+import org.apache.stanbol.commons.web.base.ContextHelper;
+import org.apache.stanbol.commons.web.base.resource.BaseStanbolResource;
+import org.apache.stanbol.ontologymanager.store.rest.client.RestClient;
+import org.apache.stanbol.ontologymanager.store.rest.client.RestClientException;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentFactory;
+import org.osgi.service.component.ComponentInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.hp.hpl.jena.ontology.OntModel;
+
+@Path("/cmsadapter/{ontologyURI:.+}/notify")
+public class NotifyResource extends BaseStanbolResource {
+    private static final Logger logger = LoggerFactory.getLogger(NotifyResource.class);
+
+    private MappingEngine engine;
+    private RestClient psi;
+
+    public NotifyResource(@Context ServletContext context) {
+        this.psi = ContextHelper.getServiceFromContext(RestClient.class, context);
+        try {
+            BundleContext bundleContext = (BundleContext) context.getAttribute(BundleContext.class.getName());
+            ServiceReference serviceReference = bundleContext.getServiceReferences(null,
+                "(component.factory=org.apache.stanbol.cmsadapter.servicesapi.mapping.MappingEngineFactory)")[0];
+            ComponentFactory componentFactory = (ComponentFactory) bundleContext.getService(serviceReference);
+            ComponentInstance componentInstance = componentFactory
+                    .newInstance(new Hashtable<Object,Object>());
+            this.engine = (MappingEngine) componentInstance.getInstance();
+
+        } catch (InvalidSyntaxException e) {
+            logger.warn("Mapping engine instance could not be instantiated", e);
+            throw new WebApplicationException(Response.Status.INTERNAL_SERVER_ERROR);
+        }
+    }
+
+    @POST
+    public Response notifyChange(@PathParam("ontologyURI") String ontologyURI,
+                                 @FormParam("changedObjects") CMSObjects cmsObjects) {
+
+        List<CMSObject> updatedObjectsList = cmsObjects.getCMSObject();
+        OntModel model;
+        try {
+            model = OntologyResourceHelper.getOntModel(psi, ontologyURI,
+                RestURIHelper.getOntologyHref(ontologyURI));
+            engine.mapCR(model, ontologyURI, updatedObjectsList);
+            return Response.ok().build();
+
+        } catch (UnsupportedEncodingException e) {
+            logger.warn("Ontology content could not be transformed to bytes", e);
+        } catch (RestClientException e) {
+            logger.warn("Error occured while interacting with store", e);
+        } catch (RepositoryAccessException e) {
+            logger.warn("Cannot access to repository", e);
+        }
+        return Response.status(Status.INTERNAL_SERVER_ERROR).build();
+    }
+}

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/RootResource.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/RootResource.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/RootResource.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/resources/RootResource.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,25 @@
+package org.apache.stanbol.cmsadapter.web.resources;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status;
+
+import org.apache.stanbol.commons.web.base.resource.BaseStanbolResource;
+
+@Path("/cmsadapter")
+public class RootResource extends BaseStanbolResource {
+
+    @GET
+    public Response notifyChange() {
+        try {
+            return Response.seeOther(new URI("http://wiki.iks-project.eu/index.php/CMSAdapterRest")).build();
+        } catch (URISyntaxException e) {
+            throw new WebApplicationException(e, Response.status(Status.BAD_REQUEST).build());
+        }
+    }
+}

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/utils/RestURIHelper.java
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/utils/RestURIHelper.java?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/utils/RestURIHelper.java (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/utils/RestURIHelper.java Sat Apr 30 11:18:30 2011
@@ -0,0 +1,46 @@
+package org.apache.stanbol.cmsadapter.web.utils;
+
+public class RestURIHelper {
+	private static final String ONTOLOGY = "ontology";
+	private static final String CLASSES = "classes";
+	private static final String INDIVIDUALS = "individuals";
+	private static final String DATATYPE_PROPERTIES = "datatypeProperties";
+	private static final String OBJECT_PROPERTIES = "objectProperties";
+
+	public static void main(String[] args) {
+		String targetStr = "http://jcr_test/NClassO41_1";
+		System.out.println(targetStr.substring(0, targetStr.lastIndexOf('#')));
+	}
+
+	public static String getOntologyHref(String ontologyURI) {
+		return ONTOLOGY + "/" + ontologyURI;
+	}
+
+	public static String getClassHref(String ontologyURI, String classURI) {
+		return getOntologyHref(ontologyURI) + "/" + CLASSES + "/"
+				+ expelLastSharp(classURI);
+	}
+
+	public static String getObjectPropertyHref(String ontologyURI,
+			String objectPropertyURI) {
+		return getOntologyHref(ontologyURI) + "/" + OBJECT_PROPERTIES + "/"
+				+ expelLastSharp(objectPropertyURI);
+	}
+
+	public static String getDatatypePropertyHref(String ontologyURI,
+			String datatypePropertyURI) {
+		return getOntologyHref(ontologyURI) + "/" + DATATYPE_PROPERTIES + "/"
+				+ expelLastSharp(datatypePropertyURI);
+	}
+
+	public static String getIndividualHref(String ontologyURI,
+			String individualURI) {
+		return getOntologyHref(ontologyURI) + "/" + INDIVIDUALS + "/"
+				+ expelLastSharp(individualURI);
+	}
+
+	private static String expelLastSharp(String targetStr) {
+		return targetStr.substring(0, targetStr.lastIndexOf('#')) + "/"
+				+ targetStr.substring(targetStr.lastIndexOf('#') + 1);
+	}
+}

Propchange: incubator/stanbol/trunk/cmsadapter/web/src/main/java/org/apache/stanbol/cmsadapter/web/utils/RestURIHelper.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/stanbol/trunk/cmsadapter/web/src/main/resources/org/apache/stanbol/cmsadapter/web/templates/imports/cmsadapterDescription.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/cmsadapter/web/src/main/resources/org/apache/stanbol/cmsadapter/web/templates/imports/cmsadapterDescription.ftl?rev=1098099&view=auto
==============================================================================
--- incubator/stanbol/trunk/cmsadapter/web/src/main/resources/org/apache/stanbol/cmsadapter/web/templates/imports/cmsadapterDescription.ftl (added)
+++ incubator/stanbol/trunk/cmsadapter/web/src/main/resources/org/apache/stanbol/cmsadapter/web/templates/imports/cmsadapterDescription.ftl Sat Apr 30 11:18:30 2011
@@ -0,0 +1,3 @@
+This is the <strong>CMS Adapter</strong> component of Apache Stanbol.
+
+