You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2015/03/22 13:11:18 UTC
[22/51] [partial] clerezza git commit: CLEREZZA-966: started
hierarchical project structure, moved platform bundles to platform,
only moved RDF artifacts ported to use commons to the rdf folder.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js b/platform.editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
deleted file mode 100644
index 4db9729..0000000
--- a/platform.editor/src/main/resources/META-INF/resources/tools/editor/scripts/underscore-min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-// Underscore.js 1.5.0
-// http://underscorejs.org
-// (c) 2009-2011 Jeremy Ashkenas, DocumentCloud Inc.
-// (c) 2011-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
-// Underscore may be freely distributed under the MIT license.
-!function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,v=e.reduce,h=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,w=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.5.0";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(j.has(n,a)&&t.call(e,n[a],a,n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,
e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduce===v)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduceRight===h)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,fu
nction(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.va
lue},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e};var F=function(n){return j.isFunction(n)?n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=F(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index<t.index?-1:1}),"value")};var k=function(n,t,r,e){var u={},i=F(null==t?j.identity:t);return A(n,function(t,a){var o=i.call(r,t,a,n);e(u,o,t)}),u};j.groupBy=function(n,t,r){return k(n,t,r,function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)})},j.countBy=function(n,t,r){return k(n,t,r,function(n,t){j.has(
n,t)||(n[t]=0),n[t]++})},j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:F(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var R=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return R(n,t,[])},j.without=function(n){return j.differen
ce(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){return j.unzip.apply(j,o.call(arguments))},j.unzip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e
]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var M=function(){};j.bind=function(n,t){var r,e;if(w&&n.bind===w)return w.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));M.prototype=n.prototype;var u=new M;M.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){
var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u=null;return function(){var i=this,a=arguments,o=function(){u=null,r||(e=n.apply(i,a))},c=r&&!u;return clearTimeout(u),u=setTimeout(o,t),c&&(e=n.apply(i,a)),e}},j.once=function(n)
{var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push(n[r]);return t},j.pairs=function(n){var t=[];for(var r in n)j.has(n,r)&&t.push([r,n[r]]);return t},j.invert=function(n){var t={};for(var r in n)j.has(n,r)&&(t[n[r]]=r);return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){va
r t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(
r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=
typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){retu
rn I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},z=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(z,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),
i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var D=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this);
-//# sourceMappingURL=underscore-min.map
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css b/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
deleted file mode 100644
index cd820ba..0000000
--- a/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/etch.css
+++ /dev/null
@@ -1,43 +0,0 @@
-body {
- padding-top: 3cm;
-}
-
-/* === Editor === */
-.etch-editor-panel { display: none; padding: 5px; position: absolute; z-index: 10000;
- background: #dadada; border: 1px solid #bdbdbd; color: #535353; text-shadow: 0 1px 0 #fff;
- background-image: -moz-linear-gradient(center bottom, #ccc 0%, #ddd 100%);
- background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ddd), to(#ccc));
- -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
- -webkit-box-shadow: inset 1px 0 0 #dfdfdf, inset 0 1px 0 #dfdfdf, inset -1px 0 0 #dfdfdf, inset 0 -1px 0 #dfdfdf, 0 0 5px rgba(0,0,0,.3);
- }
-.etch-editor-button { display: block; float: left; margin-right: 3px; position: relative; text-decoration: none;
- display: block; width: 27px; height: 27px; background: #dadada; border: 1px solid #aaa; color: #535353; text-shadow: 0 1px 0 #fff;
- background: -moz-linear-gradient(center bottom, #e1e1e1 0%, #efefef 100%);
- background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fFfFfF), to(#f1f1f1));
- -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
- }
-
-.etch-editor-button:last-child { margin-right: 0; }
-.etch-editor-button:hover { background: #fff; border-color: #999; }
-.etch-editor-button span:active { box-shadow: inset 0 0 15px rgba(0,0,0,.5); border-color: #999; }
-
-.etch-editor-button span,
-.etch-editor-button span { background: url('images/editor_icons.png') no-repeat;
- display: block; height: 100%; width: 100%;
-}
-
-.etch-editor-panel .etch-bold span { background-position: 0 0; }
-.etch-editor-panel .etch-italic span { background-position: -30px 0; }
-.etch-editor-panel .etch-underline span { background-position: -60px 0; }
-.etch-editor-panel .etch-unordered-list span { background-position: -90px 0; }
-.etch-editor-panel .etch-ordered-list span { background-position: -120px 0; }
-.etch-editor-panel .etch-image span { background-position: -150px 0; }
-.etch-editor-panel .etch-link span { background-position: -180px 0; }
-.etch-editor-panel .etch-save span { background-position: -210px 0; }
-.etch-editor-panel .etch-justify-left span { background-position: -240px 0; }
-.etch-editor-panel .etch-justify-center span { background-position: -270px 0; }
-.etch-editor-panel .etch-justify-right span { background-position: -300px 0; }
-.etch-editor-panel .etch-cite span { background-position: -330px 0; }
-.etch-editor-panel .etch-heading span { background-position: -360px 0; }
-.etch-editor-panel .etch-clear-formatting span { background-position: -390px 0; }
-
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png b/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png
deleted file mode 100644
index f94f5a6..0000000
Binary files a/platform.editor/src/main/resources/META-INF/resources/tools/editor/styles/images/editor_icons.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala b/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
deleted file mode 100644
index e8e6665..0000000
--- a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/Manager.scala
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2013 The Apache Software Foundation.
- *
- * Licensed 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.
- */
-
-package org.apache.clerezza.platform.editor
-
-import javax.ws.rs.GET;
-import javax.ws.rs.HeaderParam;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.UriInfo;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider
-import org.apache.clerezza.rdf.core.Graph
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.Service;
-
-@Component
-@Service(Array(classOf[Object]))
-@Property(name="javax.ws.rs", boolValue=Array(true))
-@Path("/tools/editor/create")
-class Manager {
-
- @Reference
- var cgp: ContentGraphProvider = null;
-
- @GET
- def sayHello = "Size of content graph: "+cgp.getContentGraph.size
-
- @PUT
- def putData(graph: Graph) = {
- //TODO implement
- graph
- }
-
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala b/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
deleted file mode 100644
index 36c5d15..0000000
--- a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/DiscobitsContentEtch.scala
+++ /dev/null
@@ -1,277 +0,0 @@
-package org.apache.clerezza.platform.editor
-
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import javax.ws.rs.core.MediaType
-import org.apache.clerezza.platform.typerendering.TypeRenderlet
-import org.apache.clerezza.platform.typerendering.scala._
-import org.apache.clerezza.rdf.ontologies.DISCOBITS
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;import scala.xml.Unparsed
-import scala.xml._
-import scala.xml.transform._
-
-
-
-abstract class DiscobitsContentEtch extends SRenderlet {
-
- override val getMediaType = MediaType.TEXT_HTML_TYPE
-
- override def getModePattern = "edit"
-
- override def renderedPage(arguments: XmlResult.Arguments) = {
- new XmlResult(arguments) {
- override def content = {
- val initScript = """
- var discoBitsCollection = new Backbone.Collection();
- $(function() {
-
- GreenRdfStore.getGraph(document, function(origGraph) {
- //now that we have the orig graph we no longer need the content atr
- $("span[property='disco:infoBit']").removeAttr("content");
- var InfoBit = Backbone.Model.extend({
- defaults: {
- "@type": 'disco:XHTMLInfoDiscoBit',
- "disco:infoBit": 'Some content'
- },
- initialize: function() {
- console.log('This model has been initialized.');
- var m = this;
- this.on('change', function(msg) {
- console.log('A value for this model has changed: ');
- console.log(m.changed);
- console.log(m.get("@id"));
- console.log('A value for this model has changed: '+m.hasChanged(null));
- m.foo = "bar"
- });
- }
- });
- function saveAllModified() {
- GreenRdfStore.getGraph(document, function(newGraph) {
- //alert("orig: "+origGraph.toNT());
- //alert("new: "+ newGraph.toNT());
- $.post( "/tools/editor/post", { assert: newGraph.toNT(), revoke: origGraph.toNT(), rdfFormat: 'text/turtle' }, function( data ) {
- alert("saved");
- origTurtle = newTurtle;
- }) .fail(function( data) {
- errdata = data
- alert( "error: " + data.statusText);
- });
- });
-
- }
- var InfoBitView = Backbone.View.extend({
- initialize: function() {
- _.bindAll(this, 'save')
- this.model.bind('save', this.save);
- var infoBit = $(this.el).find('[property="disco:infoBit"]').html()
- console.log(this.model.hasChanged(null))
- //this.model.set("disco:infoBit", infoBit)
- console.log(this.model.hasChanged(null))
- this.stickit();
- },
- events: {
- 'mousedown .editable': 'editableClick'
- },
- bindings: {
- '[property="disco:infoBit"]': 'disco:infoBit'
- },
- editableClick: etch.editableInit,
- save: function() {
-
- // normally you would call model.save() here but this is a demo
- // $(this.el).find('.editable').effect('highlight', {color: 'yellow'});
- // $('.save-event').fadeIn('fast', function() {
- // setTimeout($(this).fadeOut('slow'), 10000);
- // });
- console.log("this modified: ");
- console.log(this.model.get("@id"));
- console.log(this.model.changed);
- console.log("this is modified: "+this.model.hasChanged(null));
- saveAllModified();
- }
-
- });
- //$article = $('[property="disco:infoBit"]');
- $('[property="disco:infoBit"]').addClass("editable")
- $('[property="disco:infoBit"]').attr("data-button-class", "all")
- //this ensure two way binding with stickit
- $('[property="disco:infoBit"]').attr("contenteditable", "true")
- $article = $('[typeof="disco:XHTMLInfoDiscoBit"]');
- _.forEach($article, function(art) {
- console.log(art);
- var infoBit = $(art).find('[property="disco:infoBit"]').html()
- var about = $(art).attr('about')
- var model = new InfoBit({
- "@id": about,
- "disco:infoBit": infoBit
- });
- new InfoBitView({model: model, el: art, tagName: art.tagName});
- discoBitsCollection.add(model)
- });
-
-
-
- });
- /*var store = rdfstore.create();
-
- CallbackProcessor.prototype = new RDFaProcessor();
- CallbackProcessor.prototype.constructor=RDFaProcessor;
- function CallbackProcessor() {
- RDFaProcessor.call(this);
- }
-
- CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
- alert("New triple: "+subject+", predicate "+predicate+", object "+object.value+", "+object.language+", "+object.type);
- //RDFaProcessor.prototype.addTriple.call(this, origin, subject, predicate, object);
- //graph.add(env.createTriple())
- }*/
- //var gp = new GraphRDFaProcessor();
- /*function WrappedGraphProcessor() {
- GraphRDFaProcessor.call(this)
- }
- WrappedGraphProcessor.prototype = new GraphRDFaProcessor();
- WrappedGraphProcessor.prototype.addTriple= function(origin,subject,predicate,object) {
- alert("uff "+origin+","+subject+","+predicate+","+object);
- if (origin.getAttribute("content")) {
- object.value = origin.getAttribute("content");
- }
- GraphRDFaProcessor.prototype.addTriple.call(this, origin, subject, predicate, object);
- }
- var gp = new WrappedGraphProcessor();
- //var gp = new CallbackProcessor();
- gp.target.graph = new RDFaGraph();
- gp.process(document);
- var origTurtle = gp.target.graph.toString();
- alert(origTurtle);*/
-
-
- //});
-
-
-
-
-
- //var view = new articleView({model: model, el: $article[0], tagName: $article[0].tagName});
-
- });
-
- Backbone.on('all', function(s) {
- console.log('Handling all: ' + s);
- });
-
-
-
- /*document.addEventListener(
- "rdfa.loaded",
- function() {
- _.forEach(document.getElementsByType("http://discobits.org/ontology#Entry"), function(e) {
- $(e).css('background-color', 'blue');
- });
- console.log('all colored');
- //console.log('activating: '+RDFaProcessor);
- CallbackProcessor.prototype = new RDFaProcessor();
- CallbackProcessor.prototype.constructor=RDFaProcessor;
- function CallbackProcessor() {
- RDFaProcessor.call(this);
- }
-
- CallbackProcessor.prototype.newSubjectOrigin = function(origin,subject) {
- console.log("New origin for "+subject);
- }
-
- CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
- console.log("New triple: "+subject+", predicate "+predicate+
- ", object "+object.value+", "+object.language+", "+object.type);
- }
- console.log('activated: '+CallbackProcessor);
- processor = new CallbackProcessor();
- processor.finishedHandlers.push(
- function(node) {
- alert("Done!");
- }
- );
- processor.process(document);
- console.log('done');
- },
- false
- );*/
- """
- val html = <html xmlns:disco="http://discobits.org/ontology#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
-
- <head>
- <link type="text/css" href="/style/style.css" rel="stylesheet" />
- <link rel="stylesheet" href="/tools/editor/styles/etch.css" />
- {for (part <- res/DISCOBITS.contains; if ((part/DISCOBITS.pos*) == "0")) yield
- <title>Editing: {part/DISCOBITS.holds/DISCOBITS.infoBit*}</title> }
- <script src="/tools/editor/scripts/RDFaProcessor.1.3.0.js"></script>
- <script src="/tools/editor/scripts/RDFa.1.3.0.js"></script>
- </head>
- <body>
- {render(res, "rdfa-naked")}
- <script src="/tools/editor/scripts/jquery.min.js"></script>
- <script src="/tools/editor/scripts/underscore-min.js"></script>
- <script src="/tools/editor/scripts/backbone-min.js"></script>
- <script src="/tools/editor/scripts/etch.js"></script>
- <script src="/tools/editor/scripts/backbone.stickit.js"></script>
- <script src="/tools/editor/scripts/rdfstore.js" type="text/javascript"></script>
- <script src="/tools/editor/scripts/greenrdfstore.js"></script>
- <script>
- {Unparsed(initScript)}
- </script>
- </body>
- </html>
-
- //From: http://www.w3.org/TR/html5/syntax.html#syntax
- //"A single newline may be placed immediately after the start tag of pre
- //and textarea elements. If the element's contents are intended to
- //start with a newline, two consecutive newlines thus need to be
- //included by the author."
- object preRule extends RewriteRule {
- override def transform(n: Node): Seq[Node] = n match {
- case e:Elem
- if(e.label == "pre") => e.child(0) match {
- case t : Text =>
- if (t.text(0) == '\n') {
- val newText = Text("\n"+t.text)
- e.copy(child = newText ++ e.child.tail)
- } else {
- e
- }
- case _ => e
- }
- case other => other
- }
- }
-
- object htmlLineBreaks extends RuleTransformer(preRule)
-
- htmlLineBreaks(html)
- }
- }
- }
-
-}
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class TitledContentEtch extends DiscobitsContentEtch {
-
- val getRdfType = DISCOBITS.TitledContent
-}
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class HtmlInfoDiscobitEtch extends DiscobitsContentEtch {
-
- override val getRdfType = DISCOBITS.XHTMLInfoDiscoBit
-
-}
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class OrderedContentDiscobitEtch extends DiscobitsContentEtch {
-
- override val getRdfType = DISCOBITS.OrderedContent
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala b/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
deleted file mode 100644
index 5e64b41..0000000
--- a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/HtmlInfoDicobitRDFaNaked.scala
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.clerezza.platform.editor
-
-
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import javax.ws.rs.core.MediaType
-import org.apache.clerezza.platform.typerendering.TypeRenderlet
-import org.apache.clerezza.platform.typerendering.scala._
-import org.apache.clerezza.rdf.ontologies.DISCOBITS
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;import scala.xml.Unparsed
-
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class HtmlInfoDicobitRDFaNaked extends SRenderlet {
-
- val getRdfType = DISCOBITS.XHTMLInfoDiscoBit
-
- override val getMediaType = MediaType.TEXT_HTML_TYPE
-
- override def getModePattern = "rdfa-naked"
-
- override def renderedPage(arguments: XmlResult.Arguments) = {
- new XmlResult(arguments) {
- override def content = {
- <div typeof="disco:XHTMLInfoDiscoBit" about={res*}>
- <span property="disco:infoBit" content={(res/DISCOBITS.infoBit*).replace("\n","\\n")} datatype="rdf:XMLLiteral">{Unparsed(res/DISCOBITS.infoBit*)}</span>
- </div>
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala b/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
deleted file mode 100644
index e8e00f5..0000000
--- a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/OrderedContentRDFaNaked.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.apache.clerezza.platform.editor
-
-
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import javax.ws.rs.core.MediaType
-import org.apache.clerezza.platform.typerendering.TypeRenderlet
-import org.apache.clerezza.platform.typerendering.scala._
-import org.apache.clerezza.rdf.ontologies.DISCOBITS
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class OrderedContentRDFaNaked extends SRenderlet {
-
- val getRdfType = DISCOBITS.OrderedContent
-
- override val getMediaType = MediaType.TEXT_HTML_TYPE
-
- override def getModePattern = "rdfa-naked"
-
- override def renderedPage(arguments: XmlResult.Arguments) = {
- new XmlResult(arguments) {
- override def content = {
- <div about={res*} typeof="disco:OrderedContent">
- {for (part <- (res/DISCOBITS.contains).sortBy(part => (part/DISCOBITS.pos*).toInt))
- yield <div property="disco:contains" typeof="disco:Entry">
- <div property="disco:pos" style="display: none">{part/DISCOBITS.pos*}</div>
- <div property="disco:holds" resource={part/DISCOBITS.holds*}>{render(part/DISCOBITS.holds, "rdfa-naked")}</div>
- </div>
- }
- </div>
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
----------------------------------------------------------------------
diff --git a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala b/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
deleted file mode 100644
index 94e29fd..0000000
--- a/platform.editor/src/main/scala/org/apache/clerezza/platform/editor/renderlets/TitledContentRDFaNaked.scala
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.apache.clerezza.platform.editor
-
-
-import org.apache.clerezza.rdf.core._
-import org.apache.clerezza.rdf.scala.utils.Preamble._
-import javax.ws.rs.core.MediaType
-import org.apache.clerezza.platform.typerendering.TypeRenderlet
-import org.apache.clerezza.platform.typerendering.scala._
-import org.apache.clerezza.rdf.ontologies.DISCOBITS
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
-
-@Component
-@Service(Array(classOf[TypeRenderlet]))
-class TitledContentRDFaNaked extends SRenderlet {
-
- val getRdfType = DISCOBITS.TitledContent
-
- override val getMediaType = MediaType.TEXT_HTML_TYPE
-
- override def getModePattern = "rdfa-naked"
-
- override def renderedPage(arguments: XmlResult.Arguments) = {
- new XmlResult(arguments) {
- override def content = {
- <div typeof="disco:TitledContent" about={res*}>
- {for (part <- res/DISCOBITS.contains; if ((part/DISCOBITS.pos*) == "0"))
- yield <span property="disco:contains" typeof="disco:Entry">
- <span property="disco:pos" style="display: none">0</span>
- <h1 resource={part/DISCOBITS.holds*} property="disco:holds">{render(part/DISCOBITS.holds, "rdfa-naked")}</h1>
- </span>}
- {for (part <- res/DISCOBITS.contains; if ((part/DISCOBITS.pos*) == "1"))
- yield <div property="disco:contains" typeof="disco:Entry">
- <div property="disco:pos" style="display: none">{part/DISCOBITS.pos*}</div>
- <div property="disco:holds" resource={part/DISCOBITS.holds*}>{render(part/DISCOBITS.holds, "rdfa-naked")}</div>
- </div>}
- </div>
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.enrichment/LICENSE
----------------------------------------------------------------------
diff --git a/platform.enrichment/LICENSE b/platform.enrichment/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform.enrichment/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.enrichment/pom.xml
----------------------------------------------------------------------
diff --git a/platform.enrichment/pom.xml b/platform.enrichment/pom.xml
deleted file mode 100644
index f844156..0000000
--- a/platform.enrichment/pom.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- 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.
-
--->
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>clerezza</artifactId>
- <version>0.5</version>
- <relativePath>../parent</relativePath>
- </parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>platform.enrichment</artifactId>
- <packaging>bundle</packaging>
- <version>1.0.0-SNAPSHOT</version>
- <name>Clerezza - Platform RDF Enrichment</name>
- <description>Provides a Content-Graph Extension using Enrichers</description>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>platform</artifactId>
- <version>0.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>platform.graphprovider.content</artifactId>
- <version>0.7</version>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.core</artifactId>
- <version>0.14</version>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.enrichment</artifactId>
- <version>0.2</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
----------------------------------------------------------------------
diff --git a/platform.enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java b/platform.enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
deleted file mode 100644
index 56bf615..0000000
--- a/platform.enrichment/src/main/java/org/apache/clerezza/platform/rdf/enrichment/EnrichmentTcProvider.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.platform.rdf.enrichment;
-
-import java.security.Permission;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.clerezza.platform.Constants;
-import org.apache.clerezza.platform.graphprovider.content.ContentGraphProvider;
-import org.apache.clerezza.rdf.core.Graph;
-import org.apache.clerezza.rdf.core.MGraph;
-import org.apache.clerezza.rdf.core.TripleCollection;
-import org.apache.clerezza.rdf.core.UriRef;
-import org.apache.clerezza.rdf.core.access.EntityAlreadyExistsException;
-import org.apache.clerezza.rdf.core.access.EntityUndeletableException;
-import org.apache.clerezza.rdf.core.access.LockableMGraph;
-import org.apache.clerezza.rdf.core.access.NoSuchEntityException;
-import org.apache.clerezza.rdf.core.access.TcManager;
-import org.apache.clerezza.rdf.core.access.WeightedTcProvider;
-import org.apache.clerezza.rdf.core.access.security.TcPermission;
-import org.apache.clerezza.rdf.enrichment.Enricher;
-import org.apache.clerezza.rdf.enrichment.EnrichmentTriples;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.ReferencePolicy;
-import org.apache.felix.scr.annotations.References;
-import org.apache.felix.scr.annotations.Service;
-import org.osgi.service.component.ComponentContext;
-
-/**
- * Provides a read-only MGraph with the name urn:x-localinstance:/enrichment.graph
- * containing the enrichments provided by all available services of type
- * Enricher on the content graph.
- *
- * For performance reasons EnrichmentTcProvider gets the content-graph from
- * TcManager and doesn't do access control check on every request, to prevent
- * deductions about the content of the content graph by unauthorized users
- * the required permissions on the enrichment graph are set to those on the
- * content graph.
- *
- *
- * @author reto
- */
-@Component
-@Service(WeightedTcProvider.class)
-@References(
- {
- @Reference(referenceInterface=Enricher.class, name="enricher",
- cardinality=ReferenceCardinality.OPTIONAL_MULTIPLE,
- policy=ReferencePolicy.DYNAMIC)
- }
-)
-public class EnrichmentTcProvider implements WeightedTcProvider {
-
- public static final UriRef ENRICHMENT_GRAPH_URI = new UriRef("urn:x-localinstance:/enrichment.graph");
-
- private LockableMGraph contentGraph;
- private final Collection<Enricher> enrichers = Collections.synchronizedCollection(new HashSet<Enricher>());
-
- @Reference
- private ContentGraphProvider cgProvider;
-
- @Reference
- private TcManager tcManager;
-
- @Override
- public Graph getGraph(UriRef name) throws NoSuchEntityException {
- throw new NoSuchEntityException(name);
- }
-
- @Override
- public MGraph getMGraph(UriRef name) throws NoSuchEntityException {
- if (ENRICHMENT_GRAPH_URI.equals(name)) {
- return getEnrichmentGraph();
- }
- throw new NoSuchEntityException(name);
- }
-
- @Override
- public TripleCollection getTriples(UriRef name) throws NoSuchEntityException {
- if (ENRICHMENT_GRAPH_URI.equals(name)) {
- return getEnrichmentGraph();
- }
- throw new NoSuchEntityException(name);
- }
-
- @Override
- public Set<UriRef> listGraphs() {
- return new HashSet<UriRef>(0);
- }
-
- @Override
- public Set<UriRef> listMGraphs() {
- return Collections.singleton(ENRICHMENT_GRAPH_URI);
- }
-
- @Override
- public Set<UriRef> listTripleCollections() {
- return Collections.singleton(ENRICHMENT_GRAPH_URI);
- }
-
- @Override
- public MGraph createMGraph(UriRef name) throws UnsupportedOperationException, EntityAlreadyExistsException {
- throw new UnsupportedOperationException("creating entities not supported");
- }
-
- @Override
- public Graph createGraph(UriRef name, TripleCollection triples) throws UnsupportedOperationException, EntityAlreadyExistsException {
- throw new UnsupportedOperationException("creating entities not supported");
- }
-
- @Override
- public void deleteTripleCollection(UriRef name) throws UnsupportedOperationException, NoSuchEntityException, EntityUndeletableException {
- throw new UnsupportedOperationException("deleting entities not supported");
- }
-
- @Override
- public Set<UriRef> getNames(Graph graph) {
- return new HashSet<UriRef>(0);
- }
-
- @Override
- public int getWeight() {
- return 0;
- }
-
- private MGraph getEnrichmentGraph() {
- return new EnrichmentTriples(contentGraph, enrichers);
- }
-
- /**
- * avtivates the component and adds the enrichment-graph to the virtual
- * content graph.
- *
- * gets the base content-graph from tcManager and sets the permission
- * required to access the enrichment-graph accordingly
- */
- protected void activate(ComponentContext context) {
- contentGraph = tcManager.getMGraph(Constants.CONTENT_GRAPH_URI);
- Collection<Permission> requiredReadPermissions =
- tcManager.getTcAccessController().getRequiredReadPermissions(Constants.CONTENT_GRAPH_URI);
- if (requiredReadPermissions.isEmpty()) {
- tcManager.getTcAccessController().setRequiredReadPermissionStrings(
- ENRICHMENT_GRAPH_URI, Collections.singleton(
- new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString()
- ));
- } else {
- tcManager.getTcAccessController().setRequiredReadPermissions(
- ENRICHMENT_GRAPH_URI, requiredReadPermissions);
- }
- cgProvider.addTemporaryAdditionGraph(ENRICHMENT_GRAPH_URI);
- }
-
- /**
- * deactivates the compononent removing the enrichment-graph from the
- * virtual content graph
- */
- protected void deactivate(ComponentContext context) {
- cgProvider.removeTemporaryAdditionGraph(ENRICHMENT_GRAPH_URI);
- contentGraph = null;
- }
-
-
-
- protected void bindEnricher(Enricher enricher) {
- enrichers.add(enricher);
- }
-
- protected void unbindEnricher(Enricher enricher) {
- enrichers.remove(enricher);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.globalmenu.api/LICENSE
----------------------------------------------------------------------
diff --git a/platform.globalmenu.api/LICENSE b/platform.globalmenu.api/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/platform.globalmenu.api/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed 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.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.globalmenu.api/pom.xml
----------------------------------------------------------------------
diff --git a/platform.globalmenu.api/pom.xml b/platform.globalmenu.api/pom.xml
deleted file mode 100644
index 0ada0be..0000000
--- a/platform.globalmenu.api/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-<!--
-
- 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.
-
--->
-
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>clerezza</artifactId>
- <version>0.5</version>
- <relativePath>../parent</relativePath>
- </parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>platform.globalmenu.api</artifactId>
- <packaging>bundle</packaging>
- <version>1.0.0-SNAPSHOT</version>
- <name>Clerezza - Platform GlobalMenu API</name>
- <description>
- The API for providing entries to the global clerezza menu
- </description>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr.annotations</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
----------------------------------------------------------------------
diff --git a/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java b/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
deleted file mode 100644
index e552bad..0000000
--- a/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItem.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.platform.globalmenu;
-
-/**
- * This class keeps information about an item for the global menu.
- *
- * @author mir
- */
-public class GlobalMenuItem implements Comparable<GlobalMenuItem> {
-
- private String path;
- private String label;
- private String description;
- private String identifier;
- private int priority;
- private String groupIdentifier;
-
- /**
- * Creates a new <code>GlobalMenuItem</code>.
- *
- * @param relativeUri of the resource to be shown in the menu.
- * @param identifier The identifier of the menu item.
- * @param label Specifies the label of the menu entry.
- * @param priority the priority, higher numbers appear first in the menu
- * @param groupIdentifier Specifies the the identifier of the group of which
- * the menu item is part.
- */
- public GlobalMenuItem(String path, String identifier, String label,
- int priority, String groupIdentifier) {
- if (label == null) {
- throw new IllegalArgumentException("label may not be null");
- }
- this.path = path;
- this.label = label;
- this.identifier = identifier;
- this.priority = priority;
- this.groupIdentifier = groupIdentifier;
- }
-
- /**
- * Creates a new <code>GlobalMenuItem</code>.
- *
- * @param relativeUri of the resource to be shown in the menu.
- * @param identifier The identifier of the menu item.
- * @param label Specifies the label of the menu entry.
- * @param description The description of the menu item.
- * @param priority the priority, higher numbers appear first in the menu
- * @param groupIdentifier Specifies the the identifier of the group of which
- * the menu item is part.
- */
- public GlobalMenuItem(String path, String identifier, String label, String description,
- int priority, String groupIdentifier) {
- if (label == null) {
- throw new IllegalArgumentException("label may not be null");
- }
- this.path = path;
- this.label = label;
- this.description = description;
- this.identifier = identifier;
- this.priority = priority;
- this.groupIdentifier = groupIdentifier;
- }
-
- /**
- * Returns the path of the resource to be shown in the menu. The
- * path is additional to the bundle prefix and if existing to the
- * <code>javax.ws.rs.Path</code> annotation of the
- * <code>GlobalMenuItemsProvider</code> that returned this
- * <code>GlobalMenuItem</code>.
- * @return the path
- */
- public String getPath() {
- return path;
- }
-
- /**
- * Returns the label of the menu entry
- * @return the label
- */
- public String getLabel() {
- return label;
- }
-
- /**
- * Returns the description of the menu entry.
- * @return the groupIdentifier
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Return the identifier of the menu entry.
- *
- * @return
- */
- public String getIdentifier() {
- return identifier;
- }
-
- /**
- * Returns the the priority within the group, which is used for sorting
- * the menu Items, higher numbers appear first in the menu
- * @return the priority
- */
- public int getPriority() {
- return priority;
- }
-
- /**
- * Returns the the identifier of the group of which this menu item is part,
- * null if this is a top-level item.
- * @return the groupIdentifier
- */
- public String getGroupIdentifier() {
- return groupIdentifier;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final GlobalMenuItem other = (GlobalMenuItem) obj;
- if ((this.path == null) ? (other.path != null) : !this.path.equals(other.path)) {
- return false;
- }
- if (!this.label.equals(other.label)) {
- return false;
- }
- if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description)) {
- return false;
- }
- if (this.priority != other.priority) {
- return false;
- }
- if ((this.groupIdentifier == null) ? (other.groupIdentifier != null) : !this.groupIdentifier.equals(other.groupIdentifier)) {
- return false;
- }
- return true;
- }
-
- @Override
- public int hashCode() {
- int hash = 5;
- hash = 53 * hash + (this.path != null ? this.path.hashCode() : 0);
- hash = 53 * hash + this.label.hashCode();
- hash = 53 * hash + (this.description != null ? this.description.hashCode() : 0);
- hash = 53 * hash + this.priority;
- hash = 53 * hash + (this.groupIdentifier != null ? this.groupIdentifier.hashCode() : 0);
- return hash;
- }
-
-
-
- @Override
- public int compareTo(GlobalMenuItem o) {
- if (getPriority() == o.getPriority()) {
- if (this.equals(o)) {
- return 0;
- } else {
- return getLabel().compareTo(o.getLabel());
- }
- }
- return o.getPriority() - getPriority();
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/af0d99b2/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
----------------------------------------------------------------------
diff --git a/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java b/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
deleted file mode 100644
index f4ff7ce..0000000
--- a/platform.globalmenu.api/src/main/java/org/apache/clerezza/platform/globalmenu/GlobalMenuItemsProvider.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.platform.globalmenu;
-
-import java.util.Set;
-
-/**
- * An implementation of this interface provides a set of
- * <code>GlobalMenuItem</code>S. A <code>GlobalMenuItem</code> represents an
- * item in the global menu of the Clerezza Platform.
- *
- * @author mir
- */
-public interface GlobalMenuItemsProvider {
-
- /**
- * Returns a <code>Set</code> of <code>GlobalMenuItem</code>S. If there is
- * no <code>GlobalMenuItem</code> available (e.g. the current user has not
- * the needed permissions) then the returned set is empty.
- * @return
- */
- public Set<GlobalMenuItem> getMenuItems();
-}