public class SecuredRDFListImpl extends SecuredResourceImpl implements SecuredRDFList
RDFList.ApplyFn, RDFList.ReduceFn
SecuredItem.Util
CACHE, COUNT, MAX_CACHE
Modifier and Type | Method and Description |
---|---|
void |
add(RDFNode value) |
SecuredRDFList |
append(Iterator<? extends RDFNode> nodes)
Resulting list will contain the readable nodes from this list
concatenated with nodes
|
RDFList |
append(RDFList list)
Resulting list will contain the readable nodes from this list
concatenated with the list argument
|
void |
apply(RDFList.ApplyFn fn)
Uses the security settings for the application of the function calls.
|
void |
apply(Set<SecurityEvaluator.Action> perms,
RDFList.ApplyFn fn)
This method is intended to provide the capabilities to apply functions
that need to do more than read the graph.
|
List<RDFNode> |
asJavaList() |
void |
concatenate(Iterator<? extends RDFNode> nodes) |
void |
concatenate(RDFList list) |
SecuredRDFList |
cons(RDFNode value) |
boolean |
contains(RDFNode value) |
SecuredRDFList |
copy()
Creates a copy of this list comprising the readable elements of this
list.
|
SecuredRDFNode |
get(int i)
Answer the node that is the i'th element of the list, assuming that the
head is item zero.
|
SecuredRDFNode |
getHead()
The value that is at the head of the list.
|
static <T extends RDFList> |
getInstance(SecuredModel securedModel,
T rdfList)
Get an instance of SecuredProperty
|
boolean |
getStrict() |
SecuredRDFList |
getTail()
The value that is at the tail of the list.
|
String |
getValidityErrorMessage() |
int |
indexOf(RDFNode value) |
int |
indexOf(RDFNode value,
int start) |
boolean |
isEmpty() |
boolean |
isValid() |
ExtendedIterator<RDFNode> |
iterator() |
ExtendedIterator<RDFNode> |
iterator(Set<SecurityEvaluator.Action> constraints) |
Class<? extends RDFList> |
listAbstractionClass() |
Property |
listFirst() |
Resource |
listNil() |
Property |
listRest() |
Resource |
listType() |
<T> ExtendedIterator<T> |
mapWith(Function<RDFNode,T> fn) |
Object |
reduce(RDFList.ReduceFn fn,
Object initial)
Only readable triples will be passed to the function.
|
Object |
reduce(Set<SecurityEvaluator.Action> requiredActions,
RDFList.ReduceFn fn,
Object initial)
Only readable triples will be passed to the function.
|
RDFList |
remove(RDFNode val) |
void |
removeAll()
Deprecated.
|
SecuredRDFList |
removeHead() |
void |
removeList() |
SecuredRDFNode |
replace(int i,
RDFNode value) |
boolean |
sameListAs(RDFList list) |
SecuredRDFNode |
setHead(RDFNode value) |
void |
setStrict(boolean strict) |
SecuredRDFList |
setTail(RDFList tail) |
int |
size()
Size may be modified by security constraionts.
|
SecuredRDFList |
with(RDFNode value) |
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, canReadProperty, commit, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWith
as, asNode, canAs, equals, getModel, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, decrementUse, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, incrementUse, isEquivalent
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, asResource, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, listProperties, removeAll, removeProperties
getStmtTerm, inModel, toString
asNode, canAs, getModel, inModel
as, asLiteral, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith
canCreate, canCreate, canCreate, canDelete, canDelete, canDelete, canRead, canRead, canRead, canUpdate, canUpdate, canUpdate, getBaseItem, getModelIRI, getModelNode, getSecurityEvaluator, isEquivalent
public static <T extends RDFList> SecuredRDFList getInstance(SecuredModel securedModel, T rdfList)
securedModel
- the Secured Model to use.rdfList
- The rdfList to securepublic void add(RDFNode value) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException
add
in interface SecuredRDFList
add
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
AddDeniedException
public SecuredRDFList append(Iterator<? extends RDFNode> nodes) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
append
in interface SecuredRDFList
append
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public RDFList append(RDFList list) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
append
in interface SecuredRDFList
append
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public void apply(RDFList.ApplyFn fn) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
apply
in interface SecuredRDFList
apply
in interface RDFList
ReadDeniedException
- graph Read or other permissions are not metAuthenticationRequiredException
- if user is not authenticated and is required to be.public void apply(Set<SecurityEvaluator.Action> perms, RDFList.ApplyFn fn) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
apply
in interface SecuredRDFList
perms
- The permissions the user must have on the items in the list.fn
- The function to apply.ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.public List<RDFNode> asJavaList() throws ReadDeniedException, AuthenticationRequiredException
asJavaList
in interface SecuredRDFList
asJavaList
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public void concatenate(Iterator<? extends RDFNode> nodes) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException
concatenate
in interface SecuredRDFList
concatenate
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
AddDeniedException
public void concatenate(RDFList list) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException
concatenate
in interface SecuredRDFList
concatenate
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
AddDeniedException
public SecuredRDFList cons(RDFNode value) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException
cons
in interface SecuredRDFList
cons
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
AddDeniedException
public boolean contains(RDFNode value) throws ReadDeniedException, AuthenticationRequiredException
contains
in interface SecuredRDFList
contains
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFList copy() throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
copy
in interface SecuredRDFList
copy
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFNode get(int i) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
get
in interface SecuredRDFList
get
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFNode getHead() throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
getHead
in interface SecuredRDFList
getHead
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFList getTail() throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
getTail
in interface SecuredRDFList
getTail
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public String getValidityErrorMessage() throws ReadDeniedException, AuthenticationRequiredException
getValidityErrorMessage
in interface SecuredRDFList
getValidityErrorMessage
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public int indexOf(RDFNode value) throws ReadDeniedException, AuthenticationRequiredException
indexOf
in interface SecuredRDFList
indexOf
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public int indexOf(RDFNode value, int start) throws ReadDeniedException, AuthenticationRequiredException
indexOf
in interface SecuredRDFList
indexOf
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public boolean isEmpty() throws ReadDeniedException, AuthenticationRequiredException
isEmpty
in interface SecuredRDFList
isEmpty
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public boolean isValid() throws ReadDeniedException, AuthenticationRequiredException
isValid
in interface SecuredRDFList
isValid
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public ExtendedIterator<RDFNode> iterator() throws ReadDeniedException, AuthenticationRequiredException
iterator
in interface SecuredRDFList
iterator
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public ExtendedIterator<RDFNode> iterator(Set<SecurityEvaluator.Action> constraints) throws ReadDeniedException, AuthenticationRequiredException
iterator
in interface SecuredRDFList
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.public Property listFirst()
public Resource listNil()
public Property listRest()
public Resource listType()
public <T> ExtendedIterator<T> mapWith(Function<RDFNode,T> fn) throws ReadDeniedException, AuthenticationRequiredException
mapWith
in interface RDFList
ReadDeniedException
AuthenticationRequiredException
public Object reduce(RDFList.ReduceFn fn, Object initial) throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
reduce
in interface SecuredRDFList
reduce
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public Object reduce(Set<SecurityEvaluator.Action> requiredActions, RDFList.ReduceFn fn, Object initial) throws EmptyListException, ListIndexException, InvalidListException, ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
reduce
in interface SecuredRDFList
requiredActions
- The set of permission (in addition to Read) that the user must
havefn
- The reduction functioninitial
- The initial state for the ruduce value.EmptyListException
ListIndexException
InvalidListException
ReadDeniedException
AuthenticationRequiredException
- if user is not authenticated and is required to be.public RDFList remove(RDFNode val) throws UpdateDeniedException, DeleteDeniedException, AuthenticationRequiredException
remove
in interface SecuredRDFList
remove
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
DeleteDeniedException
@Deprecated public void removeAll() throws UpdateDeniedException, AuthenticationRequiredException
removeAll
in interface SecuredRDFList
removeAll
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
public SecuredRDFList removeHead() throws UpdateDeniedException, DeleteDeniedException, AuthenticationRequiredException
removeHead
in interface SecuredRDFList
removeHead
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
DeleteDeniedException
public void removeList() throws UpdateDeniedException, AuthenticationRequiredException
removeList
in interface SecuredRDFList
removeList
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
public SecuredRDFNode replace(int i, RDFNode value) throws UpdateDeniedException, AuthenticationRequiredException, ListIndexException
replace
in interface SecuredRDFList
replace
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
ListIndexException
public boolean sameListAs(RDFList list) throws ReadDeniedException, AuthenticationRequiredException
sameListAs
in interface SecuredRDFList
sameListAs
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFNode setHead(RDFNode value) throws EmptyListException, AuthenticationRequiredException
setHead
in interface SecuredRDFList
setHead
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.EmptyListException
public void setStrict(boolean strict) throws UpdateDeniedException, AuthenticationRequiredException
setStrict
in interface SecuredRDFList
setStrict
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
public SecuredRDFList setTail(RDFList tail) throws UpdateDeniedException, AuthenticationRequiredException
setTail
in interface RDFList
UpdateDeniedException
AuthenticationRequiredException
public int size() throws ReadDeniedException, AuthenticationRequiredException
SecuredRDFList
size
in interface SecuredRDFList
size
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.ReadDeniedException
public SecuredRDFList with(RDFNode value) throws UpdateDeniedException, AddDeniedException, AuthenticationRequiredException
with
in interface SecuredRDFList
with
in interface RDFList
AuthenticationRequiredException
- if user is not authenticated and is required to be.UpdateDeniedException
AddDeniedException
Licensed under the Apache License, Version 2.0