Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-359

inModel() dependencies on ModelCom

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.7.4
    • Jena 2.10.0
    • Jena
    • None

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andy Andy Seaborne
            claude Claude Warren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment