You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/05/01 19:05:44 UTC
jena git commit: JENA-930: Remove deprecated Node statics - use
NodeFactory instead.
Repository: jena
Updated Branches:
refs/heads/master 103776ed7 -> b4b5c1d07
JENA-930: Remove deprecated Node statics - use NodeFactory instead.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/b4b5c1d0
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/b4b5c1d0
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/b4b5c1d0
Branch: refs/heads/master
Commit: b4b5c1d072facc02a1274520aa6fc6fac7ae5566
Parents: 103776e
Author: Andy Seaborne <an...@apache.org>
Authored: Fri May 1 17:58:32 2015 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri May 1 18:00:33 2015 +0100
----------------------------------------------------------------------
.../main/java/org/apache/jena/graph/Node.java | 126 -------------------
.../model/impl/SecuredLiteralImpl.java | 15 ++-
2 files changed, 7 insertions(+), 134 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/b4b5c1d0/jena-core/src/main/java/org/apache/jena/graph/Node.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/graph/Node.java b/jena-core/src/main/java/org/apache/jena/graph/Node.java
index 346e457..023e78a 100644
--- a/jena-core/src/main/java/org/apache/jena/graph/Node.java
+++ b/jena-core/src/main/java/org/apache/jena/graph/Node.java
@@ -18,7 +18,6 @@
package org.apache.jena.graph;
-import org.apache.jena.datatypes.DatatypeFormatException ;
import org.apache.jena.datatypes.RDFDatatype ;
import org.apache.jena.graph.impl.LiteralLabel ;
import org.apache.jena.rdf.model.AnonId ;
@@ -46,131 +45,6 @@ public abstract class Node {
static final String RDFprefix = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
/**
- * @deprecated Use {@link NodeFactory#getType(String)} instead
- */
- @Deprecated
- public static RDFDatatype getType( String s )
- {
- return NodeFactory.getType(s) ;
- }
-
- /** make a blank node with a fresh anon id
- * @deprecated Use {@link NodeFactory#createAnon()} instead*/
- @Deprecated
- public static Node createAnon()
- {
- return NodeFactory.createAnon() ;
- }
-
- /** make a blank node with the specified label
- * @deprecated Use {@link NodeFactory#createAnon(AnonId)} instead*/
- @Deprecated
- public static Node createAnon( AnonId id )
- {
- return NodeFactory.createAnon(id) ;
- }
-
- /** make a literal node with the specified literal value
- * @deprecated Use {@link NodeFactory#createLiteral(LiteralLabel)} instead*/
- @Deprecated
- public static Node createLiteral( LiteralLabel lit )
- {
- return NodeFactory.createLiteral(lit) ;
- }
-
- /** make a URI node with the specified URIref string
- * @deprecated Use {@link NodeFactory#createURI(String)} instead*/
- @Deprecated
- public static Node createURI( String uri )
- {
- return NodeFactory.createURI(uri) ;
- }
-
- /** make a variable node with a given name
- * @deprecated Use {@link NodeFactory#createVariable(String)} instead*/
- @Deprecated
- public static Node createVariable( String name )
- {
- return NodeFactory.createVariable(name) ;
- }
-
- /**
- * @deprecated Use {@link NodeFactory#createLiteral(String)} instead
- */
- @Deprecated
- public static Node createLiteral( String value )
- {
- return NodeFactory.createLiteral(value) ;
- }
-
- /** make a literal with specified language and XMLishness.
- _lit_ must *not* be null.
- @param isXml If true then lit is exclusive canonical XML of type
- rdf:XMLLiteral, and no checking will be invoked.
- * @deprecated Use {@link NodeFactory#createLiteral(String,String,boolean)} instead
- */
- @Deprecated
- public static Node createLiteral( String lit, String lang, boolean isXml )
- {
- return NodeFactory.createLiteral(lit, lang, isXml) ;
- }
-
- /**
- * Build a literal node from its lexical form. The
- * lexical form will be parsed now and the value stored. If
- * the form is not legal this will throw an exception.
- *
- * @param lex the lexical form of the literal
- * @param lang the optional language tag
- * @param dtype the type of the literal, null for old style "plain" literals
- * @throws DatatypeFormatException if lex is not a legal form of dtype
- * @deprecated Use {@link NodeFactory#createLiteral(String,String,RDFDatatype)} instead
- */
- @Deprecated
- public static Node createLiteral( String lex, String lang, RDFDatatype dtype )
- throws DatatypeFormatException
- {
- return NodeFactory.createLiteral(lex, lang, dtype) ;
- }
-
- /**
- * Build a typed literal node from its lexical form. The
- * lexical form will be parsed now and the value stored. If
- * the form is not legal this will throw an exception.
- *
- * @param lex the lexical form of the literal
- * @param dtype the type of the literal, null for old style "plain" literals
- * @throws DatatypeFormatException if lex is not a legal form of dtype
- * @deprecated Use {@link NodeFactory#createLiteral(String,RDFDatatype)} instead
- */
- @Deprecated
- public static Node createLiteral( String lex, RDFDatatype dtype )
- throws DatatypeFormatException
- {
- return NodeFactory.createLiteral(lex, dtype) ;
- }
-
- /**
- * @deprecated Use {@link NodeFactory#createUncachedLiteral(Object,String,RDFDatatype)} instead
- */
- @Deprecated
- public static Node createUncachedLiteral( Object value, String lang, RDFDatatype dtype )
- throws DatatypeFormatException
- {
- return NodeFactory.createUncachedLiteral(value, lang, dtype) ;
- }
-
- /**
- * @deprecated Use {@link NodeFactory#createUncachedLiteral(Object,RDFDatatype)} instead
- */
- @Deprecated
- public static Node createUncachedLiteral( Object value, RDFDatatype dtype )
- throws DatatypeFormatException
- {
- return NodeFactory.createUncachedLiteral(value, dtype) ;
- }
-
- /**
Visit a Node and dispatch on it to the appropriate method from the
NodeVisitor <code>v</code>.
http://git-wip-us.apache.org/repos/asf/jena/blob/b4b5c1d0/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredLiteralImpl.java
----------------------------------------------------------------------
diff --git a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredLiteralImpl.java b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredLiteralImpl.java
index c457328..3291bd1 100644
--- a/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredLiteralImpl.java
+++ b/jena-permissions/src/main/java/org/apache/jena/permissions/model/impl/SecuredLiteralImpl.java
@@ -18,12 +18,12 @@
package org.apache.jena.permissions.model.impl;
import org.apache.jena.datatypes.RDFDatatype ;
-import org.apache.jena.graph.Node ;
-import org.apache.jena.permissions.impl.ItemHolder;
-import org.apache.jena.permissions.impl.SecuredItemInvoker;
-import org.apache.jena.permissions.model.SecuredLiteral;
-import org.apache.jena.permissions.model.SecuredModel;
-import org.apache.jena.permissions.model.SecuredResource;
+import org.apache.jena.graph.NodeFactory ;
+import org.apache.jena.permissions.impl.ItemHolder ;
+import org.apache.jena.permissions.impl.SecuredItemInvoker ;
+import org.apache.jena.permissions.model.SecuredLiteral ;
+import org.apache.jena.permissions.model.SecuredModel ;
+import org.apache.jena.permissions.model.SecuredResource ;
import org.apache.jena.rdf.model.Literal ;
import org.apache.jena.rdf.model.Model ;
import org.apache.jena.rdf.model.RDFVisitor ;
@@ -118,8 +118,7 @@ public class SecuredLiteralImpl extends SecuredRDFNodeImpl implements
}
else
{
- throw new ResourceRequiredException(
- Node.createLiteral("Can not read"));
+ throw new ResourceRequiredException(NodeFactory.createLiteral("Can not read"));
}
}