FOSDEM 2017 Open Source Conference - Brussels

2017-01-12 Thread Sharan F

Hello Everyone

This email is to tell you about ASF participation at FOSDEM. The event 
will be held in Brussels on 4^th & 5^th February 2017 and we are hoping 
that many people from our ASF projects will be there.


https://fosdem.org/2017/

Attending FOSDEM is completely free and the ASF will again be running a 
booth there. Our main focus will on talking to people about the ASF, our 
projects and communities.


*_Why Attend FOSDEM?_*
Some reasons for attending FOSDEM are:

1. Promoting your project: FOSDEM has up to 4-5000 attendees so is a
   great place to spread the word about your project
2. Learning, participating and meeting up: FOSDEM is a developers
   conference so includes presentations covering a range of
   technologies and includes lots of topic specific devrooms

_*FOSDEM Wiki *_
A page on the Community Development wiki has been created with the main 
details about our involvement at conference, so please take a look


https://cwiki.apache.org/confluence/display/COMDEV/FOSDEM+2017

If you would like to spend some time on the ASF booth promoting your 
project then please sign up on the FOSDEM wiki page. Initially we would 
like to split this into slots of 3-4 hours but this will depend on the 
number of projects that are represented.


We are also looking for volunteers to help out on the booth over the 2 
days of the conference, so if you are going to be there and are willing 
to help then please add your name to the volunteer list.


_*Project Stickers*_
If you are going to be at FOSDEM and do not have any project stickers to 
give away then we may (budget permitting) be able to help you get some 
printed. Please contact me with your requirements.


_*Social Event*_
Some people have asked about organising an ASF social event / meetup 
during the conference. This is possible but we will need know how many 
people are interested and which date works best. The FOSDEM wiki page 
also contains an 'Arrival / Departure' section so so please add your 
details if you would like to participate.


I hope this helps people see some of the advantages of attending FOSDEM 
and we are looking forward to seeing lots of people there from our ASF 
communities.


Thanks
Sharan

Apache Community Development
http://community.apache.org/


[GitHub] commons-rdf pull request #30: COMMONSRDF-51 language tags compared lower cas...

2017-01-12 Thread stain
GitHub user stain opened a pull request:

https://github.com/apache/commons-rdf/pull/30

COMMONSRDF-51 language tags compared lower case

