/** * * Returns all the available {@link RDFFormat}s. * * @return an unmodifiable collection of formats. */ public static Collection<RDFFormat> getFormats() { return RDFParserRegistry.getInstance().getKeys(); }
private String getFormats(final RDFParserRegistry registry) { StringBuilder sb = new StringBuilder(); boolean first = true; for (RDFFormat format : registry.getKeys()) { if (first) { first = false; } else { sb.append(", "); } sb.append(format.getName()); } return sb.toString(); }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { format = f; return; } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { format = f; return; } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { rioFormat = f; return; } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { format = f; return; } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { rioFormat = f; return; } } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); for (RDFFormat f : RDFParserRegistry.getInstance().getKeys()) { if (f.getName().equals(formatName)) { format = f; return; } } }
/** * Tries to match a MIME type against the list of RDF formats that can be parsed. * * @param mimeType * A MIME type, e.g. "application/rdf+xml". * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForMIMEType(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForMIMEType(String mimeType) { return RDFFormat.matchMIMEType(mimeType, RDFParserRegistry.getInstance().getKeys()); }
private static String listRDF() { StringBuilder sb = new StringBuilder(); for (RDFFormat fmt : RDFParserRegistry.getInstance().getKeys()) { sb.append("* ").append(fmt.getName()).append(" ("); boolean first = true; for (String ext : fmt.getFileExtensions()) { if (first) { first = false; } else { sb.append(", "); } sb.append('.').append(ext); } sb.append(")\n"); } return sb.toString(); }
/** * Tries to match a MIME type against the list of RDF formats that can be parsed. * * @param mimeType * A MIME type, e.g. "application/rdf+xml". * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForMIMEType(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForMIMEType(String mimeType) { return RDFFormat.matchMIMEType(mimeType, RDFParserRegistry.getInstance().getKeys()); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForFileName(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForFileName(String fileName) { return RDFFormat.matchFileName(fileName, RDFParserRegistry.getInstance().getKeys()); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForFileName(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForFileName(String fileName) { return RDFFormat.matchFileName(fileName, RDFParserRegistry.getInstance().getKeys()); }
/** * Tries to match the extension of a file name against the list of RDF formats that can be parsed. * * @param fileName * A file name. * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForFileName(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForFileName(String fileName) { return RDFFormat.matchFileName(fileName, RDFParserRegistry.getInstance().getKeys()); }
/** * Tries to match a MIME type against the list of RDF formats that can be parsed. * * @param mimeType * A MIME type, e.g. "application/rdf+xml". * @return An RDFFormat object if a match was found, or {@link Optional#empty()} otherwise. * @see #getParserFormatForMIMEType(String, RDFFormat) */ public static Optional<RDFFormat> getParserFormatForMIMEType(String mimeType) { return RDFFormat.matchMIMEType(mimeType, RDFParserRegistry.getInstance().getKeys()); }
Set<RDFFormat> rdfFormats = RDFParserRegistry.getInstance().getKeys(); List<String> acceptParams = RDFFormat.getAcceptParams(rdfFormats, true, null); for (String acceptParam : acceptParams) {
Set<RDFFormat> rdfFormats = RDFParserRegistry.getInstance().getKeys(); List<String> acceptParams = RDFFormat.getAcceptParams(rdfFormats, true, null); for (String acceptParam : acceptParams) {
Set<RDFFormat> rdfFormats = RDFParserRegistry.getInstance().getKeys(); if (rdfFormats.isEmpty()) { throw new RepositoryException("No tuple RDF parsers have been registered");
Set<RDFFormat> rdfFormats = RDFParserRegistry.getInstance().getKeys(); if (rdfFormats.isEmpty()) { throw new RepositoryException("No tuple RDF parsers have been registered");
Set<RDFFormat> rdfFormats = RDFParserRegistry.getInstance().getKeys(); if (rdfFormats.isEmpty()) { throw new RepositoryException("No tuple RDF parsers have been registered");