public Resource toResource(final Supplier<Map<String,Relationship>> relationshipSupplier,final Supplier<Map<String,Object>> attributeSupplier){
  final Resource resource=new Resource(type,(obj == null) ? uuid.orElseThrow(null) : dictionary.getId(obj));
  resource.setRelationships(relationshipSupplier.get());
  resource.setAttributes(attributeSupplier.get());
  return resource;
}

public Resource toResource ( final Supplier < Map < String , Relationship > > relationshipSupplier , final Supplier < Map < String , Object > > attributeSupplier ) { final Resource resource = new Resource ( type , ( obj == null ) ? uuid . orElseThrow ( null ) : dictionary . getId ( obj ) ) ; resource . setRelationships ( relationshipSupplier . get ( ) ) ; resource . setAttributes ( attributeSupplier . get ( ) ) ; return resource ; }
fetch a resource with support for lambda function for getting relationships and attributes .
