/** * Retrieves a list of registered predicates which can be used to create content relations. * * @return String containing a list with registered predicates. * @throws InvalidContentException Thrown if a xml file with an ontology has invalid content * @throws InvalidXmlException Thrown if a xml file with an ontology is invalid rdf/xml * @throws SystemException e */ @Override public String retrieveRegisteredPredicates() throws InvalidContentException, InvalidXmlException, SystemException { final List<String> predicates = ContentRelationsUtility.getPredicates(); final Iterator<String> it = predicates.iterator(); final StringBuilder sb = new StringBuilder(); sb.append(Constants.XML_HEADER); sb.append("<registeredPredicates:predicates"); sb.append( " xmlns:registeredPredicates=\"http://www.escidoc.org/schemas/predicate-list/0.1\" >\n"); while (it.hasNext()) { sb.append("<registeredPredicates:predicate>"); sb.append(it.next()); sb.append("</registeredPredicates:predicate>\n"); } sb.append("</registeredPredicates:predicates>\n"); return sb.toString(); }