/** * Retrieve all property values as Strings for the supplied subject and property from the given model. * * @param m * the model from which to retrieve the property values as Strings. * @param subject * the subject resource for which to retrieve all property values as Strings. * @param property * the property for which to retrieve all values as Strings. * @param contexts * the contexts from which to retrieve the property values. Optional vararg argument. If not * specified the operations works on the entire Model. * @return a Set of all property values as Strings for the supplied input. The resulting set may be empty. */ public static Set<String> getPropertyStrings(Model m, Resource subject, IRI property, Resource... contexts) { Objects.requireNonNull(m, "model may not be null"); Objects.requireNonNull(subject, "subject may not be null"); Objects.requireNonNull(property, "property may not be null"); return objectStrings(m.filter(subject, property, null, contexts)); }
/** * Retrieve all property values as Strings for the supplied subject and property from the given model. * * @param m * the model from which to retrieve the property values as Strings. * @param subject * the subject resource for which to retrieve all property values as Strings. * @param property * the property for which to retrieve all values as Strings. * @param contexts * the contexts from which to retrieve the property values. Optional vararg argument. If not * specified the operations works on the entire Model. * @return a Set of all property values as Strings for the supplied input. The resulting set may be empty. */ public static Set<String> getPropertyStrings(Model m, Resource subject, IRI property, Resource... contexts) { Objects.requireNonNull(m, "model may not be null"); Objects.requireNonNull(subject, "subject may not be null"); Objects.requireNonNull(property, "property may not be null"); return objectStrings(m.filter(subject, property, null, contexts)); }