Author: reto
Date: Fri Jul  1 06:29:12 2011
New Revision: 1141834

URL: http://svn.apache.org/viewvc?rev=1141834&view=rev
Log:
CLEREZZA-510: removed unneeded methods and constructors, improved comments

Modified:
    
incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala

Modified: 
incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala?rev=1141834&r1=1141833&r2=1141834&view=diff
==============================================================================
--- 
incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
 (original)
+++ 
incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/main/scala/org/apache/clerezza/rdf/scala/utils/RichGraphNode.scala
 Fri Jul  1 06:29:12 2011
@@ -45,7 +45,7 @@ class RichGraphNode(resource: Resource, 
         * @param node The GraphNode to be wrapped
         */
         def this(node: GraphNode) = this(node.getNode, node.getGraph)
-
+        
        /**
         * Operator syntax shortcut to get all objects as 
<code>RichGraphNode</code>
         *
@@ -138,13 +138,8 @@ class RichGraphNode(resource: Resource, 
                }
        }
 
-       //support for adding properties
-
-       protected def predicate(rel: UriRef) = new Predicate(rel)
-       protected def inverse(rel: UriRef) = new InversePredicate(rel)
-       //protected def make(ref: NonLiteral, graph: TripleCollection): 
RichGraphNode
-
-       /** is an instance of the given class */
+       /**
+        *Sets the RDF:type of the subject */
        def a(rdfclass: UriRef): RichGraphNode = {
                addProperty(RDF.`type`, rdfclass)
                return this
@@ -156,26 +151,22 @@ class RichGraphNode(resource: Resource, 
         */
        def protect(): RichGraphNode = new RichGraphNode(getNode, new 
UnionMGraph(new SimpleMGraph(), graph))
 
-       def this(s: NonLiteral) = this (s, new SimpleMGraph())
-
-       def this() = this (new BNode)
-
 
        /**
         * relate the subject via the given relation to....
         */
-       def --(rel: UriRef) = predicate(rel)
+       def --(rel: UriRef): Predicate = new Predicate(rel)
 
        /**
         * relate the subject via the given (expressed as string) relation 
to....
         */
-       def --(rel: String) = predicate(new UriRef(rel))
+       def --(rel: String): Predicate = --(new UriRef(rel))
 
        /**
         * relate the subject via the inverse of the given relation to....
         * note: we can't have <-- as that messes up the balance of precedence
         */
-       def -<-(rel: UriRef) = inverse(rel)
+       def -<-(rel: UriRef) = new InversePredicate(rel)
 
 
        /** class for Inverse relations with the current RichGraphNode.ref as 
object */
@@ -233,8 +224,6 @@ class RichGraphNode(resource: Resource, 
                        for (u <- uris) -->(u)
                        RichGraphNode.this
                }
-
-
        }
 }
 


Reply via email to