This fixes 
[COMMONSRDF-51](https://issues.apache.org/jira/browse/COMMONSRDF-51) - at least 
from `Literal.equals()` and `Literal.hashCode()`

Further test might be needed to verify consistent behaviour in `Graph` and 
`Dataset` if underlying framework does not correctly do langtag comparison in 
lower case (e.g. Turkish locale problem).

Please comment on the fixes and the suggested updated javadoc:

* 
[Literal.equals(Object)](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#equals-java.lang.Object-)
* 
[Literal.hashCode()](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#hashCode--)
* 
[Literal.getLanguageTag()](http://stain.github.io/commons-rdf/COMMONSRDF-51/org/apache/commons/rdf/api/Literal.html#getLanguageTag--)

For code improvements of this PR, feel free to push to the 
`COMMONSRDF-51-langtag-lcase` branch at 
https://git-wip-us.apache.org/repos/asf/commons-rdf.git or use the "Start 
review" mechanism in GitHub.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/apache/commons-rdf COMMONSRDF-51-langtag-lcase

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-rdf/pull/30.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #30


commit 3064d219606cbe42c0150d81dbf6cdbc74bf7491
Author: Stian Soiland-Reyes 
Date:   2017-01-12T14:51:26Z

COMMONSRDF-51: compare language tags in lower case




---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95840179
  
--- 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 https://tools.ietf.org/html/rfc2046";>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
+ * https://tools.ietf.org/html/rfc7231#section-3.1.1.1";>HTTP
+ * protocol.
+ */
+public String mediaType();
--- End diff --

No, only the official media type and extension should be used in this 
interface - however subtypes might add `mediaTypes()` and similar, or list 
several `RDFSyntax` instances (which would then not be `.equal()`).


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95840249
  
--- 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 https://tools.ietf.org/html/rfc2046";>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
+ * https://tools.ietf.org/html/rfc7231#section-3.1.1.1";>HTTP
+ * protocol.
+ */
+public String mediaType();
+
+/**
+ * The https://tools.ietf.org/html/rfc2046";>IANA-registered
+ * file extension.
+ * 
+ * The file extension includes the leading period, e.g. 
.jsonld
+ */
+public String fileExtension();
--- End diff --

No :-)


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95840484
  
--- 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 https://tools.ietf.org/html/rfc2046";>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
+ * https://tools.ietf.org/html/rfc7231#section-3.1.1.1";>HTTP
+ * protocol.
+ */
+public String mediaType();
+
+/**
+ * The https://tools.ietf.org/html/rfc2046";>IANA-registered
+ * file extension.
+ * 
+ * The file extension includes the leading period, e.g. 
.jsonld
+ */
+public String fileExtension();
+
+/**
+ * Indicate if this RDF syntax supports
+ * https://www.w3.org/TR/rdf11-concepts/#section-dataset";>RDF
+ * Datasets.
+ */
+public boolean supportsDataset();
+
+
--- End diff --

I think that is out of scope for now, as Commons RDF does not specify 
namespace preservation yet anywhere else.

Let's revisit that when we make `RDFWriter` where it might be a bit more 
natural than in `RDFParser` (although I know RDF4J can preserve parsed 
namespaces)


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95840655
  
--- 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 https://tools.ietf.org/html/rfc2046";>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
+ * https://tools.ietf.org/html/rfc7231#section-3.1.1.1";>HTTP
+ * protocol.
+ */
+public String mediaType();
+
+/**
+ * The https://tools.ietf.org/html/rfc2046";>IANA-registered
+ * file extension.
+ * 
+ * The file extension includes the leading period, e.g. 
.jsonld
+ */
+public String fileExtension();
+
+/**
+ * Indicate if this RDF syntax supports
+ * https://www.w3.org/TR/rdf11-concepts/#section-dataset";>RDF
+ * Datasets.
+ */
+public boolean supportsDataset();
+
+
+/**
+ * Return the RDFSyntax with the specified media type.
+ * 
+ * The mediaType is compared in lower case, therefore it 
might
+ * not be equal to the {@link RDFSyntax#mediaType} of the returned
+ * RDFSyntax.
+ * 
+ * For convenience matching of media types used in a
+ * Content-Type header, if the mediaType 
contains
+ * the characters ;, , or white space, only 
the
+ * part of the string to the left of those characters are considered.
+ * 
+ * @param mediaType
+ *The media type to match
+ * @return If {@link Optional#isPresent()}, the {@link RDFSyntax} 
which has
+ * a matching {@link RDFSyntax#mediaType}, otherwise
+ * {@link Optional#empty()} indicating that no matching syntax 
was
+ * found.
+ */
+public static Optional byMediaType(String mediaType) {
+final String type = 
mediaType.toLowerCase(Locale.ENGLISH).split("\\s*[;,]", 2)[0];
--- End diff --

I changed it to only support the media type format as @acoburn  suggests, 
not the content type which can list multiple types (parsing a `Content-Type` 
header properly requires more work!)


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95841065
  
--- 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 https://tools.ietf.org/html/rfc2046";>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
+ * https://tools.ietf.org/html/rfc7231#section-3.1.1.1";>HTTP
+ * protocol.
+ */
+public String mediaType();
+
+/**
+ * The https://tools.ietf.org/html/rfc2046";>IANA-registered
+ * file extension.
+ * 
+ * The file extension includes the leading period, e.g. 
.jsonld
+ */
+public String fileExtension();
+
+/**
+ * Indicate if this RDF syntax supports
+ * https://www.w3.org/TR/rdf11-concepts/#section-dataset";>RDF
+ * Datasets.
+ */
+public boolean supportsDataset();
+
+
+/**
+ * Return the RDFSyntax with the specified media type.
+ * 
+ * The mediaType is compared in lower case, therefore it 
might
+ * not be equal to the {@link RDFSyntax#mediaType} of the returned
+ * RDFSyntax.
+ * 
+ * For convenience matching of media types used in a
+ * Content-Type header, if the mediaType 
contains
+ * the characters ;, , or white space, only 
the
+ * part of the string to the left of those characters are considered.
+ * 
+ * @param mediaType
+ *The media type to match
+ * @return If {@link Optional#isPresent()}, the {@link RDFSyntax} 
which has
+ * a matching {@link RDFSyntax#mediaType}, otherwise
+ * {@link Optional#empty()} indicating that no matching syntax 
was
+ * found.
+ */
+public static Optional byMediaType(String mediaType) {
+final String type = 
mediaType.toLowerCase(Locale.ENGLISH).split("\\s*[;,]", 2)[0];
+return Arrays.stream(OfficialRDFSyntax.values()).filter(t -> 
t.mediaType().equals(type))
--- End diff --

Changed `OfficialRDFSyntax`  to a package-protected class `W3CRDFSyntax` 
and referred to its instances.

`values()` renamed to `w3cSyntaxes()` which return a `Set`. I 
don't think we need to make a `HashMap` from media type/extension to 
`RDFSyntax` as there's only 8 instances to iterate over anyway.


---
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.o

[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95841290
  
--- Diff: api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java ---
@@ -34,7 +152,7 @@
  *  1.1 Primer
  * @see org.apache.commons.rdf.experimental.RDFParser
  */
-public enum RDFSyntax {
+  public enum OfficialRDFSyntax implements RDFSyntax {
--- End diff --

I also wanted to list the `IRI` identifying the syntaxes, but then I would 
need a complete `IRIImpl` within `api/` .. or move `W3CRDFSyntax` to `simple/`. 
 (or.. awkwardly.. ask for an `RDF` instance :))


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95843006
  
--- Diff: 
simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
 ---
@@ -240,7 +240,7 @@ public T rdfTermFactory(RDF rdfTermFactory) {
 public T contentType(RDFSyntax rdfSyntax) throws 
IllegalArgumentException {
 AbstractRDFParser c = clone();
--- End diff --

No, but cloning means the `RDFParser` is immutable and can be reused in a 
thread-safe manner, e.g. if parsing many Turtle files in the same folder. So 
what is worse..:

* a) Creating 1000 RDFParser instances, setting all parameters every time, 
and remember not to reuse/share in multiple threads.
* b) Create a single base RDFParser instance with the common settings, then 
specialize only what is needed for each file to use in any thread at any time. 
(e.g. called from a within a `Stream.parallell().map()`

I think the overhead of cloning here is pretty much equivalent, e.g. `1000` 
instances, or `1005` instances.  

If you are parsing just a single file then I don't think the inefficiency 
of the cloning makes a big difference - that is unless you are making a very 
snappy UI or something.

Let's change this to mutable only if benchmark numbers show a problem?


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread stain
Github user stain commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95843235
  
--- Diff: 
simple/src/main/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParser.java
 ---
@@ -240,7 +240,7 @@ public T rdfTermFactory(RDF rdfTermFactory) {
 public T contentType(RDFSyntax rdfSyntax) throws 
IllegalArgumentException {
 AbstractRDFParser c = clone();
 c.contentTypeSyntax = Optional.ofNullable(rdfSyntax);
-c.contentType = c.contentTypeSyntax.map(syntax -> 
syntax.mediaType);
+c.contentType = c.contentTypeSyntax.map(syntax -> 
syntax.mediaType());
 return c.asT();
--- End diff --

It's just a generics trick so that subclasses of `AbstractRDFParser` can 
return their own type in all the setter methods rather than `RDFParser` or 
`AbstractRDFParser`, which would hide any additional methods they specialize 
with.


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread acoburn
Github user acoburn commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95862649
  
--- Diff: api/src/test/java/org/apache/commons/rdf/api/RDFSyntaxTest.java 
---
@@ -114,8 +116,7 @@ public void name() throws Exception {
 
 @Test
 public void valueOf() throws Exception {
-assertEquals(RDFSyntax.TURTLE, RDFSyntax.valueOf("TURTLE"));
-// No need to test all of them, we'll trust Enum
+assertEquals(RDFSyntax.TURTLE, RDFSyntax.byName("TURTLE"));
--- End diff --

`RDFSyntax::byName` returns an `Optional`. Perhaps you mean:

assertEquals(RDFSyntax.TURTLE, RDFSyntax.byName("TURTLE").get());


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread ansell
Github user ansell commented on a diff in the pull request:

https://github.com/apache/commons-rdf/pull/27#discussion_r95893698
  
--- Diff: api/src/main/java/org/apache/commons/rdf/api/RDFSyntax.java ---
@@ -91,7 +148,30 @@
  * Datasets.
  */
 public boolean supportsDataset();
+   
+/**
+ * Return the RDF 1.1 serialization syntaxes.
+ * 
+ * This lists the W3C standardized RDF 1.1 syntaxes like {@link 
#TURTLE} and
+ * {@link #JSONLD}. Note the existence of other RDF syntaxes that are 
not
+ * included here, e.g. http://www.w3.org/TeamSubmission/n3/";>N3 and
+ * https://en.wikipedia.org/wiki/TriX_%28syntax%29";>TriX.
+ * 
+ * The syntaxes returned only support the {@link #mediaType()}
+ * and {@link #fileExtension()} as defined in the corresponding 
+ * W3C specification.
+ * 
+ * @return
+ *  A set of the official RDF 1.1 {@link RDFSyntax}es.
+ * 
+ * @see https://www.w3.org/TR/rdf11-primer/#section-graph-syntax";>RDF
+ *  1.1 Primer
+ * @see org.apache.commons.rdf.experimental.RDFParser
+ */
 
+public static Set w3cSyntaxes() {
--- End diff --

This is unnecessary duplication


---
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



[GitHub] commons-rdf pull request #27: COMMONSRDF-47 RDFSyntax as an interface

2017-01-12 Thread ansell
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 fileExtension is compared in lower case, therefore 
it
  * might not be equal to the {@link RDFSyntax#fileExtension} of the 
returned
  * RDFSyntax.
+ * 
+ * The list of syntaxes supported is at least those returned by
+ * {@link #w3cSyntaxes()}.
  * 
  * @param fileExtension
  *The fileExtension to match, starting with .
  * @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 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()}.
+ * 
+ * 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



[Filter] No code?

2017-01-12 Thread Gilles

Hello.

As of today (revision 1778484), the SVN repository
  https://svn.apache.org/repos/asf/commons/sandbox/filter/trunk
is empty. :(

What is the status/roadmap?

Thanks,
Gilles


-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[RESULT][VOTE] Rename "Complex" to "Numbers"

2017-01-12 Thread Gilles

The following people
 Eric Barnhill
 Rob Tompkins
 Jörg Schaible
 Emmanuel Bourg
voted +1

Vote passes.

Gilles

On Mon, 09 Jan 2017 19:02:04 +0100, Gilles wrote:

See discussion thread, copied below.

[ ] Yes
[ ] Yes but I prefer this name: ...
[ ] No, because ...

I'll assume that this is a lazy consensus vote, to be closed in 72 
hours

from now (i.e. on January 12, at 18:00:00 UTC).

Thanks,
Gilles


On Mon, 9 Jan 2017 15:57:51 +, sebb wrote:
On 9 January 2017 at 11:46, Gilles  
wrote:

On Mon, 9 Jan 2017 09:08:18 +0100, Eric Barnhill wrote:


It is overall a fine plan by me. A precision class makes more 
sense than

duplicating equals methods.

From a practical standpoint I think it would be better to see 
Quaternion

in
its own subpackage than with Complex. Simply because I don't use 
them and

packages are better maintained by those who use them.

It is hard to see how the transforms fit in. If anything they 
belong with

the new sigproc libraries.



Fine.

Is there any objection on the name "Commons Numbers"?


Since the namespace belongs to the whole of Commons, this question
should be posed to all of Commons, i.e. using the [ALL] prefix.

Are there better matches for the intended scope? [Or do we want 
that
the scope grows to also contain the "o.a.c.math4.prime" package" 
and
possibly more of number-theoretic functionality (as was proposed 
some

time ago to be added to Commons Math)?]

Shall I wait a couple of days before filing the request with INFRA?
[I.e. to change the "git" repository, JIRA project and github 
mirror.]



Gilles




Eric
On 8 Jan 2017 10:17, "Gilles"  
wrote:



Hi.

How about renaming the component to "Commons Numbers" (or another 
name

if preferred) that would contain the following modules:
 * commons-numbers-core (with classes such as "Precision").
 * commons-numbers-complex
 * commons-numbers-quaternion
 * commons-numbers-fraction
 * commons-numbers-continued-fraction
 * commons-numbers-fft (Fast Fourier Transform)
 * commons-numbers-fct (Fast Cosine Transform)
 * ...
?

Gilles







-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org