Author: reto
Date: Tue May 17 20:52:42 2011
New Revision: 1104553
URL: http://svn.apache.org/viewvc?rev=1104553&view=rev
Log:
CLEREZZA-531: removed rdf.web.proxy bundle
Added:
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
Removed:
incubator/clerezza/trunk/parent/rdf.web.proxy/
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/PingBack.scala
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/person_panel.scala
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/profile_panel.scala
incubator/clerezza/trunk/parent/platform.launcher.storageless.parent/pom.xml
incubator/clerezza/trunk/parent/platform.security.foafssl/core/src/main/scala/org/apache/clerezza/foafssl/auth/WebIDClaim.scala
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/resources/OSGI-INF/serviceComponents.xml
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/pages/WebIDClaimPg.scala
incubator/clerezza/trunk/parent/platform.typerendering.scala/pom.xml
incubator/clerezza/trunk/parent/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
incubator/clerezza/trunk/parent/platform.users/core/pom.xml
incubator/clerezza/trunk/parent/platform.users/core/src/main/resources/OSGI-INF/serviceComponents.xml
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
incubator/clerezza/trunk/parent/pom.xml
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/pom.xml
Tue May 17 20:52:42 2011
@@ -110,11 +110,6 @@
<groupId>org.apache.clerezza</groupId>
<artifactId>platform.users.core</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.web.proxy.core</artifactId>
- <version>0.2-incubating-SNAPSHOT</version>
- </dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
<artifactId>platform.config</artifactId>
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/resources/OSGI-INF/serviceComponents.xml
Tue May 17 20:52:42 2011
@@ -52,6 +52,8 @@
cardinality="1..1" policy="static"
bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
<reference name="platformConfig"
interface="org.apache.clerezza.platform.config.PlatformConfig"
cardinality="1..1" policy="static"
bind="bindPlatformConfig" unbind="unbindPlatformConfig"/>
+ <reference name="tcManager"
interface="org.apache.clerezza.rdf.core.access.TcManager"
+ cardinality="1..1" policy="static" bind="bindTcManager"
unbind="unbindTcManager"/>
</scr:component>
<scr:component enabled="true"
name="org.apache.clerezza.platform.accountcontrolpanel.profile_panel">
<implementation
class="org.apache.clerezza.platform.accountcontrolpanel.profile_panel"/>
@@ -87,8 +89,6 @@
<property name="service.pid"
value="org.apache.clerezza.platform.accountcontrolpanel.PingBack"/>
<reference name="tcManager"
interface="org.apache.clerezza.rdf.core.access.TcManager"
cardinality="1..1" policy="static" bind="bindTcManager"
unbind="unbindTcManager"/>
- <reference name="webProxy"
interface="org.apache.clerezza.rdf.web.proxy.WebProxy"
- cardinality="1..1" policy="static" bind="bindWebProxy"
unbind="unbindWebProxy"/>
</scr:component>
<scr:component enabled="true"
name="org.apache.clerezza.platform.accountcontrolpanel.ping_back_panel">
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/PingBack.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/PingBack.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/PingBack.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/PingBack.scala
Tue May 17 20:52:42 2011
@@ -37,7 +37,7 @@ import javax.ws.rs._
import java.io.{StringWriter, IOException, OutputStreamWriter}
import collection.JavaConversions._
import java.lang.Appendable
-import org.apache.clerezza.rdf.web.proxy.{Cache, WebProxy}
+
object PingBack {
@@ -153,10 +153,10 @@ class PingBack {
wr append "target=" append target append "\r\n"
wr append "comment=" append comment append "\r\n"
- val pingInfo = webProxy.getResourceInfo(pingTo)
+ val pingToGraph = tcManager.getGraph(pingTo)
//initially I just test if something about pingback is there.
//todo: make the subject the resource itself.
- val filter = pingInfo.semantics(Cache.CacheOnly).filter(null,
RDF.`type`, PINGBACK.Container)
+ val filter = pingToGraph.filter(null, RDF.`type`,
PINGBACK.Container)
val res = if (filter.hasNext) try {
val to = new URL(pingTo.getUnicodeString)
if (to.getProtocol == "http" || to.getProtocol ==
"https") {
@@ -297,14 +297,4 @@ class PingBack {
this.tcManager = null
}
- protected var webProxy: WebProxy = null;
-
- protected def bindWebProxy(proxy: WebProxy) = {
- this.webProxy = proxy
- }
-
- protected def unbindWebProxy(proxy: WebProxy ) = {
- this.webProxy = null
- }
-
}
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/ProfilePanel.scala
Tue May 17 20:52:42 2011
@@ -32,6 +32,7 @@ import org.apache.clerezza.jaxrs.utils.T
import org.apache.clerezza.platform.config.PlatformConfig
import org.apache.clerezza.platform.usermanager.UserManager
import org.apache.clerezza.rdf.core._
+import access.TcManager
import org.apache.clerezza.rdf.core.impl.SimpleMGraph
import org.apache.clerezza.rdf.core.impl.TripleImpl
import org.apache.clerezza.rdf.ontologies.DC
@@ -102,8 +103,8 @@ class ProfilePanel {
)
}
case webid: UriRef => {
- var webIDInfo =
webIdGraphsService.getWebIDInfo(webid)
- var res = new
EasyGraphNode(profileDocUri, new UnionMGraph(new SimpleMGraph,
webIDInfo.publicUserGraph))
+ var webIDInfo =
webIdGraphsService.getWebIdInfo(webid)
+ var res = new
EasyGraphNode(profileDocUri, new UnionMGraph(new SimpleMGraph,
webIDInfo.localPublicUserData))
(res â
CONTROLPANEL.isLocalProfile â¶ webIDInfo.isLocal
â FOAF.primaryTopic
â¶ webid)
if (webIDInfo.isLocal) {
@@ -146,8 +147,9 @@ class ProfilePanel {
val webId: UriRef = new UriRef(ppd.getUnicodeString + "#me")
return AccessController.doPrivileged(new
PrivilegedAction[Response] {
def run: Response = {
- val webIDInfo =
webIdGraphsService.getWebIDInfo(webId)
- webIDInfo.localGraph.addAll(
+ tcManager.createMGraph(ppd)
+ val webIDInfo =
webIdGraphsService.getWebIdInfo(webId)
+ webIDInfo.localPublicUserData.addAll(
Arrays.asList(
new TripleImpl(ppd, RDF.`type`,
FOAF.PersonalProfileDocument),
new TripleImpl(ppd,
FOAF.primaryTopic, webId))
@@ -172,8 +174,8 @@ class ProfilePanel {
}
})
for (contactWebID <- newContacts) {
- val webIdGraphs =
webIdGraphsService.getWebIDInfo(me.getNode.asInstanceOf[UriRef])
- var meGrph: GraphNode = new
GraphNode(me.getNode, webIdGraphs.localGraph)
+ val webIdGraphs =
webIdGraphsService.getWebIdInfo(me.getNode.asInstanceOf[UriRef])
+ var meGrph: GraphNode = new
GraphNode(me.getNode, webIdGraphs.localPublicUserData)
meGrph.addProperty(FOAF.knows, contactWebID)
} //todo: one should catch errors here (bad uris sent
for ex
}
@@ -246,10 +248,10 @@ class ProfilePanel {
for (webid: URI<-webIds
if (webid.getScheme=="https"||webid.getScheme=="http");
val webidRef = new UriRef(webid.toString);
- val webIdInfo = webIdGraphsService.getWebIDInfo(webidRef);
+ val webIdInfo = webIdGraphsService.getWebIdInfo(webidRef);
if (webIdInfo.isLocal)
) {
- val certNode = new EasyGraph(webIdInfo.localGraph).bnode
+ val certNode = new
EasyGraph(webIdInfo.localPublicUserData).bnode
( certNode â RSA.RSAPublicKey
â CERT.identity â¶ webidRef
â RSA.modulus â¶ modulus
@@ -268,8 +270,8 @@ class ProfilePanel {
def deleteKey(@Context uriInfo: UriInfo,
@FormParam("webId") webId: UriRef,
@FormParam("keyhash") keys: List[String]): Response = {
- val webIDInfo = webIdGraphsService.getWebIDInfo(webId)
- val agent: GraphNode = new GraphNode(webId,
webIDInfo.localGraph)
+ val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
+ val agent: GraphNode = new GraphNode(webId,
webIDInfo.localPublicUserData)
var subjects: Iterator[GraphNode] =
agent.getSubjectNodes(CERT.identity)
import scala.util.control.Breaks._
breakable {
@@ -303,13 +305,13 @@ class ProfilePanel {
@FormParam("webId") webId: UriRef,
@FormParam("name") name: String,
@FormParam("description") description: String):
Response = {
- val webIDInfo = webIdGraphsService.getWebIDInfo(webId)
- val agent: GraphNode = new GraphNode(webId,
webIDInfo.localGraph)
+ val webIDInfo = webIdGraphsService.getWebIdInfo(webId)
+ val agent: GraphNode = new GraphNode(webId,
webIDInfo.localPublicUserData)
agent.deleteProperties(FOAF.name)
agent.addPropertyValue(FOAF.name, name)
agent.deleteProperties(DC.description)
agent.addPropertyValue(DC.description, description)
- logger.debug("local graph (uri: {}) is now of size {}",
webIDInfo.localGraphUri, webIDInfo.localGraph.size)
+ logger.debug("local graph (uri: {}) is now of size {}",
webIDInfo.webId, webIDInfo.localPublicUserData.size)
return RedirectUtil.createSeeOtherResponse("../profile",
uriInfo)
}
@@ -339,9 +341,7 @@ class ProfilePanel {
}
protected def unbindWebIdGraphsService(webidgraphsservice:
WebIdGraphsService): Unit = {
- if (webIdGraphsService == webidgraphsservice) {
- webIdGraphsService = null
- }
+ webIdGraphsService = null
}
protected def bindPlatformConfig(platformconfig: PlatformConfig): Unit
= {
@@ -354,6 +354,14 @@ class ProfilePanel {
}
}
+ protected def bindTcManager(tcManager: TcManager) = {
+ this.tcManager = tcManager
+ }
+
+ protected def unbindTcManager(tcManager: TcManager) = {
+ this.tcManager = null
+ }
+
protected def activate(componentContext: ComponentContext): Unit = {
this.componentContext = componentContext
}
@@ -369,4 +377,6 @@ class ProfilePanel {
private var componentContext: ComponentContext = null
+ private var tcManager: TcManager = null;
+
}
\ No newline at end of file
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/person_panel.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/person_panel.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/person_panel.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/person_panel.scala
Tue May 17 20:52:42 2011
@@ -27,9 +27,8 @@ import org.apache.clerezza.rdf.core.UriR
import org.apache.clerezza.rdf.utils.GraphNode
import xml.{NodeSeq, Text, Node}
import java.net.{URLEncoder, URL}
-import org.apache.clerezza.rdf.ontologies.{RDF, FOAF, RDFS}
-import org.apache.clerezza.rdf.web.proxy.WebProxy
import javax.ws.rs.core.MediaType
+import org.apache.clerezza.rdf.ontologies.{FOAF, RDF, RDFS}
/**
* static methods used by person panel and that could possibly be moved to a
library
@@ -136,12 +135,12 @@ class XmlPerson(args: XmlResult.Argument
// val it: CollectedIter[RichGraphNode] = res /
FOAF.primaryTopic
// val primeTpc: RichGraphNode = it.apply(0)
// or we can get that information from URL, as shown here
- lazy val webIdStr = uriInfo.getQueryParameters(true).getFirst("uri")
- lazy val webIdUri= new UriRef(webIdStr)
-
- lazy val webIdInfo = $[WebProxy].getResourceInfo(webIdUri)
- lazy val agent : RichGraphNode= $[WebProxy].fetchSemantics(webIdUri)
match { case Some(grph) => grph; case None => res};
+ //lazy val webIdStr = uriInfo.getQueryParameters(true).getFirst("uri")
+ //lazy val webIdUri= new UriRef(webIdStr)
+ //lazy val webIdInfo = $[WebProxy].getResourceInfo(webIdUri)
+ //lazy val agent : RichGraphNode= $[WebProxy].fetchSemantics(webIdUri)
match { case Some(grph) => grph; case None => res};
+ lazy val agent : RichGraphNode = res / FOAF.primaryTopic
//
// setting some header info
//
@@ -226,7 +225,7 @@ class XmlPerson(args: XmlResult.Argument
* in the cache?
*
*/
- def definedHere(uri: UriRef):Boolean =
uri.getUnicodeString.startsWith(webIdInfo.graphUriRef.getUnicodeString)
+ def definedHere(uri: UriRef):Boolean =
uri.getUnicodeString.startsWith(agent*)
def personHtml(p: RichGraphNode): NodeSeq = {
Modified:
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/profile_panel.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/profile_panel.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/profile_panel.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/profile_panel.scala
Tue May 17 20:52:42 2011
@@ -30,7 +30,6 @@ import java.text._
import org.apache.clerezza.rdf.core.UriRef
import org.apache.clerezza.platform.accountcontrolpanel.ontologies.CONTROLPANEL
import org.apache.clerezza.rdf.ontologies.{RDFS, DC, FOAF}
-import org.apache.clerezza.rdf.web.proxy.WebProxy
import javax.ws.rs.core.MediaType
class profile_panel extends SRenderlet {
@@ -154,13 +153,16 @@ class ProfilePanelXHTML(arguments: XmlRe
<table>{ var i =0
val friends = for (friend <- agent/FOAF.knows) yield {
import person_panel._
- val node = friend.getNode() match {
+ val node = personInABox(friend)
+ /*added in CLEREZZA-473, no longer working as no such
WebRenderingService available
+
+ val node = friend.getNode() match {
case uri: UriRef => $[WebProxy].fetchSemantics(uri)
match {
case Some(grp) => personInABox(grp)
case None => emptyText
}
case _ => emptyText //one could show info with bnodes
too...
- }
+ }*/
<td>{node}</td>
}
for (row <- friends.grouped(5)) yield <tr>{row}</tr>
Modified:
incubator/clerezza/trunk/parent/platform.launcher.storageless.parent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.launcher.storageless.parent/pom.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.launcher.storageless.parent/pom.xml
(original)
+++
incubator/clerezza/trunk/parent/platform.launcher.storageless.parent/pom.xml
Tue May 17 20:52:42 2011
@@ -372,11 +372,6 @@
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.web.proxy.core</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
<artifactId>platform.security</artifactId>
<scope>runtime</scope>
</dependency>
Modified:
incubator/clerezza/trunk/parent/platform.security.foafssl/core/src/main/scala/org/apache/clerezza/foafssl/auth/WebIDClaim.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.foafssl/core/src/main/scala/org/apache/clerezza/foafssl/auth/WebIDClaim.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.security.foafssl/core/src/main/scala/org/apache/clerezza/foafssl/auth/WebIDClaim.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.security.foafssl/core/src/main/scala/org/apache/clerezza/foafssl/auth/WebIDClaim.scala
Tue May 17 20:52:42 2011
@@ -25,7 +25,6 @@ import java.io.ByteArrayOutputStream
import org.apache.clerezza.rdf.core.serializedform.{SupportedFormat,
Serializer}
import org.apache.clerezza.rdf.utils.GraphNode
import org.apache.clerezza.foafssl.ontologies.{RSA, CERT}
-import org.apache.clerezza.rdf.web.proxy.Cache
import java.util.LinkedList
import org.apache.clerezza.rdf.core._
import org.apache.clerezza.rdf.scala.utils.Preamble._
@@ -80,12 +79,13 @@ class WebIDClaim(val webId: UriRef, val
return
}
verified = try {
- var webIdInfo = authSrvc.webIdSrvc.getWebIDInfo(webId,
Cache.CacheOnly)
- verify(webIdInfo.publicUserGraph) match {
+ var webIdInfo = authSrvc.webIdSrvc.getWebIdInfo(webId)
+ verify(webIdInfo.localPublicUserData) match {
case None => Verification.Verified
case Some(err) => {
- webIdInfo =
authSrvc.webIdSrvc.getWebIDInfo(webId, Cache.ForceUpdate)
- verify(webIdInfo.publicUserGraph) match
{
+ webIdInfo.forceCacheUpdate()
+ webIdInfo =
authSrvc.webIdSrvc.getWebIdInfo(webId)
+ verify(webIdInfo.localPublicUserData)
match {
case None =>
Verification.Verified
case Some(err) => {
errors.add(err)
Modified:
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/resources/OSGI-INF/serviceComponents.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/resources/OSGI-INF/serviceComponents.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/resources/OSGI-INF/serviceComponents.xml
(original)
+++
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/resources/OSGI-INF/serviceComponents.xml
Tue May 17 20:52:42 2011
@@ -6,8 +6,8 @@
<provide interface="java.lang.Object"/>
</service>
<property name="javax.ws.rs" type="Boolean" value="true"/>
- <reference name="webProxy"
interface="org.apache.clerezza.rdf.web.proxy.WebProxy"
- cardinality="1..1" policy="static"
bind="bindWebProxy" unbind="unbindWebProxy"/>
+ <reference name="webIdGraphsService"
interface="org.apache.clerezza.platform.users.WebIdGraphsService"
+ cardinality="1..1" policy="static"
bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
</scr:component>
<scr:component enabled="true"
name="org.apache.clerezza.foafssl.testservlets.pages.CertificateDescription">
@@ -16,5 +16,7 @@
<provide
interface="org.apache.clerezza.platform.typerendering.TypeRenderlet"/>
</service>
<property name="service.pid"
value="org.apache.clerezza.foafssl.test.pages.WebIDClaimPg"/>
+ <reference name="webIdGraphsService"
interface="org.apache.clerezza.platform.users.WebIdGraphsService"
+ cardinality="1..1" policy="static"
bind="bindWebIdGraphsService" unbind="unbindWebIdGraphsService"/>
</scr:component>
</components>
Modified:
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala
Tue May 17 20:52:42 2011
@@ -28,11 +28,11 @@ import org.slf4j.{LoggerFactory, Logger}
import org.apache.clerezza.rdf.core.impl.util.Base64
import java.security.interfaces.RSAPublicKey
import org.apache.clerezza.rdf.core._
+import access.NoSuchEntityException
import impl.{PlainLiteralImpl, TypedLiteralImpl, SimpleMGraph}
import org.apache.clerezza.foafssl.ontologies._
import org.apache.clerezza.foafssl.auth.{WebIDClaim, Verification,
WebIdPrincipal, X509Claim}
import java.util.Date
-import org.apache.clerezza.rdf.web.proxy.{Cache, WebProxy}
import org.apache.clerezza.rdf.scala.utils.Preamble._
import org.apache.clerezza.rdf.scala.utils.{CollectedIter, EasyGraphNode,
EasyGraph, RichGraphNode}
import serializedform.Serializer
@@ -42,6 +42,7 @@ import java.math.BigInteger
import collection.mutable.{Queue, LinkedList}
import javax.security.auth.Subject
import collection.JavaConversions._
+import org.apache.clerezza.platform.users.WebIdGraphsService
/**
@@ -66,15 +67,7 @@ class WebIDTester {
// configure(componentContext.getBundleContext(),
"profile-staticweb");
}
- private var webProxy: WebProxy = _
- protected def bindWebProxy(proxy: WebProxy) {
- webProxy = proxy
- }
-
- protected def unbindWebProxy(proxy: WebProxy) {
- webProxy = null
- }
/**
* don't bother converting to rdf here for the moment.
@@ -94,7 +87,7 @@ class WebIDTester {
@GET
def getTestMeRDF(): TripleCollection = {
- val certTester = new
CertTester(UserUtil.getCurrentSubject(),webProxy)
+ val certTester = new CertTester(UserUtil.getCurrentSubject(),
webIdGraphsService)
certTester.runTests()
return certTester.toRdf()
}
@@ -113,10 +106,19 @@ class WebIDTester {
}
+ private var webIdGraphsService: WebIdGraphsService = null
+ protected def bindWebIdGraphsService(webIdGraphsService:
WebIdGraphsService): Unit = {
+ this.webIdGraphsService = webIdGraphsService
+ }
+
+ protected def unbindWebIdGraphsService(webIdGraphsService:
WebIdGraphsService): Unit = {
+ this.webIdGraphsService = null
+ }
+
}
/** All the cert tests are placed here */
-class CertTester(subj: Subject, webProxy: WebProxy) extends Assertor {
+class CertTester(subj: Subject, webIdGraphsService: WebIdGraphsService)
extends Assertor {
import EARL.{passed, failed, cantTell, untested, inapplicable}
@@ -246,8 +248,11 @@ class CertTester(subj: Subject, webProxy
// more detailed tester for claims that passed or failed
// even tester that succeed could be just succeeding by chance (if
public profileKeys are badly written out for eg)
def claimTests(claim: WebIDClaim) {
- val sem: Option[GraphNode] =
webProxy.fetchSemantics(claim.webId, Cache.CacheOnly)
-
+ val sem: Option[GraphNode] = try {
+ Some(new GraphNode(claim.webId,
webIdGraphsService.getWebIdInfo(claim.webId).publicProfile))
//webProxy.fetchSemantics(claim.webId, Cache.CacheOnly)
+ } catch {
+ case e: NoSuchEntityException => None
+ }
val profileXst = create(TEST.profileGet, claim.webId)
sem match {
Modified:
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/pages/WebIDClaimPg.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/pages/WebIDClaimPg.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/pages/WebIDClaimPg.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/pages/WebIDClaimPg.scala
Tue May 17 20:52:42 2011
@@ -22,7 +22,6 @@ package org.apache.clerezza.foafssl.test
import org.apache.clerezza.platform.typerendering.scala.{XmlResult, SRenderlet}
import org.apache.clerezza.platform.security.UserUtil
import org.apache.clerezza.foafssl.test.WebIDTester
-import org.apache.clerezza.rdf.web.proxy.{Cache, WebProxy}
import org.apache.clerezza.foafssl.ontologies.{RSA, CERT}
import org.apache.clerezza.rdf.scala.utils.Preamble._
import java.security.{PrivilegedAction, AccessController}
@@ -35,6 +34,7 @@ import org.apache.clerezza.rdf.scala.uti
import org.apache.clerezza.rdf.core._
import org.apache.clerezza.rdf.scala.utils.{CollectedIter, RichGraphNode}
import org.apache.clerezza.rdf.ontologies.{XSD, RDF}
+import org.apache.clerezza.platform.users.WebIdGraphsService
/**
* @author hjs
@@ -44,14 +44,29 @@ import org.apache.clerezza.rdf.ontologie
class WebIDClaimPg extends SRenderlet {
def getRdfType() = WebIDTester.testCls
- override def renderedPage(arguments: XmlResult.Arguments) = new
XhtmlWebIDClaimPg(arguments)
+ override def renderedPage(arguments: XmlResult.Arguments) = new
XhtmlWebIDClaimPg(arguments, webIdGraphsService)
+
+ //TODO a renderlet should not need services,
+
+ private var webIdGraphsService: WebIdGraphsService = null
+
+ protected def bindWebIdGraphsService(webIdGraphsService:
WebIdGraphsService): Unit = {
+ this.webIdGraphsService = webIdGraphsService
+ }
+
+ protected def unbindWebIdGraphsService(webIdGraphsService:
WebIdGraphsService): Unit = {
+ this.webIdGraphsService = null
+ }
+
+
+
}
object XhtmlWebIDClaimPg {
val emptyxml=new scala.xml.Text("")
}
-class XhtmlWebIDClaimPg(arguments: XmlResult.Arguments) extends
XmlResult(arguments ) {
+class XhtmlWebIDClaimPg(arguments: XmlResult.Arguments, webIdGraphsService:
WebIdGraphsService) extends XmlResult(arguments ) {
import XhtmlWebIDClaimPg._
@@ -81,7 +96,7 @@ class XhtmlWebIDClaimPg(arguments: XmlRe
def getWebIDProfile(claim: WebIDClaim): Option[GraphNode] = {
val som = AccessController.doPrivileged(new
PrivilegedAction[Option[GraphNode]] {
- def run = $[WebProxy].fetchSemantics(claim.webId, Cache.CacheOnly)
+ def run = Some(new GraphNode(claim.webId,
webIdGraphsService.getWebIdInfo(claim.webId).publicProfile))
})
som
}
Modified: incubator/clerezza/trunk/parent/platform.typerendering.scala/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.typerendering.scala/pom.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.typerendering.scala/pom.xml
(original)
+++ incubator/clerezza/trunk/parent/platform.typerendering.scala/pom.xml Tue
May 17 20:52:42 2011
@@ -28,10 +28,6 @@
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.web.proxy.core</artifactId>
- </dependency>
</dependencies>
<build>
Modified:
incubator/clerezza/trunk/parent/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.typerendering.scala/src/main/scala/org/apache/clerezza/platform/typerendering/scala/RenderedPage.scala
Tue May 17 20:52:42 2011
@@ -33,7 +33,6 @@ import org.apache.clerezza.rdf.utils._
import org.apache.clerezza.rdf.scala.utils.Preamble._
import java.security.{PrivilegedAction, AccessController}
import org.osgi.framework.{BundleContext, ServiceReference}
-import org.apache.clerezza.rdf.web.proxy.{WebProxy,Cache}
import org.apache.clerezza.rdf.scala.utils.RichGraphNode
/**
Modified: incubator/clerezza/trunk/parent/platform.users/core/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.users/core/pom.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/platform.users/core/pom.xml (original)
+++ incubator/clerezza/trunk/parent/platform.users/core/pom.xml Tue May 17
20:52:42 2011
@@ -41,7 +41,7 @@
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.web.proxy.core</artifactId>
+ <artifactId>rdf.storage.web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
Modified:
incubator/clerezza/trunk/parent/platform.users/core/src/main/resources/OSGI-INF/serviceComponents.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.users/core/src/main/resources/OSGI-INF/serviceComponents.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.users/core/src/main/resources/OSGI-INF/serviceComponents.xml
(original)
+++
incubator/clerezza/trunk/parent/platform.users/core/src/main/resources/OSGI-INF/serviceComponents.xml
Tue May 17 20:52:42 2011
@@ -18,6 +18,8 @@
cardinality="1..1" policy="static" bind="bindPlatformConfig"
unbind="unbindPlatformConfig"/>
<reference name="parser"
interface="org.apache.clerezza.rdf.core.serializedform.Parser"
cardinality="1..1" policy="static" bind="bindParser"
unbind="unbindParser"/>
+ <reference name="proxy"
interface="org.apache.clerezza.rdf.storage.web.WebProxy"
+ cardinality="1..1" policy="static" bind="bindProxy"
unbind="unbindProxy"/>
<!-- <reference name="tcManager"
interface="org.apache.clerezza.platform.users.WebDescriptionProvider"
cardinality="1..1" policy="static"
bind="bindWebDescriptionProvider" unbind="unbindWebDescriptionProvider"/> -->
</scr:component>
Modified:
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
---
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
(original)
+++
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdGraphsService.scala
Tue May 17 20:52:42 2011
@@ -18,31 +18,76 @@
*/
package org.apache.clerezza.platform.users
+import java.net.HttpURLConnection
+import java.net.URL
import java.security.AccessController
import java.security.PrivilegedAction
import org.apache.clerezza.platform.Constants
+import org.apache.clerezza.platform.config.PlatformConfig
import org.apache.clerezza.platform.config.SystemConfig
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.NoSuchEntityException
import org.apache.clerezza.rdf.core.access.SecuredMGraph
+import org.apache.clerezza.rdf.core.access.TcManager
import org.apache.clerezza.rdf.core.access.security.TcPermission
import org.apache.clerezza.rdf.core.impl.SimpleMGraph
import org.apache.clerezza.rdf.ontologies.PLATFORM
+import org.apache.clerezza.rdf.storage.web.WebProxy
import org.apache.clerezza.rdf.utils.UnionMGraph
-import org.apache.clerezza.rdf.web.proxy.{Cache, WebProxy}
+import org.apache.clerezza.rdf.core.serializedform.{SupportedFormat, Parser}
/**
* For agents with a Web-Id various graphs are available, these graphs are
- * grouped by <code>WebIdGraphs</code> which this service provides.
+ * grouped by <code>WebIDInfo</code> which this service provides.
*/
-class WebIdGraphsService extends WebProxy {
+class WebIdGraphsService {
- //todo: Here we duplicate the WebProxy Method and extend the
ResourceInfo objects
- //The advantage is that it shows clearly what code is specific to
WebIDs.
- //But it also feels a bit dangerous to extend inner classes like this.
+ private var proxy: WebProxy = null
+
+ protected def bindProxy(proxy: WebProxy) = {
+ this.proxy = proxy
+ }
+
+ protected def unbindProxy(proxy: WebProxy) = {
+ this.proxy = null
+ }
+
+ /**
+ * We use the parser just to get the supported formats so we get the
right redirect location
+ */
+ private var parser: Parser = null;
+
+ protected def bindParser(parser: Parser) = {
+ this.parser = parser
+ }
+
+ protected def unbindParser(parser: Parser) = {
+ this.parser = 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
+ }
/**
*
@@ -51,76 +96,160 @@ class WebIdGraphsService extends WebProx
* if this is still valid
* @return a resource info, more or less updated
*/
- def getWebIDInfo(uri: UriRef, update: Cache.Value = Cache.Fetch):
WebIDInfo = {
- val resource = new WebIDInfo(uri)
- resource.semantics(update)
- return resource
- }
+ def getWebIdInfo(uri: UriRef): WebIdInfo = {
+ return new WebIdInfo {
+ private val uriString = uri.getUnicodeString
- /**
- * A Proxy for WebID Resource info
- */
- class WebIDInfo(webId: UriRef) extends ResourceInfo(webId) {
- /**
- * Returns the graph with triples to which public read access
can be granted.
- *
- * This will return a union of the following graphs.
- * - minimum graph constructed for system graph
- * - cached version of profile document from web, if available
- * - as read/write graph: the public personal profile graph
- *
- * @return a GraphNode describing webId
- */
- def publicUserGraph: MGraph = {
- def systemTriples = {
- val systemGraph =
tcManager.getMGraph(Constants.SYSTEM_GRAPH_URI)
- val triples = systemGraph.filter(webId,
PLATFORM.userName, null)
- val result = new SimpleMGraph
- while (triples.hasNext) {
- result.add(triples.next())
+
+ /**
+ * 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 representationGraphUriString = {
+ val hashPos = uriString.indexOf('#')
+ if (hashPos != -1) {
+ uriString.substring(0, hashPos)
+ } else {
+ finalRedirectLocation
}
- result
}
- AccessController.doPrivileged(new
PrivilegedAction[MGraph]() {
- def run() = {
- val unionGraph = if (isLocal) {
- new UnionMGraph(localGraph,
systemTriples)
- } else {
- new UnionMGraph(localGraph,
semantics(Cache.CacheOnly), systemTriples)
- }
- new SecuredMGraph(unionGraph,
localGraphUri, tcManager.getTcAccessController)
+
+ /**
+ * for web-ids with a # same as
representationGraphUriString
+ */
+ //FIXME multiple remote users could have same
+ /*private lazy val localGraphUri = {
+ new UriRef(localGraphUriString)
+ }*/
+ /**
+ * 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)
}
- })
- }
+ }
- /**
- * the graph for putting local information in addition to the
remote graph
- */
- lazy val localGraphUri = {
- if (isLocal) graphUriRef
- else {
- new
UriRef(platformConfig.getDefaultBaseUri.getUnicodeString+"user/"+graphUriRef.getUnicodeString)
+ private lazy val hashTruncatedUriString = {
+ val hashPos = uriString.indexOf('#')
+ if (hashPos != -1) {
+ uriString.substring(0, hashPos)
+ } else {
+ uriString
+ }
}
- }
- //for the WebID Graph this is the place where local information
in addition to remote
- //information is stored.
- //for the WebProxy would we want this to be the name for the
local cache?
- lazy val localGraph = try {
- tcManager.getMGraph(localGraphUri)
- } catch {
- case e: NoSuchEntityException => {
+ private lazy val representationGraphUri = {
+ new UriRef(representationGraphUriString)
+ }
+
+ //TODO maybe its better to just follow one redirect and
assume this
+ //to be the profile rather than get the uri of the
actual representation
+ private lazy val finalRedirectLocation = {
+ finalRedirectLocationFor(uriString)
+ }
+ private def finalRedirectLocationFor(us: String):
String = {
+ val url = new URL(us)
+ 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")
+
}
+
finalRedirectLocationFor(location)
+ }
+ case _ => us
+ }
+ }
+ case _ => us
+ }
+ }
+
+ private lazy val acceptHeader = {
import scala.collection.JavaConversions._
- tcManager.getTcAccessController.
-
setRequiredReadPermissionStrings(localGraphUri,
- List(new
TcPermission(Constants.CONTENT_GRAPH_URI_STRING, TcPermission.READ).toString))
- tcManager.createMGraph(localGraphUri)
+ (for (f <- parser.getSupportedFormats) yield {
+ val qualityOfFormat = {
+ f match {
+ //the default,
well established format
+ case
SupportedFormat.RDF_XML => "1.0";
+ //n3 is
a bit less well defined and/or many parsers supports only subsets
+ case
SupportedFormat.N3 => "0.6";
+ //we
prefer most dedicated formats to (X)HTML, not because those are "better",
+ //but
just because it is quite likely that the pure RDF format will be
+
//ligher (contain less presentation markup), and it is also possible that HTML
does not
+
//contain any RDFa, but just points to another format.
+ case
SupportedFormat.XHTML => "0.5";
+ //we
prefer XHTML over html, because parsing (shoule) be easier
+ case
SupportedFormat.HTML => "0.4";
+ //all
other formats known currently are structured formats
+ case _ => "0.8"
+ }
+ }
+ f+"; q="+qualityOfFormat+","
+ }).mkString +" *; q=.1" //with grddl
should add */*
}
- }
- }
+ 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(representationGraphUri)
+ }
+
+ def localPublicUserData: MGraph = {
+ if (isLocal) {
+ new
UnionMGraph(tcManager.getMGraph(representationGraphUri), 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(representationGraphUri)
+ }
+ }
+
+ }
}
\ No newline at end of file
Added:
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala?rev=1104553&view=auto
==============================================================================
---
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
(added)
+++
incubator/clerezza/trunk/parent/platform.users/core/src/main/scala/org/apache/clerezza/platform/users/WebIdInfo.scala
Tue May 17 20:52:42 2011
@@ -0,0 +1,60 @@
+/*
+ * 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.users
+
+import org.apache.clerezza.rdf.core.{MGraph, TripleCollection, UriRef}
+
+
+/*
+ * This functionality is currently limited to users with webid, it could be
+ * extended for being available also for users without a URI. But in general
+ * many things are easier for user with URIs.
+ *
+ */
+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: MGraph
+
+ /**
+ * 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
Modified: incubator/clerezza/trunk/parent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/pom.xml?rev=1104553&r1=1104552&r2=1104553&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/pom.xml (original)
+++ incubator/clerezza/trunk/parent/pom.xml Tue May 17 20:52:42 2011
@@ -108,7 +108,6 @@
<module>rdf.stable.serializer</module>
<module>rdf.utils</module>
<module>rdf.web</module>
- <module>rdf.web.proxy</module>
<module>shell</module>
<module>shell.felixshellcommand</module>
<module>bundledevtool</module>
@@ -674,11 +673,6 @@
</dependency>
<dependency>
<groupId>org.apache.clerezza</groupId>
- <artifactId>rdf.web.proxy.core</artifactId>
- <version>0.2-incubating-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
<artifactId>rdf.web.ontologies</artifactId>
<version>0.2-incubating-SNAPSHOT</version>
</dependency>