How to use the sbol3.SBOL2Serialize.serialize_sboll2 function in sbol3

To help you get started, we’ve selected a few sbol3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SynBioDex / pySBOL / sbol3 / document.py View on Github external
def doc_serialize_rdf2xml(self, outfile):
        """
        Serialize RDF XML.
        :param outfile: output file
        :return: None
        """
        self.update_graph()
        rdf = SBOL2Serialize.serialize_sboll2(self.graph).decode('utf-8')
        self.logger.debug("RDF: "+ rdf)
        self.logger.debug("TYPE: " + str(type(rdf)))
        with open(outfile, 'w') as out:
            out.write(rdf)
            out.flush()