buildResourceAndLabelFieldOptions
public static edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ConstantFieldOptions buildResourceAndLabelFieldOptions(edu.cornell.mannlib.vitro.webapp.rdfservice.RDFService rdfService,
edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory webappDaoFactory,
String headerValue,
String headerLabel,
String... resourceURIs)
throws Exception
Build a field options list of resource URIs paired with their labels as
retrieved from the supplied RDFService.
- Parameters:
rdfService - from which to retrieve labels: this should typically
be a LanguageFilteringRDFService.
webappDaoFactory - may be null. If non-null, labels for classes will be
returned from here first before consulting
rdfService.
headerValue - optional value for first value/label pair in the
options list before appending the URIs with their
labels. May be null. Example: empty string
headerLabel - optional label for first value/label pair in the
options list before appending the URIs with their
labels. May be null. Example: "Select type"
resourceURIs - variable list of resource URI strings
- Returns:
- empty ConstantFieldOptions list if resourceURIs is null or empty or
if rdfService is null
- Throws:
edu.cornell.mannlib.vitro.webapp.rdfservice.RDFServiceException - from the supplied rdfService
Exception - from ConstantFieldOptions constructor