marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ans...@apache.org
Subject git commit: MARMOTTA-260 : Remove sesame-tools-rio-rdfjson
Date Mon, 24 Jun 2013 23:12:57 GMT
Updated Branches:
  refs/heads/develop 467d70557 -> 66015fd5a


MARMOTTA-260 : Remove sesame-tools-rio-rdfjson

The functionality is not provided in the sesame-rio-rdfjson module


Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/66015fd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/66015fd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/66015fd5

Branch: refs/heads/develop
Commit: 66015fd5a4903159b0396d81040964ddda314b78
Parents: 467d705
Author: Peter Ansell <p_ansell@yahoo.com>
Authored: Tue Jun 25 09:11:57 2013 +1000
Committer: Peter Ansell <p_ansell@yahoo.com>
Committed: Tue Jun 25 09:11:57 2013 +1000

----------------------------------------------------------------------
 commons/pom.xml                                 |   1 -
 commons/sesame-tools-rio-rdfjson/pom.xml        | 113 ---------
 .../sesame/rio/rdfjson/RDFJsonParser.java       | 160 -------------
 .../rio/rdfjson/RDFJsonParserFactory.java       |  46 ----
 .../sesame/rio/rdfjson/RDFJsonWriter.java       | 231 -------------------
 .../rio/rdfjson/RDFJsonWriterFactory.java       |  62 -----
 .../services/org.openrdf.rio.RDFParserFactory   |   1 -
 .../services/org.openrdf.rio.RDFWriterFactory   |   1 -
 .../sesame/rio/rdfjson/TestRDFJsonParser.java   | 135 -----------
 .../src/test/resources/logback.xml              |  27 ---
 .../commons/sesame/rio/rdfjson/test-001.json    |  21 --
 .../commons/sesame/rio/rdfjson/test-001.rdf     |  37 ---
 .../ldclient/ldclient-provider-rdf/pom.xml      |   8 +-
 parent/pom.xml                                  |  10 +-
 platform/marmotta-core/pom.xml                  |   8 +-
 15 files changed, 13 insertions(+), 848 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/pom.xml
----------------------------------------------------------------------
diff --git a/commons/pom.xml b/commons/pom.xml
index 4c8ef03..182338c 100644
--- a/commons/pom.xml
+++ b/commons/pom.xml
@@ -56,7 +56,6 @@
         <module>sesame-filter</module>
         <module>sesame-tools-rio-api</module>
         <module>sesame-tools-rio-ical</module>
