Package org.trellisldp.constraint
Class LdpConstraintService
- java.lang.Object
-
- org.trellisldp.constraint.LdpConstraintService
-
- All Implemented Interfaces:
ConstraintService
@ApplicationScoped public class LdpConstraintService extends Object implements ConstraintService
A set of constraints applied to user-provided graphs.This class includes the following restrictions on a provided
Graph
:- Prevent LDP types to be set explicitly (Link headers should be used).
- Direct Containers require certain defined predicates (as defined by LDP).
- Indirect Containers require certain defined predicates (as defined by LDP).
- ldp:contains triples may not be set directly (as defined by LDP).
- ldp:contains may not be used as a membership property.
- rdf:type may not be used as a membership property.
- any rdf:type
Triple
requires anIRI
as object. - any ldp:inbox
Triple
requires anIRI
as object. - any oa:annotationService
Triple
requires anIRI
as object.
-
-
Constructor Summary
Constructors Constructor Description LdpConstraintService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<ConstraintViolation>
constrainedBy(IRI identifier, IRI model, Graph graph, String domain)
Check a graph against an LDP interaction model.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.trellisldp.api.ConstraintService
constrainedBy
-
-
-
-
Method Detail
-
constrainedBy
public Stream<ConstraintViolation> constrainedBy(IRI identifier, IRI model, Graph graph, String domain)
Description copied from interface:ConstraintService
Check a graph against an LDP interaction model.- Specified by:
constrainedBy
in interfaceConstraintService
- Parameters:
identifier
- the resource identifiermodel
- the interaction modelgraph
- the graphdomain
- the domain of the resource- Returns:
- any constraint violations on the graph
-
-