175 std::set< CRDFTriplet> Triplets;
176 std::set< CRDFTriplet>::iterator it;
177 std::set< CRDFTriplet>::iterator end;
179 const sChange * pChange = changes;
184 std::set< CRDFTriplet > Failed;
191 NewPath.push_back(*pNewPath++);
194 while ((Triplets = pGraph->
getTriplets(pChange->
Source,
false)).size() > Failed.size())
197 for (it = Triplets.begin(), end = Triplets.end(); it != end; ++it)
198 if (Failed.find(*it) == Failed.end())
201 if (!
convert(pGraph, *it, NewPath))
224 CurrentPath.pop_back();
228 if (SubPathIndex == 0)
237 if (CurrentPath.size() < newPath.size())
243 CRDFPredicate::AllowedLocationList::const_iterator it = List.begin();
244 CRDFPredicate::AllowedLocationList::const_iterator end = List.end();
246 for (; it != end; ++it)
272 if (Triplets.size() == 0)
282 Object.
setResource(
"http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag",
false);
286 std::set< CRDFTriplet>::iterator it = Triplets.begin();
287 std::set< CRDFTriplet>::iterator end = Triplets.end();
289 for (; it != end; ++it)
321 else if (CurrentPath.size() > newPath.size())
335 Triplet.
Predicate = newPath[SubPathIndex];
343 if (SubPathIndex == newPath.size() - 1)
346 return convert(pGraph, Triplet, newPath);
static bool convert(CRDFGraph *pGraph, const sChange *changes)
static unsigned C_INT32 fixSBMLRdf(std::string &rdfXml)
static sChange SBML2CopasiChanges[]
void removeTriplet(CRDFNode *pSubject, const CRDFPredicate &predicate, CRDFNode *pObject)
std::set< CRDFTriplet > getDescendantsWithPredicate(const CRDFPredicate &predicate) const
const CRDFSubject & getSubject() const
std::vector< sAllowedLocation > AllowedLocationList
CRDFPredicate::ePredicateType Source
CRDFTriplet moveTriplet(CRDFNode *pNewSubject, const CRDFTriplet &triplet)
void setType(const eObjectType &type)
CRDFTriplet addTriplet(const CRDFSubject &subject, const CRDFPredicate &predicate, const CRDFObject &object)
const std::set< CRDFTriplet > & getTriplets() const
CRDFPredicate::Path getPath() const
static size_t getSubPathIndex(const Path &fullPath, const Path ¤tPath)
static const AllowedLocationList & getAllowedLocationList(const ePredicateType &predicate)
void removeEdge(const CRDFPredicate &predicate, CRDFNode *pObject)
void setResource(const std::string &resource, const bool &isLocal)
static bool SBML2Copasi(std::string &XML)
static CCopasiMessage getLastMessage()
const std::string & getURI() const
void setBlankNodeId(const std::string &blankNodeId)
CRDFPredicate::ePredicateType Target[4]
std::string generatedNodeId(const std::string &existingId="")
static CRDFGraph * graphFromXml(const std::string &xml)
CRDFTriplet addEdge(const CRDFPredicate &predicate, CRDFNode *pObject)
std::vector< ePredicateType > Path
static std::string xmlFromGraph(const CRDFGraph *pGraph)