-        <module>sesame-tools-rio-rdfjson</module>
         <module>sesame-tools-rio-rss</module>
         <module>sesame-tools-rio-vcard</module>
         <module>sesame-tools-facading</module>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/pom.xml
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/pom.xml b/commons/sesame-tools-rio-rdfjson/pom.xml
deleted file mode 100644
index da00181..0000000
--- a/commons/sesame-tools-rio-rdfjson/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-        http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.marmotta</groupId>
-        <artifactId>marmotta-parent</artifactId>
-        <version>3.1.0-incubating-SNAPSHOT</version>
-        <relativePath>../../parent</relativePath>
-    </parent>
-
-    <name>Sesame I/O: RDF/JSON</name>
-    <artifactId>sesame-tools-rio-rdfjson</artifactId>
-    <packaging>jar</packaging>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.marmotta</groupId>
-            <artifactId>sesame-tools-rio-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-api</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-core-asl</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.codehaus.jackson</groupId>
-            <artifactId>jackson-mapper-asl</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-model</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-rio-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-rio-rdfxml</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-query</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-queryparser-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-queryparser-sparql</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-queryalgebra-model</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-queryalgebra-evaluation</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-sail-memory</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.openrdf.sesame</groupId>
-            <artifactId>sesame-repository-sail</artifactId>
-            <scope>test</scope>
-        </dependency>
-        
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParser.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParser.java
b/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParser.java
deleted file mode 100644
index f21dcae..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParser.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.rdfjson;
-
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.type.TypeReference;
-import org.openrdf.model.Resource;
-import org.openrdf.model.Value;
-import org.openrdf.model.ValueFactory;
-import org.openrdf.model.impl.BNodeImpl;
-import org.openrdf.model.impl.URIImpl;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFHandlerException;
-import org.openrdf.rio.RDFParseException;
-import org.openrdf.rio.helpers.RDFParserBase;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * Add file description here!
- * <p/>
- * User: sschaffe
- */
-public class RDFJsonParser extends RDFParserBase {
-
-
-    private static final String HTTP = "http://";
-    private static final String VALUE = "value";
-    private static final String TYPE = "type";
-    private static final String BNODE = "bnode";
-    private static final String URI = "uri";
-    private static final String LANG = "lang";
-    private static final String DATATYPE = "datatype";
-
-    /**
-     * Creates a new RDFParserBase that will use a {@link org.openrdf.model.impl.ValueFactoryImpl}
to
-     * create RDF model objects.
-     */
-    public RDFJsonParser() {
-        super();
-    }
-
-    /**
-     * Creates a new TurtleParser that will use the supplied ValueFactory to
-     * create RDF model objects.
-     *
-     * @param valueFactory A ValueFactory.
-     */
-    public RDFJsonParser(ValueFactory valueFactory) {
-        super(valueFactory);
-    }
-
-    /**
-     * Gets the RDF format that this parser can parse.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.RDFJSON;
-    }
-
-    /**
-     * Parses the data from the supplied InputStream, using the supplied baseURI
-     * to resolve any relative URI references.
-     *
-     * @param in      The InputStream from which to read the data.
-     * @param baseURI The URI associated with the data in the InputStream.
-     * @throws java.io.IOException If an I/O error occurred while data was read from the
InputStream.
-     * @throws org.openrdf.rio.RDFParseException
-     *                             If the parser has found an unrecoverable parse error.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *                             If the configured statement handler has encountered an
-     *                             unrecoverable error.
-     */
-    @Override
-    public void parse(InputStream in, String baseURI) throws IOException, RDFParseException,
RDFHandlerException {
-        ObjectMapper mapper = new ObjectMapper();
-        Map<String,Map<String,Set<Map<String,String>>>> subjects
= mapper.readValue(in, new TypeReference<Map<String,Map<String,Set<Map<String,String>>>>>(){});
-        addToRepository(subjects);
-    }
-
-    /**
-     * Parses the data from the supplied Reader, using the supplied baseURI to
-     * resolve any relative URI references.
-     *
-     * @param reader  The Reader from which to read the data.
-     * @param baseURI The URI associated with the data in the InputStream.
-     * @throws java.io.IOException If an I/O error occurred while data was read from the
InputStream.
-     * @throws org.openrdf.rio.RDFParseException
-     *                             If the parser has found an unrecoverable parse error.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *                             If the configured statement handler has encountered an
-     *                             unrecoverable error.
-     */
-    @Override
-    public void parse(Reader reader, String baseURI) throws IOException, RDFParseException,
RDFHandlerException {
-        ObjectMapper mapper = new ObjectMapper();
-        Map<String,Map<String,Set<Map<String,String>>>> subjects
= mapper.readValue(reader, new TypeReference<Map<String,Map<String,Set<Map<String,String>>>>>(){});
-        addToRepository(subjects);
-    }
-
-
-
-    private void addToRepository(Map<String,Map<String,Set<Map<String,String>>>>
subjects) throws RDFParseException, RDFHandlerException {
-        for(String subjectKey : subjects.keySet() ) {
-            //create subject Resource
-            Resource subject;
-            if(subjectKey.startsWith(HTTP)) {
-                subject = new URIImpl(subjectKey);
-            } else {
-                subject = new BNodeImpl(subjectKey);
-            }
-
-            for(Map.Entry<String, Set<Map<String, String>>> entry : subjects.get(subjectKey).entrySet())
{
-                //create property URI
-                URIImpl property = new URIImpl(entry.getKey());
-
-                for(Map<String,String> o : entry.getValue()) {
-                    //create object resources
-                    Value object;
-
-                    if( o.get(TYPE).equals(URI) ) {
-                        object = createURI(o.get(VALUE));
-                    } else if( o.get(TYPE).equals(BNODE) ) {
-                        object = createBNode(o.get(VALUE));
-                    } else {
-                        if( o.get(LANG) != null ) {
-                            object = createLiteral(o.get(VALUE),o.get(LANG),null);
-                        } else if( o.get(DATATYPE) != null) {
-                            object = createLiteral(o.get(VALUE),null,new URIImpl(o.get(DATATYPE)));
-                        } else {
-                            object = createLiteral(o.get(VALUE),null,null);
-                        }
-                    }
-                    //add triple
-                    rdfHandler.handleStatement(createStatement(subject, property, object));
-                }
-            }
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParserFactory.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParserFactory.java
b/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParserFactory.java
deleted file mode 100644
index b61200b..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonParserFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.rdfjson;
-
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFParser;
-import org.openrdf.rio.RDFParserFactory;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class RDFJsonParserFactory implements RDFParserFactory {
-
-    /**
-     * Returns the RDF format for this factory.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.RDFJSON;
-    }
-
-    /**
-     * Returns a RDFParser instance.
-     */
-    @Override
-    public RDFParser getParser() {
-        return new RDFJsonParser();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriter.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriter.java
b/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriter.java
deleted file mode 100644
index f64ada6..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriter.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.rdfjson;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-
-import org.codehaus.jackson.map.ObjectMapper;
-import org.openrdf.model.BNode;
-import org.openrdf.model.Literal;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFHandlerException;
-import org.openrdf.rio.RDFWriter;
-import org.openrdf.rio.RioSetting;
-import org.openrdf.rio.WriterConfig;
-
-/**
- * RDF/JSON RIO Writer
- * 
- * @author Sebastian Schaffert
- * @author Sergio Fernández
- */
-public class RDFJsonWriter implements RDFWriter {
-
-    private static final String VALUE = "value";
-    private static final String TYPE = "type";
-    private static final String BNODE = "bnode";
-    private static final String URI = "uri";
-    private static final String LITERAL = "literal";
-    private static final String LANG = "lang";
-    private static final String DATATYPE = "datatype";
-
-    private Writer writer;
-    private WriterConfig config;
-    
-    private HashMap<String,HashMap<String,HashSet<HashMap<String,String>>>>
subjects;
-
-    public RDFJsonWriter(OutputStream out) {
-        writer = new OutputStreamWriter(out);
-    }
-
-
-    public RDFJsonWriter(Writer writer) {
-        this.writer = writer;
-    }
-
-    /**
-     * Gets the RDF format that this RDFWriter uses.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.RDFJSON;
-    }
-
-    /**
-     * Signals the start of the RDF data. This method is called before any data
-     * is reported.
-     *
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void startRDF() throws RDFHandlerException {
-        subjects = new HashMap<String,HashMap<String,HashSet<HashMap<String,String>>>>();
-    }
-
-    /**
-     * Signals the end of the RDF data. This method is called when all data has
-     * been reported.
-     *
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void endRDF() throws RDFHandlerException {
-        ObjectMapper mapper = new ObjectMapper();
-        try {
-            mapper.writeValue(writer,subjects);
-        } catch (IOException e) {
-            throw new RDFHandlerException("error while serializing JSON objects",e);
-        }
-    }
-
-    /**
-     * Handles a namespace declaration/definition. A namespace declaration
-     * associates a (short) prefix string with the namespace's URI. The prefix
-     * for default namespaces, which do not have an associated prefix, are
-     * represented as empty strings.
-     *
-     * @param prefix The prefix for the namespace, or an empty string in case of a
-     *               default namespace.
-     * @param uri    The URI that the prefix maps to.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleNamespace(String prefix, String uri) throws RDFHandlerException {
-    	
-    }
-
-    /**
-     * Handles a statement.
-     *
-     * @param st The statement.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleStatement(Statement st) throws RDFHandlerException {
-            // get subject key
-            String subjectKey;
-            if( st.getSubject() instanceof URI) {
-                subjectKey = ((URI)st.getSubject()).stringValue();
-            } else {
-                subjectKey = ((BNode)st.getSubject()).getID();
-            }
-
-            //add or get predicate map
-            HashMap<String,HashSet<HashMap<String,String>>> predicates;
-            if( subjects.containsKey(subjectKey)) {
-                predicates = subjects.get(subjectKey);
-            } else {
-                predicates = new HashMap<String,HashSet<HashMap<String,String>>>();
-                subjects.put(subjectKey,predicates);
-            }
-
-            //get predicate key
-            String predicateKey = st.getPredicate().stringValue();
-
-            //add or get object set
-            HashSet<HashMap<String,String>> objects;
-            if( predicates.containsKey(predicateKey) ) {
-                objects = predicates.get(predicateKey);
-            } else {
-                 objects = new HashSet<HashMap<String,String>>();
-                predicates.put(predicateKey,objects);
-            }
-
-            //add objects
-            HashMap<String,String> object = new HashMap<String,String>();
-            Value objectNode = st.getObject();
-            if( objectNode instanceof Literal) {
-                object.put(TYPE,LITERAL);
-                object.put(VALUE,((Literal)objectNode).stringValue());
-                if(((Literal) objectNode).getLanguage() != null )
-                    object.put(LANG,((Literal) objectNode).getLanguage());
-                if(((Literal) objectNode).getDatatype() != null)
-                    object.put(DATATYPE,((Literal) objectNode).getDatatype().stringValue());
-            } else {
-                if( objectNode instanceof URI ) {
-                    object.put(TYPE,URI);
-                    object.put(VALUE,((URI)objectNode).stringValue());
-                } else {
-                    object.put(TYPE,BNODE);
-                    object.put(VALUE,((BNode)objectNode).getID());
-                }
-            }
-            objects.add(object);
-    }
-
-    /**
-     * Handles a comment.
-     *
-     * @param comment The comment.
-     * @throws org.openrdf.rio.RDFHandlerException
-     *          If the RDF handler has encountered an unrecoverable error.
-     */
-    @Override
-    public void handleComment(String comment) throws RDFHandlerException {
-    	
-    }
-
-    /**
-     * @return A collection of {@link RioSetting}s that are supported by this
-     *         RDFWriter.
-     * @since 2.7.0
-     */
-	@Override
-	public Collection<RioSetting<?>> getSupportedSettings() {
-		return new ArrayList<RioSetting<?>>();
-	}
-
-    /**
-     * Retrieves the current writer configuration as a single object.
-     * 
-     * @return a writer configuration object representing the current
-     *         configuration of the writer.
-     * @since 2.7.0
-     */
-	@Override
-	public WriterConfig getWriterConfig() {
-		return config;
-	}
-
-    /**
-     * Sets all supplied writer configuration options.
-     * 
-     * @param config
-     *        a writer configuration object.
-     * @since 2.7.0
-     */
-	@Override
-	public void setWriterConfig(WriterConfig config) {
-		this.config = config;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriterFactory.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriterFactory.java
b/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriterFactory.java
deleted file mode 100644
index 22dd3b2..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/java/org/apache/marmotta/commons/sesame/rio/rdfjson/RDFJsonWriterFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.rdfjson;
-
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.rio.RDFWriter;
-import org.openrdf.rio.RDFWriterFactory;
-
-import java.io.OutputStream;
-import java.io.Writer;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-public class RDFJsonWriterFactory implements RDFWriterFactory {
-
-    /**
-     * Returns the RDF format for this factory.
-     */
-    @Override
-    public RDFFormat getRDFFormat() {
-        return RDFFormat.RDFJSON;
-    }
-
-    /**
-     * Returns an RDFWriter instance that will write to the supplied output
-     * stream.
-     *
-     * @param out The OutputStream to write the RDF to.
-     */
-    @Override
-    public RDFWriter getWriter(OutputStream out) {
-        return new RDFJsonWriter(out);
-    }
-
-    /**
-     * Returns an RDFWriter instance that will write to the supplied writer.
-     *
-     * @param writer The Writer to write the RDF to.
-     */
-    @Override
-    public RDFWriter getWriter(Writer writer) {
-        return new RDFJsonWriter(writer);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
b/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
deleted file mode 100644
index 0cf0d1a..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFParserFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.marmotta.commons.sesame.rio.rdfjson.RDFJsonParserFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
b/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
deleted file mode 100644
index b224d1c..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/main/resources/META-INF/services/org.openrdf.rio.RDFWriterFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.marmotta.commons.sesame.rio.rdfjson.RDFJsonWriterFactory
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/test/java/org/apache/marmotta/commons/sesame/rio/rdfjson/TestRDFJsonParser.java
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/test/java/org/apache/marmotta/commons/sesame/rio/rdfjson/TestRDFJsonParser.java
b/commons/sesame-tools-rio-rdfjson/src/test/java/org/apache/marmotta/commons/sesame/rio/rdfjson/TestRDFJsonParser.java
deleted file mode 100644
index f6ac7d5..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/test/java/org/apache/marmotta/commons/sesame/rio/rdfjson/TestRDFJsonParser.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.marmotta.commons.sesame.rio.rdfjson;
-/*
- * Copyright (c) 2013 The Apache Software Foundation
- *
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.openrdf.model.BNode;
-import org.openrdf.model.Resource;
-import org.openrdf.model.Statement;
-import org.openrdf.model.URI;
-import org.openrdf.model.Value;
-import org.openrdf.repository.Repository;
-import org.openrdf.repository.RepositoryConnection;
-import org.openrdf.repository.sail.SailRepository;
-import org.openrdf.rio.RDFFormat;
-import org.openrdf.sail.memory.MemoryStore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import static java.util.Arrays.asList;
-import static org.hamcrest.CoreMatchers.everyItem;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.*;
-import static org.junit.Assume.assumeThat;
-
-/**
- * Add file description here!
- * <p/>
- * Author: Sebastian Schaffert
- */
-@RunWith(Parameterized.class)
-public class TestRDFJsonParser {
-
-    private static Logger log = LoggerFactory.getLogger(TestRDFJsonParser.class);
-
-    private String fileName;
-
-    public TestRDFJsonParser(String fileName) {
-        this.fileName = fileName;
-    }
-
-    // return the list of rdf-NNNN.jsonld files
-    @Parameterized.Parameters(name = "{0}")
-    public static Collection<Object[]> data() {
-        ArrayList<Object[]> list = new ArrayList<Object[]>();
-        for(int i=1; i<=1; i++) {
-            list.add(new Object[] {"test-"+String.format("%03d",i)});
-        }
-        return list;
-    }
-
-    @Test
-    public void runTest() throws Exception {
-        log.info("running test {} ...", fileName);
-
-        InputStream rdfJSON = this.getClass().getResourceAsStream(fileName+".json");
-        InputStream rdfXML = this.getClass().getResourceAsStream(fileName+".rdf");
-        assumeThat("Could not load testfiles", asList(rdfJSON, rdfXML), everyItem(notNullValue(InputStream.class)));
-
-        Repository repositoryJSON = new SailRepository(new MemoryStore());
-        repositoryJSON.initialize();
-
-        RepositoryConnection connectionJSON = repositoryJSON.getConnection();
-        try {
-            connectionJSON.add(rdfJSON, "http://localhost/rdfjson/", RDFFormat.RDFJSON);
-            connectionJSON.commit();
-        } catch(Exception ex) {
-            fail("parsing "+fileName+" failed!");
-        }
-        assertTrue(connectionJSON.size() > 0);
-
-
-        Repository repositoryRDF = new SailRepository(new MemoryStore());
-        repositoryRDF.initialize();
-
-        RepositoryConnection connectionRDF = repositoryRDF.getConnection();
-        connectionRDF.add(rdfXML, "http://localhost/rdfjson/", RDFFormat.RDFXML);
-        connectionRDF.commit();
-
-        assertEquals(connectionJSON.size(), connectionRDF.size());
-
-        // check each triple in the RDF/XML whether it exists in the RDF/JSON
-        for(Statement statement : connectionRDF.getStatements(null,null,null,false).asList())
{
-            Resource subject = statement.getSubject() instanceof URI ? statement.getSubject()
: null;
-            URI predicate = statement.getPredicate();
-            Value object = statement.getObject() instanceof BNode ? null : statement.getObject();
-            assertTrue("statement "+statement+" not contained in result",connectionJSON.hasStatement(subject,predicate,object,false));
-        }
-
-        connectionJSON.close();
-        connectionRDF.close();
-
-        repositoryJSON.shutDown();
-        repositoryRDF.shutDown();
-
-    }
-
-
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/test/resources/logback.xml
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/test/resources/logback.xml b/commons/sesame-tools-rio-rdfjson/src/test/resources/logback.xml
deleted file mode 100644
index 1bfecff..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/test/resources/logback.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<configuration>
-    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} %highlight(%level) %cyan(%logger{15}) - %m%n</pattern>
-        </encoder>
-    </appender>
-    <root level="${root-level:-INFO}">
-        <appender-ref ref="CONSOLE"/>
-    </root>
-</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.json
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.json
b/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.json
deleted file mode 100644
index 02e2ee4..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-    "http://example.org/about" : {
-        "http://purl.org/dc/elements/1.1/creator" : [ { "value" : "Anna Wilder", "type" :
"literal" } ],
-        "http://purl.org/dc/elements/1.1/title"   : [ { "value" : "Anna's Homepage", "type"
: "literal", "lang" : "en" } ] ,
-        "http://xmlns.com/foaf/0.1/maker"         : [ { "value" : "_:person", "type" : "bnode"
} ]
-    } ,
-
-    "_:person" : {
-        "http://xmlns.com/foaf/0.1/homepage"      : [ { "value" : "http://example.org/about",
"type" : "uri" } ] ,
-        "http://xmlns.com/foaf/0.1/made"          : [ { "value" : "http://example.org/about",
"type" : "uri" } ] ,
-        "http://xmlns.com/foaf/0.1/name"          : [ { "value" : "Anna Wilder", "type" :
"literal" } ] ,
-        "http://xmlns.com/foaf/0.1/firstName"     : [ { "value" : "Anna", "type" : "literal"
} ] ,
-        "http://xmlns.com/foaf/0.1/surname"       : [ { "value" : "Wilder", "type" : "literal"
} ] ,
-        "http://xmlns.com/foaf/0.1/depiction"     : [ { "value" : "http://example.org/pic.jpg",
"type" : "uri" } ] ,
-        "http://xmlns.com/foaf/0.1/nick"          : [
-            { "type" : "literal", "value" : "wildling"} ,
-            { "type" : "literal", "value" : "wilda" }
-        ] ,
-        "http://xmlns.com/foaf/0.1/mbox_sha1sum"  : [ {  "value" : "69e31bbcf58d432950127593e292a55975bc66fd",
"type" : "literal" } ]
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.rdf
----------------------------------------------------------------------
diff --git a/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.rdf
b/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.rdf
deleted file mode 100644
index 4befdab..0000000
--- a/commons/sesame-tools-rio-rdfjson/src/test/resources/org/apache/marmotta/commons/sesame/rio/rdfjson/test-001.rdf
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to You under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-         xmlns:foaf="http://xmlns.com/foaf/0.1/"
-         xmlns:dc="http://purl.org/dc/elements/1.1/">
-    <rdf:Description rdf:about="http://example.org/about">
-        <dc:creator>Anna Wilder</dc:creator>
-        <dc:title xml:lang="en">Anna's Homepage</dc:title>
-        <foaf:maker rdf:nodeID="person" />
-    </rdf:Description>
-    <rdf:Description rdf:nodeID="person">
-        <foaf:homepage rdf:resource="http://example.org/about" />
-        <foaf:made rdf:resource="http://example.org/about" />
-        <foaf:name>Anna Wilder</foaf:name>
-        <foaf:firstName>Anna</foaf:firstName>
-        <foaf:surname>Wilder</foaf:surname>
-        <foaf:depiction rdf:resource="http://example.org/pic.jpg" />
-        <foaf:nick>wildling</foaf:nick>
-        <foaf:nick>wilda</foaf:nick>
-        <foaf:mbox_sha1sum>69e31bbcf58d432950127593e292a55975bc66fd</foaf:mbox_sha1sum>
-    </rdf:Description>
-</rdf:RDF>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/libraries/ldclient/ldclient-provider-rdf/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-provider-rdf/pom.xml b/libraries/ldclient/ldclient-provider-rdf/pom.xml
index 5241bbe..ab3355a 100644
--- a/libraries/ldclient/ldclient-provider-rdf/pom.xml
+++ b/libraries/ldclient/ldclient-provider-rdf/pom.xml
@@ -45,6 +45,10 @@
 
         <dependency>
             <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-rdfjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
             <artifactId>sesame-rio-rdfxml</artifactId>
         </dependency>
         <dependency>
@@ -59,10 +63,6 @@
             <groupId>com.github.jsonld-java</groupId>
             <artifactId>jsonld-java-sesame</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.marmotta</groupId>
-            <artifactId>sesame-tools-rio-rdfjson</artifactId>
-        </dependency>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 503f0e7..9fda4a6 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -998,6 +998,11 @@
             </dependency>
             <dependency>
                 <groupId>org.openrdf.sesame</groupId>
+                <artifactId>sesame-rio-rdfjson</artifactId>
+                <version>${sesame.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.openrdf.sesame</groupId>
                 <artifactId>sesame-rio-rdfxml</artifactId>
                 <version>${sesame.version}</version>
             </dependency>
@@ -1170,11 +1175,6 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.marmotta</groupId>
-                <artifactId>sesame-tools-rio-rdfjson</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.marmotta</groupId>
                 <artifactId>sesame-tools-rio-rss</artifactId>
                 <version>${project.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/66015fd5/platform/marmotta-core/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/pom.xml b/platform/marmotta-core/pom.xml
index b5412e7..6f4c57c 100644
--- a/platform/marmotta-core/pom.xml
+++ b/platform/marmotta-core/pom.xml
@@ -454,6 +454,10 @@
         </dependency>
         <dependency>
             <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-rdfjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
             <artifactId>sesame-rio-rdfxml</artifactId>
         </dependency>
         <dependency>
@@ -511,10 +515,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.marmotta</groupId>
-            <artifactId>sesame-tools-rio-rdfjson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.marmotta</groupId>
             <artifactId>sesame-tools-rio-rss</artifactId>
         </dependency>
         <dependency>


Mime
View raw message