clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [4/9] CLEREZZA-435: repaced tabs with spaces in scala files
Date Wed, 04 Dec 2013 15:21:21 GMT
http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.shellcustomizer/src/main/scala/org/apache/clerezza/platform/shellcustomizer/PlatformDsl.scala
----------------------------------------------------------------------
diff --git a/platform.shellcustomizer/src/main/scala/org/apache/clerezza/platform/shellcustomizer/PlatformDsl.scala b/platform.shellcustomizer/src/main/scala/org/apache/clerezza/platform/shellcustomizer/PlatformDsl.scala
index 2964392..84f66cf 100644
--- a/platform.shellcustomizer/src/main/scala/org/apache/clerezza/platform/shellcustomizer/PlatformDsl.scala
+++ b/platform.shellcustomizer/src/main/scala/org/apache/clerezza/platform/shellcustomizer/PlatformDsl.scala
@@ -35,17 +35,17 @@ import clerezza.rdf.core.serializedform.Parser
  */
 class PlatformDsl(outputStream: OutputStream, bundleContext: BundleContext) {
 
-	private lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true)
-	private val serviceDsl = new ServicesDsl(bundleContext)
-	import serviceDsl._
+  private lazy val out = new PrintWriter(new OutputStreamWriter(outputStream, "utf-8"), true)
+  private val serviceDsl = new ServicesDsl(bundleContext)
+  import serviceDsl._
 
-	lazy val contentGraph = $[ContentGraphProvider].getContentGraph
-	def parser = $[Parser]
+  lazy val contentGraph = $[ContentGraphProvider].getContentGraph
+  def parser = $[Parser]
 
