Github user ansell commented on a diff in the pull request: https://github.com/apache/commons-rdf/pull/27#discussion_r95894599 --- Diff: api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java --- @@ -178,17 +206,62 @@ private RDFSyntax(final String name, final String mediaType, final String fileEx * The <code>fileExtension</code> is compared in lower case, therefore it * might not be equal to the {@link RDFSyntax#fileExtension} of the returned * RDFSyntax. + * <p> + * The list of syntaxes supported is at least those returned by + * {@link #w3cSyntaxes()}. * * @param fileExtension * The fileExtension to match, starting with <code>.</code> * @return If {@link Optional#isPresent()}, the {@link RDFSyntax} which has - * a matching {@link RDFSyntax#fileExtension}, otherwise + * a matching {@link RDFSyntax#fileExtension()}, otherwise * {@link Optional#empty()} indicating that no matching file * extension was found. */ public static Optional<RDFSyntax> byFileExtension(final String fileExtension) { - final String ext = fileExtension.toLowerCase(Locale.ENGLISH); - return Arrays.stream(RDFSyntax.values()).filter(t -> t.fileExtension.equals(ext)).findAny(); + final String ext = fileExtension.toLowerCase(Locale.ROOT); + return w3cSyntaxes().stream().filter(t -> t.fileExtension().equals(ext)) + .findAny(); + } + + /** + * Return the RDFSyntax with the specified {@link #name()}. + * <p> + * The list of syntaxes supported is at least those returned by --- End diff -- There doesn't look to be any way to extend that set from a user point of view. This wording implies there is a way.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org