protected Collection < String > getPropertyValues ( final Property property ) { final ExtendedIterator < Triple > iterator = graph . find ( Node . ANY , property . asNode ( ) , Node . ANY ) ; final Set < String > set = new HashSet <> ( ) ; while ( iterator . hasNext ( ) ) { final Node object = iterator . next ( ) . getObject ( ) ; if ( object . isLiteral ( ) ) { set . add ( object . getLiteralValue ( ) . toString ( ) ) ; } else if ( object . isURI ( ) ) { set . add ( object . getURI ( ) . toString ( ) ) ; } else { set . add ( object . toString ( ) ) ; } } return set ; }
Return all the values of a property