Author: bblfish
Date: Fri Jul  1 19:12:22 2011
New Revision: 1142030

URL: http://svn.apache.org/viewvc?rev=1142030&view=rev
Log:
CLEREZZA-510 renamed EzGraph to EzMGraph - a reasonable Reto idea.

Added:
    
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
      - copied, changed from r1142019, 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzGraph.scala
    
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
      - copied, changed from r1142019, 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
Removed:
    
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzGraph.scala
    
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
Modified:
    
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/FoafBrowser.scala
    
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.security.foafssl/test/src/main/scala/org/apache/clerezza/foafssl/test/WebIDTester.scala

Modified: 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/FoafBrowser.scala
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/FoafBrowser.scala?rev=1142030&r1=1142029&r2=1142030&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/FoafBrowser.scala
 (original)
+++ 
incubator/clerezza/trunk/parent/platform.accountcontrolpanel/platform.accountcontrolpanel.core/src/main/scala/org/apache/clerezza/platform/accountcontrolpanel/FoafBrowser.scala
 Fri Jul  1 19:12:22 2011
@@ -32,7 +32,7 @@ import java.security.{PrivilegedAction, 
 import org.apache.clerezza.rdf.core._
 import access.TcManager
 import impl.SimpleMGraph
-import org.apache.clerezza.rdf.scala.utils.{EzStyleChoice, EzGraph}
+import org.apache.clerezza.rdf.scala.utils.{EzStyleChoice, EzMGraph}
 
 object FoafBrowser {
        def removeHash(uri: UriRef) = {
@@ -52,7 +52,7 @@ object FoafBrowser {
  */
 @Path("/browse")
 class FoafBrowser extends Logging {
-       import org.apache.clerezza.rdf.scala.utils.EzGraph._
+       import org.apache.clerezza.rdf.scala.utils.EzMGraph._
        import org.apache.clerezza.platform.accountcontrolpanel.FoafBrowser._
        import EzStyleChoice.unicode
 
@@ -78,7 +78,7 @@ class FoafBrowser extends Logging {
                         def run() = tcManager.getGraph(removeHash (uri))
                 });
 
-               val inference = new EzGraph(new UnionMGraph(new 
SimpleMGraph(),profile))
+               val inference = new EzMGraph(new UnionMGraph(new 
SimpleMGraph(),profile))
 
                //add a bit of inferencing for persons, until we have some 
reasoning
                for (kn: Triple <- profile.filter(null,FOAF.knows,null)) {

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=1142030&r1=1142029&r2=1142030&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
 Fri Jul  1 19:12:22 2011
@@ -101,7 +101,7 @@ class PingBack {
         */
        def  pingCollection(id: String, uriInfo: UriInfo): EzGraphNodeA = {
                val pingRef = new UriRef(pingCollUri(id, uriInfo))
-               val pingCollG: EzGraph = pingColl(pingRef)
+               val pingCollG: EzMGraph = pingColl(pingRef)
                pingCollG.node(pingRef)
        }
 
@@ -119,7 +119,7 @@ class PingBack {
        /**
         * get Ping Collection
         */
-       def pingColl(pingCollRef: UriRef): EzGraph = {
+       def pingColl(pingCollRef: UriRef): EzMGraph = {
                val tcgraph =AccessController.doPrivileged(new 
PrivilegedAction[MGraph] {
                        def run: MGraph = try {
                                tcManager.getMGraph(pingCollRef)
@@ -133,7 +133,7 @@ class PingBack {
                                }
                        }
                })
-               new EzGraph(tcgraph)
+               new EzMGraph(tcgraph)
        }
 
        /**
@@ -224,7 +224,7 @@ class PingBack {
                //create a new Resource for this ping (we'll use time stamps to 
get going)
                val pingCollUriStr: String = pingCollUri(id, uriInfo)
                val pingItem = new UriRef(pingCollUriStr + "/ts" + 
System.currentTimeMillis)
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
 
                //build the graph and add to the store if ok
                val pingColGr = pingColl(new UriRef(pingCollUriStr))
@@ -284,7 +284,7 @@ class PingBack {
           //get the source graph
                 val targetGrph = tcManager.getMGraph(target)
                (
-                       new EzGraph(new UnionMGraph(new 
SimpleMGraph(),targetGrph)).bnode.a(PLATFORM.HeadedPage)
+                       new EzMGraph(new UnionMGraph(new 
SimpleMGraph(),targetGrph)).bnode.a(PLATFORM.HeadedPage)
                                                                    
.a(ProxyForm)
                                -- PINGBACK.source --> { if (source == null) 
ProfilePanel.webID(id,uriInfo) else source }
                                -- PINGBACK.target --> target

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=1142030&r1=1142029&r2=1142030&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
 Fri Jul  1 19:12:22 2011
@@ -82,7 +82,7 @@ object ProfilePanel {
 class ProfilePanel extends Logging {
 
        import collection.JavaConversions._
-       import EzGraph._
+       import EzMGraph._
        import EzStyleChoice.unicode
 
 
@@ -106,7 +106,7 @@ class ProfilePanel extends Logging {
                                val profile = userInSysGraph.getNode match {
                                        case blank: BNode => {
                                                //user does not have a webId yet
-                                               val g = EzGraph()
+                                               val g = EzMGraph()
                                                (
                                                        g.bnode ⟝ 
CONTROLPANEL.isLocalProfile ⟶ true
                                                                ⟝ 
CONTROLPANEL.suggestedPPDUri ⟶ profileDocUri
@@ -136,7 +136,7 @@ class ProfilePanel extends Logging {
                                        } catch {
                                                case e => {
                                                        logger.warn("cought 
exception trying to fetch graph - these graphs should already be in store " + 
friend, e)
-                                                       EzGraph().add(friend, 
SKOS.note, "problem with fetching this node: " + e)
+                                                       EzMGraph().add(friend, 
SKOS.note, "problem with fetching this node: " + e)
                                                }
                                        }
                                }
@@ -289,7 +289,7 @@ class ProfilePanel extends Logging {
                     val webIdInfo = webIdGraphsService.getWebIdInfo(webidRef);
                     if (webIdInfo.isLocal)
                ) {
-                       val certNode = new 
EzGraph(webIdInfo.localPublicUserData).bnode
+                       val certNode = new 
EzMGraph(webIdInfo.localPublicUserData).bnode
                        ( certNode ∈  RSA.RSAPublicKey
                           ⟝ CERT.identity ⟶  webidRef
                           ⟝ RSA.modulus ⟶  modulus

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=1142030&r1=1142029&r2=1142030&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
 Fri Jul  1 19:12:22 2011
@@ -36,7 +36,7 @@ import java.util.Date
 import 
org.apache.clerezza.rdf.scala.utils.Preamble.{toRichGraphNode,toFirstElement}
 import serializedform.Serializer
 import java.io.ByteArrayOutputStream
-import org.apache.clerezza.rdf.scala.utils.EzGraph._
+import org.apache.clerezza.rdf.scala.utils.EzMGraph._
 import java.math.BigInteger
 import collection.mutable.{Queue, LinkedList}
 import javax.security.auth.Subject
@@ -675,7 +675,7 @@ class CertTester(subj: Subject, webIdGra
   */
 class Assertor {
 
-       val g = new EzGraph(new SimpleMGraph)
+       val g = new EzMGraph(new SimpleMGraph)
 
        var assertions: List[Assertion] = Nil
 

Copied: 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
 (from r1142019, 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzGraph.scala)
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala?p2=incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala&p1=incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzGraph.scala&r1=1142019&r2=1142030&rev=1142030&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzGraph.scala
 (original)
+++ 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/EzMGraph.scala
 Fri Jul  1 19:12:22 2011
@@ -29,10 +29,10 @@ import org.apache.clerezza.rdf.utils.{Gr
 import org.apache.clerezza.rdf.core._
 import impl._
 
-object EzGraph {
+object EzMGraph {
 
-       def apply(graph: TripleCollection) = new EzGraph(graph)
-       def apply() = new EzGraph()
+       def apply(graph: TripleCollection) = new EzMGraph(graph)
+       def apply() = new EzMGraph()
 
        private val litFactory = LiteralFactory.getInstance
 
@@ -114,7 +114,7 @@ object EzStyleChoice {
 
 }
 /**
- * EzGraph enhances graph writing. Used together with EzGraphNode, it can make 
writing rdf graphs in code a lot more
+ * EzMGraph enhances graph writing. Used together with EzGraphNode, it can 
make writing rdf graphs in code a lot more
  * readable, as it avoids a lot of repetition.
  *
  * @param graph: a Triple collection - or should it be an MGraph since it is 
really meant to be modifiable
@@ -122,7 +122,7 @@ object EzStyleChoice {
  * @created: 20/04/2011
  */
 //todo: should this take a TripleCollection or a Set[Triple]
-class EzGraph(val baseTc: TripleCollection) extends AbstractMGraph {
+class EzMGraph(val baseTc: TripleCollection) extends AbstractMGraph {
 
        def this() = this (new SimpleMGraph())
 
@@ -172,7 +172,7 @@ class EzGraph(val baseTc: TripleCollecti
 
        /**
         * create a new Resource based EzGraphNode with the preferred writing 
style.
-        * The EzGraphNode will contain the graph that this EzGraph is built on 
and point to the given subj
+        * The EzGraphNode will contain the graph that this EzMGraph is built 
on and point to the given subj
         */
        def node[T<: EzGraphNode](subj: NonLiteral)(implicit writingStyle: 
EzStyle[T]=EzStyleChoice.arrow ): T = {
                writingStyle.preferred(subj,baseTc)
@@ -453,13 +453,13 @@ object EzGraphNode {
 }
 
 /**
- * EzGraphNode. Create instances from an EzGraph object. Differnt notations 
implementations can be used.
+ * EzGraphNode. Create instances from an EzMGraph object. Differnt notations 
implementations can be used.
  */
 abstract class EzGraphNode(val ref: NonLiteral, val graph: TripleCollection) 
extends RichGraphNode(ref, graph) {
 
 //     lazy val easyGraph = graph match {
-//             case eg: EzGraph => eg
-//             case other: TripleCollection => new EzGraph(graph)
+//             case eg: EzMGraph => eg
+//             case other: TripleCollection => new EzMGraph(graph)
 //     }
 
        def +(sub: EzGraphNode) = {

Copied: 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
 (from r1142019, 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala)
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala?p2=incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala&p1=incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala&r1=1142019&r2=1142030&rev=1142030&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
 (original)
+++ 
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzMGraphTest.scala
 Fri Jul  1 19:12:22 2011
@@ -23,7 +23,7 @@ import org.junit._
 import org.apache.clerezza.rdf.core._
 import impl._
 
-class EzGraphTest {
+class EzMGraphTest {
 
        val bblfishModulus = """
        9D ☮ 79 ☮ BF ☮ E2 ☮ F4 ☮ 98 ☮ BC ☮ 79 ☮ 6D ☮ AB ☮ 
73 ☮ E2 ☮ 8B ☮ 39 ☮ 4D ☮ B5 26 ✜ 68 ✜ 49 ✜ EE ✜ 71 ✜ 87 ✜
@@ -88,7 +88,7 @@ class EzGraphTest {
                gr.add(new TripleImpl(reto,RDF.`type`, FOAF.Person))
 
                import EzStyleChoice.unicode
-               val ez = EzGraph()
+               val ez = EzMGraph()
                ez.bnode ∈ FOAF.Person
 
                Assert.assertEquals("the two graphs should be of same 
size",gr.size(),ez.size())
@@ -116,9 +116,9 @@ class EzGraphTest {
                gr.add(new TripleImpl(list3,RDF.rest,RDF.nil))
                gr.add(new TripleImpl(reto,RDF.`type`, FOAF.Person))
 
-               val ez = EzGraph()
+               val ez = EzMGraph()
 
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                import org.apache.clerezza.rdf.scala.utils.Lang._
                import org.apache.clerezza.rdf.scala.utils.EzStyleChoice.unicode
                ( ez.u(retoUri) ∈ FOAF.Person
@@ -136,15 +136,15 @@ class EzGraphTest {
                gr.add(new TripleImpl(reto,FOAF.knows,new UriRef(henryUri)))
                gr.add(new TripleImpl(reto,FOAF.knows,new UriRef(danbriUri)))
 
-               val ez = EzGraph()
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               val ez = EzMGraph()
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                //default style is now arrow
                (ez.u(retoUri) -- FOAF.knows -->> 
List(henryUri.uri,danbriUri.uri))
 
                Assert.assertEquals("the two graphs should be of same 
size",gr.size(),ez.size())
                Assert.assertEquals("Both graphs should contain exactly the 
same triples",gr.getGraph,ez.getGraph) //mutable graphs cannot be compared for 
equality
 
-               val ez2 = EzGraph()
+               val ez2 = EzMGraph()
                (ez2.u(retoUri)(EzStyleChoice.unicode) ⟝  FOAF.knows ⟶*  
Set(danbriUri.uri,henryUri.uri))
 
                Assert.assertEquals("the two graphs should be of same 
size",gr.size(),ez2.size())
@@ -154,7 +154,7 @@ class EzGraphTest {
 
        @Test
        def langEquals {
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                import org.apache.clerezza.rdf.scala.utils.Lang._
 
                 val lit = new PlainLiteralImpl("SPARQL update support",new 
Language("en"))
@@ -174,7 +174,7 @@ class EzGraphTest {
 
        @Test
        def uriEquals {
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                val uc = new UriRef("http://clerezza.org/";)
                val ec = "http://clerezza.org/".uri
 
@@ -194,9 +194,9 @@ class EzGraphTest {
           val gr = new SimpleMGraph
                gr.add(new TripleImpl(new BNode,OWL.sameAs,n3Lit))
 
-               import EzGraph._
+               import EzMGraph._
                import EzStyleChoice.unicode
-               val ez = EzGraph()
+               val ez = EzMGraph()
 
                (ez.bnode ⟝  OWL.sameAs ⟶  
(n3^^"http://example.com/turtle".uri))
 
@@ -209,7 +209,7 @@ class EzGraphTest {
                val exp = LiteralFactory.getInstance().createTypedLiteral(65537)
                val mod= new TypedLiteralImpl(bblfishModulus,hex)
 
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                val modZ: TypedLiteral = bblfishModulus^^hex
                val expZ: TypedLiteral = 65537
 
@@ -224,9 +224,9 @@ class EzGraphTest {
 
        @Test
        def usingSymbolicArrows {
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                import org.apache.clerezza.rdf.scala.utils.Lang._
-               val ez = EzGraph()
+               val ez = EzMGraph()
                import EzStyleChoice.unicode //in IntelliJ this is needed for 
the moment to remove the red lines
                 // example using arrows
                 (
@@ -260,10 +260,10 @@ class EzGraphTest {
 
        @Test
        def usingAsciiArrows {
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                import org.apache.clerezza.rdf.scala.utils.Lang._
                import EzStyleChoice.arrow
-                val ez = EzGraph()
+                val ez = EzMGraph()
                 // example using arrows
                 (
                   ez.b_("reto").a(FOAF.Person)
@@ -297,11 +297,11 @@ class EzGraphTest {
 
        @Test
        def usingWordOperators {
-               import org.apache.clerezza.rdf.scala.utils.EzGraph._
+               import org.apache.clerezza.rdf.scala.utils.EzMGraph._
                import org.apache.clerezza.rdf.scala.utils.Lang._
                import EzStyleChoice.english
 
-                val ez = EzGraph()
+                val ez = EzMGraph()
                 // example using arrows
                 (
                   ez.b_("reto").asInstanceOf[EzGraphNodeEn] a FOAF.Person


Reply via email to