You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Claude Warren (JIRA)" <ji...@apache.org> on 2012/12/01 18:03:58 UTC

[jira] [Created] (JENA-359) inModel() dependencies on ModelCom

Claude Warren created JENA-359:
----------------------------------

             Summary: inModel() dependencies on ModelCom
                 Key: JENA-359
                 URL: https://issues.apache.org/jira/browse/JENA-359
             Project: Apache Jena
          Issue Type: Bug
          Components: Jena
    Affects Versions: Jena 2.7.4
            Reporter: Claude Warren


LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.

ResourecImpl.inModel() calls
asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )

this line handles working with variables and I am not sure how to fix that.

LiteralImpl.inModel()  calls
(Literal) ((ModelCom) m).getRDFNode( asNode() )

I think this can be replaced with
m.createTypedLiteral(getLexicalForm(), getDataType())

My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-359) inModel() dependencies on ModelCom

Posted by "Claude Warren (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508280#comment-13508280 ] 

Claude Warren commented on JENA-359:
------------------------------------

I'm fine with your solution -- I like it even better.  For some reason I didn't recall that ModelCon had the methods.
                
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (JENA-359) inModel() dependencies on ModelCom

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne resolved JENA-359.
--------------------------------

       Resolution: Fixed
    Fix Version/s: Jena 2.10.0
         Assignee: Andy Seaborne
    
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>             Fix For: Jena 2.10.0
>
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-359) inModel() dependencies on ModelCom

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508318#comment-13508318 ] 

Hudson commented on JENA-359:
-----------------------------

Integrated in Jena__Development_Test #306 (See [https://builds.apache.org/job/Jena__Development_Test/306/])
    JENA-359 : Remove unnecessary casts (Revision 1416223)

     Result = SUCCESS
andy : 
Files : 
* /jena/branches/jena-core-simplified/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
* /jena/branches/jena-core-simplified/src/main/java/com/hp/hpl/jena/rdf/model/impl/ResourceImpl.java
* /jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/LiteralImpl.java
* /jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/rdf/model/impl/ResourceImpl.java

                
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>             Fix For: Jena 2.10.0
>
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-359) inModel() dependencies on ModelCom

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508311#comment-13508311 ] 

Andy Seaborne commented on JENA-359:
------------------------------------

Fixed in both trunk and in branches/jena-core-simplified.

The simplification work is done, barring one test failing but that looks like the test failure (in concurrency) is something the old tests did not find.

There are other ModelCom dependencies and ResourceImpl is quite tied to ModelCom.  Let's take that to the A list for general discussion
                
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>             Fix For: Jena 2.10.0
>
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JENA-359) inModel() dependencies on ModelCom

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508238#comment-13508238 ] 

Andy Seaborne commented on JENA-359:
------------------------------------

Why not just remove the casts?  getRDFNode in the interface ModelCon.

More generally, what required an implementation of Model that can't be done by an implementation of Graph?
                
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (JENA-359) inModel() dependencies on ModelCom

Posted by "Andy Seaborne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JENA-359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Seaborne closed JENA-359.
------------------------------

    
> inModel() dependencies on ModelCom
> ----------------------------------
>
>                 Key: JENA-359
>                 URL: https://issues.apache.org/jira/browse/JENA-359
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.7.4
>            Reporter: Claude Warren
>            Assignee: Andy Seaborne
>             Fix For: Jena 2.10.0
>
>
> LiteralImpl.inModel( Model m ) and ResourceImpl.inModel( Model m ) cast the Model m to a ModelCom in some instances.
> ResourecImpl.inModel() calls
> asNode().isConcrete() == false ? (Resource) ((ModelCom) m).getRDFNode( asNode() )
> this line handles working with variables and I am not sure how to fix that.
> LiteralImpl.inModel()  calls
> (Literal) ((ModelCom) m).getRDFNode( asNode() )
> I think this can be replaced with
> m.createTypedLiteral(getLexicalForm(), getDataType())
> My issue is that I have a model implementation that does not derive from ModelCom so these methods fail some test cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira