Menu

Triple extraction with sujet = _:Doc*-*

Help
2017-06-22
2017-06-22
  • Yves Teissier

    Yves Teissier - 2017-06-22

    Hi everybody,

    I don't find the way find a triple by using the sujet = _:Doc-
    This is the triple:

    "_:Doc0-1"  "rdfs:comment"  ""function VariableTypeValue2ElementVal(in String, out String)
    {
         String inVal = in.GetValue()
         out = inVal
    }"" 
    

    I'm using this code:

    owlcpp::Node_id const* subject = triple_store.find_node_iri("_:Doc0-1");
    
          if( subject ) BOOST_FOREACH(
             owlcpp::Triple const& triple,
             triple_store.find_triple(*subject, owlcpp::any(), owlcpp::any(), owlcpp::any())
          ) {
             std::cout
              << "****************************************************\n"
              << '\"'
              << to_string(triple.subj_, triple_store) << "\"\t\""
              << to_string(triple.pred_, triple_store) << "\"\t\""
              << to_string(triple.obj_, triple_store) << "\"\t\n"
              ;
             // Get the source ID (doc...)
            DocId = to_string(triple.subj_, triple_store);
          }
    

    By I have subject = 0x0

    There're a way to find this triple ?

    Regards,
    Yves Teissier

     
  • M Levin

    M Levin - 2017-06-26

    It does not find your subject and returns a null pointer.
    You are looking for a blank node, right? Have you tried using tripple_store.find_blank(n, did)?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.