public static Set < IRI > triplePreferences ( final Prefer prefer ) { final Set < IRI > include = new HashSet <> ( DEFAULT_REPRESENTATION ) ; if ( prefer != null ) { if ( prefer . getInclude ( ) . contains ( LDP . PreferMinimalContainer . getIRIString ( ) ) ) { include . remove ( LDP . PreferContainment ) ; include . remove ( LDP . PreferMembership ) ; } if ( prefer . getOmit ( ) . contains ( LDP . PreferMinimalContainer . getIRIString ( ) ) ) { include . remove ( Trellis . PreferUserManaged ) ; } prefer . getOmit ( ) . stream ( ) . map ( rdf :: createIRI ) . forEach ( include :: remove ) ; prefer . getInclude ( ) . stream ( ) . map ( rdf :: createIRI ) . filter ( iri -> ! ignoredPreferences . contains ( iri ) ) . forEach ( include :: add ) ; } return include ; }
Get a collection of IRIs for identifying the categories of triples to retrieve .