-	def uname {
-		out println ("Clerezza on "+System.getProperty("java.vm.name"))
-	}
+  def uname {
+    out println ("Clerezza on "+System.getProperty("java.vm.name"))
+  }
 
 
-	//here we could add a command to set the debug output to the console for some packages
+  //here we could add a command to set the debug output to the console for some packages
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.style.default/src/main/scala/Activator.scala
----------------------------------------------------------------------
diff --git a/platform.style.default/src/main/scala/Activator.scala b/platform.style.default/src/main/scala/Activator.scala
index 1c22cac..a6a687b 100644
--- a/platform.style.default/src/main/scala/Activator.scala
+++ b/platform.style.default/src/main/scala/Activator.scala
@@ -38,9 +38,9 @@ import java.io.{FileOutputStream, FileInputStream, File}
  */
 class Activator extends ActivationHelper {
 
-	registerRenderlet(new GlobalMenuRenderlet)
-	registerRenderlet(new HeadedPageRenderlet)
-	registerRenderlet(new CollectionHeader)
-	registerRenderlet(new RdfListRenderlet)
-	
+  registerRenderlet(new GlobalMenuRenderlet)
+  registerRenderlet(new HeadedPageRenderlet)
+  registerRenderlet(new CollectionHeader)
+  registerRenderlet(new RdfListRenderlet)
+  
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.style.default/src/main/scala/CollectionHeader.scala
----------------------------------------------------------------------
diff --git a/platform.style.default/src/main/scala/CollectionHeader.scala b/platform.style.default/src/main/scala/CollectionHeader.scala
index 4e7dd61..97fd00c 100644
--- a/platform.style.default/src/main/scala/CollectionHeader.scala
+++ b/platform.style.default/src/main/scala/CollectionHeader.scala
@@ -30,9 +30,9 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
  */
 class CollectionHeader extends HeadedPageRenderlet {
 
-	override val getRdfType = HIERARCHY.Collection
+  override val getRdfType = HIERARCHY.Collection
 
-	override def defaultTitle(res: RichGraphNode) = (res*) +  " (Collection)"
+  override def defaultTitle(res: RichGraphNode) = (res*) +  " (Collection)"
 
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.style.default/src/main/scala/GlobalMenuRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.style.default/src/main/scala/GlobalMenuRenderlet.scala b/platform.style.default/src/main/scala/GlobalMenuRenderlet.scala
index 408a338..9db29a0 100644
--- a/platform.style.default/src/main/scala/GlobalMenuRenderlet.scala
+++ b/platform.style.default/src/main/scala/GlobalMenuRenderlet.scala
@@ -37,57 +37,57 @@ import org.apache.clerezza.rdf.ontologies.DC
  */
 class GlobalMenuRenderlet extends SRenderlet {
 
-	val getRdfType = RDFS.Resource
+  val getRdfType = RDFS.Resource
 
-	override def getModePattern = "menu"
+  override def getModePattern = "menu"
 
-	override def renderedPage(arguments: XmlResult.Arguments) = {
-		new XmlResult(arguments) {
-			def menuLink(href: String, label: String) =
-			if ((res*).endsWith(href) || (res*).endsWith(href+"index")) {
-				 <a href={href} class="active">{label}</a>
-			} else {
-				 <a href={href}>{label}</a>
-			}
-			override def content = {
-				def menu(s: Any) = new UriRef("http://clerezza.org/2009/11/global-menu#"+s)
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      def menuLink(href: String, label: String) =
+      if ((res*).endsWith(href) || (res*).endsWith(href+"index")) {
+         <a href={href} class="active">{label}</a>
+      } else {
+         <a href={href}>{label}</a>
+      }
+      override def content = {
+        def menu(s: Any) = new UriRef("http://clerezza.org/2009/11/global-menu#"+s)
 def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
 def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
 def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
 
 <div class="column nav">
-							<ul>
-								
+              <ul>
+                
 
-	{for (menuItem <- res/menu("globalMenu")!!) yield
-		<li class="top-nav-entry"><div class="title">
-			{
-				if ((menuItem/menu("path")).length > 0) {
-					<a href={menuItem/menu("path")*}>{(menuItem/rdfs("label")*)}</a>
-				} else {
-					<a href="#" onclick="return false">{(menuItem/rdfs("label")*)}</a>
-				}
-			}
-		 </div>
-			{
-				ifx ((menuItem/menu("children")).length > 0) {
-				<div>
-					<ul class="nav-entries">
-						 {
-							for (childMenuItem <- menuItem/menu("children")!!) yield {
-							<li><a href={childMenuItem/menu("path")*}>{childMenuItem/rdfs("label")*}</a><span>{childMenuItem/dct("description")*}</span></li>
-							}
-						 }
-					</ul>
-				</div>
-				}
-			}
-		</li>
-	}
-	</ul>
+  {for (menuItem <- res/menu("globalMenu")!!) yield
+    <li class="top-nav-entry"><div class="title">
+      {
+        if ((menuItem/menu("path")).length > 0) {
+          <a href={menuItem/menu("path")*}>{(menuItem/rdfs("label")*)}</a>
+        } else {
+          <a href="#" onclick="return false">{(menuItem/rdfs("label")*)}</a>
+        }
+      }
+     </div>
+      {
+        ifx ((menuItem/menu("children")).length > 0) {
+        <div>
+          <ul class="nav-entries">
+             {
+              for (childMenuItem <- menuItem/menu("children")!!) yield {
+              <li><a href={childMenuItem/menu("path")*}>{childMenuItem/rdfs("label")*}</a><span>{childMenuItem/dct("description")*}</span></li>
+              }
+             }
+          </ul>
+        </div>
+        }
+      }
+    </li>
+  }
+  </ul>
 </div>
-			}
-		}
-	}
+      }
+    }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.style.default/src/main/scala/HeadedPageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.style.default/src/main/scala/HeadedPageRenderlet.scala b/platform.style.default/src/main/scala/HeadedPageRenderlet.scala
index 63dead1..f5c0106 100644
--- a/platform.style.default/src/main/scala/HeadedPageRenderlet.scala
+++ b/platform.style.default/src/main/scala/HeadedPageRenderlet.scala
@@ -39,22 +39,22 @@ import org.apache.clerezza.rdf.ontologies.DC
  */
 class HeadedPageRenderlet extends SRenderlet {
 
-	val getRdfType = PLATFORM.HeadedPage
+  val getRdfType = PLATFORM.HeadedPage
 
-	override def getModePattern = "(?!.*naked).*"
+  override def getModePattern = "(?!.*naked).*"
 
-	protected def defaultTitle(res: RichGraphNode) = "An incomplete titled content "+(res/DISCOBITS.contains*)
+  protected def defaultTitle(res: RichGraphNode) = "An incomplete titled content "+(res/DISCOBITS.contains*)
 
-	override def renderedPage(arguments: XmlResult.Arguments) = {
-		new XmlResult(arguments) {
-			def menuLink(href: String, label: String) =
-			if ((res*).endsWith(href) || (res*).endsWith(href+"index")) {
-				 <a href={href} class="active">{label}</a>
-			} else {
-				 <a href={href}>{label}</a>
-			}
-			override def content = {
-				resultDocModifier.addStyleSheet("/style/style.css");
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      def menuLink(href: String, label: String) =
+      if ((res*).endsWith(href) || (res*).endsWith(href+"index")) {
+         <a href={href} class="active">{label}</a>
+      } else {
+         <a href={href}>{label}</a>
+      }
+      override def content = {
+        resultDocModifier.addStyleSheet("/style/style.css");
 resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
 /*resultDocModifier.addScriptReference("/jquery/jquery.menu.js");
 resultDocModifier.addScriptReference("/jquery/jquery.panel.js");
@@ -62,99 +62,99 @@ resultDocModifier.addScriptReference("/style/scripts/panel.js");*/
 resultDocModifier.addScriptReference("/scripts/modification-status.js");
 resultDocModifier.addScriptReference("/scripts/status-message.js");
 <html xmlns="http://www.w3.org/1999/xhtml">
-	<head>
-		{(res/DISCOBITS.contains).find(e => ((e/DISCOBITS.pos*) == "0")) match {
-				case Some(e) => <title>{render(e/DISCOBITS.holds, "naked")}</title>
-				case None => <title>{defaultTitle(res)}</title>
-			}
-		}
-	</head>
-	<body>
-		<div class="zz-header">
-			<div class="bar"></div>
-			<div class="logo">
-				<a href="http://clerezza.apache.org/" style=""><img src="/images/logo.png" alt="logo" /></a>
-			</div>
-			<div class="module-info">
-				<span id="tx-module">
-					<div id="tx-page-actions">
-						<ol id="tx-page-actions-ol">
-						</ol>
-					</div>
-				</span>
-				<div id="tx-module-tabs">
-					<ol id="tx-module-tabs-ol">
-					</ol>
-					
-				</div>
-			</div>
-			
-			<div class="zz-control">
-				<div class="login">
-						{
-							def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
-							val userName = context/platform("user")/platform("userName")*
-							val displayName = if ((context/platform("user")/FOAF.name).length == 0) {
-										userName
-									} else {
-										context/platform("user")/FOAF.name*
-									}
-							if((userName).equals("anonymous")) {
-								<span>
-									<a href= {"/login?referer="+URLEncoder.encode(uriInfo.getAbsolutePath.toString, "utf-8")}
-											  id="tx-login-button">login</a>
-								</span>
-							} else {
-								<span><a href={"/user/" + userName + "/control-panel"}>{displayName}</a>|<a href="/logout">logout</a></span>
-							}
-						}
-				</div>
-				<div class="actions" id="tx-contextual-buttons">
-						<ol id="tx-contextual-buttons-ol">
-						</ol>
-					</div>
-				<div id="tx-module-options">
-					<ol id="tx-module-options-ol">
-					</ol>
-				</div>
-				
-				
-				<div class="tx-panel" id="tx-panel">
-					<div id="tx-panel-title"><h3></h3></div>
-					<div class="tx-panel-window">
-						<div class="tx-panel-tab-buttons" id="tx-panel-tab-buttons">
-							<ol id="tx-panel-tab-buttons-ol">
-							</ol>
-						</div>
-						<div class="tx-panel-tabs" id="tx-panel-tabs"></div>
-					</div>
-				</div>
-				
-			</div>
-		</div>
-		{render(context,"menu")}
-		<div class="zz-content">
-		{
-			if (mode == null) {
-				render(res, "naked")
-			} else {
-				render(res, mode + "-naked")
-			}
-		}
-		</div>
-						<div class="footer">
-							<div class="logos"><img src="/images/feather.png" /><img src="/images/sw-vert-w3c.png" /><img src="/images/footer-logo.png" /></div>
+  <head>
+    {(res/DISCOBITS.contains).find(e => ((e/DISCOBITS.pos*) == "0")) match {
+        case Some(e) => <title>{render(e/DISCOBITS.holds, "naked")}</title>
+        case None => <title>{defaultTitle(res)}</title>
+      }
+    }
+  </head>
+  <body>
+    <div class="zz-header">
+      <div class="bar"></div>
+      <div class="logo">
+        <a href="http://clerezza.apache.org/" style=""><img src="/images/logo.png" alt="logo" /></a>
+      </div>
+      <div class="module-info">
+        <span id="tx-module">
+          <div id="tx-page-actions">
+            <ol id="tx-page-actions-ol">
+            </ol>
+          </div>
+        </span>
+        <div id="tx-module-tabs">
+          <ol id="tx-module-tabs-ol">
+          </ol>
+          
+        </div>
+      </div>
+      
+      <div class="zz-control">
+        <div class="login">
+            {
+              def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
+              val userName = context/platform("user")/platform("userName")*
+              val displayName = if ((context/platform("user")/FOAF.name).length == 0) {
+                    userName
+                  } else {
+                    context/platform("user")/FOAF.name*
+                  }
+              if((userName).equals("anonymous")) {
+                <span>
+                  <a href= {"/login?referer="+URLEncoder.encode(uriInfo.getAbsolutePath.toString, "utf-8")}
+                        id="tx-login-button">login</a>
+                </span>
+              } else {
+                <span><a href={"/user/" + userName + "/control-panel"}>{displayName}</a>|<a href="/logout">logout</a></span>
+              }
+            }
+        </div>
+        <div class="actions" id="tx-contextual-buttons">
+            <ol id="tx-contextual-buttons-ol">
+            </ol>
+          </div>
+        <div id="tx-module-options">
+          <ol id="tx-module-options-ol">
+          </ol>
+        </div>
+        
+        
+        <div class="tx-panel" id="tx-panel">
+          <div id="tx-panel-title"><h3></h3></div>
+          <div class="tx-panel-window">
+            <div class="tx-panel-tab-buttons" id="tx-panel-tab-buttons">
+              <ol id="tx-panel-tab-buttons-ol">
+              </ol>
+            </div>
+            <div class="tx-panel-tabs" id="tx-panel-tabs"></div>
+          </div>
+        </div>
+        
+      </div>
+    </div>
+    {render(context,"menu")}
+    <div class="zz-content">
+    {
+      if (mode == null) {
+        render(res, "naked")
+      } else {
+        render(res, mode + "-naked")
+      }
+    }
+    </div>
+            <div class="footer">
+              <div class="logos"><img src="/images/feather.png" /><img src="/images/sw-vert-w3c.png" /><img src="/images/footer-logo.png" /></div>
 
-							<div class="divider"></div>
-							<div class="dark">
-								<div class="copyright">Apache Clerezza, Clerezza, Apache, the Apache feather logo, and the Apache Clerezza project logo are trademarks of The Apache Software Foundation. <br></br>© 2011 The Apache Software Foundation.</div>
-							</div>
-						</div>
-	</body>
+              <div class="divider"></div>
+              <div class="dark">
+                <div class="copyright">Apache Clerezza, Clerezza, Apache, the Apache feather logo, and the Apache Clerezza project logo are trademarks of The Apache Software Foundation. <br></br>© 2011 The Apache Software Foundation.</div>
+              </div>
+            </div>
+  </body>
 </html>
-			
-			}
-		}
-	}
+      
+      }
+    }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.style.default/src/main/scala/RdfListRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.style.default/src/main/scala/RdfListRenderlet.scala b/platform.style.default/src/main/scala/RdfListRenderlet.scala
index b9cbd32..2425d24 100644
--- a/platform.style.default/src/main/scala/RdfListRenderlet.scala
+++ b/platform.style.default/src/main/scala/RdfListRenderlet.scala
@@ -33,21 +33,21 @@ import org.apache.clerezza.platform.typerendering.scala._
  */
 class RdfListRenderlet extends SRenderlet {
 
-	val getRdfType = RDF.List
+  val getRdfType = RDF.List
 
-	
-	override def renderedPage(arguments: XmlResult.Arguments) = {
-		new XmlResult(arguments) {
-			override def content = {
-				<div id="tx-content" class="list">
-					{for (entry <- res!!) yield
-						<div class="entry">
-							{render(entry, mode)}
-						</div>
-					}
-				</div>
-			}
-		}
-	}
+  
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+        <div id="tx-content" class="list">
+          {for (entry <- res!!) yield
+            <div class="entry">
+              {render(entry, mode)}
+            </div>
+          }
+        </div>
+      }
+    }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.gui/src/main/scala/Activator.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.gui/src/main/scala/Activator.scala b/platform.typerendering.gui/src/main/scala/Activator.scala
index d5731da..5e88a85 100644
--- a/platform.typerendering.gui/src/main/scala/Activator.scala
+++ b/platform.typerendering.gui/src/main/scala/Activator.scala
@@ -41,86 +41,86 @@ import java.security.{AccessControlException, AccessController}
  */
 class Activator extends BundleActivator {
 
-	private var renderletsOverview: ServiceRegistration[Object] = null
-	private var renderletRegistration: ServiceRegistration[TypeRenderlet] = null
+  private var renderletsOverview: ServiceRegistration[Object] = null
+  private var renderletRegistration: ServiceRegistration[TypeRenderlet] = null
     private var menuProviderRegistration: ServiceRegistration[GlobalMenuItemsProvider] = null
-	private var bundleContext: BundleContext = null
+  private var bundleContext: BundleContext = null
 
 
-	final val path = "admin/renderlets/overview"
-	@Path(path)
-	object RenderletsOverview {
-		@GET def get() = {
-			val resultMGraph = new SimpleMGraph();
-			val preamble = new Preamble(resultMGraph)
-			import preamble._
-			val resultNode = new GraphNode(new BNode(), resultMGraph);
-			resultNode.addProperty(RDF.`type` , Ontology.RenderletOverviewPage);
-			resultNode.addProperty(RDF.`type` , PLATFORM.HeadedPage);
-			resultNode.addProperty(RDF.`type` , RDF.List);
-			val renderletList = resultNode.asList;
-			for (sr <- bundleContext.getServiceReferences(classOf[TypeRenderlet].getName, null)) {
-				val renderlet = bundleContext.getService(sr).asInstanceOf[TypeRenderlet]
-				val rendRes = new BNode()
-				rendRes.addProperty(RDF.`type`, Ontology.Renderlet);
-				rendRes.addPropertyValue(Ontology.mediaType,
-										renderlet.getMediaType.toString)
-				if (renderlet.getModePattern != null) rendRes.addPropertyValue(Ontology.modePattern,
-										renderlet.getModePattern)
-				rendRes.addProperty(Ontology.rdfType,
-										renderlet.getRdfType)
-				rendRes.addPropertyValue(Ontology.stringRepresentation,
-										renderlet.toString)
-				rendRes.addPropertyValue(Ontology.providingBundle,
-										sr.getBundle.getLocation)
-				renderletList.add(rendRes)
-			}
-			resultNode;
-		}
-	}
+  final val path = "admin/renderlets/overview"
+  @Path(path)
+  object RenderletsOverview {
+    @GET def get() = {
+      val resultMGraph = new SimpleMGraph();
+      val preamble = new Preamble(resultMGraph)
+      import preamble._
+      val resultNode = new GraphNode(new BNode(), resultMGraph);
+      resultNode.addProperty(RDF.`type` , Ontology.RenderletOverviewPage);
+      resultNode.addProperty(RDF.`type` , PLATFORM.HeadedPage);
+      resultNode.addProperty(RDF.`type` , RDF.List);
+      val renderletList = resultNode.asList;
+      for (sr <- bundleContext.getServiceReferences(classOf[TypeRenderlet].getName, null)) {
+        val renderlet = bundleContext.getService(sr).asInstanceOf[TypeRenderlet]
+        val rendRes = new BNode()
+        rendRes.addProperty(RDF.`type`, Ontology.Renderlet);
+        rendRes.addPropertyValue(Ontology.mediaType,
+                    renderlet.getMediaType.toString)
+        if (renderlet.getModePattern != null) rendRes.addPropertyValue(Ontology.modePattern,
+                    renderlet.getModePattern)
+        rendRes.addProperty(Ontology.rdfType,
+                    renderlet.getRdfType)
+        rendRes.addPropertyValue(Ontology.stringRepresentation,
+                    renderlet.toString)
+        rendRes.addPropertyValue(Ontology.providingBundle,
+                    sr.getBundle.getLocation)
+        renderletList.add(rendRes)
+      }
+      resultNode;
+    }
+  }
 
-	object MenuProvider extends GlobalMenuItemsProvider {
-		override def getMenuItems: java.util.Set[GlobalMenuItem] = {
-			import collection.JavaConversions._
-			val result = new HashSet[GlobalMenuItem]();
-			try {
-				//TODO should have a more general way to say that a user has some administrative priviledges
-				AccessController.checkPermission(new TcPermission("urn:x-localinstance:/content.graph", "readwrite"))
-			}
-			catch {
-				case e: AccessControlException => {
-					return result
-				}
-			}
-			result.add(new GlobalMenuItem("/"+path,"renderlet-overview", "Renderlet Overview", -999, "Administration"))
-			result
-		}
-	}
+  object MenuProvider extends GlobalMenuItemsProvider {
+    override def getMenuItems: java.util.Set[GlobalMenuItem] = {
+      import collection.JavaConversions._
+      val result = new HashSet[GlobalMenuItem]();
+      try {
+        //TODO should have a more general way to say that a user has some administrative priviledges
+        AccessController.checkPermission(new TcPermission("urn:x-localinstance:/content.graph", "readwrite"))
+      }
+      catch {
+        case e: AccessControlException => {
+          return result
+        }
+      }
+      result.add(new GlobalMenuItem("/"+path,"renderlet-overview", "Renderlet Overview", -999, "Administration"))
+      result
+    }
+  }
 
-	/**
-	 * called when the bundle is started, this method initializes the provided service
-	 */
-	def start(context: BundleContext) {
-		this.bundleContext = context
-		val args = scala.collection.mutable.Map("javax.ws.rs" -> true)
-		renderletsOverview = context.registerService(classOf[Object],
-													 RenderletsOverview, args)
-		val renderlet = new RenderletDescriptionRenderlet
-		val serviceReference = context.getServiceReference(classOf[RenderletManager].getName)
-		renderletRegistration = context.registerService(classOf[TypeRenderlet],
-														renderlet, null)
-		menuProviderRegistration = context.registerService(classOf[GlobalMenuItemsProvider],
-														MenuProvider, null)
-	}
+  /**
+   * called when the bundle is started, this method initializes the provided service
+   */
+  def start(context: BundleContext) {
+    this.bundleContext = context
+    val args = scala.collection.mutable.Map("javax.ws.rs" -> true)
+    renderletsOverview = context.registerService(classOf[Object],
+                           RenderletsOverview, args)
+    val renderlet = new RenderletDescriptionRenderlet
+    val serviceReference = context.getServiceReference(classOf[RenderletManager].getName)
+    renderletRegistration = context.registerService(classOf[TypeRenderlet],
+                            renderlet, null)
+    menuProviderRegistration = context.registerService(classOf[GlobalMenuItemsProvider],
+                            MenuProvider, null)
+  }
 
-	/**
-	 * called when the bundle is stopped, this method unregisters the provided service
-	 */
-	def stop(context: BundleContext) {
-		renderletsOverview.unregister()
-		renderletRegistration.unregister()
-		menuProviderRegistration.unregister()
-		this.bundleContext = null
-	}
+  /**
+   * called when the bundle is stopped, this method unregisters the provided service
+   */
+  def stop(context: BundleContext) {
+    renderletsOverview.unregister()
+    renderletRegistration.unregister()
+    menuProviderRegistration.unregister()
+    this.bundleContext = null
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.gui/src/main/scala/Ontology.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.gui/src/main/scala/Ontology.scala b/platform.typerendering.gui/src/main/scala/Ontology.scala
index 7f34948..209d4c4 100644
--- a/platform.typerendering.gui/src/main/scala/Ontology.scala
+++ b/platform.typerendering.gui/src/main/scala/Ontology.scala
@@ -25,15 +25,15 @@ import org.apache.clerezza.rdf.core.UriRef
 
 object Ontology {
 
-	private def p(s: String) = new UriRef("http://clerezza.org/2011/25/renderletgui#"+s)
+  private def p(s: String) = new UriRef("http://clerezza.org/2011/25/renderletgui#"+s)
 
-	val RenderletOverviewPage = p("RenderletOverviewPage")
-	val Renderlet = p("Renderlet")
-	val renderlet = p("renderlet")
-	val modePattern = p("modePattern")
-	val mediaType = p("mediaType")
-	val rdfType = p("renderedType")
-	val providingBundle = p("providingBundle")
-	val stringRepresentation = p("stringRepresentation")
+  val RenderletOverviewPage = p("RenderletOverviewPage")
+  val Renderlet = p("Renderlet")
+  val renderlet = p("renderlet")
+  val modePattern = p("modePattern")
+  val mediaType = p("mediaType")
+  val rdfType = p("renderedType")
+  val providingBundle = p("providingBundle")
+  val stringRepresentation = p("stringRepresentation")
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala b/platform.typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
index 088c787..afd20dc 100644
--- a/platform.typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
+++ b/platform.typerendering.gui/src/main/scala/RenderletDescriptionRenderlet.scala
@@ -37,24 +37,24 @@ import org.apache.clerezza.rdf.ontologies.DC
  */
 class RenderletDescriptionRenderlet extends SRenderlet {
 
-	val getRdfType = Ontology.Renderlet
+  val getRdfType = Ontology.Renderlet
 
-	override def getModePattern = "naked"
+  override def getModePattern = "naked"
 
-	override def renderedPage(arguments: XmlResult.Arguments) = {
-		new XmlResult(arguments) {
-			override def content = {
-				resultDocModifier.setTitle("Renderlet Overview")
-				resultDocModifier.addStyleSheet("/styles/renderlets/style.css")
-				<div class="renderlet">
-					<div>Renderlet: <span class="value">{res/Ontology.stringRepresentation*}</span></div>
-					<div>For type: <span class="value">{res/Ontology.rdfType*}</span></div>
-					<div>Producing: <span class="value">{res/Ontology.mediaType*}</span></div>
-					{if ((res/Ontology.modePattern).size > 0) <div>Mode pattern: <span class="value">{res/Ontology.modePattern*}</span></div>}
-					<div>Provided by: <span class="value">{res/Ontology.providingBundle*}</span></div>
-				</div>
-			}
-		}
-	}
+  override def renderedPage(arguments: XmlResult.Arguments) = {
+    new XmlResult(arguments) {
+      override def content = {
+        resultDocModifier.setTitle("Renderlet Overview")
+        resultDocModifier.addStyleSheet("/styles/renderlets/style.css")
+        <div class="renderlet">
+          <div>Renderlet: <span class="value">{res/Ontology.stringRepresentation*}</span></div>
+          <div>For type: <span class="value">{res/Ontology.rdfType*}</span></div>
+          <div>Producing: <span class="value">{res/Ontology.mediaType*}</span></div>
+          {if ((res/Ontology.modePattern).size > 0) <div>Mode pattern: <span class="value">{res/Ontology.modePattern*}</span></div>}
+          <div>Provided by: <span class="value">{res/Ontology.providingBundle*}</span></div>
+        </div>
+      }
+    }
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
index a9da3d9..84a4221 100644
--- a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
+++ b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/AbstractRenderlet.scala
@@ -46,46 +46,46 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
  *
  * class BookFormRenderlet extends AbstractRenderlet {
  *
- *	 override def renderedPage(arguments: RenderedPage.Arguments): RenderedPage = {
- *		new RenderedPage(arguments) {
+ *   override def renderedPage(arguments: RenderedPage.Arguments): RenderedPage = {
+ *    new RenderedPage(arguments) {
  *
- *			override def content = <div xmlns="http://www.w3.org/1999/xhtml">
- *			   ....
- *			</div>
- *		}
- *	 }
+ *      override def content = <div xmlns="http://www.w3.org/1999/xhtml">
+ *         ....
+ *      </div>
+ *    }
+ *   }
  * }
  */
 abstract class AbstractRenderlet extends Renderlet {
 
-	def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
+  def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
 
-	def ifx[T](con:  => Boolean)(f: => T) :  T = {
-		if (con) f else null.asInstanceOf[T]
-	}
+  def ifx[T](con:  => Boolean)(f: => T) :  T = {
+    if (con) f else null.asInstanceOf[T]
+  }
 
-	val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
+  val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
 
-	@throws(classOf[IOException])
-	override def render(res: GraphNode, context: GraphNode,
-					sharedRenderingValues: java.util.Map[String, Object],
-					renderer: CallbackRenderer ,
-					renderingSpecification:  URI,
-					mode: String,
-					mediaType: MediaType,
-					requestProperties: RequestProperties,
-					os: OutputStream) = {
-			if (os == null) {
-				throw new IllegalArgumentException("Exception!")
-			}
-			val renderingSpecificationOption = if (renderingSpecification != null) {Some(renderingSpecification)} else {None}
-			val modeOption = if (mode != null) {Some(mode)} else {None}
-			renderedPage(
-				RenderedPage.Arguments(res, context, sharedRenderingValues, renderer,
-								   renderingSpecificationOption, modeOption, 
-								   mediaType, requestProperties, os));
+  @throws(classOf[IOException])
+  override def render(res: GraphNode, context: GraphNode,
+          sharedRenderingValues: java.util.Map[String, Object],
+          renderer: CallbackRenderer ,
+          renderingSpecification:  URI,
+          mode: String,
+          mediaType: MediaType,
+          requestProperties: RequestProperties,
+          os: OutputStream) = {
+      if (os == null) {
+        throw new IllegalArgumentException("Exception!")
+      }
+      val renderingSpecificationOption = if (renderingSpecification != null) {Some(renderingSpecification)} else {None}
+      val modeOption = if (mode != null) {Some(mode)} else {None}
+      renderedPage(
+        RenderedPage.Arguments(res, context, sharedRenderingValues, renderer,
+                   renderingSpecificationOption, modeOption, 
+                   mediaType, requestProperties, os));
 
-	}
+  }
 
 }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
index f9a4cf3..df8335f 100644
--- a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
+++ b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/PageRenderlet.scala
@@ -39,26 +39,26 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
  */
 abstract class PageRenderlet extends AbstractRenderlet {
 
-	def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
-	def rdfType: UriRef
-	def mode = "naked"
+  def renderedPage(renderingArguments: RenderedPage.Arguments): RenderedPage
+  def rdfType: UriRef
+  def mode = "naked"
 
-	var renderletManager: RenderletManager = null;
+  var renderletManager: RenderletManager = null;
 
-	def activate(context: ComponentContext) = {
-		renderletManager.registerRenderlet(this.getClass.getName,
-				null,
-				rdfType, mode,
-				MediaType.APPLICATION_XHTML_XML_TYPE, true);
-	}
+  def activate(context: ComponentContext) = {
+    renderletManager.registerRenderlet(this.getClass.getName,
+        null,
+        rdfType, mode,
+        MediaType.APPLICATION_XHTML_XML_TYPE, true);
+  }
 
-	def bindRenderletManager(m: RenderletManager)  = {
-		renderletManager = m
-	}
+  def bindRenderletManager(m: RenderletManager)  = {
+    renderletManager = m
+  }
 
-	def unbindRenderletManager(m: RenderletManager)  = {
-		renderletManager = null
-	}
+  def unbindRenderletManager(m: RenderletManager)  = {
+    renderletManager = null
+  }
 
 }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
index b353a76..76d835e 100644
--- a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
+++ b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
@@ -43,134 +43,134 @@ import org.apache.clerezza.rdf.scala.utils.RichGraphNode
 @deprecated("user XmlResult with SRenderlet", "2012")
 abstract class RenderedPage(arguments: RenderedPage.Arguments) {
 
-	val RenderedPage.Arguments(
-					res: GraphNode,
-					context: GraphNode,
-					sharedRenderingValues: java.util.Map[String, Object],
-					renderer: CallbackRenderer,
-					renderingSpecificationOption:  Option[URI],
-					modeOption: Option[String],
-					mediaType: MediaType,
-					requestProperties: RequestProperties,
-					os: OutputStream) = arguments;
-	val mode = modeOption match {
-		case Some(x) => x
-		case None => null
-	}
-
-	val uriInfo = requestProperties.getUriInfo
-	val requestHeaders = requestProperties.getRequestHeaders
-	val responseHeaders = requestProperties.getResponseHeaders
-
-	def render(resource: GraphNode): Seq[Node] = {
-		modeOption match {
-			case Some(m) => render(resource, m)
-			case None => render(resource, "naked")
-		}
-	}
-
-	def render(resource: GraphNode, mode: String) = {
-		def parseNodeSeq(string: String) = {
-			_root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-		}
-		val baos = new java.io.ByteArrayOutputStream
-		renderer.render(resource, context, mode, baos)
-		parseNodeSeq(new String(baos.toByteArray))
-	}
-
-	/**
-	 * renders the specified resource without using the base-graph from resource
-	 * rendered by the caller but getting a new context using the GraphNodeProvider
-	 */
-	def render(resource: UriRef): Seq[Node] = {
-		modeOption match {
-			case Some(m) => render(resource, m)
-			case None => render(resource, "naked")
-		}
-	}
-
-	/**
-	 * renders the specified resource without using the base-graph from resource
-	 * rendered by the caller but getting a new context using the GraphNodeProvider
-	 */
-	def render(resource: UriRef, mode: String) = {
-		def parseNodeSeq(string: String) = {
-			_root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-		}
-		val baos = new java.io.ByteArrayOutputStream
-		renderer.render(resource, context, mode, baos)
-		parseNodeSeq(new String(baos.toByteArray))
-	}
-
-	/**
-	 * This is an object that allows one to use some nice shortcuts in scala based subclasses
-	 * - $variable will get the value of the sharedRenderingValues hash
-	 * - $variable = value allows one to update the sharedRenderingValues hash
-	 * - $[ClassName] allows to access an osgi service annotated to be a WebRenderingService
-	 */
-	object dollar {
-		def apply(key: String) = sharedRenderingValues.get(key)
-
-		def update(key: String, value: Object) = sharedRenderingValues.put(key, value)
-
-		def apply[T](implicit m: Manifest[T]): T = {
-			val clazz = m.erasure.asInstanceOf[Class[T]]
-			requestProperties.getRenderingService(clazz)
-		}
-	}
+  val RenderedPage.Arguments(
+          res: GraphNode,
+          context: GraphNode,
+          sharedRenderingValues: java.util.Map[String, Object],
+          renderer: CallbackRenderer,
+          renderingSpecificationOption:  Option[URI],
+          modeOption: Option[String],
+          mediaType: MediaType,
+          requestProperties: RequestProperties,
+          os: OutputStream) = arguments;
+  val mode = modeOption match {
+    case Some(x) => x
+    case None => null
+  }
+
+  val uriInfo = requestProperties.getUriInfo
+  val requestHeaders = requestProperties.getRequestHeaders
+  val responseHeaders = requestProperties.getResponseHeaders
+
+  def render(resource: GraphNode): Seq[Node] = {
+    modeOption match {
+      case Some(m) => render(resource, m)
+      case None => render(resource, "naked")
+    }
+  }
+
+  def render(resource: GraphNode, mode: String) = {
+    def parseNodeSeq(string: String) = {
+      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
+    }
+    val baos = new java.io.ByteArrayOutputStream
+    renderer.render(resource, context, mode, baos)
+    parseNodeSeq(new String(baos.toByteArray))
+  }
+
+  /**
+   * renders the specified resource without using the base-graph from resource
+   * rendered by the caller but getting a new context using the GraphNodeProvider
+   */
+  def render(resource: UriRef): Seq[Node] = {
+    modeOption match {
+      case Some(m) => render(resource, m)
+      case None => render(resource, "naked")
+    }
+  }
+
+  /**
+   * renders the specified resource without using the base-graph from resource
+   * rendered by the caller but getting a new context using the GraphNodeProvider
+   */
+  def render(resource: UriRef, mode: String) = {
+    def parseNodeSeq(string: String) = {
+      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
+    }
+    val baos = new java.io.ByteArrayOutputStream
+    renderer.render(resource, context, mode, baos)
+    parseNodeSeq(new String(baos.toByteArray))
+  }
+
+  /**
+   * This is an object that allows one to use some nice shortcuts in scala based subclasses
+   * - $variable will get the value of the sharedRenderingValues hash
+   * - $variable = value allows one to update the sharedRenderingValues hash
+   * - $[ClassName] allows to access an osgi service annotated to be a WebRenderingService
+   */
+  object dollar {
+    def apply(key: String) = sharedRenderingValues.get(key)
+
+    def update(key: String, value: Object) = sharedRenderingValues.put(key, value)
+
+    def apply[T](implicit m: Manifest[T]): T = {
+      val clazz = m.erasure.asInstanceOf[Class[T]]
+      requestProperties.getRenderingService(clazz)
+    }
+  }
     
     /** no idea why, but since scala 2.10 it doesn't work if the object 
     * is called $ directly */
     val $ = dollar
 
-	def ifx[T](con: => Boolean)(f: => T): T = {
-		if (con) f else null.asInstanceOf[T]
-	}
+  def ifx[T](con: => Boolean)(f: => T): T = {
+    if (con) f else null.asInstanceOf[T]
+  }
 
-	val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
+  val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
 
-	val out = new PrintWriter(os)
+  val out = new PrintWriter(os)
 
-	out.print(
-		content match {
-			case s: Seq[_] => s.mkString
-			case o => o.toString
-		}
-	)
-	out.flush()
+  out.print(
+    content match {
+      case s: Seq[_] => s.mkString
+      case o => o.toString
+    }
+  )
+  out.flush()
 
-	/**
-	 * This is the main method/variable that needs to be implemented by subclasses
-	 */
-	def content: AnyRef;
+  /**
+   * This is the main method/variable that needs to be implemented by subclasses
+   */
+  def content: AnyRef;
 
 
 }
 
 object RenderedPage {
 
-	/**
-	 * Class to encapsulate information sent to the rendering engine.
-	 *
-	 * @param res  RDF resource to be rendered with the template.
-	 * @param context  RDF resource providing a rendering context.
-	 * @param sharedRenderingValues	a map that can be used for sharing values
-	 * across the different Renderlets involved in a rendering process
-	 * @param callbackRenderer  renderer for call backs.
-	 * @param renderingSpecification  the rendering specification
-	 * @param modeOption the mode this Renderlet was invoked with, this is mainly used
-	 * so that the callbackRenderer can be claeed inheriting the mode.
-	 * @param mediaType  the media type this media produces (a part of)
-	 * @param requestProperties properties of the http request, may be null
-	 * @param os  where the output will be written to.
-	 */
-	case class Arguments(res: GraphNode,
-								context: GraphNode,
-								sharedRenderingValues: java.util.Map[String, Object],
-								renderer: CallbackRenderer,
-								renderingSpecificationOption: Option[URI],
-								modeOption: Option[String],
-								mediaType: MediaType,
-								requestProperties: RequestProperties,
-								os: OutputStream);
+  /**
+   * Class to encapsulate information sent to the rendering engine.
+   *
+   * @param res  RDF resource to be rendered with the template.
+   * @param context  RDF resource providing a rendering context.
+   * @param sharedRenderingValues  a map that can be used for sharing values
+   * across the different Renderlets involved in a rendering process
+   * @param callbackRenderer  renderer for call backs.
+   * @param renderingSpecification  the rendering specification
+   * @param modeOption the mode this Renderlet was invoked with, this is mainly used
+   * so that the callbackRenderer can be claeed inheriting the mode.
+   * @param mediaType  the media type this media produces (a part of)
+   * @param requestProperties properties of the http request, may be null
+   * @param os  where the output will be written to.
+   */
+  case class Arguments(res: GraphNode,
+                context: GraphNode,
+                sharedRenderingValues: java.util.Map[String, Object],
+                renderer: CallbackRenderer,
+                renderingSpecificationOption: Option[URI],
+                modeOption: Option[String],
+                mediaType: MediaType,
+                requestProperties: RequestProperties,
+                os: OutputStream);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
index 981377b..ad082bb 100644
--- a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
+++ b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/SRenderlet.scala
@@ -45,46 +45,46 @@ import org.apache.clerezza.rdf.scala.utils.Preamble._
  *
  * class BookFormRenderlet extends SRenderlet {
  *
- *	 override def renderedPage(arguments: RenderedPage.Arguments) = {
- *		new XmlResult(arguments) {
+ *   override def renderedPage(arguments: RenderedPage.Arguments) = {
+ *    new XmlResult(arguments) {
  *
- *			override def content = <div xmlns="http://www.w3.org/1999/xhtml">
- *			   ....
- *			</div>
- *		}
- *	 }
+ *      override def content = <div xmlns="http://www.w3.org/1999/xhtml">
+ *         ....
+ *      </div>
+ *    }
+ *   }
  * }
  */
 trait SRenderlet extends TypeRenderlet {
 
-	def renderedPage(renderingArguments: XmlResult.Arguments): XmlResult
+  def renderedPage(renderingArguments: XmlResult.Arguments): XmlResult
 
-	def ifx[T](con:  => Boolean)(f: => T) :  T = {
-		if (con) f else null.asInstanceOf[T]
-	}
+  def ifx[T](con:  => Boolean)(f: => T) :  T = {
+    if (con) f else null.asInstanceOf[T]
+  }
 
-	val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
+  val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
 
-	@throws(classOf[IOException])
-	override def render(res: GraphNode, context: GraphNode,
-					sharedRenderingValues: java.util.Map[String, Object],
-					renderer: CallbackRenderer ,
-					requestProperties: RequestProperties,
-					os: OutputStream) = {
-			if (os == null) {
-				throw new IllegalArgumentException("Exception!")
-			}
-			val modeOption = if (requestProperties.getMode != null) {Some(requestProperties.getMode)} else {None}
-			renderedPage(
-				XmlResult.Arguments(res, context, sharedRenderingValues, renderer,
-								   modeOption, 
-								   requestProperties.getMediaType, requestProperties, os));
+  @throws(classOf[IOException])
+  override def render(res: GraphNode, context: GraphNode,
+          sharedRenderingValues: java.util.Map[String, Object],
+          renderer: CallbackRenderer ,
+          requestProperties: RequestProperties,
+          os: OutputStream) = {
+      if (os == null) {
+        throw new IllegalArgumentException("Exception!")
+      }
+      val modeOption = if (requestProperties.getMode != null) {Some(requestProperties.getMode)} else {None}
+      renderedPage(
+        XmlResult.Arguments(res, context, sharedRenderingValues, renderer,
+                   modeOption, 
+                   requestProperties.getMediaType, requestProperties, os));
 
-	}
+  }
 
-	override def getMediaType() = MediaType.APPLICATION_XHTML_XML_TYPE
+  override def getMediaType() = MediaType.APPLICATION_XHTML_XML_TYPE
 
-	def getModePattern = "naked"
+  def getModePattern = "naked"
 
 }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
----------------------------------------------------------------------
diff --git a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
index b605dd9..bcf3dcf 100644
--- a/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
+++ b/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/XmlResult.scala
@@ -42,132 +42,132 @@ import org.apache.clerezza.rdf.scala.utils.RichGraphNode
  */
 abstract class XmlResult(arguments: XmlResult.Arguments) {
 
-	val XmlResult.Arguments(
-					res: GraphNode,
-					context: GraphNode,
-					sharedRenderingValues: java.util.Map[String, Object],
-					renderer: CallbackRenderer,
-					modeOption: Option[String],
-					mediaType: MediaType,
-					requestProperties: RequestProperties,
-					os: OutputStream) = arguments;
-	val mode = modeOption match {
-		case Some(x) => x
-		case None => null
-	}
-
-	val uriInfo = requestProperties.getUriInfo
-	val requestHeaders = requestProperties.getRequestHeaders
-	val responseHeaders = requestProperties.getResponseHeaders
-
-	def render(resource: GraphNode): Seq[Node] = {
-		modeOption match {
-			case Some(m) => render(resource, m)
-			case None => render(resource, "naked")
-		}
-	}
-
-	def render(resource: GraphNode, mode: String) = {
-		def parseNodeSeq(string: String) = {
-			_root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-		}
-		val baos = new java.io.ByteArrayOutputStream
-		renderer.render(resource, context, mode, baos)
-		parseNodeSeq(new String(baos.toByteArray))
-	}
-
-	/**
-	 * renders the specified resource without using the base-graph from resource
-	 * rendered by the caller but getting a new context using the GraphNodeProvider
-	 */
-	def render(resource: UriRef): Seq[Node] = {
-		modeOption match {
-			case Some(m) => render(resource, m)
-			case None => render(resource, "naked")
-		}
-	}
-
-	/**
-	 * renders the specified resource without using the base-graph from resource
-	 * rendered by the caller but getting a new context using the GraphNodeProvider
-	 */
-	def render(resource: UriRef, mode: String) = {
-		def parseNodeSeq(string: String) = {
-			_root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
-		}
-		val baos = new java.io.ByteArrayOutputStream
-		renderer.render(resource, context, mode, baos)
-		parseNodeSeq(new String(baos.toByteArray))
-	}
-
-	/**
-	 * This is an object that allows one to use some nice shortcuts in scala based subclasses
-	 * - $variable will get the value of the sharedRenderingValues hash
-	 * - $variable = value allows one to update the sharedRenderingValues hash
-	 * - $[ClassName] allows to access an osgi service annotated to be a WebRenderingService
-	 */
-	object dollar {
-		def apply(key: String) = sharedRenderingValues.get(key)
-
-		def update(key: String, value: Object) = sharedRenderingValues.put(key, value)
-
-		def apply[T](implicit m: Manifest[T]): T = {
-			val clazz = m.erasure.asInstanceOf[Class[T]]
-			requestProperties.getRenderingService(clazz)
-		}
-	}
+  val XmlResult.Arguments(
+          res: GraphNode,
+          context: GraphNode,
+          sharedRenderingValues: java.util.Map[String, Object],
+          renderer: CallbackRenderer,
+          modeOption: Option[String],
+          mediaType: MediaType,
+          requestProperties: RequestProperties,
+          os: OutputStream) = arguments;
+  val mode = modeOption match {
+    case Some(x) => x
+    case None => null
+  }
+
+  val uriInfo = requestProperties.getUriInfo
+  val requestHeaders = requestProperties.getRequestHeaders
+  val responseHeaders = requestProperties.getResponseHeaders
+
+  def render(resource: GraphNode): Seq[Node] = {
+    modeOption match {
+      case Some(m) => render(resource, m)
+      case None => render(resource, "naked")
+    }
+  }
+
+  def render(resource: GraphNode, mode: String) = {
+    def parseNodeSeq(string: String) = {
+      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
+    }
+    val baos = new java.io.ByteArrayOutputStream
+    renderer.render(resource, context, mode, baos)
+    parseNodeSeq(new String(baos.toByteArray))
+  }
+
+  /**
+   * renders the specified resource without using the base-graph from resource
+   * rendered by the caller but getting a new context using the GraphNodeProvider
+   */
+  def render(resource: UriRef): Seq[Node] = {
+    modeOption match {
+      case Some(m) => render(resource, m)
+      case None => render(resource, "naked")
+    }
+  }
+
+  /**
+   * renders the specified resource without using the base-graph from resource
+   * rendered by the caller but getting a new context using the GraphNodeProvider
+   */
+  def render(resource: UriRef, mode: String) = {
+    def parseNodeSeq(string: String) = {
+      _root_.scala.xml.XML.loadString("<elem>" + string + "</elem>").child
+    }
+    val baos = new java.io.ByteArrayOutputStream
+    renderer.render(resource, context, mode, baos)
+    parseNodeSeq(new String(baos.toByteArray))
+  }
+
+  /**
+   * This is an object that allows one to use some nice shortcuts in scala based subclasses
+   * - $variable will get the value of the sharedRenderingValues hash
+   * - $variable = value allows one to update the sharedRenderingValues hash
+   * - $[ClassName] allows to access an osgi service annotated to be a WebRenderingService
+   */
+  object dollar {
+    def apply(key: String) = sharedRenderingValues.get(key)
+
+    def update(key: String, value: Object) = sharedRenderingValues.put(key, value)
+
+    def apply[T](implicit m: Manifest[T]): T = {
+      val clazz = m.erasure.asInstanceOf[Class[T]]
+      requestProperties.getRenderingService(clazz)
+    }
+  }
 
     /** no idea why, but since scala 2.10 it doesn't work if the object 
     * is called $ directly */
     val $ = dollar
    
-	def ifx[T](con: => Boolean)(f: => T): T = {
-		if (con) f else null.asInstanceOf[T]
-	}
+  def ifx[T](con: => Boolean)(f: => T): T = {
+    if (con) f else null.asInstanceOf[T]
+  }
 
-	val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
+  val resultDocModifier = org.apache.clerezza.platform.typerendering.ResultDocModifier.getInstance();
 
-	val out = new PrintWriter(os)
+  val out = new PrintWriter(os)
 
-	out.print(
-		content match {
-			case s: Seq[_] => s.mkString
-			case o => o.toString
-		}
-	)
-	out.flush()
+  out.print(
+    content match {
+      case s: Seq[_] => s.mkString
+      case o => o.toString
+    }
+  )
+  out.flush()
 
-	/**
-	 * This is the main method/variable that needs to be implemented by subclasses
-	 */
-	def content: AnyRef;
+  /**
+   * This is the main method/variable that needs to be implemented by subclasses
+   */
+  def content: AnyRef;
 
 
 }
 
 object XmlResult {
 
-	/**
-	 * Class to encapsulate information sent to the rendering engine.
-	 *
-	 * @param res  RDF resource to be rendered with the template.
-	 * @param context  RDF resource providing a rendering context.
-	 * @param sharedRenderingValues	a map that can be used for sharing values
-	 * across the different Renderlets involved in a rendering process
-	 * @param callbackRenderer  renderer for call backs.
-	 * @param renderingSpecification  the rendering specification
-	 * @param modeOption the mode this Renderlet was invoked with, this is mainly used
-	 * so that the callbackRenderer can be claeed inheriting the mode.
-	 * @param mediaType  the media type this media produces (a part of)
-	 * @param requestProperties properties of the http request, may be null
-	 * @param os  where the output will be written to.
-	 */
-	case class Arguments(res: GraphNode,
-					context: GraphNode,
-					sharedRenderingValues: java.util.Map[String, Object],
-					renderer: CallbackRenderer,
-					modeOption: Option[String],
-					mediaType: MediaType,
-					requestProperties: RequestProperties,
-					os: OutputStream);
+  /**
+   * Class to encapsulate information sent to the rendering engine.
+   *
+   * @param res  RDF resource to be rendered with the template.
+   * @param context  RDF resource providing a rendering context.
+   * @param sharedRenderingValues  a map that can be used for sharing values
+   * across the different Renderlets involved in a rendering process
+   * @param callbackRenderer  renderer for call backs.
+   * @param renderingSpecification  the rendering specification
+   * @param modeOption the mode this Renderlet was invoked with, this is mainly used
+   * so that the callbackRenderer can be claeed inheriting the mode.
+   * @param mediaType  the media type this media produces (a part of)
+   * @param requestProperties properties of the http request, may be null
+   * @param os  where the output will be written to.
+   */
+  case class Arguments(res: GraphNode,
+          context: GraphNode,
+          sharedRenderingValues: java.util.Map[String, Object],
+          renderer: CallbackRenderer,
+          modeOption: Option[String],
+          mediaType: MediaType,
+          requestProperties: RequestProperties,
+          os: OutputStream);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
----------------------------------------------------------------------
diff --git a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
index eadaa92..72f2324 100644
--- a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
+++ b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/UserGraphAcessPermissionProvider.scala
@@ -21,19 +21,19 @@ import org.apache.clerezza.platform.security.WebIdBasedPermissionProvider
 import org.apache.clerezza.rdf.core.UriRef
 
 class UserGraphAcessPermissionProvider extends WebIdBasedPermissionProvider {
-	
-	override def getPermissions(webId: UriRef) : java.util.Collection[String] = {
-		import scala.collection.JavaConversions._
-		val uriString = webId.getUnicodeString
-		def uriStringWithoutFragment = {
-			val hashPos = uriString.indexOf('#')
-			if (hashPos != -1) {
-				uriString.substring(0, hashPos)
-			} else {
-				uriString
-			}
-		}
-		List("(org.apache.clerezza.rdf.core.access.security.TcPermission \""+uriStringWithoutFragment+"\" \"readwrite\")")
-	}
+  
+  override def getPermissions(webId: UriRef) : java.util.Collection[String] = {
+    import scala.collection.JavaConversions._
+    val uriString = webId.getUnicodeString
+    def uriStringWithoutFragment = {
+      val hashPos = uriString.indexOf('#')
+      if (hashPos != -1) {
+        uriString.substring(0, hashPos)
+      } else {
+        uriString
+      }
+    }
+    List("(org.apache.clerezza.rdf.core.access.security.TcPermission \""+uriStringWithoutFragment+"\" \"readwrite\")")
+  }
 }
 */
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
----------------------------------------------------------------------
diff --git a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
index 788056f..78eca2a 100644
--- a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
+++ b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
@@ -45,168 +45,168 @@ import org.apache.clerezza.rdf.core.serializedform.{SupportedFormat, Parser}
  */
 class WebIdGraphsService {
 
-	private var proxy: WebProxy  = null
-
-	protected def bindProxy(proxy: WebProxy) = {
-		this.proxy = proxy
-	}
-
-	protected def unbindProxy(proxy: WebProxy) = {
-		this.proxy = null
-	}
-	private var tcManager: TcManager = null;
-
-	protected def bindTcManager(tcManager: TcManager) = {
-		this.tcManager = tcManager
-	}
-
-	protected def unbindTcManager(tcManager: TcManager) = {
-		this.tcManager = null
-	}
-
-	private var platformConfig: PlatformConfig = null;
-
-	protected def bindPlatformConfig(c: PlatformConfig) = {
-		this.platformConfig = c
-	}
-
-	protected def unbindPlatformConfig(c: PlatformConfig) = {
-		this.platformConfig = null
-	}
-
-	/**
-	 *
-	 * @param uri the Web-Id
-	 * @return a WebIdInfo allowing to access the graphs of the user
-	 */
-	def getWebIdInfo(uri: UriRef): WebIdInfo = {
-		return new WebIdInfo {
-
-			private val uriString = uri.getUnicodeString
-
-
-			/**
-			 * We don't know if there are multiple rediects from the person to the
-			 * Document with the triples which one is the Document
-			 */
-			private lazy val profileDocumentUriString = {
-				val hashPos = uriString.indexOf('#')
-				if (hashPos != -1) {
-					uriString.substring(0, hashPos)
-				} else {
-					redirectLocationString
-				}
-			}
-
-			/**
-			 * the graph for putting local information in addition to the remote graph
-			 */
-			private lazy val localGraphUri = {
-				if (isLocal) uri
-				else {
-					new UriRef("urn:x-localinstance:/user/"+hashTruncatedUriString)
-				}
-			}
-
-			private lazy val hashTruncatedUriString = {
-				val hashPos = uriString.indexOf('#')
-				if (hashPos != -1) {
-					uriString.substring(0, hashPos)
-				} else {
-					uriString
-				}
-			}
-
-
-			private lazy val profileDocumentUri = {
-				new UriRef(profileDocumentUriString)
-			}
-
-			/**
-			 * As the webid identifies a person an not a document, a webid without hash sign
-			 * should redirect to the profile document
-			 */
-			private lazy val redirectLocationString = {
-				val url = new URL(uriString)
-				val connection = url.openConnection()
-				connection match {
-					case hc : HttpURLConnection => {
-							hc.setRequestMethod("HEAD");
-							hc.setInstanceFollowRedirects(false)
-							hc.addRequestProperty("Accept",  acceptHeader)
-							hc.getResponseCode match {
-								case HttpURLConnection.HTTP_SEE_OTHER  => {
-										val location = hc.getHeaderField("Location")
-										if (location == null) {
-											throw new RuntimeException("No Location Headers in 303 response")
-										}
-										location
-									}
-								case _ => uriString
-							}
-						}
-					case _ => uriString
-				}
-			}
-
-			/**
-			 * A webbid identifying a person should redirect to the uri identifying the document,
-			 * it is possible that it redirects directly to the "correct" representation, this is why
-			 * we set this to prefer rdf over other formats
-			 */
-			private lazy val acceptHeader = "application/rdf+xml,*/*;q.1"
-
-
-			private def systemTriples = {
-				AccessController.doPrivileged(new PrivilegedAction[MGraph]() {
-					def run() = {
-						val systemGraph = tcManager.getMGraph(Constants.SYSTEM_GRAPH_URI)
-						val triples = systemGraph.filter(uri, PLATFORM.userName, null)
-						val result = new SimpleMGraph
-						while (triples.hasNext) {
-							result.add(triples.next())
-						}
-						result
-					}
-				})
-			}
-
-			private lazy val localGraph = try {
-				val g = tcManager.getMGraph(localGraphUri)
-				g
-			} catch {
-				case e: NoSuchEntityException => {
-						import scala.collection.JavaConversions._
-						tcManager.getTcAccessController.
-						setRequiredReadPermissionStrings(localGraphUri,
-														 List(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
-						tcManager.createMGraph(localGraphUri)
-					}
-			}
-			//implementing exposed methods (from WebIdInfo trait)
-			def publicProfile: TripleCollection = {
-				tcManager.getMGraph(profileDocumentUri)
-			}
-
-			def localPublicUserData: LockableMGraph = {
-				if (isLocal) {
-					new UnionMGraph(tcManager.getMGraph(profileDocumentUri), systemTriples)
-				} else {
-					new UnionMGraph(localGraph, systemTriples, publicProfile)
-				}
-			}
-
-			lazy val isLocal: Boolean = {
-				import scala.collection.JavaConversions._
-				platformConfig.getBaseUris.exists(baseUri => uriString.startsWith(baseUri.getUnicodeString))
-			}
-
-			val webId = uri
-
-			def forceCacheUpdate() = {
-				proxy.getGraph(profileDocumentUri)
-			}
-		}
-
-	}
+  private var proxy: WebProxy  = null
+
+  protected def bindProxy(proxy: WebProxy) = {
+    this.proxy = proxy
+  }
+
+  protected def unbindProxy(proxy: WebProxy) = {
+    this.proxy = null
+  }
+  private var tcManager: TcManager = null;
+
+  protected def bindTcManager(tcManager: TcManager) = {
+    this.tcManager = tcManager
+  }
+
+  protected def unbindTcManager(tcManager: TcManager) = {
+    this.tcManager = null
+  }
+
+  private var platformConfig: PlatformConfig = null;
+
+  protected def bindPlatformConfig(c: PlatformConfig) = {
+    this.platformConfig = c
+  }
+
+  protected def unbindPlatformConfig(c: PlatformConfig) = {
+    this.platformConfig = null
+  }
+
+  /**
+   *
+   * @param uri the Web-Id
+   * @return a WebIdInfo allowing to access the graphs of the user
+   */
+  def getWebIdInfo(uri: UriRef): WebIdInfo = {
+    return new WebIdInfo {
+
+      private val uriString = uri.getUnicodeString
+
+
+      /**
+       * We don't know if there are multiple rediects from the person to the
+       * Document with the triples which one is the Document
+       */
+      private lazy val profileDocumentUriString = {
+        val hashPos = uriString.indexOf('#')
+        if (hashPos != -1) {
+          uriString.substring(0, hashPos)
+        } else {
+          redirectLocationString
+        }
+      }
+
+      /**
+       * the graph for putting local information in addition to the remote graph
+       */
+      private lazy val localGraphUri = {
+        if (isLocal) uri
+        else {
+          new UriRef("urn:x-localinstance:/user/"+hashTruncatedUriString)
+        }
+      }
+
+      private lazy val hashTruncatedUriString = {
+        val hashPos = uriString.indexOf('#')
+        if (hashPos != -1) {
+          uriString.substring(0, hashPos)
+        } else {
+          uriString
+        }
+      }
+
+
+      private lazy val profileDocumentUri = {
+        new UriRef(profileDocumentUriString)
+      }
+
+      /**
+       * As the webid identifies a person an not a document, a webid without hash sign
+       * should redirect to the profile document
+       */
+      private lazy val redirectLocationString = {
+        val url = new URL(uriString)
+        val connection = url.openConnection()
+        connection match {
+          case hc : HttpURLConnection => {
+              hc.setRequestMethod("HEAD");
+              hc.setInstanceFollowRedirects(false)
+              hc.addRequestProperty("Accept",  acceptHeader)
+              hc.getResponseCode match {
+                case HttpURLConnection.HTTP_SEE_OTHER  => {
+                    val location = hc.getHeaderField("Location")
+                    if (location == null) {
+                      throw new RuntimeException("No Location Headers in 303 response")
+                    }
+                    location
+                  }
+                case _ => uriString
+              }
+            }
+          case _ => uriString
+        }
+      }
+
+      /**
+       * A webbid identifying a person should redirect to the uri identifying the document,
+       * it is possible that it redirects directly to the "correct" representation, this is why
+       * we set this to prefer rdf over other formats
+       */
+      private lazy val acceptHeader = "application/rdf+xml,*/*;q.1"
+
+
+      private def systemTriples = {
+        AccessController.doPrivileged(new PrivilegedAction[MGraph]() {
+          def run() = {
+            val systemGraph = tcManager.getMGraph(Constants.SYSTEM_GRAPH_URI)
+            val triples = systemGraph.filter(uri, PLATFORM.userName, null)
+            val result = new SimpleMGraph
+            while (triples.hasNext) {
+              result.add(triples.next())
+            }
+            result
+          }
+        })
+      }
+
+      private lazy val localGraph = try {
+        val g = tcManager.getMGraph(localGraphUri)
+        g
+      } catch {
+        case e: NoSuchEntityException => {
+            import scala.collection.JavaConversions._
+            tcManager.getTcAccessController.
+            setRequiredReadPermissionStrings(localGraphUri,
+                             List(new TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
+            tcManager.createMGraph(localGraphUri)
+          }
+      }
+      //implementing exposed methods (from WebIdInfo trait)
+      def publicProfile: TripleCollection = {
+        tcManager.getMGraph(profileDocumentUri)
+      }
+
+      def localPublicUserData: LockableMGraph = {
+        if (isLocal) {
+          new UnionMGraph(tcManager.getMGraph(profileDocumentUri), systemTriples)
+        } else {
+          new UnionMGraph(localGraph, systemTriples, publicProfile)
+        }
+      }
+
+      lazy val isLocal: Boolean = {
+        import scala.collection.JavaConversions._
+        platformConfig.getBaseUris.exists(baseUri => uriString.startsWith(baseUri.getUnicodeString))
+      }
+
+      val webId = uri
+
+      def forceCacheUpdate() = {
+        proxy.getGraph(profileDocumentUri)
+      }
+    }
+
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
----------------------------------------------------------------------
diff --git a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
index f2bf977..228c327 100644
--- a/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
+++ b/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
@@ -31,31 +31,31 @@ import org.apache.clerezza.rdf.core.access.LockableMGraph
  */
 trait WebIdInfo {
 
-	/**
-	 * The WebID this instance is about
-	 */
-	def webId: UriRef
-
-	/**
-	 * The WebId profile graph, for remote users this is immutable
-	 */
-	def publicProfile: TripleCollection
-
-	/**
-	 * An MGraph used to store public information about the user. For local
-	 * users this is the same as publicProfile. In any case this contains the
-	 * triples of the publicProfile.
-	 */
-	def localPublicUserData: LockableMGraph
-
-	/**
-	 * indicates if this WebId is local.
-	 */
-	def isLocal: Boolean
-
-	/**
-	 * forces an update of cached graphs associated with thie WebID (if any)
-	 */
-	def forceCacheUpdate(): Unit
+  /**
+   * The WebID this instance is about
+   */
+  def webId: UriRef
+
+  /**
+   * The WebId profile graph, for remote users this is immutable
+   */
+  def publicProfile: TripleCollection
+
+  /**
+   * An MGraph used to store public information about the user. For local
+   * users this is the same as publicProfile. In any case this contains the
+   * triples of the publicProfile.
+   */
+  def localPublicUserData: LockableMGraph
+
+  /**
+   * indicates if this WebId is local.
+   */
+  def isLocal: Boolean
+
+  /**
+   * forces an update of cached graphs associated with thie WebID (if any)
+   */
+  def forceCacheUpdate(): Unit
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
index 8617647..b0ae23a 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/CollectedIter.scala
@@ -37,32 +37,32 @@ import java.util.concurrent.locks.Lock
  */
 class CollectedIter[T](iterCreator: () => Iterator[T], readLock: Lock) extends immutable.Seq[T] {
 
-	def this(jList : java.util.List[T], readLock: Lock) = this(() => jList.iterator(), readLock)
-	def this() = this( ()=> java.util.Collections.emptyList[T].iterator(),null)
+  def this(jList : java.util.List[T], readLock: Lock) = this(() => jList.iterator(), readLock)
+  def this() = this( ()=> java.util.Collections.emptyList[T].iterator(),null)
 
-	var iter = iterCreator()
-	var firstIter = true
+  var iter = iterCreator()
+  var firstIter = true
 
-	private val collectedElems = new ArrayBuffer[T]()
+  private val collectedElems = new ArrayBuffer[T]()
 
-	/**
+  /**
     * This method allows the position to be expressed between parenthesis
     */
     def apply(pos : Int) = {
-    	ensureReadTill(pos)
-    	collectedElems(pos)
+      ensureReadTill(pos)
+      collectedElems(pos)
     }
 
 
-	/**
-	* returns a new fully expanded and sorted CollectediterCreator
-	*/
-	def sort(lt : (T,T) => Boolean) = {
-		val sortedElems = iterator.toList.sortWith(lt)
-		//TODO this re-expands everything, return sorted-list directly
-		new CollectedIter[T](sortedElems, readLock)
+  /**
+  * returns a new fully expanded and sorted CollectediterCreator
+  */
+  def sort(lt : (T,T) => Boolean) = {
+    val sortedElems = iterator.toList.sortWith(lt)
+    //TODO this re-expands everything, return sorted-list directly
+    new CollectedIter[T](sortedElems, readLock)
 
-	}
+  }
 
     /**
     * Operator style syntax to access a position.
@@ -70,42 +70,42 @@ class CollectedIter[T](iterCreator: () => Iterator[T], readLock: Lock) extends i
     def %(pos: Int) = apply(pos)
 
     private def ensureReadTill(pos: Int) {
-		try {
-			
-			while (iter.hasNext && (collectedElems.length-1 <= pos)) {
-				val next = iter.next()
-				if (firstIter || !collectedElems.contains(next)) {
-					collectedElems += next
-				}
-			}
-		} catch {
-			case e: ConcurrentModificationException => {
-					readLock.lock()
-					try {
-						iter = iterCreator()
-						firstIter = false
-						//going beyond pos, do reduce chance we have to aquire another lock
-						val biggerPos = if (pos < (Integer.MAX_VALUE - 100)) {
-							pos + 100
-						} else {
-							Integer.MAX_VALUE
-						}
-						while (iter.hasNext && (collectedElems.length-1 <= biggerPos)) {
-							val next = iter.next()
-							if (!collectedElems.contains(next)) {
-								collectedElems += next
-							}
-						}
-					} finally {
-						readLock.unlock()
-					}
-			}
-			case e => throw e
-		}
+    try {
+      
+      while (iter.hasNext && (collectedElems.length-1 <= pos)) {
+        val next = iter.next()
+        if (firstIter || !collectedElems.contains(next)) {
+          collectedElems += next
+        }
+      }
+    } catch {
+      case e: ConcurrentModificationException => {
+          readLock.lock()
+          try {
+            iter = iterCreator()
+            firstIter = false
+            //going beyond pos, do reduce chance we have to aquire another lock
+            val biggerPos = if (pos < (Integer.MAX_VALUE - 100)) {
+              pos + 100
+            } else {
+              Integer.MAX_VALUE
+            }
+            while (iter.hasNext && (collectedElems.length-1 <= biggerPos)) {
+              val next = iter.next()
+              if (!collectedElems.contains(next)) {
+                collectedElems += next
+              }
+            }
+          } finally {
+            readLock.unlock()
+          }
+      }
+      case e => throw e
+    }
     }
 
     override def length : Int = {
-    	length(Integer.MAX_VALUE)
+      length(Integer.MAX_VALUE)
     }
 
     /**
@@ -114,20 +114,20 @@ class CollectedIter[T](iterCreator: () => Iterator[T], readLock: Lock) extends i
     * the result is smaller than max it is the length of the collection.
     */
     def length(max: Int) : Int = {
-    	ensureReadTill(max)
-    	collectedElems.length
-	}
+      ensureReadTill(max)
+      collectedElems.length
+  }
 
     override def toString() = {
-    	if (length(1) > 0) {
-        	apply(0).toString
-    	} else {
-        	"empty"
+      if (length(1) > 0) {
+          apply(0).toString
+      } else {
+          "empty"
         }
     }
 
     override def iterator = {
-    	ensureReadTill(Integer.MAX_VALUE)
+      ensureReadTill(Integer.MAX_VALUE)
         collectedElems.iterator
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
index e96ea6f..b7e7313 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzLiteral.scala
@@ -27,7 +27,7 @@ object EzLiteral extends EzLiteralImplicits
 
 trait EzLiteralImplicits {
 
-	implicit def string2lit(str: String) = new EzLiteral(str)
+  implicit def string2lit(str: String) = new EzLiteral(str)
 
 }
 
@@ -47,24 +47,24 @@ trait EzLiteralImplicits {
  */
 class EzLiteral(string: String) extends TypedLiteralImpl(string,XSD.string) {
 
-	/**
-	 * @return a plain literal with language specified by lang
-	 */
-	def lang(lng: String): PlainLiteral = lang(new Language(lng))
+  /**
+   * @return a plain literal with language specified by lang
+   */
+  def lang(lng: String): PlainLiteral = lang(new Language(lng))
 
-	/**
-	 * @return a plain literal with language specified by lang
-	 */
-	def lang(lng: Language): PlainLiteral = new PlainLiteralImpl(string, lng)
+  /**
+   * @return a plain literal with language specified by lang
+   */
+  def lang(lng: Language): PlainLiteral = new PlainLiteralImpl(string, lng)
 
-	/**
-	 * Map to a Typed Literal of given type
-	 */
-	def ^^(typ: UriRef): TypedLiteral = new TypedLiteralImpl(string, typ)
+  /**
+   * Map to a Typed Literal of given type
+   */
+  def ^^(typ: UriRef): TypedLiteral = new TypedLiteralImpl(string, typ)
 
-	/**
-	 * Map to a URI of given lexical form
-	 */
-	def uri = new UriRef(string)
+  /**
+   * Map to a URI of given lexical form
+   */
+  def uri = new UriRef(string)
 
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
index ce7e3a7..485f939 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
@@ -34,44 +34,44 @@ import scala.collection.mutable.HashMap
 class EzMGraph(val baseTc: MGraph) extends AbstractMGraph with TcDependentConversions {
 
 
-	def this() = this (new SimpleMGraph())
-
-	def performFilter(subject: NonLiteral, predicate: UriRef,
-			obj: Resource): java.util.Iterator[Triple] = baseTc.filter(subject, predicate, obj)
-
-	override def size = baseTc.size
-
-	override def add(t: Triple) = baseTc.add(t)
-
-	/**
-	 * Add all triples into the other graph to this one
-	 */
-	def +=(other: Graph) = {
-		if (baseTc ne other) baseTc.addAll(other)
-	}
-
-	/**
-	 * create a new bnode
-	 */
-	def bnode: BNode = {
-		new BNode
-	}
-
-	private val namedBnodes = new HashMap[String,BNode]
-
-	/**
-	 * create a new named bnode based EzGraphNode with the preferred writing style
-	 */
-	def b_(name: String): BNode = {
-		namedBnodes.get(name) match {
-			case Some(bnode) => bnode
-			case None => {
-				val bn = new BNode
-				namedBnodes.put(name, bn);
-				bn
-			}
-		}
-	}
+  def this() = this (new SimpleMGraph())
+
+  def performFilter(subject: NonLiteral, predicate: UriRef,
+      obj: Resource): java.util.Iterator[Triple] = baseTc.filter(subject, predicate, obj)
+
+  override def size = baseTc.size
+
+  override def add(t: Triple) = baseTc.add(t)
+
+  /**
+   * Add all triples into the other graph to this one
+   */
+  def +=(other: Graph) = {
+    if (baseTc ne other) baseTc.addAll(other)
+  }
+
+  /**
+   * create a new bnode
+   */
+  def bnode: BNode = {
+    new BNode
+  }
+
+  private val namedBnodes = new HashMap[String,BNode]
+
+  /**
+   * create a new named bnode based EzGraphNode with the preferred writing style
+   */
+  def b_(name: String): BNode = {
+    namedBnodes.get(name) match {
+      case Some(bnode) => bnode
+      case None => {
+        val bn = new BNode
+        namedBnodes.put(name, bn);
+        bn
+      }
+    }
+  }
 
 }
 

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
index 6581543..ff67919 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/NameSpace.scala
@@ -25,13 +25,13 @@ import org.apache.clerezza.rdf.core.UriRef
  */
 class NameSpace(prefix: String) {
 
-	/**
-	 * returns a UriRef applying this namespace prefix to the given symbol
-	 */
-	def +(s: Symbol) = new UriRef(prefix + s.name)
+  /**
+   * returns a UriRef applying this namespace prefix to the given symbol
+   */
+  def +(s: Symbol) = new UriRef(prefix + s.name)
 
-	/**
-	 * returns a UriRef applying this prefix to the given string
-	 */
-	def +(s: String) = new UriRef(prefix + s)
+  /**
+   * returns a UriRef applying this prefix to the given string
+   */
+  def +(s: String) = new UriRef(prefix + s)
 }

http://git-wip-us.apache.org/repos/asf/clerezza/blob/35448624/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
----------------------------------------------------------------------
diff --git a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
index 6a9686f..d5ff494 100644
--- a/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
+++ b/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/Preamble.scala
@@ -59,59 +59,59 @@ object Preamble extends TcIndependentConversions {
 * @author bblfish, reto
 */
 class Preamble(val baseTc: TripleCollection) extends TcDependentConversions {
-	
+  
 }
 protected trait TcDependentConversions extends TcIndependentConversions {
-	
-	def baseTc: TripleCollection
-	
-	implicit def toRichGraphNode(resource: Resource) = {
-		new RichGraphNode(new GraphNode(resource, baseTc))
-	}
+  
+  def baseTc: TripleCollection
+  
+  implicit def toRichGraphNode(resource: Resource) = {
+    new RichGraphNode(new GraphNode(resource, baseTc))
+  }
 }
 
 protected trait TcIndependentConversions extends EzLiteralImplicits {
-	implicit def toRichGraphNode(node: GraphNode) = {
-		new RichGraphNode(node)
-	}
+  implicit def toRichGraphNode(node: GraphNode) = {
+    new RichGraphNode(node)
+  }
 
-	implicit def toFirstElement(c: CollectedIter[RichGraphNode])  = {
-		if (c.length(1) > 0) {
-			c(0)
-		} else {
-			TcIndependentConversions.emptyLiteral
-		}
-	}
+  implicit def toFirstElement(c: CollectedIter[RichGraphNode])  = {
+    if (c.length(1) > 0) {
+      c(0)
+    } else {
+      TcIndependentConversions.emptyLiteral
+    }
+  }
 
-	private val litFactory = LiteralFactory.getInstance
+  private val litFactory = LiteralFactory.getInstance
 
 
-	implicit def lit2String(lit: Literal) = lit.getLexicalForm
+  implicit def lit2String(lit: Literal) = lit.getLexicalForm
 
-	implicit def date2lit(date: Date) = litFactory.createTypedLiteral(date)
+  implicit def date2lit(date: Date) = litFactory.createTypedLiteral(date)
 
-	implicit def int2lit(int: Int) = litFactory.createTypedLiteral(int)
+  implicit def int2lit(int: Int) = litFactory.createTypedLiteral(int)
 
-	implicit def bigint2lit(bint: BigInt) = litFactory.createTypedLiteral(bint.underlying())
+  implicit def bigint2lit(bint: BigInt) = litFactory.createTypedLiteral(bint.underlying())
 
-	implicit def bigint2lit(bigInt: BigInteger) = litFactory.createTypedLiteral(bigInt)
+  implicit def bigint2lit(bigInt: BigInteger) = litFactory.createTypedLiteral(bigInt)
 
-	implicit def bool2lit(boolean: Boolean) = litFactory.createTypedLiteral(boolean)
+  implicit def bool2lit(boolean: Boolean) = litFactory.createTypedLiteral(boolean)
 
-	implicit def long2lit(long: Long) = litFactory.createTypedLiteral(long)
+  implicit def long2lit(long: Long) = litFactory.createTypedLiteral(long)
 
-	implicit def double2lit(double: Double) = litFactory.createTypedLiteral(double)
+  implicit def double2lit(double: Double) = litFactory.createTypedLiteral(double)
 
-	implicit def uriRef2Prefix(uriRef: UriRef) = new NameSpace(uriRef.getUnicodeString)
+  implicit def uriRef2Prefix(uriRef: UriRef) = new NameSpace(uriRef.getUnicodeString)
 
-	implicit def URItoUriRef(uri: URI) = new UriRef(uri.toString)
+  implicit def URItoUriRef(uri: URI) = new UriRef(uri.toString)
 
-	implicit def URLtoUriRef(url: URL) = new UriRef(url.toExternalForm)
-	
+  implicit def URLtoUriRef(url: URL) = new UriRef(url.toExternalForm)
+  
 }
 protected object TcIndependentConversions {
-	val emptyGraph = new impl.SimpleGraph(new impl.SimpleMGraph)
-	val emptyLiteral = new RichGraphNode(new GraphNode(new impl.PlainLiteralImpl(""), emptyGraph))
+  val emptyGraph = new impl.SimpleGraph(new impl.SimpleMGraph)
+  val emptyLiteral = new RichGraphNode(new GraphNode(new impl.PlainLiteralImpl(""), emptyGraph))
 
 }
 


Mime
View raw message