20 #ifndef GTXLREADERXERCES_H_
21 #define GTXLREADERXERCES_H_
23 #include "GTXLReader.h"
24 #include <xercesc/dom/DOMElement.hpp>
52 virtual shared_ptr<vector<graphs::Hypergraph_sp>>
readGXL(
string filename,
53 unordered_map<IDType,IDType>* oldIDs)
const override;
56 unordered_map<IDType,IDType>* oldRuleIDs =
nullptr,
57 unordered_map<IDType,IDType>* oldGraphIDs =
nullptr)
const override;
64 typedef unordered_map<string, unordered_set<IDType>>
QuantMap;
70 typedef std::tuple<graphs::Rule_sp, GTXLReaderXerces::QuantMap, GTXLReaderXerces::QuantMap>
RuleTriple;
82 unordered_set<IDType>
const& leftQuant,
83 unordered_set<IDType>
const& rightQuant)
const;
94 pair<graphs::Hypergraph_sp,unordered_map<string, IDType>>
readHypergraph(xercesc::DOMElement* graphroot,
95 unordered_map<IDType,IDType>* oldIDs =
nullptr)
const;
105 pair<graphs::AnonHypergraph_sp,unordered_map<string, IDType>>
readAnonHypergraph(xercesc::DOMElement* graphroot)
const;
123 unordered_map<IDType,IDType>* oldIDs,
126 unordered_map<string,IDType>& strToID)
const;
137 unordered_map<IDType,IDType>* oldIDs =
nullptr)
const;
147 unordered_map<string,IDType>& idMap)
const;
193 XMLCh* xmlch_edgeids;
195 XMLCh* xmlch_hypergraph;
202 XMLCh* xmlch_startorder;
206 XMLCh* xmlch_edgemode;
217 XMLCh* xmlch_initial;
221 XMLCh* xmlch_rulegraph;
222 XMLCh* xmlch_mapping;
223 XMLCh* xmlch_mapelem;
227 XMLCh* xmlch_transformationunit;
228 XMLCh* xmlch_quantification;
void checkConsistency(const graphs::Mapping &match, const graphs::Hypergraph &left, const graphs::Hypergraph &right) const
Checks if the input parameters form a correct and consistent Rule.
Definition: GTXLReaderXerces.cpp:858
void readQuantMap(xercesc::DOMElement *root, GTXLReaderXerces::QuantMap &quantMap, unordered_map< string, IDType > &idMap) const
Takes a 'quantification' XML element and extracts the QuantMap from it.
Definition: GTXLReaderXerces.cpp:817
Represents the data structure for a rule including a unique identifier.
Definition: Rule.h:38
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
This class imports GXL or GTXL XML files and converts them to Hypergraph and GTS objects respectively...
Definition: GTXLReader.h:34
GTXLReaderXerces()
Creates a new GTXLReaderXerces object, which includes initialization of the Xerces framework...
Definition: GTXLReaderXerces.cpp:41
bool isEqualIgnoringCase2(const XMLCh *lowerCase, const XMLCh *notLowerCase) const
Checks if the two strings are equal.
Definition: GTXLReaderXerces.cpp:993
unordered_map< string, unordered_set< IDType > > QuantMap
Alias for a map, mapping every quantification name to the set of ID of which it consists.
Definition: GTXLReaderXerces.h:64
pair< graphs::Hypergraph_sp, unordered_map< string, IDType > > readHypergraph(xercesc::DOMElement *graphroot, unordered_map< IDType, IDType > *oldIDs=nullptr) const
This method takes a DOMElement object and tries to extract a Hypergraph out of it.
Definition: GTXLReaderXerces.cpp:482
A Hypergraph represents a graph with a unique identifier.
Definition: Hypergraph.h:35
pair< graphs::AnonHypergraph_sp, unordered_map< string, IDType > > readAnonHypergraph(xercesc::DOMElement *graphroot) const
This method takes a DOMElement object and tries to extract an AnonHypergraph out of it...
Definition: GTXLReaderXerces.cpp:174
This class imports GXL or GTXL XML files and converts them to Hypergraph and GTS objects respectively...
Definition: GTXLReaderXerces.h:37
An AnonHypergraph is a data structure storing a hypergraph.
Definition: AnonHypergraph.h:43
virtual shared_ptr< vector< graphs::Hypergraph_sp > > readGXL(string filename, unordered_map< IDType, IDType > *oldIDs) const override
This method takes a path to a GXL XML-file and reads all hypergraphs stored in it.
Definition: GTXLReaderXerces.cpp:137
virtual ~GTXLReaderXerces()
Destroys the GTXLReaderXerces object.
Definition: GTXLReaderXerces.cpp:88
std::tuple< graphs::Rule_sp, GTXLReaderXerces::QuantMap, GTXLReaderXerces::QuantMap > RuleTriple
Alias for a triple consisting of a rule (first element) and two QuantMaps for the left rule side (sec...
Definition: GTXLReaderXerces.h:70
void convertToQuant(graphs::UQRule &rule, unordered_set< IDType > const &leftQuant, unordered_set< IDType > const &rightQuant) const
Takes the given UQRule and generates a quantification consisting of all specified element in the left...
Definition: GTXLReaderXerces.cpp:579
virtual graphs::GTS_sp readGTXL(string filename, unordered_map< IDType, IDType > *oldRuleIDs=nullptr, unordered_map< IDType, IDType > *oldGraphIDs=nullptr) const override
This method takes a path to a GTXL XML-file and reads the stored GTS.
Definition: GTXLReaderXerces.cpp:489
This class serves as data structure of a universally quantified rule.
Definition: UQRule.h:38
GTXLReaderXerces::RuleTriple readRule(xercesc::DOMElement *ruleroot, unordered_map< IDType, IDType > *oldIDs=nullptr) const
This method takes a DOMElement object and tries to extract a Rule out of it.
Definition: GTXLReaderXerces.cpp:696
unsigned int IDType
IDType is an (unsigned) integer specifically used as an Identifier of graphs, elements of graphs or a...
Definition: globals.h:53
shared_ptr< GTS > GTS_sp
Alias for a shared pointer to a GTS object.
Definition: GTS.h:164