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 2016/10/29 13:09:46 UTC

[1/2] jena git commit: JENA-1253: Remove RDF/XML related validity checks.

Repository: jena
Updated Branches:
  refs/heads/master b732fdf69 -> 488257beb


JENA-1253: Remove RDF/XML related validity checks.

These were applied only in some constructors and not others leading to
inconsistent behaviour.

Remove checkOrdinal because it was a no-op and the comment by it
says "remove shortly".


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/eac92d15
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/eac92d15
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/eac92d15

Branch: refs/heads/master
Commit: eac92d159587ef404a02d1a5f61d117360def914
Parents: fb101b8
Author: Andy Seaborne <an...@apache.org>
Authored: Fri Oct 28 16:33:30 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Fri Oct 28 16:36:49 2016 +0100

----------------------------------------------------------------------
 .../jena/rdf/model/impl/PropertyImpl.java       | 48 +-------------------
 1 file changed, 2 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/eac92d15/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
----------------------------------------------------------------------
diff --git a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
index efd7111..abaf3b7 100644
--- a/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
+++ b/jena-core/src/main/java/org/apache/jena/rdf/model/impl/PropertyImpl.java
@@ -52,50 +52,34 @@ public class PropertyImpl extends ResourceImpl implements Property
     public PropertyImpl( String uri )
         {
         super( uri );
-        checkLocalName();
-        checkOrdinal();
         }
 
     @Override public Property inModel( Model m )
         { return getModel() == m ? this : m.createProperty( getURI() ); }
 
-    private void checkLocalName()
-        {
-        String localName = getLocalName();
-        if (localName == null || localName.equals( "" )) 
-            throw new InvalidPropertyURIException( getURI() );
-        }
-
     public PropertyImpl( String nameSpace, String localName )
         {
         super( nameSpace, localName );
-        checkLocalName();
-        checkOrdinal();
         }
 
     public PropertyImpl( String uri, ModelCom m )
         {
         super( uri, m );
-        checkOrdinal();
         }
 
     public PropertyImpl( String nameSpace, String localName, ModelCom m )
         {
         super( nameSpace, localName, m );
-        checkOrdinal();
         }
 
     public PropertyImpl( Node n, EnhGraph m )
         {
         super( n, m );
-        checkOrdinal();
         }
 
     public PropertyImpl( String nameSpace, String localName, int ordinal, ModelCom m )
         {
         super( nameSpace, localName, m );
-        checkLocalName();
-        this.ordinal = ordinal;
         }
 
     @Override
@@ -105,7 +89,8 @@ public class PropertyImpl extends ResourceImpl implements Property
     @Override
     public int getOrdinal()
         {
-        if (ordinal < 0) ordinal = computeOrdinal();
+        if (ordinal < 0) 
+            ordinal = computeOrdinal();
         return ordinal;
         }
 
@@ -122,33 +107,4 @@ public class PropertyImpl extends ResourceImpl implements Property
         try { return Integer.parseInt( digits );}
         catch (NumberFormatException e) { throw new JenaException( "checkOrdinal fails on " + digits, e ); }
         }
-
-    // Remove shortly.
-
-    protected void checkOrdinal()
-        {
-        // char c;
-        // String nameSpace = getNameSpace();
-        // String localName = getLocalName();
-        // // check for an rdf:_xxx property
-        // if (localName.length() > 0)
-        // {
-        // if (localName.charAt(0) == '_' && nameSpace.equals(RDF.getURI())
-        // && nameSpace.equals(RDF.getURI())
-        // && localName.length() > 1
-        // )
-        // {
-        // for (int i=1; i<localName.length(); i++) {
-        // c = localName.charAt(i);
-        // if (c < '0' || c > '9') return;
-        // }
-        //                try {
-        //                  ordinal = Integer.parseInt(localName.substring(1));
-        //                } catch (NumberFormatException e) {
-        //                    logger.error( "checkOrdinal fails on " + localName, e );
-        //                }
-        //            }
-        //        }
-        }
-
     }


[2/2] jena git commit: JENA-1253: Merge commit 'refs/pull/186/head' of github.com:apache/jena

Posted by an...@apache.org.
JENA-1253: Merge commit 'refs/pull/186/head' of github.com:apache/jena

This closes #186.


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/488257be
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/488257be
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/488257be

Branch: refs/heads/master
Commit: 488257bebcc7dd75c2b68692f882e1dc36520ede
Parents: b732fdf eac92d1
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Oct 29 14:08:49 2016 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Oct 29 14:08:49 2016 +0100

----------------------------------------------------------------------
 .../jena/rdf/model/impl/PropertyImpl.java       | 48 +-------------------
 1 file changed, 2 insertions(+), 46 deletions(-)
----------------------------------------------------------------------