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/07/19 21:37:40 UTC

svn commit: r1148497 [5/6] - in /incubator/stanbol/trunk/ontologymanager/store: launchers/fise/src/main/bundles/ web/ web/src/ web/src/main/ web/src/main/java/ web/src/main/java/org/ web/src/main/java/org/apache/ web/src/main/java/org/apache/stanbol/ w...

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js Tue Jul 19 19:37:37 2011
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+
+ Takes className as an argument and 
+ makes visible "pageSize" number of  elements starting from startIndex
+ which has class attribute in from class="className index"
+
+ */
+//Create PAGING object if not exist
+if (!this.PAGING) {
+	this.PAGING = {};
+}
+// Create startIndex and pageSize variables if not exist
+if (!this.PAGING.startIndex) {
+	this.PAGING.startIndex = {};
+}
+
+if (!this.PAGING.pageSize) {
+	this.PAGING.pageSize = {};
+}
+
+(function() {
+	PAGING.adjustVisibility = function(className) {
+		PAGING.showVisibility(className)
+		if (PAGING.hasNext(className)) {
+			PAGING.getNextButton(className).removeClass("invisible");
+		} else {
+			PAGING.getNextButton(className).addClass("invisible");
+		}
+		if (PAGING.hasPrevious(className)) {
+			PAGING.getPreviousButton(className).removeClass("invisible");
+		} else {
+			PAGING.getPreviousButton(className).addClass("invisible");
+		}
+	}
+
+	PAGING.gotoNext = function(className) {
+		PAGING.startIndex[className] += PAGING.pageSize[className];
+		PAGING.adjustVisibility(className);
+	}
+
+	PAGING.gotoPrevious = function(className) {
+		PAGING.startIndex[className] -= PAGING.pageSize[className];
+		if (PAGING.startIndex[className] < 0)
+			PAGING.startIndex[className] = 0;
+		PAGING.adjustVisibility(className);
+	}
+
+	PAGING.count = function(className) {
+		var c = $("." + className).length;
+		return c;
+	}
+
+	PAGING.hasPrevious = function(className) {
+		if (PAGING.startIndex[className] > 0) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	// FIXME - 3 needed because two buttons (next and previous) and combobox
+	// also has this class
+	// attribute
+	PAGING.hasNext = function(className) {
+		if (PAGING.count(className) - 3 > PAGING.startIndex[className]
+				+ PAGING.pageSize[className]) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+
+	PAGING.getNextButton = function(className) {
+		return $("." + className).filter(".nextButton");
+	}
+
+	PAGING.getPreviousButton = function(className) {
+		return $("." + className).filter(".previousButton");
+	}
+
+	PAGING.showVisibility = function(className) {
+
+		// Initialize 'undefined' parameters
+		if (typeof (PAGING.startIndex[className]) == 'undefined') {
+			PAGING.startIndex[className] = 0;
+		}
+
+		if (typeof (PAGING.pageSize[className]) == 'undefined') {
+			PAGING.pageSize[className] = 5;
+		}
+
+		var elems = $("." + className);
+		elems.each(function() {
+			$(this).addClass("invisible");
+
+			for (i = 0; i < PAGING.pageSize[className]; i++) {
+				if ($(this).hasClass(PAGING.startIndex[className] + i)) {
+					$(this).removeClass("invisible");
+					break;
+				}
+			}
+			if ($(this).hasClass("sizeCombobox")) {
+				if ($(this).parent().hasClass("margined")) {
+					$(this).parent().removeClass("margined");
+				}
+				if ($(this).hasClass("inline")) {
+					$(this).removeClass("inline");
+				}
+				if (PAGING.hasNext(className) || PAGING.hasPrevious(className)
+						|| PAGING.pageSize[className] != 5) {
+					$(this).addClass("inline");
+					$(this).removeClass("invisible");
+					$(this).parent().addClass("margined");
+				}
+			}
+		});
+	}
+}());

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js Tue Jul 19 19:37:37 2011
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//Create the PSTORE object if one does not exist. 
+if (!this.PSTORE) {
+	this.PSTORE = {};
+}
+
+// Create the propUtil and oPropUtil object if one does not exist
+if (!this.PSTORE.propUtil) {
+	this.PSTORE.propUtil = {};
+}
+
+// Create the property and origProperty object which resembles the property
+// shown in the html page
+if (!this.PSTORE.propUtil.property) {
+	this.PSTORE.propUtil.property = {};
+}
+
+if (!this.PSTORE.propUtil.originalProperty) {
+	this.PSTORE.propUtil.originalProperty = {};
+}
+
+(function() {
+	// Define variables to make code more readable
+	var propUtil = this.PSTORE.propUtil;
+	var property = this.PSTORE.propUtil.property;
+	var originalProperty = this.PSTORE.propUtil.originalProperty;
+
+	// Although super properties of the property is a list, this methods just
+	// adds a
+	// new one to them
+	propUtil.setSubPropertyOf = function(superProp) {
+		property.subPropertyOf = superProp;
+	};
+
+	propUtil.setFunctional = function(bool) {
+		property.isFunctional = bool;
+	};
+
+	propUtil.setTransitive = function(bool) {
+		property.isTransitive = bool;
+	};
+
+	propUtil.setSymmetric = function(bool) {
+		property.isSymmetric = bool;
+	};
+
+	propUtil.setInverseFunctional = function(bool) {
+		property.isInverseFunctional = bool;
+	};
+
+	// Send the modified property to the server and refresh the page
+	propUtil.post = function(uri) {
+		var data = "";
+		var xmlhttp;
+
+		// Create request object
+		if (window.XMLHttpRequest) {
+			xmlhttp = new XMLHttpRequest();
+		} else if (window.ActiveXObject) {
+			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
+		}
+
+		if (typeof property.isFunctional !== 'undefined') {
+			data += "isFunctional=" + property.isFunctional + "&";
+		}
+		if (typeof property.isSymmetric !== 'undefined') {
+			data += "isSymmetric=" + property.isSymmetric + "&";
+		}
+		if (typeof property.isTransitive !== 'undefined') {
+			data += "isTransitive=" + property.isTransitive + "&";
+		}
+		if (typeof property.isInverseFunctional !== 'undefined') {
+			data += "isInverseFunctional=" + property.isInverseFunctional + "&";
+		}
+		if (typeof property.subPropertyOf !== 'undefined') {
+			data += "subPropertyOf=" + property.subPropertyOf + "&";
+		}
+
+		xmlhttp.open('POST', uri, false);
+		xmlhttp.onreadystatechange = function() {
+			if (xmlhttp.readyState != 4) {
+				alert(xmlhttp.responseText);
+			}
+			window.location.reload('false');
+		}
+		xmlhttp.setRequestHeader("Content-Type",
+				"application/x-www-form-urlencoded");
+		xmlhttp.setRequestHeader("Accept", "application/xml");
+		xmlhttp.send(data);
+
+	};
+}());
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js Tue Jul 19 19:37:37 2011
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//Create the PSTORE object if one does not exist. 
+if (!this.PSTORE) {
+	this.PSTORE = {};
+}
+
+// Create the HTTPHelper
+if (!this.PSTORE.HTTPHelper) {
+	this.PSTORE.HTTPHelper = {};
+}
+
+(function() {
+	var httphelper = this.PSTORE.HTTPHelper;
+
+	httphelper.send = function(method, uri, normalize, override, name, value) {
+		var request = null;
+		if (window.XMLHttpRequest) {
+			request = new XMLHttpRequest();
+		} else if (window.ActiveXObject) {
+			request = new ActiveXObject("Msxml2.XMLHTTP");
+		}
+		if (normalize) {
+			uri = httphelper.normalize(uri);
+		}
+		request.open(method, uri, false);
+		if (override) {
+			request.setRequestHeader('X-HTTP-Method-Override', 'DELETE');
+		}
+		if (method === 'POST' || override) {
+			var data = name + '=' + value;
+			request.setRequestHeader("Content-Type",
+					"application/x-www-form-urlencoded");
+			request.send(data);
+		} else {
+			request.send();
+		}
+		location.reload('false');
+	};
+
+	httphelper.normalize = function(uri) {
+		var n = uri.lastIndexOf("#");
+		uri = uri.substring(0, n) + "/" + uri.substring(n + 1, uri.length);
+		return uri;
+	};
+
+}());
+
+function getResponse(method, uri, acceptHeader) {
+	if (typeof acceptHeader == "undefined") {
+		acceptHeader = "application/xml";
+	}
+	var request = new XMLHttpRequest();
+	request.open(method, uri, false);
+	request.setRequestHeader("Accept", acceptHeader);
+	request.send();
+	var headers = request.getAllResponseHeaders();
+
+	return ("HTTP/1.1 " + request.status + " " + request.statusText + "\n"
+			+ headers + "\n\n" + request.responseText.replace(/</gi, "&lt;")
+			.replace(/>/gi, "&gt;"));
+
+}

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css Tue Jul 19 19:37:37 2011
@@ -0,0 +1,200 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+.ontology {
+	border: 1px solid #eee;
+	border-spacing: 1px;
+	border-radius: 6px;
+	-moz-border-radius: 6px;
+	padding-bottom: 3px;
+	padding-top: 3px;
+	padding-left: 3px;
+	padding-right: 3px;
+}
+
+.ontologyHeader {
+	display: inline;
+	background: url("/static/home/images/foldable_unfolded.png");
+	background-repeat: no-repeat;
+	background-position: right;
+	text-indent: 5%;
+	border: 0;
+	width: 10%;
+	height: 16px;
+	float: right;
+	cursor: hand;
+}
+
+.collapsed .ontologyHeader {
+	background: url("/static/home/images/foldable_folded.png");
+	background-repeat: no-repeat;
+	background-position: right;
+}
+
+.imgOnt {
+	display: inline;
+	background: url(/static/home/images/rdf_flyer_16.png);
+	background-repeat: no-repeat;
+	padding-left: 20px;
+}
+
+.imgOntClass {
+	display: inline;
+	background: url(/static/ontology/images/ont_class_16.png);
+	background-repeat: no-repeat;
+	padding-left: 20px;
+}
+
+.imgOntDataProp {
+	display: inline;
+	background: url(/static/ontology/images/ont_data_prop.png);
+	background-repeat: no-repeat;
+	padding-left: 20px;
+}
+
+.imgOntObjectProp {
+	display: inline;
+	background: url(/static/ontology/images/ont_obj_prop.png);
+	background-repeat: no-repeat;
+	padding-left: 20px;
+}
+
+.imgOntInd {
+	display: inline;
+	background: url(/static/ontology/images/ont_ind.png);
+	background-repeat: no-repeat;
+	padding-left: 20px;
+}
+
+.ontology .collapsed .ontologyCollapsable {
+	display: none
+}
+
+.rightFloat {
+	float: right;
+	align: right;
+}
+
+.ontology .ontologySubmitHeader {
+	background: url(/static/ontology/images/add_icon_16.png),
+		url("/static/home/images/foldable_unfolded.png");
+	background-repeat: no-repeat;
+	background-position: 1%, right;
+	text-indent: 4%;
+	margin-top: 1px;
+	margin-bottom: 1px;
+}
+
+.ontology .collapsed .ontologySubmitHeader {
+	background: url(/static/ontology/images/add_icon_16.png),
+		url("/static/home/images/foldable_folded.png");
+	background-repeat: no-repeat;
+	background-position: 1%, right;
+	text-indent: 4%;
+}
+
+.delete {
+	background: url(/static/ontology/images/delete_icon_16.png) no-repeat
+		center;
+	border: 0;
+	width: 36px;
+	height: 16px;
+	padding-left: 20px;
+	cursor: hand;
+}
+
+.addHeader {
+	background: url(/static/ontology/images/add_icon_16.png);
+	background-repeat: no-repeat;
+	background-position: 1%;
+	text-indent: 4%;
+}
+
+.invisible {
+	display: none;
+}
+
+.horizontal {
+	horizontal-align: left;
+}
+
+.inline {
+	display: inline;
+}
+
+.margined {
+	margin: 10px 0px 10px 0px;
+}
+
+.show {
+	padding: 4px 6px 5px;
+	position: absolute;
+	left: 50%;
+}
+
+.previousButton {
+	border: 1px solid #c3c3c3;
+	background-color: #fafafa;
+	padding: 4px 6px 5px;
+	align: left;
+}
+
+.nextButton {
+	border: 1px solid #c3c3c3;
+	background-color: #fafafa;
+	padding: 4px 6px 5px;
+	float: right;
+	align: right;
+}
+
+.props th {
+	color: #000;
+	font-size: 105%;
+	font-weight: normal;
+	padding: 6px 10px;
+	border-bottom: 1px solid #d1dfce;
+	background-color: #f8f8f8;
+}
+
+.formParams th {
+	color: #000;
+	font-size: 105%;
+	font-weight: normal;
+	padding: 6px 10px;
+	border-bottom: 1px solid #d1dfce;
+	background-color: #f8f8f8;
+}
+
+.props td {
+	padding: 4px 10px 5px;
+	border-bottom: 1px solid #ffe8f9;
+}
+
+.formParams td {
+	padding: 4px 10px 5px;
+	border-bottom: 1px solid #ffe8f9;
+}
+
+.bordered {
+	padding-bottom: 4px;
+	padding-right: 4px;
+	border: 1px solid #d1dfce;
+}
+
+li {
+	padding-bottom: 2px;
+	padding-top: 2px;
+}
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,90 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#macro processConstraint original constraint>
+	<#assign seqs = constraint.classConstraintOrClassMetaInformationOrPropertyMetaInformation/>  
+	<#assign type = constraint.type/>
+	  <fieldset>
+	  	<legend>${type?replace("_", " ")?capitalize}</legend>	
+	  <ul>
+    
+	<#if type == "COMPLEMENT_OF" || type =="ENUMERATION_OF" || type =="INTERSECTION_OF"|| type =="UNION_OF">
+	 <!-- ClassMetaInf or IndividualMetaInf or ClassConstraint or Literal -->
+	  <!--<li><b>Type:&nbsp;&nbsp;</b> ${constraint.type}</li>-->
+	 <#list seqs as seq>
+		 	<#if seq.class.simpleName == "ClassMetaInformation">
+		 		<li><b>Class: </b> <a href='${seq.href}'>${seq.URI}</a></li>	
+		 	<#elseif seq.class.simpleName == "ClassConstraint">
+		 		<li><b>Range: </b> <@processConstraint original=constraint constraint=seq/></li>
+		 	<#elseif seq.class.simpleName == "IndividualMetaInformation">
+		 		<li><b>Individual: </b> <a href='${seq.href}'>${seq.URI}</a></li>
+		 		
+	 		<#elseif seq.class.simpleName == "String">
+	 			<li><b>Resource: </b> ${seq}</li>
+		 	<#else>
+		 	</#if>
+		 </#list>
+	<#elseif type=="ALL_VALUES_FROM" || type=="SOME_VALUES_FROM" || type=="HAS_VALUE">
+	<!--[0] Property:(Clickable : PropertyMetaInf | Unclickable : ResourceMetaInf) -->
+	<!-- [>0] ((ClassMetaInformation | Class Constraint) | DataRange : (IndividualMetaInformation | Literal) )-->
+	 <!--<li><b>Type:&nbsp;&nbsp;</b> ${constraint.type}</li>-->
+		 <#if seqs?first.class.simpleName == "ResourceMetaInformationType" >
+	 	 		<li><b>On:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>${seqs?first.URI}</li>		
+	 	<#else>
+	 		<li><b>On:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><a href='${seqs?first.href}'>${seqs?first.URI}</a></li>
+	 	</#if>
+	 	<#if (seqs?size >1)>
+	 	<#if seqs[1].class.simpleName == "IndividualMetaInformation" || seqs[1].class.simpleName	== "String">
+ 	 		<li class="bordered">Data Range
+	 			<ul>
+	 	 </#if>
+	 	 </#if>
+		 <#list seqs as seq>
+		 	<#if seq_index != 0>
+			 	<#if seq.class.simpleName == "ClassMetaInformation">
+			 		<li><b>On Class: </b> <a href='${seq.href}'>${seq.URI}</a></li>	
+			 	<#elseif seq.class.simpleName == "ClassConstraint">
+			 		<li><b>On Class: </b> <@processConstraint original=constraint constraint=seq/></li>
+			 	<#elseif seq.class.simpleName == "IndividualMetaInformation">
+			 		<li><b>Value: </b> <a href='${seq.href}'>${seq.URI}</a></li>
+			 	<#elseif seq.class.simpleName == "String">
+			 		<li><b>Value: </b> ${seq}</li>
+			 	<#else>
+			 	</#if>
+			 </#if>
+		 </#list>
+		 <#if (seqs?size >1)>
+			 <#if seqs[1].class.simpleName == "IndividualMetaInformation" || seqs[1].class.simpleName	== "String">
+		 			</ul>
+		 	 </#if>
+		 </#if>
+	<#elseif type=="CARDINALITY" || type="MAX_CARDINALITY" || type=="MIN_CARDINALITY">
+	<!--[0] Property:(Clickable : PropertyMetaInf | Unclickable : ResourceMetaInf) -->
+	<!--[1] Cardinality : literal-->
+	 <!--<li><b>Type:&nbsp;&nbsp;</b> ${constraint.type}</li>-->
+	 	<#if seqs?first.class.simpleName == "ResourceMetaInformationType" >
+	 		<li><b>On:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>${seqs?first.URI}</li>		
+	 	<#else>
+	 		<li><b>On:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b><a href='${seqs?first.href}'>${seqs?first.URI}</a></li>
+	 	</#if>
+	 <li><b>Value:&nbsp;</b>${seqs[1]}</li>
+	
+	<#else>
+	</#if>
+  </ul>
+  </fieldset>
+  <#assign constraint = original>
+</#macro>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,39 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#macro prevNextButtons className>
+		<div class = "margined">
+			<a class="${className} previousButton" href="javascript:;" onClick="javascript: PAGING.gotoPrevious('${className}')">&lt;&lt; Previous</a>
+				<div class="show inline ${className} sizeCombobox">
+					<p class = "inline">Show</p> 
+					<form class=" inline" id="${className}sizeCombobox"> 
+				                    <select name="pagesizes" size="1" 
+				   onChange="javascript:  var select = document.getElementById('${className}sizeCombobox').elements['pagesizes']; var value = select.options[select.selectedIndex].value;  PAGING.pageSize['${className}'] = parseInt(value); PAGING.adjustVisibility(
+				   '${className}')  "> 
+				                    <option selected  value="5">5</option> 
+				                    <option value="10">10</option> 
+				                    <option value="15">15</option>
+				                    <option value="20">20</option>
+				                    <option value="30">30</option>
+				                    <option value="40">40</option>
+				                    <option value="50">50</option> 
+				                    </select>
+			    </div> 
+			 </form>
+			<a class="${className} nextButton" href="javascript:;" onClick="javascript: PAGING.gotoNext('${className}')">Next &gt;&gt;</a>
+			</br>
+		</div>
+</#macro>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,46 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#macro property it>
+    var property = this.PSTORE.propUtil.property;
+	property.domainURIs = new Array();
+	
+	<#list it.domain.classMetaInformationOrBuiltInResource as resource>
+		<#if resource?is_hash>
+			property.domainURIs.push("${resource.URI}");
+		<#else>
+			property.domainURIs.push("${resource}");
+		</#if>
+	</#list>
+	property.rangeURIs = new Array();
+	<#list it.range.classMetaInformationOrBuiltInResource as resource>
+		<#if resource?is_hash>
+			property.rangeURIs.push("${resource.URI}");
+		<#else>
+			property.rangeURIs.push("${resource}");
+		</#if>
+	</#list>
+	property.isFunctional = ${it.isIsFunctional()?string};
+	
+	<!-- Object Property Attributes -->
+	<#if it.class.simpleName== 'ObjectPropertyContext'>
+		property.isTransitive = ${it.isIsTransitive()?string};
+		property.isSymmetric = ${it.isIsSymmetric()?string};
+		property.isInverseFunctional = ${it.isIsInverseFunctional()?string};
+	</#if>
+	<!--Deep copy using jQuery-->
+  	jQuery.extend(true, this.PSTORE.propUtil.originalProperty, property);
+</#macro>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,19 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+This is the <strong>Store</strong> component of Apache Stanbol,  Ontology Manager.
+
+

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,152 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Ontology Manager - Store" hasrestapi=true >
+<div class="panel" id="webview">
+<button class="rightFloat" onClick="javascript: clearStore()">Clear Persistence Store</button>
+<br/>
+<br/>
+<div class="ontology">
+	<div class="collapsed">
+		<h4 class="ontologySubmitHeader">Submit a new Ontology</h4>
+		<form class="ontologyCollapsable" method="POST" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Submit raw text in RDF/XML format</legend>
+			  <p>Ontology URI: <textarea rows="1" name="ontologyURI"></textarea></p>
+			  <p>Ontology Content:<textarea rows="15" name="ontologyContent"></textarea></p>
+			  <p><input type="submit" value="Submit Ontology"></p>
+		  </fieldset>
+		</form>
+	</div>
+</div>
+
+<#if it.ontologies?size == 0>
+	<p><em>There is no ontologies installed, a DBPedia ontology can be submitted by activating eu.iksproject.fise.stores.persistencestore.dbPedia.DBPediaClient component in Configuration tab of Apache Felix Web Console.</em></p>
+<#else>
+	<fieldset>
+		<legend><b>Installed Ontologies</b></legend>
+    <#list it.ontologies as ontology>
+		<div class="ontology ontologyList ${ontology_index}"> 
+			<div class="collapsed">
+				<a class="imgOnt" href="${ontology.href}">${ontology.URI}</a>
+				<button class="delete" title="Delete ${ontology.URI}" onClick="javascript: deleteOnt('${ontology.href}')"></button>
+				<button class="ontologyHeader"></button>
+				<ul class= "ontologyCollapsable">
+					<li><b>Description:</b> ${ontology.description}</li>
+					<li><b>URI:</b> ${ontology.URI}</li>
+				</ul>
+			</div>
+		</div>	
+    </#list>
+    	<@buttons.prevNextButtons className="ontologyList"/>
+    </fieldset>
+</#if>
+	<script>
+	PAGING.adjustVisibility("ontologyList");
+	
+	function clearStore()
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',"/ontology",false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+	
+	function deleteOnt(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+	
+	$(".ontology .ontologySubmitHeader").click(function () {
+	  $(this).parents("div").toggleClass("collapsed");
+	});
+	
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting ontologies from the persistence store</h3>
+	<p>A list of previously registered ontologies can be obtained by following command:<p>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/ontologies
+</pre>
+<p>Response:</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:AdministeredOntologies xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://www.co-ode.org/ontologies/pizza/pizza.owl"&gt;
+        &lt;ns1:URI&gt;http://www.co-ode.org/ontologies/pizza/pizza.owl&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts"&gt;
+        &lt;ns1:URI&gt;http://oiled.man.example.net/facts&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+&lt;/ns1:AdministeredOntologies&gt;
+
+</pre>
+
+<p><b>OntologyMetaInformation</b> element contains URI, and description of an ontology and provides a relative link to that ontology resource.</p>	
+<p>This link can be resolved into an absolute URI using http://localhost:8080/persistencestore/ as base URI.</p>  	 	
+<h3>Submitting new ontologies to the persistence store</h3>
+<p>New ontologies can be submitted with following command</p>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode ontologyURI=http://iks-project.eu/sample --data-urlencode ontologyContent@sampleOntology.owl http://localhost:8080/persistencestore/ontologies
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:OntologyMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://iks-project.eu/sample"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/sample&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+&lt;/ns1:OntologyMetaInformation&gt;
+</pre>
+<p>Following URIs can be used to observe classes, datatype properties, object properties and individuals respectively.</p>
+<ul>
+	<li>http://localhost:8080/persistencestore/ontologies/http://iks-project.eu/sample/classes</li>
+	<li>http://localhost:8080/persistencestore/ontologies/http://iks-project.eu/sample/datatypeProperties</li>
+	<li>http://localhost:8080/persistencestore/ontologies/http://iks-project.eu/sample/objectProperties</li>
+	<li>http://localhost:8080/persistencestore/ontologies/http://iks-project.eu/sample/individuals</li>
+</ul>
+<h3>Clearing the persistence store</h3>
+<p>Persistence Store can be cleared using following command</p>
+<pre>
+curl -i -X DELETE http://localhost:8080/persistencestore/ontologies
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 204 No Content
+Server: Jetty(6.1.x)
+</pre>
+</div>
+</...@common.page>

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,115 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Classes Of ${it.metadata.ontologyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+		<h4 class="addHeader">Create a new Class</h4>
+		<form method="POST" accept="text/html" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Enter Class URI to be created</legend>
+			  <p>Class URI: <textarea rows="1" name="classURI"></textarea></p>
+			  <p><input type="submit" value="Create Class"></p>
+		  </fieldset>
+		</form>
+	<#if it.metadata.classMetaInformation?size == 0>
+	<p><em>Currently there are no classes in this ontology.</em></p>
+		
+	<#else>
+	<fieldset>
+		<legend><b>Classes</b></legend>
+		<#list it.metadata.classMetaInformation?sort_by("URI") as classInf>
+			<div class="ontology ontologyClassesList ${classInf_index}"> 
+			<div class="collapsed">
+					<a class="imgOntClass" href="${classInf.href}">${classInf.URI}</a>
+					<button class="delete" title="Delete ${classInf.URI}" onClick="javascript: deleteClass('${classInf.href}')"></button>
+					<div class="ontologyHeader"></div>
+				<ul class= "ontologyCollapsable">
+					<li><b>Description:</b> ${classInf.description}</li>
+					<li><b>Namespace:</b> ${classInf.namespace}</li>
+					<li><b>Local Name:</b> ${classInf.localName}</li>
+				</ul>
+			</div>	
+		</div>
+		</#list>
+		<@buttons.prevNextButtons className="ontologyClassesList"/>
+	</fieldset>
+	</#if>
+<script>
+	PAGING.adjustVisibility("ontologyClassesList");
+
+	function deleteClass(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting Classes of ontology</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/classes
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ClassesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/PopulatedPlace"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/PopulatedPlace&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;PopulatedPlace&lt;/ns1:LocalName&gt;
+    &lt;/ns1:ClassMetaInformation&gt;
+&lt;/ns1:ClassesForOntology&gt;
+</pre>
+<h3>Creating a new Class</h3>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode classURI=http://iks-project.eu/klazzes#SampleClass http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/classes
+</pre>
+<p>Response</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ClassMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://iks-project.eu/klazzes/SampleClass"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/klazzes#SampleClass&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;ns1:Namespace&gt;http://iks-project.eu/klazess#&lt;/ns1:Namespace&gt;
+    &lt;ns1:LocalName&gt;SampleClass&lt;/ns1:LocalName&gt;
+&lt;/ns1:ClassMetaInformation&gt;
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,118 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Datatype Properties Of ${it.metadata.ontologyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+		<h4 class="addHeader">Create a new Datatype Property</h4>
+		<form method="POST" accept-charset="utf-8" accept="text/html" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Enter Datatype Property URI to be created</legend>
+			  <p>Datatype Property URI: <textarea rows="1" name="datatypePropertyURI"></textarea></p>
+			  <p><input type="submit" value="Create Datatype Property"></p>
+		  </fieldset>
+		</form>
+	<#if it.metadata.propertyMetaInformation?size == 0>
+	<br>
+	<p><em>Currently there is no classes in this ontology.</em></p>
+		
+	<#else>
+	<fieldset>
+		<legend><b>Datatype Properties</b></legend>
+		<#list it.metadata.propertyMetaInformation?sort_by("URI") as prop>
+			<div class="ontology ontDPropList ${prop_index}"> 
+			<div class="collapsed">
+					<a class="imgOntDataProp" href="${prop.href}">${prop.URI}</a>
+					<button class="delete" title="Delete ${prop.URI}" onClick="javascript: deleteClass('${prop.href}')"></button>
+					<div class="ontologyHeader"></div>
+				<ul class= "ontologyCollapsable">
+					<li><b>Description:</b> ${prop.description}</li>
+					<li><b>Namespace:</b> ${prop.namespace}</li>
+					<li><b>Local Name:</b> ${prop.localName}</li>
+				</ul>
+			</div>	
+		</div>
+		</#list>
+			<@buttons.prevNextButtons className="ontDPropList"/>
+	</fieldset>
+	</#if>
+<script>
+	PAGING.adjustVisibility("ontDPropList");
+
+	function deleteClass(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting datatype properties of ontology</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/datatypeProperties
+</pre>
+<p>Response :</p>
+
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:DatatypePropertiesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:PropertyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//datatypeProperties/http://dbpedia.org/ontology/academyaward"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/academyaward&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;academyaward&lt;/ns1:LocalName&gt;
+    &lt;/ns1:PropertyMetaInformation&gt;
+&lt;/ns1:DatatypePropertiesForOntology&gt;
+</pre>
+<h3>Creating a new datatypeProperty</h3>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode datatypePropertyURI=http://iks-project.eu/datatypeProps#SampleDatatypeProperty http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/datatypeProperties
+</pre>
+<p>Response</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:PropertyMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://dbpedia.org/ontology//datatypeP
+roperties/http://iks-project.eu/datatypeProps/SampleDatatypeProperty"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/datatypeProps#SampleDatatypeProperty&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;ns1:Namespace&gt;http://iks-project.eu/datatypeProps#&lt;/ns1:Namespace&gt;
+    &lt;ns1:LocalName&gt;SampleDatatypeProperty&lt;/ns1:LocalName&gt;
+&lt;/ns1:PropertyMetaInformation&gt;
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyImports.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyImports.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyImports.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyImports.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,124 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Imports Of ${it.metadata.ontologyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+		<h4 class="addHeader">Add a new Import</h4>
+		<form method="POST" accept="text/html" accept-charset="utf-8" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Enter Ontology URI to be imported</legend>
+			  <p>Ontology URI: <textarea id="importURIIn" rows="1" name="importURI"></textarea></p>
+			  <p><input id="submitImport" type="submit" value="Add Import"></p>
+		  </fieldset>
+		</form>
+	<#if it.metadata.ontologyImport?size == 0>
+  <p><em>No imported ontologies.</em></p>
+<#else>
+  <fieldset>
+    <legend><b>Installed Ontologies</b></legend>
+    <#list it.metadata.ontologyImport as ontology>
+    <div class="ontology ontologyList ${ontology_index}"> 
+      <div class="collapsed">
+        <a class="imgOnt" href="${ontology.href}">${ontology.URI}</a>
+        <button class="delete" title="Delete ${ontology.URI}" onClick="javascript: deleteImport('${it.metadata.ontologyMetaInformation.href}/imports?importURI=${ontology.URI}')"></button>
+        <button class="ontologyHeader"></button>
+        <ul class= "ontologyCollapsable">
+          <li><b>URI:</b> ${ontology.URI}</li>
+        </ul>
+      </div>
+    </div>  
+    </#list>
+      <!--<@buttons.prevNextButtons className="ontologyList"/>-->
+    </fieldset>
+</#if>
+<script>
+	PAGING.adjustVisibility("ontologyClassesList");
+
+	function deleteImport(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+	
+	$("#submitImport").click(function(e){
+	  e.preventDefault()
+	  $.ajax({
+      type: 'POST',
+      data: { importURI: $("#importURIIn").val() },
+      success: function(){
+        location.reload()
+      }
+      
+    });
+	});
+
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting Classes of ontology</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/classes
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ClassesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/PopulatedPlace"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/PopulatedPlace&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;PopulatedPlace&lt;/ns1:LocalName&gt;
+    &lt;/ns1:ClassMetaInformation&gt;
+&lt;/ns1:ClassesForOntology&gt;
+</pre>
+<h3>Creating a new Class</h3>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode classURI=http://iks-project.eu/klazzes#SampleClass http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/classes
+</pre>
+<p>Response</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ClassMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://iks-project.eu/klazzes/SampleClass"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/klazzes#SampleClass&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;ns1:Namespace&gt;http://iks-project.eu/klazess#&lt;/ns1:Namespace&gt;
+    &lt;ns1:LocalName&gt;SampleClass&lt;/ns1:LocalName&gt;
+&lt;/ns1:ClassMetaInformation&gt;
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,115 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Datatype Properties Of ${it.metadata.ontologyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+		<h4 class="addHeader">Create a new Individual</h4>
+		<form method="POST" accept-charset="utf-8" accept="text/html" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Enter Individual URI to be created</legend>
+			  <p>Individual URI: <textarea rows="1" name="individualURI"></textarea></p>
+			  <p>Class URI: <textarea rows="1" name="classURI"></textarea></p>
+			  <p><input type="submit" value="Create Individual"></p>
+		  </fieldset>
+		</form>
+	<#if it.metadata.individualMetaInformation?size == 0>
+		<p><em>Currently there is no individuals in this ontology.</em></p>
+	<#else>
+	<fieldset>
+		<legend><b>Individuals</b></legend>
+		<#list it.metadata.individualMetaInformation?sort_by("URI") as ind>
+			<div class="ontology ontIndList ${ind_index}"> 
+			<div class="collapsed">
+					<a class="imgOntInd" href="${ind.href}">${ind.URI}</a>
+					<button class="delete" title="Delete ${ind.URI}" onClick="javascript: deleteClass('${ind.href}')"></button>
+					<div class ="ontologyHeader"></div>
+				<ul class= "ontologyCollapsable">
+					<li><b>Description:</b> ${ind.description}</li>
+					<li><b>Namespace:</b> ${ind.namespace}</li>
+					<li><b>Local Name:</b> ${ind.localName}</li>
+				</ul>
+			</div>	
+		</div>
+		</#list>
+			<@buttons.prevNextButtons className="ontIndList"/>
+	</fieldset>
+	</#if>
+<script>
+	PAGING.adjustVisibility("ontIndList");
+	
+	function deleteClass(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting individuals of ontology</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/individuals
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:IndividualsForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:IndividualMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//individuals/http://iks-project.eu/individuals/SampleIndividual"&gt;
+        &lt;ns1:URI&gt;http://iks-project.eu/inds#SampleIndividual&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://iks-project.eu/inds#&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;SampleIndividual&lt;/ns1:LocalName&gt;
+    &lt;/ns1:IndividualMetaInformation&gt;
+&lt;/ns1:IndividualsForOntology&gt;
+
+</pre>
+<h3>Creating a new individual</h3>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode individualURI=http://iks-project.eu/inds#SampleIndividual --data-urlencode classURI=http://dbpedia.org/ontology/Actor http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/individuals
+</pre>
+<p>Response</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:IndividualMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://dbpedia.org/ontology//individuals/http://iks-project.eu/inds/SampleIndividual"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/individuals#SampleIndividual&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;ns1:Namespace&gt;http://iks-project.eu/individuals#&lt;/ns1:Namespace&gt;
+    &lt;ns1:LocalName&gt;SampleIndividual&lt;/ns1:LocalName&gt;
+&lt;/ns1:IndividualMetaInformation&gt;
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,117 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<@common.page title="Object Properties Of ${it.metadata.ontologyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+		<h4 class="addHeader">Create a new Object Property</h4>
+		<form method="POST" accept-charset="utf-8" accept="text/html" enctype="application/x-www-form-urlencoded">
+		  <fieldset>
+			  <legend>Enter Object Property URI to be created</legend>
+			  <p>Object Property URI: <textarea rows="1" name="objectPropertyURI"></textarea></p>
+			  <p><input type="submit" value="Create Object Property"></p>
+		  </fieldset>
+		</form>
+	<#if it.metadata.propertyMetaInformation?size == 0>
+	<p><em>Currently there is no classes in this ontology.</em></p>
+		
+	<#else>
+	<fieldset>
+		<legend><b>Object Properties</b></legend>
+		<#list it.metadata.propertyMetaInformation?sort_by("URI") as prop>
+			<div class="ontology ontOPropList ${prop_index}"> 
+			<div class="collapsed">
+					<a class="imgOntObjectProp" href="${prop.href}">${prop.URI}</a>
+					<button class="delete" title="Delete ${prop.URI}" onClick="javascript: deleteClass('${prop.href}')"></button>
+					<div class="ontologyHeader"></div>
+				<ul class= "ontologyCollapsable">
+					<li><b>Description:</b> ${prop.description}</li>
+					<li><b>Namespace:</b> ${prop.namespace}</li>
+					<li><b>Local Name:</b> ${prop.localName}</li>
+				</ul>
+			</div>	
+		</div>
+		</#list>
+			<@buttons.prevNextButtons className="ontOPropList"/>
+	</fieldset>
+	</#if>
+<script>
+	PAGING.adjustVisibility("ontOPropList");
+
+	function deleteClass(uri)
+	{
+		xmlhttp=new XMLHttpRequest();
+		xmlhttp.open('DELETE',uri,false);
+		xmlhttp.send();
+		location.reload('true');
+	}
+
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parent().toggleClass("collapsed");
+	}); 
+</script>
+</div>
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting object properties of ontology</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/objectProperties
+</pre>
+<p>Response :</p>
+
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ObjectPropertiesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;/ns1:OntologyMetaInformation&gt;
+    &lt;ns1:PropertyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//objectProperties/http://dbpedia.org/ontology/actingheadteacher"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/actingheadteacher&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;actingheadteacher&lt;/ns1:LocalName&gt;
+    &lt;/ns1:PropertyMetaInformation&gt;
+&lt;/ns1:ObjectPropertiesForOntology&gt;
+</pre>
+<h3>Creating a new object property</h3>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode objectPropertyURI=http://iks-project.eu/objectProps#SampleObjectProperty http://localhost:8080/persistencestore/${it.metadata.ontologyMetaInformation.href}/objectProperties
+</pre>
+<p>Response</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:PropertyMetaInformation xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns2:href="ontologies/http://dbpedia.org/ontology//objectPro
+perties/http://iks-project.eu/objectProps/SampleObjectProperty"&gt;
+    &lt;ns1:URI&gt;http://iks-project.eu/objectProps#SampleObjectProperty&lt;/ns1:URI&gt;
+    &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+    &lt;ns1:Namespace&gt;http://iks-project.eu/objectProps#&lt;/ns1:Namespace&gt;
+    &lt;ns1:LocalName&gt;SampleObjectProperty&lt;/ns1:LocalName&gt;
+&lt;/ns1:PropertyMetaInformation&gt;
+
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file

Added: incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl?rev=1148497&view=auto
==============================================================================
--- incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl (added)
+++ incubator/stanbol/trunk/ontologymanager/store/web/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl Tue Jul 19 19:37:37 2011
@@ -0,0 +1,334 @@
+<#--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<#import "/imports/classConstraint.ftl" as constraint>
+<@common.page title="Class Context of ${it.metadata.classMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+
+	<!-- Equivalent Classes -->
+	<fieldset>
+			<legend><b>Equivalent Classes</b></legend>
+			<div class="ontology">
+				<div class="collapsed">
+					<fieldset>
+					    <h4 class="ontologySubmitHeader">Add Equivalent Class</h4>
+					  	<div class="ontologyCollapsable">
+						  <p>Domain URI: <textarea class="equivalentClassInput"rows="1" name="classURI"></textarea></p>
+						  <p><button  name="Add Domain" onClick="javascript: PSTORE.HTTPHelper.send('POST', '${it.metadata.classMetaInformation.href}/equivalentClasses', false, false, 'equivalentClassURIs',$('.equivalentClassInput')[0].value )">Add Equivalent Class</button></p>
+						 </div>
+					  </fieldset>
+				</div>
+			</div>
+	<#if it.metadata.equivalentClasses.classMetaInformation?size !=0>
+			<#list it.metadata.equivalentClasses.classMetaInformation?sort_by("URI") as eqCls>
+				<div class="ontology equClasses ${eqCls_index}"> 
+				<div class="collapsed">
+					<a class="imgOntClass" href="${eqCls.href}">${eqCls.URI}</a>
+					<button class="delete" title="Delete ${eqCls.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.classMetaInformation.href}/equivalentClasses/${eqCls.URI}', true, false, null, null)"></button>
+				</div>
+			</div>
+			</#list>
+				<@buttons.prevNextButtons className="equClasses"/>
+	</#if>
+	</fieldset>	
+	
+		<!-- Super Classes -->
+		<fieldset>
+			<legend><b>Super Classes</b></legend>
+			<div class="ontology">
+				<div class="collapsed">
+					<fieldset>
+					    <h4 class="ontologySubmitHeader">Add Super Class</h4>
+					  	<div class="ontologyCollapsable">
+						  <p>Domain URI: <textarea class="superClassInput"rows="1" name="classURI"></textarea></p>
+						  <p><button  name="Add Super Class" onClick="javascript: PSTORE.HTTPHelper.send('POST', '${it.metadata.classMetaInformation.href}/superClasses', false, false, 'superClassURIs',$('.superClassInput')[0].value )">Add Super Class</button></p>
+						 </div>
+					  </fieldset>
+				</div>
+			</div>
+	<#if it.metadata.superclasses.classMetaInformation?size !=0>
+			<#list it.metadata.superclasses.classMetaInformation?sort_by("URI") as supCls>
+				<div class="ontology supClasses ${supCls_index}"> 
+				<div class="collapsed">
+					<a class="imgOntClass" href="${supCls.href}">${supCls.URI}</a>
+					<button class="delete" title="Delete ${supCls.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.classMetaInformation.href}/superClasses/${supCls.URI}', true, false, null, null)"></button>
+				</div>
+			</div>
+			</#list>
+				<@buttons.prevNextButtons className="supClasses"/>
+		
+	</#if>
+	</fieldset>
+		<!-- Disjoint Classes -->
+		<fieldset>
+			<legend><b>Disjoint Classes</b></legend>
+			<div class="ontology">
+				<div class="collapsed">
+					<fieldset>
+					    <h4 class="ontologySubmitHeader">Add Disjoint Class</h4>
+					  	<div class="ontologyCollapsable">
+						  <p>Domain URI: <textarea class="disjointClassInput"rows="1" name="classURI"></textarea></p>
+						  <p><button  name="Add Disjoint Class" onClick="javascript: PSTORE.HTTPHelper.send('POST', '${it.metadata.classMetaInformation.href}/disjointClasses', false, false, 'disjointClassURIs',$('.disjointClassInput')[0].value )">Add Disjoint Class</button></p>
+						 </div>
+					  </fieldset>
+				</div>
+			</div>
+	<#if it.metadata.disjointClasses.classMetaInformation?size !=0>
+		
+			<#list it.metadata.disjointClasses.classMetaInformation?sort_by("URI") as disjCls>
+				<div class="ontology disClasses ${disjCls_index}"> 
+				<div class="collapsed">
+					<a class="imgOntClass" href="${disjCls.href}">${disjCls.URI}</a>
+					<button class="delete" title="Delete ${disjCls.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.classMetaInformation.href}/disjointClasses/${disjCls.URI}', true, false, null, null)"></button>
+				</div>
+			</div>
+			</#list>
+				<@buttons.prevNextButtons className="disClasses"/>
+	</#if>
+	</fieldset>
+	
+	
+		<!-- Class Constraints -->
+	<#if it.metadata.classConstraint?size != 0>
+		<fieldset>
+			<legend><b>Class Constraints</b></legend>
+			<#list it.metadata.classConstraint?sort_by("type") as clsCons>
+				<p class="clasCons ${clsCons_index}">
+					<@constraint.processConstraint original=clsCons constraint=clsCons/>
+				</p>
+			</#list>
+		</fieldset>
+	</#if>
+</div>
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting class context of a  class</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.classMetaInformation.href}
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
+&lt;ns1:ClassContext xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink"&gt;
+    &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/AdultActor"&gt;
+        &lt;ns1:URI&gt;http://dbpedia.org/ontology/AdultActor&lt;/ns1:URI&gt;
+        &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+        &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+        &lt;ns1:LocalName&gt;AdultActor&lt;/ns1:LocalName&gt;
+    &lt;/ns1:ClassMetaInformation&gt;
+    &lt;ns1:EquivalentClasses/&gt;
+    &lt;ns1:Superclasses&gt;
+        &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/Actor"&gt;
+            &lt;ns1:URI&gt;http://dbpedia.org/ontology/Actor&lt;/ns1:URI&gt;
+            &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+            &lt;ns1:Namespace&gt;http://dbpedia.org/ontology/&lt;/ns1:Namespace&gt;
+            &lt;ns1:LocalName&gt;Actor&lt;/ns1:LocalName&gt;
+        &lt;/ns1:ClassMetaInformation&gt;
+    &lt;/ns1:Superclasses&gt;
+    &lt;ns1:DisjointClasses/&gt;
+&lt;/ns1:ClassContext&gt;
+</pre>
+
+<p><b>Class</b> Context contains following information:
+	<ul>
+		<li><b>Equivalent Classes</b> as a list of ClassMetaInformation</li>
+		<li><b>Super Classes</b> as a list of ClassMetaInformation</li>
+		<li><b>Disjoint Classes</b> as a list of ClassMetaInformation</li>
+		<li><b>Class Constraint</b> list containing
+			<ul>
+				<li>owl:allValuesFrom</li>
+				<li>owl:someValuesFrom</li>
+				<li>owl:hasValue</li>
+				<li>owl:maxCardinality</li>
+				<li>owl:minCardinality</li>
+				<li>owl:cardinality</li>
+				<li>owl:intersectionOf</li>
+				<li>owl:unionOf</li>
+			</ul>
+			constrains defined on this class
+		</li>
+		Here is an example class constraint that defines a class which has either a student or a happy friend : 
+<pre>
+&lt;ns1:ClassConstraint ns1:type="union_of">
+    &lt;ns1:ClassConstraint ns1:type="some_values_from"&gt;
+        &lt;ns1:PropertyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/objectProperties/http://oiled.man.example.net/facts/hasFriend"&gt;
+            &lt;ns1:URI&gt;http://oiled.man.example.net/facts#hasFriend&lt;/ns1:URI&gt;
+            &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+            &lt;ns1:Namespace&gt;http://oiled.man.example.net/facts#&lt;/ns1:Namespace&gt;
+            &lt;ns1:LocalName&gt;hasFriend&lt;/ns1:LocalName&gt;
+        &lt;/ns1:PropertyMetaInformation&gt;
+        &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/classes/http://oiled.man.example.net/facts/Happy"&gt;
+            &lt;ns1:URI&gt;http://oiled.man.example.net/facts#Happy&lt;/ns1:URI&gt;
+            &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+            &lt;ns1:Namespace&gt;http://oiled.man.example.net/facts#&lt;/ns1:Namespace&gt;
+            &lt;ns1:LocalName&gt;Happy&lt;/ns1:LocalName&gt;
+        &lt;/ns1:ClassMetaInformation&gt;
+    &lt;/ns1:ClassConstraint&gt;
+    &lt;ns1:ClassConstraint ns1:type="some_values_from"&gt;
+        &lt;ns1:PropertyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/objectProperties/http://oiled.man.example.net/facts/hasFriend"&gt;
+            &lt;ns1:URI&gt;http://oiled.man.example.net/facts#hasFriend&lt;/ns1:URI&gt;
+            &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+            &lt;ns1:Namespace&gt;http://oiled.man.example.net/facts#&lt;/ns1:Namespace&gt;
+            &lt;ns1:LocalName&gt;hasFriend&lt;/ns1:LocalName&gt;
+        &lt;/ns1:PropertyMetaInformation&gt;
+        &lt;ns1:ClassMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/classes/http://oiled.man.example.net/facts/Student"&gt;
+            &lt;ns1:URI&gt;http://oiled.man.example.net/facts#Student&lt;/ns1:URI&gt;
+            &lt;ns1:Description&gt;&lt;/ns1:Description&gt;
+            &lt;ns1:Namespace&gt;http://oiled.man.example.net/facts#&lt;/ns1:Namespace&gt;
+            &lt;ns1:LocalName&gt;Student&lt;/ns1:LocalName&gt;
+        &lt;/ns1:ClassMetaInformation&gt;
+    &lt;/ns1:ClassConstraint&gt;
+&lt;/ns1:ClassConstraint&gt;
+		
+</pre>
+	</ul>
+</p>
+
+<h3>Updating class context of a class</h3>
+<fieldset>
+	<legend><b>SubPath: /superClasses  Method: POST </b></legend>
+	<table class="formParams">
+		<head>
+			<th width="20%">POST Parameter</th>
+			<th width="10%">Type</th>
+			<th width="70%">Explanation</th>
+		</head>
+		<body>
+			<tr>
+				<td>superClassURIs</td>
+				<td>List&lt;String&gt;</td>
+				<td>A list of existing class URIs which will be added as a super class to this class</td>
+			</tr>
+		</body>
+	</table>
+</fieldset>
+<fieldset>
+	<legend><b>SubPath:  /superClasses/{classURI} Method : DELETE</b></legend> 
+	<p>Delete class indicated by classURI at path parameter from the super class list of this class</p>
+</fieldset>
+
+<fieldset>
+	<legend><b>SubPath: /equivalentClasses  Method: POST </b></legend>
+	<table class="formParams">
+		<head>
+			<th width="20%">POST Parameter</th>
+			<th width="10%">Type</th>
+			<th width="70%">Explanation</th>
+		</head>
+		<body>
+			<tr>
+				<td>equivalentClassURIs</td>
+				<td>List&lt;String&gt;</td>
+				<td>A list of existing class URIs which will be added as an equivalent class to this class</td>
+			</tr>
+		</body>
+	</table>
+</fieldset>
+<fieldset>
+	<legend><b>SubPath: /equivalentClasses/{classURI} Method : DELETE</b></legend> 
+	<p>Delete class indicated by classURI at path parameter from the equivalent class list of this class</p>
+</fieldset>
+<fieldset>
+	<legend><b>SubPath: /disjointClasses  Method: POST </b></legend>
+	<table class="formParams">
+		<head>
+			<th width="20%">POST Parameter</th>
+			<th width="10%">Type</th>
+			<th width="70%">Explanation</th>
+		</head>
+		<body>
+			<tr>
+				<td>disjointClassURIs</td>
+				<td>List&lt;String&gt;</td>
+				<td>A list of existing class URIs which will be added as a disjoint class to this class</td>
+			</tr>
+		</body>
+	</table>
+</fieldset>
+<fieldset>
+	<legend><b>SubPath: /disjointClasses/{classURI} Method : DELETE</b></legend> 
+	<p>Delete class indicated by classURI at path parameter from the super disjoint class  list of this class</p>
+</fieldset>
+
+<fieldset>
+	<legend><b>SubPath: /unionClasses  Method: POST </b></legend>
+	<table class="formParams">
+		<head>
+			<th width="20%">POST Parameter</th>
+			<th width="10%">Type</th>
+			<th width="70%">Explanation</th>
+		</head>
+		<body>
+			<tr>
+				<td>unionClassURIs</td>
+				<td>List&lt;String&gt;</td>
+				<td>A list of existing class URIs which will be added as a union class to this class and this class is converted to union class of this list</td>
+			</tr>
+		</body>
+	</table>
+</fieldset>
+<fieldset>
+	<legend><b>SubPath: /unionClasses/{classURI} Method : DELETE</b></legend> 
+	<p>Delete class indicated by classURI at path parameter from the union class list of this class</p>
+</fieldset>
+</div>
+<script>
+	PAGING.adjustVisibility("equClasses");
+	PAGING.adjustVisibility("supClasses");
+	PAGING.adjustVisibility("disClasses");
+	PAGING.adjustVisibility("clasCons");
+	
+	$(".ontology .ontologyHeader").click(function () {
+	  $(this).parents("div").toggleClass("collapsed");
+	}); 
+	
+	$(".ontology .ontologySubmitHeader").click(function () {
+	  $(this).parents("div").toggleClass("collapsed");
+	}); 
+
+	$(".updateRadio").change(
+		function(){
+			$(".superClass").addClass("invisible");
+			$(".equivalentClass").addClass("invisible");
+			$(".disjointClass").addClass("invisible");
+			$(".unionOf").addClass("invisible");
+			$(".superClass").children("p").children("textarea")[0].value="";
+			$(".equivalentClass").children("p").children("textarea")[0].value="";
+			$(".disjointClass").children("p").children("textarea")[0].value="";
+			$(".unionOf").children("p").children("textarea")[0].value="";
+			var rb = $("input:checked")[0];
+			if(rb != null){ 
+				var checked = $("input:checked")[0].value;
+				if(checked == "SP"){
+					$(".superClass").removeClass("invisible");
+				}else if(checked == "EQ"){
+					$(".equivalentClass").removeClass("invisible");
+				}else if(checked == "DS"){
+					$(".disjointClass").removeClass("invisible");
+				}else if(checked == "UN"){
+					$(".unionOf").removeClass("invisible");
+				}
+			}
+		}
+	)
+</script>
+</...@common.page>
\ No newline at end of file