Class JSONWriter

  • All Implemented Interfaces:
    AutoCloseable, org.apache.any23.writer.FormatWriter, org.apache.any23.writer.TripleHandler, org.apache.any23.writer.TripleWriter

    @Deprecated
    public class JSONWriter
    extends TripleWriterHandler
    implements org.apache.any23.writer.FormatWriter
    Deprecated.
    since 2.3. Use JSONLDWriter instead.
    Implementation of JSON TripleWriter.
    Author:
    Michele Mostarda (mostarda@fbk.eu)
    • Constructor Detail

      • JSONWriter

        public JSONWriter​(OutputStream os)
        Deprecated.
    • Method Detail

      • startDocument

        public void startDocument​(org.eclipse.rdf4j.model.IRI documentIRI)
                           throws org.apache.any23.writer.TripleHandlerException
        Deprecated.
        Description copied from class: TripleWriterHandler
        Writers may override this method to handle a "startDocument" extraction event. The default implementation does nothing.
        Specified by:
        startDocument in interface org.apache.any23.writer.TripleHandler
        Overrides:
        startDocument in class TripleWriterHandler
        Parameters:
        documentIRI - the name of the document that was started
        Throws:
        org.apache.any23.writer.TripleHandlerException - if an error occurred while responding to a "startDocument" extraction event.
      • writeTriple

        public void writeTriple​(org.eclipse.rdf4j.model.Resource s,
                                org.eclipse.rdf4j.model.IRI p,
                                org.eclipse.rdf4j.model.Value o,
                                org.eclipse.rdf4j.model.Resource g)
                         throws org.apache.any23.writer.TripleHandlerException
        Deprecated.
        Specified by:
        writeTriple in interface org.apache.any23.writer.TripleWriter
        Throws:
        org.apache.any23.writer.TripleHandlerException
      • writeNamespace

        public void writeNamespace​(String prefix,
                                   String uri)
                            throws org.apache.any23.writer.TripleHandlerException
        Deprecated.
        Specified by:
        writeNamespace in interface org.apache.any23.writer.TripleWriter
        Throws:
        org.apache.any23.writer.TripleHandlerException
      • endDocument

        public void endDocument​(org.eclipse.rdf4j.model.IRI documentIRI)
                         throws org.apache.any23.writer.TripleHandlerException
        Deprecated.
        Description copied from class: TripleWriterHandler
        Writers may override this method to handle an "endDocument" extraction event. The default implementation does nothing.
        Specified by:
        endDocument in interface org.apache.any23.writer.TripleHandler
        Overrides:
        endDocument in class TripleWriterHandler
        Parameters:
        documentIRI - the document IRI.
        Throws:
        org.apache.any23.writer.TripleHandlerException - if an error occurred while responding to a "endDocument" extraction event.
      • close

        public void close()
                   throws org.apache.any23.writer.TripleHandlerException
        Deprecated.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface org.apache.any23.writer.TripleHandler
        Specified by:
        close in interface org.apache.any23.writer.TripleWriter
        Throws:
        org.apache.any23.writer.TripleHandlerException
      • isAnnotated

        public boolean isAnnotated()
        Deprecated.
        Specified by:
        isAnnotated in interface org.apache.any23.writer.FormatWriter
      • setAnnotated

        public void setAnnotated​(boolean f)
        Deprecated.
        Specified by:
        setAnnotated in interface org.apache.any23.writer.FormatWriter