/*
 * Copyright 2016 Amherst College
 *
 * 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.
 */
package edu.amherst.acdc.trellis.spi;

import java.io.OutputStream;
import java.util.stream.Stream;

import edu.amherst.acdc.trellis.api.Event;
import org.apache.commons.rdf.api.IRI;
import org.apache.commons.rdf.api.Triple;

/**
 * The SerializationService defines methods for serializing RDF streams
 * in a concrete RDF 1.1 syntax.
 *
 * @author acoburn
 */
public interface SerializationService {

    /**
     * Serialize the triple stream as RDF
     * @param triples the stream of triples
     * @param output the output stream
     * @param contentType the output format
     */
    void serialize(Stream<Triple> triples, OutputStream output, String contentType);

    /**
     * Serialize the triple stream as RDF
     * @param triples the stream of triples
     * @param output the output stream
     * @param contentType the output format
     * @param profile additional profile information used for output
     */
    void serialize(Stream<Triple> triples, OutputStream output, String contentType, String profile);


    /**
     * Serialize an event as RDF
     * @param event the event
     * @param output the output stream
     * @param contentType the output format
     */
    void serialize(Event event, OutputStream output, String contentType);
}

@@ -774,11 +774,17 @@
 api.
-IRI
+RDFSyntax
 ;%0Aim
@@ -1143,35 +1143,30 @@
    * @param 
-contentType
+syntax
  the output 
@@ -1244,34 +1244,32 @@
 output, 
-String contentType
+RDFSyntax syntax
 );%0A%0A    
@@ -1407,35 +1407,30 @@
    * @param 
-contentType
+syntax
  the output 
@@ -1577,34 +1577,32 @@
 output, 
-String contentType
+RDFSyntax syntax
 , String
@@ -1738,27 +1738,22 @@
  @param 
-contentType
+syntax
  the out
@@ -1828,26 +1828,24 @@
 ut, 
-String contentType
+RDFSyntax syntax
 );%0A%7D

use RDFSyntax in serialization service