Class TriXWriter

    • Field Detail

      • xmlWriter

        private final XMLWriter xmlWriter
      • inActiveContext

        private boolean inActiveContext
      • convertRDFStar

        private boolean convertRDFStar
      • currentContext

        private Resource currentContext
    • Constructor Detail

      • TriXWriter

        public TriXWriter​(java.io.OutputStream out)
        Creates a new TriXWriter that will write to the supplied OutputStream.
        Parameters:
        out - The OutputStream to write the RDF/XML document to.
      • TriXWriter

        public TriXWriter​(java.io.Writer writer)
        Creates a new TriXWriter that will write to the supplied Writer.
        Parameters:
        writer - The Writer to write the RDF/XML document to.
      • TriXWriter

        protected TriXWriter​(XMLWriter xmlWriter)
    • Method Detail

      • getWriter

        public java.io.Writer getWriter()
        Description copied from interface: CharSink
        get the Writer used by this CharSink.
        Specified by:
        getWriter in interface CharSink
        Returns:
        an Writer
      • endRDF

        public void endRDF()
                    throws RDFHandlerException
        Description copied from interface: RDFHandler
        Signals the end of the RDF data. This method is called when all data has been reported.
        Specified by:
        endRDF in interface RDFHandler
        Throws:
        RDFHandlerException - If the RDF handler has encountered an unrecoverable error.
      • handleNamespace

        public void handleNamespace​(java.lang.String prefix,
                                    java.lang.String name)
        Description copied from interface: RDFHandler
        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.
        Specified by:
        handleNamespace in interface RDFHandler
        Overrides:
        handleNamespace in class AbstractRDFWriter
        Parameters:
        prefix - The prefix for the namespace, or an empty string in case of a default namespace.
        name - The URI that the prefix maps to.
      • contextsEquals

        private static boolean contextsEquals​(Resource context1,
                                              Resource context2)