Class 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 an IRI as object.
    • any ldp:inbox Triple requires an IRI as object.
    • any oa:annotationService Triple requires an IRI as object.
    • Constructor Detail

      • LdpConstraintService

        public LdpConstraintService()
    • 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 interface ConstraintService
        Parameters:
        identifier - the resource identifier
        model - the interaction model
        graph - the graph
        domain - the domain of the resource
        Returns:
        any constraint violations on the graph