def do_serialize(self, line):
        """Serialize an entity into an RDF flavour"""
        opts = self.SERIALIZE_OPTS

        if not self.current:
            self._help_noontology()
            return

        line = line.split()
        g = self.current['graph']

        if not line:
            line = ['turtle']

        if line[0] not in opts:
            self.help_serialize()
            return

        elif self.currentEntity:
            self.currentEntity['object'].printSerialize(line[0])

        else:
            self._print(g.rdf_source(format=line[0]))
def do_serialize ( self , line ) : opts = self . SERIALIZE_OPTS if not self . current : self . _help_noontology ( ) return line = line . split ( ) g = self . current [ 'graph' ] if not line : line = [ 'turtle' ] if line [ 0 ] not in opts : self . help_serialize ( ) return elif self . currentEntity : self . currentEntity [ 'object' ] . printSerialize ( line [ 0 ] ) else : self . _print ( g . rdf_source ( format = line [ 0 ] ) )
Serialize an entity into an RDF flavour