Class ResourceProxyBase

java.lang.Object
org.apache.jena.enhanced.Polymorphic<org.apache.jena.rdf.model.RDFNode>
org.apache.jena.enhanced.EnhNode
org.apache.jena.rdf.model.impl.ResourceImpl
org.aksw.jenax.reprogen.core.ResourceProxyBase
All Implemented Interfaces:
org.apache.jena.graph.FrontsNode, org.apache.jena.rdf.model.RDFNode, org.apache.jena.rdf.model.Resource

public class ResourceProxyBase extends org.apache.jena.rdf.model.impl.ResourceImpl
Experimental base implementation that is used for generated proxies. The asResource() method returns a plain jena ResourceImpl instead of 'this'. This effectively allows for un-proxying. Note, that "r == r.asResource() if r is a Resource" no longer holds for proxied resources. It's hard to image someone would rely on that, but one never knows. The change in behavior is useful e.g. for Apache Spark, where serializers may expect only standard Jena types.
Author:
raven
  • Field Summary

    Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

    factory, rdfNodeFactory

    Fields inherited from class org.apache.jena.enhanced.EnhNode

    enhGraph, node
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceProxyBase(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph enhGraph)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.rdf.model.Resource
     

    Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

    abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asStatementTerm, begin, commit, getId, getLocalName, getModel, getModelCom, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, mustHaveModel, removeAll, removeProperties, toString, visitWith

    Methods inherited from class org.apache.jena.enhanced.EnhNode

    as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAs

    Methods inherited from class org.apache.jena.enhanced.Polymorphic

    addView, alreadyHasView, asInternal, supports

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.jena.graph.FrontsNode

    asNode

    Methods inherited from interface org.apache.jena.rdf.model.RDFNode

    as, canAs, isAnon, isLiteral, isResource, isStatementTerm, isURIResource

    Methods inherited from interface org.apache.jena.rdf.model.Resource

    equals
  • Constructor Details

    • ResourceProxyBase

      public ResourceProxyBase(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph enhGraph)
  • Method Details

    • asResource

      public org.apache.jena.rdf.model.Resource asResource()
      Specified by:
      asResource in interface org.apache.jena.rdf.model.RDFNode
      Overrides:
      asResource in class org.apache.jena.rdf.model.impl.ResourceImpl