Class SecuredRDFNodeImpl
java.lang.Object
org.apache.jena.permissions.impl.SecuredItemImpl
org.apache.jena.permissions.model.impl.SecuredRDFNodeImpl
- All Implemented Interfaces:
FrontsNode
,SecuredRDFNode
,SecuredItem
,RDFNode
- Direct Known Subclasses:
SecuredLiteralImpl
,SecuredResourceImpl
Implementation of SecuredRDFNode to be used by a SecuredItemInvoker proxy.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.permissions.SecuredItem
SecuredItem.Util
-
Field Summary
Fields inherited from class org.apache.jena.permissions.impl.SecuredItemImpl
CACHE, COUNT, MAX_CACHE
-
Method Summary
Modifier and TypeMethodDescription<T extends RDFNode>
TasNode()
<T extends RDFNode>
booleanfinal boolean
An RDFNode is equal to another enhanced node n iff the underlying nodes are equal.static SecuredRDFNode
getInstance
(SecuredModel securedModel, RDFNode rdfNode) getModel()
final int
hashCode()
The hash code of an RDFnode is defined to be the same as the underlying node.boolean
isAnon()
boolean
boolean
boolean
boolean
Methods inherited from class org.apache.jena.permissions.impl.SecuredItemImpl
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, decrementUse, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, incrementUse, isEquivalent, toString
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
asLiteral, asResource, toString, visitWith
Methods inherited from interface org.apache.jena.permissions.SecuredItem
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, isEquivalent
-
Method Details
-
getInstance
- Parameters:
securedModel
- the Secured Model to use.rdfNode
- the node to secure.- Returns:
- the secured RDFNode
-
as
public <T extends RDFNode> T as(Class<T> view) throws ReadDeniedException, AuthenticationRequiredException, SecuredUnsupportedPolymorphismException - Specified by:
as
in interfaceRDFNode
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.SecuredUnsupportedPolymorphismException
- Required graph permissions:
- Read
-
asNode
- Specified by:
asNode
in interfaceFrontsNode
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
canAs
- Specified by:
canAs
in interfaceRDFNode
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
getModel
-
inModel
- Specified by:
inModel
in interfaceRDFNode
- Throws:
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.- Required graph permissions:
- Read
-
isAnon
public boolean isAnon() -
isLiteral
public boolean isLiteral() -
isResource
public boolean isResource()- Specified by:
isResource
in interfaceRDFNode
-
isURIResource
public boolean isURIResource()- Specified by:
isURIResource
in interfaceRDFNode
-
isStmtResource
public boolean isStmtResource()- Specified by:
isStmtResource
in interfaceRDFNode
-
equals
An RDFNode is equal to another enhanced node n iff the underlying nodes are equal. We generalise to allow the other object to be any class implementing asNode, because we allow other implementations of Resource, at least in principle. This is deemed to be a complete and correct interpretation of RDFNode equality, which is why this method has been marked final.- Specified by:
equals
in interfaceSecuredItem
- Overrides:
equals
in classSecuredItemImpl
- Parameters:
o
- An object to test for equality with this node- Returns:
- True if o is equal to this node.
- Throws:
ReadDeniedException
AuthenticationRequiredException
-
hashCode
public final int hashCode()The hash code of an RDFnode is defined to be the same as the underlying node.- Overrides:
hashCode
in classSecuredItemImpl
- Returns:
- The hashcode as an int
-