@PostConstruct
    public void initialize() {
        final IRI root = rdf.createIRI(TRELLIS_DATA_PREFIX);
        final IRI rootAuth = rdf.createIRI(TRELLIS_DATA_PREFIX + "#auth");
        try (final TrellisDataset dataset = TrellisDataset.createDataset()) {
            dataset.add(rdf.createQuad(Trellis.PreferAccessControl, rootAuth, ACL.mode, ACL.Read));
            dataset.add(rdf.createQuad(Trellis.PreferAccessControl, rootAuth, ACL.mode, ACL.Write));
            dataset.add(rdf.createQuad(Trellis.PreferAccessControl, rootAuth, ACL.mode, ACL.Control));
            dataset.add(rdf.createQuad(Trellis.PreferAccessControl, rootAuth, ACL.agentClass, FOAF.Agent));
            dataset.add(rdf.createQuad(Trellis.PreferAccessControl, rootAuth, ACL.accessTo, root));
            LOGGER.debug("Preparing to initialize Trellis at {}", root);
            trellis.getResourceService().get(root).thenCompose(res -> initialize(root, res, dataset))
                .exceptionally(err -> {
                    LOGGER.warn("Unable to auto-initialize Trellis: {}. See DEBUG log for more info", err.getMessage());
                    LOGGER.debug("Error auto-initializing Trellis", err);
                    return null;
                }).toCompletableFuture().join();
        }
    }
@ PostConstruct public void initialize ( ) { final IRI root = rdf . createIRI ( TRELLIS_DATA_PREFIX ) ; final IRI rootAuth = rdf . createIRI ( TRELLIS_DATA_PREFIX + "#auth" ) ; try ( final TrellisDataset dataset = TrellisDataset . createDataset ( ) ) { dataset . add ( rdf . createQuad ( Trellis . PreferAccessControl , rootAuth , ACL . mode , ACL . Read ) ) ; dataset . add ( rdf . createQuad ( Trellis . PreferAccessControl , rootAuth , ACL . mode , ACL . Write ) ) ; dataset . add ( rdf . createQuad ( Trellis . PreferAccessControl , rootAuth , ACL . mode , ACL . Control ) ) ; dataset . add ( rdf . createQuad ( Trellis . PreferAccessControl , rootAuth , ACL . agentClass , FOAF . Agent ) ) ; dataset . add ( rdf . createQuad ( Trellis . PreferAccessControl , rootAuth , ACL . accessTo , root ) ) ; LOGGER . debug ( "Preparing to initialize Trellis at {}" , root ) ; trellis . getResourceService ( ) . get ( root ) . thenCompose ( res -> initialize ( root , res , dataset ) ) . exceptionally ( err -> { LOGGER . warn ( "Unable to auto-initialize Trellis: {}. See DEBUG log for more info" , err . getMessage ( ) ) ; LOGGER . debug ( "Error auto-initializing Trellis" , err ) ; return null ; } ) . toCompletableFuture ( ) . join ( ) ; } }
Initialize the Trellis backend with a root container and default ACL quads.

@apiNote In a CDI context, this initialization step will be called automatically.
In a Java SE context, however, it may be necessary to invoke this method
in code, though a ResourceService implementation may still choose to
initialize itself independently of this method. In either case, if the
persistence backend has already been initialized with a root resoure and
root ACL, this method will make no changes to the storage layer.