You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by cl...@apache.org on 2014/01/01 16:31:41 UTC
svn commit: r1554631 -
/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
Author: claude
Date: Wed Jan 1 15:31:41 2014
New Revision: 1554631
URL: http://svn.apache.org/r1554631
Log:
deprecated GraphMemPlain in favore of CollectionGraph
Added correct graph capabilities
Modified:
jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
Modified: jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java?rev=1554631&r1=1554630&r2=1554631&view=diff
==============================================================================
--- jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java (original)
+++ jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java Wed Jan 1 15:31:41 2014
@@ -23,6 +23,7 @@ import java.util.Iterator ;
import java.util.Locale ;
import java.util.Set ;
+import com.hp.hpl.jena.graph.Capabilities;
import com.hp.hpl.jena.graph.Node ;
import com.hp.hpl.jena.graph.NodeFactory ;
import com.hp.hpl.jena.graph.Triple ;
@@ -33,7 +34,13 @@ import com.hp.hpl.jena.util.iterator.Clo
import com.hp.hpl.jena.util.iterator.ExtendedIterator ;
import com.hp.hpl.jena.util.iterator.Filter ;
-/** A version of Graph that does term equality only */
+/** */
+/**
+ * A version of Graph that does term equality only
+ *
+ * @deprecated use com.hp.hpl.jena.graph.impl.CollectionGraph instead.
+ */
+@Deprecated
public class GraphMemPlain extends GraphBase
{
private Set<Triple> triples = new HashSet<Triple>() ;
@@ -41,6 +48,11 @@ public class GraphMemPlain extends Graph
public GraphMemPlain() {}
@Override
+ public Capabilities getCapabilities() {
+ return gmpCapabilities;
+ }
+
+ @Override
public void performAdd( Triple t )
{ triples.add(t) ; }
@@ -125,4 +137,52 @@ public class GraphMemPlain extends Graph
}
+ private static Capabilities gmpCapabilities = new Capabilities() {
+
+ @Override
+ public boolean sizeAccurate() {
+ return true;
+ }
+
+ @Override
+ public boolean addAllowed() {
+ return true;
+ }
+
+ @Override
+ public boolean addAllowed(boolean everyTriple) {
+ return true;
+ }
+
+ @Override
+ public boolean deleteAllowed() {
+ return true;
+ }
+
+ @Override
+ public boolean deleteAllowed(boolean everyTriple) {
+ return true;
+ }
+
+ @Override
+ public boolean iteratorRemoveAllowed() {
+ return false;
+ }
+
+ @Override
+ public boolean canBeEmpty() {
+ return true;
+ }
+
+ @Override
+ public boolean findContractSafe() {
+ return true;
+ }
+
+ @Override
+ public boolean handlesLiteralTyping() {
+ return false;
+ }
+
+ };
}
Re: svn commit: r1554631 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
Posted by Andy Seaborne <an...@apache.org>.
On 01/01/14 19:53, Claude Warren wrote:
> I missed the deprecation issues. I'll remove the deprecation. Can you
> provide me with some pointers for checking deprecation?
I use Eclipse and it's warnings.
Andy
Still leaves the issue of why does the issue of the language tags not
show up in the core test suite.
>
>
>
>
> On Wed, Jan 1, 2014 at 6:50 PM, Andy Seaborne <an...@apache.org> wrote:
>
>> Why?
>>
>> And could you see through the implications of deprecation and remove
>> warnings when making changes?
>>
>> I tried to clean up the new warnings only to find that CollectionGraph
>> breaks the ARQ test suite if used.
>>
>> GraphMemPlain provides the same matching as GraphMem - CollectionGraph
>> does not for language tags.
>>
>> Indeed why not use GraphMemPlain (the original)? It goes through a
>> factory so you can even move the code around.
>>
>> Andy
>>
>> On 01/01/14 15:31, claude@apache.org wrote:
>>
>>> Author: claude
>>> Date: Wed Jan 1 15:31:41 2014
>>> New Revision: 1554631
>>>
>>> URL: http://svn.apache.org/r1554631
>>> Log:
>>> deprecated GraphMemPlain in favore of CollectionGraph
>>> Added correct graph capabilities
>>>
>>
>>
>
>
Re: svn commit: r1554631 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
Posted by Claude Warren <cl...@xenei.com>.
I missed the deprecation issues. I'll remove the deprecation. Can you
provide me with some pointers for checking deprecation?
On Wed, Jan 1, 2014 at 6:50 PM, Andy Seaborne <an...@apache.org> wrote:
> Why?
>
> And could you see through the implications of deprecation and remove
> warnings when making changes?
>
> I tried to clean up the new warnings only to find that CollectionGraph
> breaks the ARQ test suite if used.
>
> GraphMemPlain provides the same matching as GraphMem - CollectionGraph
> does not for language tags.
>
> Indeed why not use GraphMemPlain (the original)? It goes through a
> factory so you can even move the code around.
>
> Andy
>
> On 01/01/14 15:31, claude@apache.org wrote:
>
>> Author: claude
>> Date: Wed Jan 1 15:31:41 2014
>> New Revision: 1554631
>>
>> URL: http://svn.apache.org/r1554631
>> Log:
>> deprecated GraphMemPlain in favore of CollectionGraph
>> Added correct graph capabilities
>>
>
>
--
I like: Like Like - The likeliest place on the web<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren
Re: svn commit: r1554631 - /jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/graph/GraphMemPlain.java
Posted by Andy Seaborne <an...@apache.org>.
Why?
And could you see through the implications of deprecation and remove
warnings when making changes?
I tried to clean up the new warnings only to find that CollectionGraph
breaks the ARQ test suite if used.
GraphMemPlain provides the same matching as GraphMem - CollectionGraph
does not for language tags.
Indeed why not use GraphMemPlain (the original)? It goes through a
factory so you can even move the code around.
Andy
On 01/01/14 15:31, claude@apache.org wrote:
> Author: claude
> Date: Wed Jan 1 15:31:41 2014
> New Revision: 1554631
>
> URL: http://svn.apache.org/r1554631
> Log:
> deprecated GraphMemPlain in favore of CollectionGraph
> Added correct graph capabilities