Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A583B200BCE for ; Thu, 17 Nov 2016 23:55:30 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A3D2C160AD8; Thu, 17 Nov 2016 22:55:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0394B160B0B for ; Thu, 17 Nov 2016 23:55:29 +0100 (CET) Received: (qmail 7425 invoked by uid 500); 17 Nov 2016 22:55:29 -0000 Mailing-List: contact dev-help@commonsrdf.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commonsrdf.incubator.apache.org Delivered-To: mailing list dev@commonsrdf.incubator.apache.org Received: (qmail 7347 invoked by uid 99); 17 Nov 2016 22:55:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 22:55:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 455F4180149 for ; Thu, 17 Nov 2016 22:55:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.018 X-Spam-Level: X-Spam-Status: No, score=-7.018 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id tJyjT-g2ZV0u for ; Thu, 17 Nov 2016 22:55:27 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 02AF75F3BA for ; Thu, 17 Nov 2016 22:55:25 +0000 (UTC) Received: (qmail 7297 invoked by uid 99); 17 Nov 2016 22:55:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2016 22:55:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 137FFE97D7; Thu, 17 Nov 2016 22:55:25 +0000 (UTC) From: ansell To: dev@commonsrdf.incubator.apache.org Reply-To: dev@commonsrdf.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-commonsrdf pull request #27: COMMONSRDF-47 RDFSyntax as an interfa... Content-Type: text/plain Message-Id: <20161117225525.137FFE97D7@git1-us-west.apache.org> Date: Thu, 17 Nov 2016 22:55:25 +0000 (UTC) archived-at: Thu, 17 Nov 2016 22:55:30 -0000 Github user ansell commented on a diff in the pull request: https://github.com/apache/incubator-commonsrdf/pull/27#discussion_r88350737 --- Diff: api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java --- @@ -22,6 +22,124 @@ import java.util.Optional; /** + * An RDF syntax, e.g. as used for parsing and writing RDF. + *

+ * An RDF syntax is uniquely identified by its {@link #mediaType()}, and has a + * suggested {@link #fileExtension()}. + *

+ * Some of the RDF syntaxes may {@link #supportsDataset()}, meaning they can + * represent {@link Quad}s. + *

+ * An enumeration of the official RDF 1.1 syntaxes is available in + * {@link OfficialRDFSyntax} - for convenience they are also accessible + * as constants here, e.g. RDFSyntax.JSONLD. + * + */ +public interface RDFSyntax { + + public static OfficialRDFSyntax JSONLD = OfficialRDFSyntax.JSONLD; + public static OfficialRDFSyntax TURTLE = OfficialRDFSyntax.TURTLE; + public static OfficialRDFSyntax NQUADS = OfficialRDFSyntax.NQUADS; + public static OfficialRDFSyntax NTRIPLES = OfficialRDFSyntax.NTRIPLES; + public static OfficialRDFSyntax RDFA_HTML = OfficialRDFSyntax.RDFA_HTML; + public static OfficialRDFSyntax RDFA_XHTML = OfficialRDFSyntax.RDFA_XHTML; + public static OfficialRDFSyntax RDFXML = OfficialRDFSyntax.RDFXML; + public static OfficialRDFSyntax TRIG = OfficialRDFSyntax.TRIG; + + /** + * A short name of the RDF Syntax. + *

+ * The name typically corresponds to the {@link Enum#name()} of for + * {@link OfficialRDFSyntax}, e.g. JSONLD. + * + * @return Short name for RDF syntax + */ + public String name(); + + /** + * The title of the RDF Syntax. + *

+ * This is generally the title of the corresponding standard, + * e.g. RDF 1.1 Turtle. + * + * @return Title of RDF Syntax + */ + public String title(); + + /** + * The IANA media type for + * the RDF syntax. + *

+ * The media type can be used as part of Content-Type and + * Accept for content negotiation in the + * HTTP + * protocol. + */ + public String mediaType(); + + /** + * The IANA-registered + * file extension. + *

+ * The file extension includes the leading period, e.g. .jsonld + */ + public String fileExtension(); --- End diff -- Do you plan on supporting alternative less used file extensions here? --- 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---