Package org.aksw.jenax.reprogen.core
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, rdfNodeFactoryFields inherited from class org.apache.jena.enhanced.EnhNode
enhGraph, node -
Constructor Summary
ConstructorsConstructorDescriptionResourceProxyBase(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph enhGraph) -
Method Summary
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, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, alreadyHasView, asInternal, supportsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, canAs, isAnon, isLiteral, isResource, isStatementTerm, isURIResourceMethods 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:
asResourcein interfaceorg.apache.jena.rdf.model.RDFNode- Overrides:
asResourcein classorg.apache.jena.rdf.model.impl.ResourceImpl
-