lib/buhos/graphml_builder.rb
# Return a string with GraphML XML
# @return  [String]
Return a string with GraphML XML
Return a string with GraphML XML
def generate_graphml
      ars=AnalysisSystematicReview.new(@sr)
      if @stage
        cd_hash=CanonicalDocument.where(:id=>@sr.cd_id_by_stage(@stage)).order(:year).as_hash
      else
        cd_hash=@sr.canonical_documents.order(:year).as_hash
      end
      head=build_head
      nodos = build_nodes(ars, cd_hash)
      edges= build_edges(ars, cd_hash)
      footer="\n</graph>\n</graphml>"
      [head, nodos, edges, footer].join("\n")
    end
def generate_graphml ars = AnalysisSystematicReview . new ( @sr ) if @stage cd_hash = CanonicalDocument . where ( :id => @sr . cd_id_by_stage ( @stage ) ) . order ( :year ) . as_hash else cd_hash = @sr . canonical_documents . order ( :year ) . as_hash end head = build_head nodos = build_nodes ( ars , cd_hash ) edges = build_edges ( ars , cd_hash ) footer = "\n</graph>\n</graphml>" [ head , nodos , edges , footer ] . join ( "\n" ) end
Return a string with GraphML XML
Return a string with GraphML XML
None
String