public static Optional < IRI > getContainer ( final IRI identifier ) { if ( identifier . getIRIString ( ) . equals ( TRELLIS_DATA_PREFIX ) ) { return Optional . empty ( ) ; } final String path = identifier . getIRIString ( ) . substring ( TRELLIS_DATA_PREFIX . length ( ) ) ; final int index = Math . max ( path . lastIndexOf ( ' ' ) , 0 ) ; return Optional . of ( rdf . createIRI ( TRELLIS_DATA_PREFIX + path . substring ( 0 , index ) ) ) ; }
Get the structural - logical container for this resource .