You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stanbol.apache.org by ci...@apache.org on 2011/04/07 10:04:47 UTC
svn commit: r1089764 [5/6] - in
/incubator/stanbol/trunk/commons/web/ontology: ./ src/ src/main/
src/main/java/ src/main/java/org/ src/main/java/org/apache/
src/main/java/org/apache/stanbol/
src/main/java/org/apache/stanbol/ontologymanager/ src/main/ja...
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/jquery-1.4.2.js
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js Thu Apr 7 08:04:44 2011
@@ -0,0 +1,123 @@
+/*
+
+ 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");
+ }
+ }
+ }
+ );
+ }
+}());
+
+
+
+
+
+
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/paging.js
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js Thu Apr 7 08:04:44 2011
@@ -0,0 +1,91 @@
+//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
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/propertyUpdater.js
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js Thu Apr 7 08:04:44 2011
@@ -0,0 +1,62 @@
+//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, "<")
+ .replace(/>/gi, ">"));
+
+}
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/scripts/requestResponse.js
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css Thu Apr 7 08:04:44 2011
@@ -0,0 +1,182 @@
+
+.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
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/static/style/store.css
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,74 @@
+<#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: </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: </b> ${constraint.type}</li>-->
+ <#if seqs?first.class.simpleName == "ResourceMetaInformationType" >
+ <li><b>On: </b>${seqs?first.URI}</li>
+ <#else>
+ <li><b>On: </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: </b> ${constraint.type}</li>-->
+ <#if seqs?first.class.simpleName == "ResourceMetaInformationType" >
+ <li><b>On: </b>${seqs?first.URI}</li>
+ <#else>
+ <li><b>On: </b><a href='${seqs?first.href}'>${seqs?first.URI}</a></li>
+ </#if>
+ <li><b>Value: </b>${seqs[1]}</li>
+
+ <#else>
+ </#if>
+ </ul>
+ </fieldset>
+ <#assign constraint = original>
+</#macro>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/classConstraint.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,23 @@
+<#macro prevNextButtons className>
+ <div class = "margined">
+ <a class="${className} previousButton" href="javascript:;" onClick="javascript: PAGING.gotoPrevious('${className}')"><< 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 >></a>
+ </br>
+ </div>
+</#macro>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/prevNextButtons.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,30 @@
+<#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
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/propertySerializer.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/imports/storeDescription.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,3 @@
+This is the <strong>Store</strong> component of Apache Stanbol, Ontology Manager.
+
+
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,136 @@
+<#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',"ontologies",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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:AdministeredOntologies xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://www.co-ode.org/ontologies/pizza/pizza.owl">
+ <ns1:URI>http://www.co-ode.org/ontologies/pizza/pizza.owl</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts">
+ <ns1:URI>http://oiled.man.example.net/facts</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+</ns1:AdministeredOntologies>
+
+</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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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">
+ <ns1:URI>http://iks-project.eu/sample</ns1:URI>
+ <ns1:Description></ns1:Description>
+</ns1:OntologyMetaInformation>
+</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>
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologies.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,99 @@
+<#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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:ClassesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/">
+ <ns1:URI>http://dbpedia.org/ontology/</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/PopulatedPlace">
+ <ns1:URI>http://dbpedia.org/ontology/PopulatedPlace</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>PopulatedPlace</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+</ns1:ClassesForOntology>
+</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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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">
+ <ns1:URI>http://iks-project.eu/klazzes#SampleClass</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://iks-project.eu/klazess#</ns1:Namespace>
+ <ns1:LocalName>SampleClass</ns1:LocalName>
+</ns1:ClassMetaInformation>
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyClasses.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,102 @@
+<#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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:DatatypePropertiesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/">
+ <ns1:URI>http://dbpedia.org/ontology/</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+ <ns1:PropertyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//datatypeProperties/http://dbpedia.org/ontology/academyaward">
+ <ns1:URI>http://dbpedia.org/ontology/academyaward</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>academyaward</ns1:LocalName>
+ </ns1:PropertyMetaInformation>
+</ns1:DatatypePropertiesForOntology>
+</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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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">
+ <ns1:URI>http://iks-project.eu/datatypeProps#SampleDatatypeProperty</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://iks-project.eu/datatypeProps#</ns1:Namespace>
+ <ns1:LocalName>SampleDatatypeProperty</ns1:LocalName>
+</ns1:PropertyMetaInformation>
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyDatatypeProperties.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,99 @@
+<#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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:IndividualsForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/">
+ <ns1:URI>http://dbpedia.org/ontology/</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+ <ns1:IndividualMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//individuals/http://iks-project.eu/individuals/SampleIndividual">
+ <ns1:URI>http://iks-project.eu/inds#SampleIndividual</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://iks-project.eu/inds#</ns1:Namespace>
+ <ns1:LocalName>SampleIndividual</ns1:LocalName>
+ </ns1:IndividualMetaInformation>
+</ns1:IndividualsForOntology>
+
+</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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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">
+ <ns1:URI>http://iks-project.eu/individuals#SampleIndividual</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://iks-project.eu/individuals#</ns1:Namespace>
+ <ns1:LocalName>SampleIndividual</ns1:LocalName>
+</ns1:IndividualMetaInformation>
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyIndividuals.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,101 @@
+<#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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:ObjectPropertiesForOntology xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:OntologyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology/">
+ <ns1:URI>http://dbpedia.org/ontology/</ns1:URI>
+ <ns1:Description></ns1:Description>
+ </ns1:OntologyMetaInformation>
+ <ns1:PropertyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//objectProperties/http://dbpedia.org/ontology/actingheadteacher">
+ <ns1:URI>http://dbpedia.org/ontology/actingheadteacher</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>actingheadteacher</ns1:LocalName>
+ </ns1:PropertyMetaInformation>
+</ns1:ObjectPropertiesForOntology>
+</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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<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">
+ <ns1:URI>http://iks-project.eu/objectProps#SampleObjectProperty</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://iks-project.eu/objectProps#</ns1:Namespace>
+ <ns1:LocalName>SampleObjectProperty</ns1:LocalName>
+</ns1:PropertyMetaInformation>
+
+</pre>
+</div>
+</...@common.page>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/ontologyObjectProperties.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/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/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,318 @@
+<#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)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:ClassContext xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink">
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/AdultActor">
+ <ns1:URI>http://dbpedia.org/ontology/AdultActor</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>AdultActor</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+ <ns1:EquivalentClasses/>
+ <ns1:Superclasses>
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/Actor">
+ <ns1:URI>http://dbpedia.org/ontology/Actor</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>Actor</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+ </ns1:Superclasses>
+ <ns1:DisjointClasses/>
+</ns1:ClassContext>
+</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>
+<ns1:ClassConstraint ns1:type="union_of">
+ <ns1:ClassConstraint ns1:type="some_values_from">
+ <ns1:PropertyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/objectProperties/http://oiled.man.example.net/facts/hasFriend">
+ <ns1:URI>http://oiled.man.example.net/facts#hasFriend</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://oiled.man.example.net/facts#</ns1:Namespace>
+ <ns1:LocalName>hasFriend</ns1:LocalName>
+ </ns1:PropertyMetaInformation>
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/classes/http://oiled.man.example.net/facts/Happy">
+ <ns1:URI>http://oiled.man.example.net/facts#Happy</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://oiled.man.example.net/facts#</ns1:Namespace>
+ <ns1:LocalName>Happy</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+ </ns1:ClassConstraint>
+ <ns1:ClassConstraint ns1:type="some_values_from">
+ <ns1:PropertyMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/objectProperties/http://oiled.man.example.net/facts/hasFriend">
+ <ns1:URI>http://oiled.man.example.net/facts#hasFriend</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://oiled.man.example.net/facts#</ns1:Namespace>
+ <ns1:LocalName>hasFriend</ns1:LocalName>
+ </ns1:PropertyMetaInformation>
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://oiled.man.example.net/facts/classes/http://oiled.man.example.net/facts/Student">
+ <ns1:URI>http://oiled.man.example.net/facts#Student</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://oiled.man.example.net/facts#</ns1:Namespace>
+ <ns1:LocalName>Student</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+ </ns1:ClassConstraint>
+</ns1:ClassConstraint>
+
+</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<String></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<String></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<String></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<String></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
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularClass.ftl
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularDatatypeProperty.ftl
URL: http://svn.apache.org/viewvc/incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularDatatypeProperty.ftl?rev=1089764&view=auto
==============================================================================
--- incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularDatatypeProperty.ftl (added)
+++ incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularDatatypeProperty.ftl Thu Apr 7 08:04:44 2011
@@ -0,0 +1,288 @@
+<#import "/imports/common.ftl" as common>
+<#import "/imports/prevNextButtons.ftl" as buttons>
+<#import "/imports/propertySerializer.ftl" as propSerializer>
+<@common.page title="Datatype Property Context of ${it.metadata.propertyMetaInformation.URI}" hasrestapi=true>
+<div class="panel" id="webview">
+ <!--FIXME Currently superProperties of this property are not changed using html interface-->
+ <script type="text/javascript" src="static/scripts/propertyUpdater.js"></script>
+<!-- Property Features-->
+ <fieldset>
+ <legend><b>Property Feature</b></legend>
+ <input class="horizontal" name="propFeatFunc" type="checkbox" <#if it.metadata.isIsFunctional()>checked</#if>>Functional<br>
+ <input type="button" value="Save Changes" onClick="javascript: PSTORE.propUtil.post('${it.metadata.propertyMetaInformation.href}')">
+ </fieldset>
+<!--Domains -->
+ <fieldset>
+ <legend><b>Datatype Property Domains</b></legend>
+ <div class="ontology">
+ <div class="collapsed">
+ <fieldset>
+ <h4 class="ontologySubmitHeader">Add Domain</h4>
+ <div class="ontologyCollapsable">
+ <p>Domain URI: <textarea class="domainInput"rows="1" name="classURI"></textarea></p>
+ <p><button name="Add Domain" onClick="javascript: PSTORE.HTTPHelper.send('POST', '${it.metadata.propertyMetaInformation.href}/domains', false, false, 'domainURIs',$('.domainInput')[0].value )">Add Domain</button></p>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <#if it.metadata.domain.classMetaInformationOrBuiltInResource?size == 0>
+ <em>There is no ranges declared for this Datatype property.</em>
+
+ <#else>
+ <#list it.metadata.domain.classMetaInformationOrBuiltInResource as domain>
+ <#if domain?keys?seq_contains("href")>
+ <div class="ontology domainList ${domain_index}">
+ <div class="collapsed">
+ <a class= "imgOntClass" href="${domain.href}">${domain.URI}</a>
+ <button class="delete" title="Delete ${domain.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.propertyMetaInformation.href}/domains/${domain.URI}', true, false, null, null)"></button>
+ <ul class= "ontologyCollapsable">
+ <li><b>Description:</b> ${domain.description}</li>
+ <li><b>URI:</b> ${domain.URI}</li>
+ </ul>
+ </div>
+ </div>
+ <#else>
+ <div class="ontology ontologyHeader domainList ${domain_index}">
+ <b>URI:</b> ${domain.URI}<button class="delete" title="Delete ${domain.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.propertyMetaInformation.href}/domains/${domain.URI}', true, false, null, null)"></button>
+ <div>
+ </#if>
+ </#list>
+ <@buttons.prevNextButtons className="domainList"/>
+
+ </#if>
+ </fieldset>
+<!--Ranges -->
+ <fieldset>
+ <legend><b>Datatype Property Ranges</b></legend>
+ <div class="ontology">
+ <div class="collapsed">
+ <fieldset>
+ <h4 class="ontologySubmitHeader">Add Range</h4>
+ <div class="ontologyCollapsable">
+ <p>Range URI: <textarea class="rangeInput"rows="1" name="classURI"></textarea></p>
+ <p><button name="Add Range" onClick="javascript: PSTORE.HTTPHelper.send('POST', '${it.metadata.propertyMetaInformation.href}/ranges', false, false, 'rangeURIs',$('.rangeInput')[0].value )">Add Range</button></p>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <#if it.metadata.range.classMetaInformationOrBuiltInResource?size == 0>
+ <em>There is no ranges declared for this Datatype property.</em>
+
+ <#else>
+ <#list it.metadata.range.classMetaInformationOrBuiltInResource as range>
+ <#if range?keys?seq_contains("href")>
+ <div class="ontology rangeList ${range_index}">
+ <div class="collapsed">
+ <p class ="ontologyHeader">
+ <a class ="imgOntClass" href="${range.href}">${range.URI}</a>
+ <button class="delete" title="Delete ${range.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.propertyMetaInformation.href}/ranges/${range.URI}', true, false, null, null)"></button>
+ </p>
+ </div>
+ </div>
+ <#else>
+ <div class="ontology rangeList ${range_index}">
+ <b>URI:</b> ${range.URI} <button class="delete" title="Delete ${range.URI}" onClick="javascript: PSTORE.HTTPHelper.send('DELETE', '${it.metadata.propertyMetaInformation.href}/ranges/${range.URI}', true, false, null, null)"></button>
+ </div>
+ </#if>
+ </#list>
+ <@buttons.prevNextButtons className="rangeList"/>
+ </fieldset>
+ </#if>
+
+
+<!-- Equivalent Properties -->
+ <#if it.metadata.equivalentProperties.propertyMetaInformation?size !=0>
+ <fieldset>
+ <legend><b>Equivalent Properties</b></legend>
+ <#list it.metadata.equivalentProperties.propertyMetaInformation?sort_by("URI") as prop>
+ <div class="ontology equProps ${prop_index}">
+ <div class="collapsed">
+ <a class="imgOntDataProp" href="${prop.href}">${prop.URI}</a>
+ </div>
+ </div>
+ </#list>
+ <@buttons.prevNextButtons className="equProps"/>
+ </fieldset>
+ </#if>
+
+<!-- Super Properties -->
+ <#if it.metadata.superProperties.propertyMetaInformation?size !=0>
+ <fieldset>
+ <legend><b>Super Properties</b></legend>
+ <#list it.metadata.superProperties.propertyMetaInformation?sort_by("URI") as prop>
+ <div class="ontology superProps ${prop_index}">
+ <div class="collapsed">
+ <a class="imgOntDataProp" href="${prop.href}">${prop.URI}</a>
+ </div>
+ </div>
+ </#list>
+ <@buttons.prevNextButtons className="superProps"/>
+ </fieldset>
+ </#if>
+ <br>
+</div>
+
+<div class="panel" id="restapi" style="display: none;">
+<h3>Getting datatype property context of a class</h3>
+<pre>
+curl -i -X GET -H "Accept:application/xml" http://localhost:8080/persistencestore/${it.metadata.propertyMetaInformation.href}
+</pre>
+<p>Response :</p>
+<pre>
+HTTP/1.1 200 OK
+Content-Type: application/xml
+Transfer-Encoding: chunked
+Server: Jetty(6.1.x)
+
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns1:DatatypePropertyContext xmlns:ns1="model.rest.persistence.iks.srdc.com.tr" xmlns:ns2="http://www.w3.org/1999/xlink" ns1:isFunctional="true">
+ <ns1:PropertyMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//datatypeProperties/http://dbpedia.org/ontology/added">
+ <ns1:URI>http://dbpedia.org/ontology/added</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>added</ns1:LocalName>
+ </ns1:PropertyMetaInformation>
+ <ns1:Domain>
+ <ns1:ClassMetaInformation ns2:href="ontologies/http://dbpedia.org/ontology//classes/http://dbpedia.org/ontology/HistoricPlace">
+ <ns1:URI>http://dbpedia.org/ontology/HistoricPlace</ns1:URI>
+ <ns1:Description></ns1:Description>
+ <ns1:Namespace>http://dbpedia.org/ontology/</ns1:Namespace>
+ <ns1:LocalName>HistoricPlace</ns1:LocalName>
+ </ns1:ClassMetaInformation>
+ </ns1:Domain>
+ <ns1:Range>
+ <ns1:BuiltInResource>
+ <ns1:URI>http://www.w3.org/2001/XMLSchema#date</ns1:URI>
+ </ns1:BuiltInResource>
+ </ns1:Range>
+ <ns1:EquivalentProperties/>
+ <ns1:SuperProperties/>
+</ns1:DatatypePropertyContext>
+</pre>
+
+<p>Datatype property Context contains following information:
+ <ul>
+ <li><b>Equivalent Properties</b> as a list of PropertyMetaInformation</li>
+ <li><b>Super Properties</b> as a list of PropertyMetaInformation</li>
+ <li>Whether the datatype property is <b>functional</b> or not</li>
+ <li><b>Domains</b> as a list of resource URIs or ClassMetaInformation</li>
+ <li><b>Ranges</b> as a list of resource URIs</li>
+ </ul>
+</p>
+
+<h3>Updating datatype property context of an datatype property</h3>
+<fieldset>
+ <legend>Form Paramaters</legend>
+ <table class="formParams">
+ <head>
+ <th width="20%">Parameter Name</th>
+ <th width="10%">Type</th>
+ <th width="70%">Explanation</th>
+ </head>
+ <tr>
+ <td>isFunctional</td>
+ <td>boolean</td>
+ <td>Boolean value indicating whether the datatype property is functional</td>
+ </tr>
+ <body>
+ </body>
+ </table>
+</fieldset>
+
+<fieldset>
+ <legend><b>SubPath: /domains 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>domainURIs</td>
+ <td>List<String></td>
+ <td>A list of existing class URIs which will be added as a domain to this datatype property</td>
+ </tr>
+ </body>
+ </table>
+</fieldset>
+<fieldset>
+ <legend><b>SubPath: /domains/{domainURI} Method : DELETE</b></legend>
+ <p>Delete domain indicated by domainURI at path parameter from the domain list of this datatype property</p>
+</fieldset>
+
+<fieldset>
+ <legend><b>SubPath: /ranges 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>rangeURIs</td>
+ <td>List<String></td>
+ <td>A list of existing class URIs which will be added as a range to this datatype property</td>
+ </tr>
+ </body>
+ </table>
+</fieldset>
+<fieldset>
+ <legend><b>SubPath: /ranges/{rangeURI} Method : DELETE</b></legend>
+ <p>Delete range indicated by rangeURI at path parameter from the range list of this datatype property</p>
+</fieldset>
+
+<fieldset>
+ <legend><b>SubPath: /superProperties 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>superPropertyURIs</td>
+ <td>List<String></td>
+ <td>A list of existing datatype property URIs which will be added as a super property to this datatype property</td>
+ </tr>
+ </body>
+ </table>
+</fieldset>
+<fieldset>
+ <legend><b>SubPath: /superProperties/{propertyURI} Method : DELETE</b></legend>
+ <p>Delete datatype property indicated by propertyURI at path parameter from the super properties list of this datatype property</p>
+</fieldset>
+<p>Example curl command</p>
+<pre>
+curl -i -X POST -H "Accept:application/xml" --data-urlencode isFuntional=true http://localhost:8080/persistencestore/${it.metadata.propertyMetaInformation.href}
+</pre>
+<p>Response is the updated class context of the class</p>
+
+</div>
+<script>
+
+ PAGING.adjustVisibility("domainList");
+ PAGING.adjustVisibility("rangeList");
+ PAGING.adjustVisibility("equProps");
+ PAGING.adjustVisibility("superProps");
+ <@propSerializer.property it=it.metadata/>
+
+
+
+ var propUtil = this.PSTORE.propUtil;
+
+ $('[name="propFeatFunc"]').click(function(){
+ propUtil.setFunctional($(this)[0].checked);
+ });
+
+ $(".ontology .ontologyHeader").click(function () {
+ $(this).parent().toggleClass("collapsed");
+ });
+
+ $(".ontology .ontologySubmitHeader").click(function () {
+ $(this).parents("div").toggleClass("collapsed");
+ });
+</script>
+</...@common.page>
\ No newline at end of file
Propchange: incubator/stanbol/trunk/commons/web/ontology/src/main/resources/org/apache/stanbol/commons/web/ontologymanager/store/templates/org/apache/stanbol/ontologymanager/store/rest/resources/particularDatatypeProperty.ftl
------------------------------------------------------------------------------
svn:executable = *