Main Page | Class Hierarchy | Class List | File List | Class Members

joinxmldoc.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _JOINXMLDOC_H
00004 #define _JOINXMLDOC_H
00005 
00006 #include "joingrps.h"
00007 #include "idreferl.h"
00008 #include "domid.h"
00009 #include "teiheader.h"
00010 #include "joinprolog.h"
00011 #include <string>
00012 #include <vector> 
00013 #include <fstream>
00014 
00017 class JoinXMLDoc:public IdRefErl {
00018  protected:
00019   DomId joinDom;             // Domeinuaren identifikatzailea <TEXT ID=joinDom>
00020   JoinProlog prolog;          // XML dokumentuaren prolog-a
00021   JoinGrpS jGrpS;            // Join taldeak dituen dokumentua
00022 
00023  public:
00024 
00028   JoinXMLDoc(const DomId & domId);
00029   
00033   JoinXMLDoc(const JoinXMLDoc & joinDoc);
00034 
00036   virtual ~JoinXMLDoc();
00037 
00042   JoinXMLDoc& operator=(const JoinXMLDoc & joinDoc);
00043 
00047   DomId      getDom() const;
00048 
00052   void putDom ( const DomId & domId);
00053     
00058   std::string getRefFitx(const DomId & domId) const;
00059   
00064   std::vector <std::string> getRefFitx(const RefType & rt) const;
00065   
00070   std::vector <DomId> getRefDom(const RefType & rt) const;
00071 
00078   void addRefFitx(const RefType & rt, const DomId & d, const std::string & f, const bool system=true);
00079 
00083   void removeRefFitx(const DomId & d);
00084 
00088   void removeRefFitx(const std::string & fitx);
00089   
00092   void begin();
00093 
00096   void next();
00097   
00101   bool ready() const;
00102 
00106   JoinGrp current() const;
00107 
00108   
00109   std::vector<JoinGrpType> getJoinGrpTypes() const;
00110   JoinGrp getJoinGrp(const JoinGrpType &) const;
00111   void addJoinGrp(const JoinGrp  &);
00112 
00113 
00114   void addJoin(const JoinGrpType &, const Join &);
00115   void removeJoin(const JoinGrpType &, const Join &);
00116 
00120   unsigned size() const;
00121 
00126   unsigned size(const JoinGrpType & jgt) const;
00127 
00132   bool contains(const JoinId & joinId) const;
00133 
00138   Join get(const JoinId & joinId) const;
00139 
00145   Join get(const JoinGrpType& jgt, const unsigned pos) const;    // JoinGrp-aren pos. joina
00146 
00147   /* ** BILAKETAK ************************************************************** */
00148   /* 1. -> Join guztien artean, targets artean id duten linkak bilatu eta itzuli */
00149   /* 2. -> Join guztien artean, targets-en artean tt posizioan id duten linkak   */
00150   /*       bilatu eta itzuli                                                     */
00151   /* 3. -> Join guztien artean,targets-en arten tt1 posizioan id duten linken    */
00152   /*       tt2 Idak bilatu eta itzuli                                            */
00153   /* *************************************************************************** */
00154 
00159   std::vector<Join> find (const Id & id);
00160 
00166   std::vector<Join> find (const TargetName & n, const Id & id);
00167   
00174   std::vector<Id> find (const TargetName & n1, const Id & id1, const TargetName & nResult);
00175   
00181   std::vector<Join> find (const unsigned int & pos, const Id & id);
00182 
00189   std::vector<Id> find (const unsigned int & pos1, const Id & id, const unsigned int & pos2);
00190 
00191   
00192  private:
00193 
00194   void writeDocument(XMLSimpleStruct*) const throw (char*);
00195   void readDocument(XMLSimpleStruct*) throw (char*);
00196   
00197 };
00198 #endif //_JOINXMLDOC_H

Generated on Tue Sep 11 12:07:43 2007 for libIXAml by doxygen 1.3.5