Difference between revisions of "Concept:Seminar/Java"

From BITPlan Wiki
Jump to navigation Jump to search
(created by WikiTask 2017-09-14T13:05:45Z)
 
m (created by WikiTask 2017-12-09T14:23:48Z)
 
(9 intermediate revisions by the same user not shown)
Line 37: Line 37:
  
 
     /**
 
     /**
     * get the propertySidif of the given property
+
     * get the SiDIF representation of the given property
 
     *  
 
     *  
     * @param name
+
     * @param name - the name of the property
     * @param value
+
     * @param value - the value of the property
     * @return
+
    * @param type - the type of the property
 +
     * @return - the SiDIF Sting representation of the property
 
     */
 
     */
 
     public static String propertySiDIF(String name, String value, String type) {
 
     public static String propertySiDIF(String name, String value, String type) {
       // default is an empty string - no property line for emtpy values
+
       // default is a comment line which can be filled by uncommenting
       String result = "";
+
       String result = String.format("# is is %s of it\n",name);;
 
       // if the value is not empty
 
       // if the value is not empty
 
       if ((value != null) && (!("".equals(value.trim())))) {
 
       if ((value != null) && (!("".equals(value.trim())))) {
Line 56: Line 57:
 
         // create a SIDIF Property line like
 
         // create a SIDIF Property line like
 
         // "John" is lastname of it
 
         // "John" is lastname of it
         result += quote + value + quote + " is " + name + " of it\n";
+
         // convert double quotes to single quotes - FIXME - should we escape instead?
 +
        value=value.replace("\"","'");
 +
        result = String.format("%s%s%s is %s of it\n",quote,value,quote,name);
 
       }
 
       }
 
       // return the SiDIF property line
 
       // return the SiDIF property line
Line 96: Line 99:
 
   } // TopicBase
 
   } // TopicBase
 
  /**
 
  /**
   * ZAnswer
+
   * Seminar
   * A ZAnswer is an answer to a Z-Question - it consist of a pair of terms that 'fit'
+
   * Ein Seminar ist die Durchfuehrung einer Ausbildungsveranstaltung an einem bestimmten Ort in einem bestimmten Zeitraum zu einem bestimmten Thema
 
   */
 
   */
   public static class ZAnswer extends TopicBase {
+
   public static class Seminar extends TopicBase {
 
    
 
    
     public String left;
+
     public String kind;
     public String right;
+
     public String lang;
     public String question;
+
     public String year;
 +
    public String month;
 +
    public String price;
 +
    public String inHouse;
 +
    public String exam_fee;
 +
    public String from;
 +
    public String modeldayprice;
 +
    public String to;
 +
    public String title;
 +
    public String contact;
 +
    public String customer;
 +
    public String documentation;
 +
    public String trainer;
 +
    public String city;
 +
    public String thema;
  
     public String getLeft() { return left; }
+
     public String getKind() { return kind; }
     public void setLeft(String pLeft) { left=pLeft; }
+
     public void setKind(String pKind) { kind=pKind; }
     public String getRight() { return right; }
+
     public String getLang() { return lang; }
     public void setRight(String pRight) { right=pRight; }
+
     public void setLang(String pLang) { lang=pLang; }
     public String getQuestion() { return question; }
+
     public String getYear() { return year; }
     public void setQuestion(String pQuestion) { question=pQuestion; }
+
     public void setYear(String pYear) { year=pYear; }
 +
    public String getMonth() { return month; }
 +
    public void setMonth(String pMonth) { month=pMonth; }
 +
    public String getPrice() { return price; }
 +
    public void setPrice(String pPrice) { price=pPrice; }
 +
    public String getInHouse() { return inHouse; }
 +
    public void setInHouse(String pInHouse) { inHouse=pInHouse; }
 +
    public String getExam_fee() { return exam_fee; }
 +
    public void setExam_fee(String pExam_fee) { exam_fee=pExam_fee; }
 +
    public String getFrom() { return from; }
 +
    public void setFrom(String pFrom) { from=pFrom; }
 +
    public String getModeldayprice() { return modeldayprice; }
 +
    public void setModeldayprice(String pModeldayprice) { modeldayprice=pModeldayprice; }
 +
    public String getTo() { return to; }
 +
    public void setTo(String pTo) { to=pTo; }
 +
    public String getTitle() { return title; }
 +
    public void setTitle(String pTitle) { title=pTitle; }
 +
    public String getContact() { return contact; }
 +
    public void setContact(String pContact) { contact=pContact; }
 +
    public String getCustomer() { return customer; }
 +
    public void setCustomer(String pCustomer) { customer=pCustomer; }
 +
    public String getDocumentation() { return documentation; }
 +
    public void setDocumentation(String pDocumentation) { documentation=pDocumentation; }
 +
    public String getTrainer() { return trainer; }
 +
    public void setTrainer(String pTrainer) { trainer=pTrainer; }
 +
    public String getCity() { return city; }
 +
    public void setCity(String pCity) { city=pCity; }
 +
    public String getThema() { return thema; }
 +
    public void setThema(String pThema) { thema=pThema; }
 
     /**
 
     /**
     * convert this ZAnswer to a JSON string
+
     * convert this Seminar to a JSON string
 
     */
 
     */
 
     public String toJson() { return JSON.toJSONString(this); }
 
     public String toJson() { return JSON.toJSONString(this); }
  
 
     /**
 
     /**
     * convert this ZAnswer to a WikiSon string
+
     * convert this Seminar to a WikiSon string
 +
    * @return the WikiSon representation of this Seminar
 
     */
 
     */
 
     public String toWikiSon() {
 
     public String toWikiSon() {
       String wikison= "{{ZAnswer\n";
+
       String wikison= "{{Seminar\n";
       wikison+=toWikiSon("left",left);
+
       wikison+=toWikiSon("kind",kind);
       wikison+=toWikiSon("right",right);
+
       wikison+=toWikiSon("lang",lang);
       wikison+=toWikiSon("question",question);
+
       wikison+=toWikiSon("year",year);
 +
      wikison+=toWikiSon("month",month);
 +
      wikison+=toWikiSon("price",price);
 +
      wikison+=toWikiSon("inHouse",inHouse);
 +
      wikison+=toWikiSon("exam_fee",exam_fee);
 +
      wikison+=toWikiSon("from",from);
 +
      wikison+=toWikiSon("modeldayprice",modeldayprice);
 +
      wikison+=toWikiSon("to",to);
 +
      wikison+=toWikiSon("title",title);
 +
      wikison+=toWikiSon("contact",contact);
 +
      wikison+=toWikiSon("customer",customer);
 +
      wikison+=toWikiSon("documentation",documentation);
 +
      wikison+=toWikiSon("trainer",trainer);
 +
      wikison+=toWikiSon("city",city);
 +
      wikison+=toWikiSon("thema",thema);
 
       wikison+="}}\n";
 
       wikison+="}}\n";
 
       return wikison;
 
       return wikison;
 +
    }
 +
 +
    /**
 +
    * convert this Seminar to a SiDIF string
 +
    * @return the SiDIF representation of this Seminar
 +
    */
 +
    public String toSiDIF() {
 +
      String siDIF = String.format("%s isA Seminar\n",this.pageid);
 +
      siDIF+=propertySiDIF("kind",kind,"Page");
 +
      siDIF+=propertySiDIF("lang",lang,"Text");
 +
      siDIF+=propertySiDIF("year",year,"Text");
 +
      siDIF+=propertySiDIF("month",month,"Text");
 +
      siDIF+=propertySiDIF("price",price,"Number");
 +
      siDIF+=propertySiDIF("inHouse",inHouse,"Boolean");
 +
      siDIF+=propertySiDIF("exam_fee",exam_fee,"Number");
 +
      siDIF+=propertySiDIF("from",from,"Date");
 +
      siDIF+=propertySiDIF("modeldayprice",modeldayprice,"Number");
 +
      siDIF+=propertySiDIF("to",to,"Date");
 +
      siDIF+=propertySiDIF("title",title,"Text");
 +
      siDIF+=propertySiDIF("contact",contact,"Text");
 +
      siDIF+=propertySiDIF("customer",customer,"Text");
 +
      siDIF+=propertySiDIF("documentation",documentation,"Text");
 +
      siDIF+=propertySiDIF("trainer",trainer,"Page");
 +
      siDIF+=propertySiDIF("city",city,"Page");
 +
      siDIF+=propertySiDIF("thema",thema,"Page");
 +
      return siDIF;
 
     }
 
     }
 
   
 
   
Line 134: Line 220:
  
 
     /**
 
     /**
     * default constructor for ZAnswer
+
     * default constructor for Seminar
 
     */
 
     */
     public ZAnswer() {}
+
     public Seminar() {}
  
 
     /**
 
     /**
     * construct a ZAnswer from the given Triple
+
     * construct a Seminar from the given Triple
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
     * @param pZAnswerTriple - the triple to construct me from
+
     * @param pSeminarTriple - the triple to construct me from
 
     */
 
     */
     public ZAnswer(TripleQuery query,Triple pZAnswerTriple) {
+
     public Seminar(TripleQuery query,Triple pSeminarTriple) {
       this(query,pZAnswerTriple.getSubject().toString());
+
       this(query,pSeminarTriple.getSubject().toString());
 
     } // constructor
 
     } // constructor
  
 
     /**
 
     /**
     * construct a ZAnswer from the given pageId
+
     * construct a Seminar from the given pageId
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
 
     * @param pageid - pageid
 
     * @param pageid - pageid
 
     */
 
     */
     public ZAnswer(TripleQuery query,String pageid) {
+
     public Seminar(TripleQuery query,String pageid) {
 
       this.pageid=pageid;
 
       this.pageid=pageid;
       Triple leftTriple=query.selectSingle(pageid,"left",null);
+
       Triple kindTriple=query.selectSingle(pageid,"kind",null);
       if (leftTriple==null)
+
       if (kindTriple==null)
         leftTriple=query.selectSingle(pageid,"Property:ZAnswer_left",null);
+
         kindTriple=query.selectSingle(pageid,"Property:Seminar_kind",null);
       if (leftTriple!=null)  
+
       if (kindTriple!=null)  
         left=leftTriple.getObject().toString();
+
         kind=kindTriple.getObject().toString();
       Triple rightTriple=query.selectSingle(pageid,"right",null);
+
       Triple langTriple=query.selectSingle(pageid,"lang",null);
       if (rightTriple==null)
+
       if (langTriple==null)
         rightTriple=query.selectSingle(pageid,"Property:ZAnswer_right",null);
+
         langTriple=query.selectSingle(pageid,"Property:Seminar_lang",null);
       if (rightTriple!=null)  
+
       if (langTriple!=null)  
         right=rightTriple.getObject().toString();
+
         lang=langTriple.getObject().toString();
       Triple questionTriple=query.selectSingle(pageid,"question",null);
+
       Triple yearTriple=query.selectSingle(pageid,"year",null);
       if (questionTriple==null)
+
       if (yearTriple==null)
         questionTriple=query.selectSingle(pageid,"Property:ZAnswer_question",null);
+
         yearTriple=query.selectSingle(pageid,"Property:Seminar_year",null);
       if (questionTriple!=null)  
+
       if (yearTriple!=null)  
         question=questionTriple.getObject().toString();
+
         year=yearTriple.getObject().toString();
 +
      Triple monthTriple=query.selectSingle(pageid,"month",null);
 +
      if (monthTriple==null)
 +
        monthTriple=query.selectSingle(pageid,"Property:Seminar_month",null);
 +
      if (monthTriple!=null)
 +
        month=monthTriple.getObject().toString();
 +
      Triple priceTriple=query.selectSingle(pageid,"price",null);
 +
      if (priceTriple==null)
 +
        priceTriple=query.selectSingle(pageid,"Property:Seminar_price",null);
 +
      if (priceTriple!=null)
 +
        price=priceTriple.getObject().toString();
 +
      Triple inHouseTriple=query.selectSingle(pageid,"inHouse",null);
 +
      if (inHouseTriple==null)
 +
        inHouseTriple=query.selectSingle(pageid,"Property:Seminar_inHouse",null);
 +
      if (inHouseTriple!=null)
 +
        inHouse=inHouseTriple.getObject().toString();
 +
      Triple exam_feeTriple=query.selectSingle(pageid,"exam_fee",null);
 +
      if (exam_feeTriple==null)
 +
        exam_feeTriple=query.selectSingle(pageid,"Property:Seminar_exam_fee",null);
 +
      if (exam_feeTriple!=null)
 +
        exam_fee=exam_feeTriple.getObject().toString();
 +
      Triple fromTriple=query.selectSingle(pageid,"from",null);
 +
      if (fromTriple==null)
 +
        fromTriple=query.selectSingle(pageid,"Property:Seminar_from",null);
 +
      if (fromTriple!=null)
 +
        from=fromTriple.getObject().toString();
 +
      Triple modeldaypriceTriple=query.selectSingle(pageid,"modeldayprice",null);
 +
      if (modeldaypriceTriple==null)
 +
        modeldaypriceTriple=query.selectSingle(pageid,"Property:Seminar_modeldayprice",null);
 +
      if (modeldaypriceTriple!=null)
 +
        modeldayprice=modeldaypriceTriple.getObject().toString();
 +
      Triple toTriple=query.selectSingle(pageid,"to",null);
 +
      if (toTriple==null)
 +
        toTriple=query.selectSingle(pageid,"Property:Seminar_to",null);
 +
      if (toTriple!=null)
 +
        to=toTriple.getObject().toString();
 +
      Triple titleTriple=query.selectSingle(pageid,"title",null);
 +
      if (titleTriple==null)
 +
        titleTriple=query.selectSingle(pageid,"Property:Seminar_title",null);
 +
      if (titleTriple!=null)
 +
        title=titleTriple.getObject().toString();
 +
      Triple contactTriple=query.selectSingle(pageid,"contact",null);
 +
      if (contactTriple==null)
 +
        contactTriple=query.selectSingle(pageid,"Property:Seminar_contact",null);
 +
      if (contactTriple!=null)
 +
        contact=contactTriple.getObject().toString();
 +
      Triple customerTriple=query.selectSingle(pageid,"customer",null);
 +
      if (customerTriple==null)
 +
        customerTriple=query.selectSingle(pageid,"Property:Seminar_customer",null);
 +
      if (customerTriple!=null)
 +
        customer=customerTriple.getObject().toString();
 +
      Triple documentationTriple=query.selectSingle(pageid,"documentation",null);
 +
      if (documentationTriple==null)
 +
        documentationTriple=query.selectSingle(pageid,"Property:Seminar_documentation",null);
 +
      if (documentationTriple!=null)
 +
        documentation=documentationTriple.getObject().toString();
 +
      Triple trainerTriple=query.selectSingle(pageid,"trainer",null);
 +
      if (trainerTriple==null)
 +
        trainerTriple=query.selectSingle(pageid,"Property:Seminar_trainer",null);
 +
      if (trainerTriple!=null)
 +
        trainer=trainerTriple.getObject().toString();
 +
      Triple cityTriple=query.selectSingle(pageid,"city",null);
 +
      if (cityTriple==null)
 +
        cityTriple=query.selectSingle(pageid,"Property:Seminar_city",null);
 +
      if (cityTriple!=null)
 +
        city=cityTriple.getObject().toString();
 +
      Triple themaTriple=query.selectSingle(pageid,"thema",null);
 +
      if (themaTriple==null)
 +
        themaTriple=query.selectSingle(pageid,"Property:Seminar_thema",null);
 +
      if (themaTriple!=null)
 +
        thema=themaTriple.getObject().toString();
 
       init(query);
 
       init(query);
     } // constructor for ZAnswer
+
     } // constructor for Seminar
 
      
 
      
     // >>>{user defined topic code}{ZAnswer}{ZAnswer}
+
     // >>>{user defined topic code}{Seminar}{Seminar}
     // <<<{user defined topic code}{ZAnswer}{ZAnswer}
+
     // <<<{user defined topic code}{Seminar}{Seminar}
   } // class ZAnswer
+
   } // class Seminar
 
   /**
 
   /**
   * Manager for ZAnswer
+
   * Manager for Seminar
 
   */
 
   */
   public static class ZAnswerManager extends TopicBase {
+
   public static class SeminarManager extends TopicBase {
 
   
 
   
     public String topicName="ZAnswer";
+
     public String topicName="Seminar";
     public transient List<ZAnswer> mZAnswers=new ArrayList<ZAnswer>();
+
     public transient List<Seminar> mSeminars=new ArrayList<Seminar>();
     public transient Map<String,ZAnswer> mZAnswerMap=new LinkedHashMap<String,ZAnswer>();
+
     public transient Map<String,Seminar> mSeminarMap=new LinkedHashMap<String,Seminar>();
  
 
     /**
 
     /**
     * get my ZAnswers
+
     * get my Seminars
 
     */
 
     */
     public List<ZAnswer> getZAnswers() {
+
     public List<Seminar> getSeminars() {
       List<ZAnswer> result=this.mZAnswers;
+
       List<Seminar> result=this.mSeminars;
 
       return result;
 
       return result;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new ZAnswer
+
     *  add a new Seminar
 
     */
 
     */
     public ZAnswer add(ZAnswer pZAnswer) {
+
     public Seminar add(Seminar pSeminar) {
       mZAnswers.add(pZAnswer);
+
       mSeminars.add(pSeminar);
       mZAnswerMap.put(pZAnswer.getPageid(),pZAnswer);
+
       mSeminarMap.put(pSeminar.getPageid(),pSeminar);
       return pZAnswer;
+
       return pSeminar;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new ZAnswer from the given triple
+
     *  add a new Seminar from the given triple
 
     */
 
     */
     public ZAnswer add(TripleQuery query,Triple pZAnswerTriple) {
+
     public Seminar add(TripleQuery query,Triple pSeminarTriple) {
       ZAnswer lZAnswer=new ZAnswer(query,pZAnswerTriple);
+
       Seminar lSeminar=new Seminar(query,pSeminarTriple);
       add(lZAnswer);
+
       add(lSeminar);
       return lZAnswer;
+
       return lSeminar;
 
     }
 
     }
  
     // reinitialize my mZAnswer map
+
     // reinitialize my mSeminar map
 
     public void reinit() {
 
     public void reinit() {
       mZAnswerMap.clear();
+
       mSeminarMap.clear();
       for (ZAnswer lZAnswer:mZAnswers) {
+
       for (Seminar lSeminar:mSeminars) {
         mZAnswerMap.put(lZAnswer.getPageid(),lZAnswer);
+
         mSeminarMap.put(lSeminar.getPageid(),lSeminar);
 
       }
 
       }
 
     }
 
     }
Line 222: Line 378:
 
      
 
      
 
     // get a new manager from the given json string
 
     // get a new manager from the given json string
     public static ZAnswerManager fromJson(String json) {
+
     public static SeminarManager fromJson(String json) {
       ZAnswerManager result=JSON.parseObject(json, ZAnswerManager.class);
+
       SeminarManager result=JSON.parseObject(json, SeminarManager.class);
 
       result.reinit();
 
       result.reinit();
 
       return result;
 
       return result;
 
     }
 
     }
  
     // default constructor for ZAnswer Manager
+
     // default constructor for Seminar Manager
     public ZAnswerManager() {}
+
     public SeminarManager() {}
  
     // add ZAnswers from the given query
+
     // add Seminars from the given query
     public void addZAnswers(TripleQuery pZAnswerQuery,TripleQuery query) {
+
     public void addSeminars(TripleQuery pSeminarQuery,TripleQuery query) {
       if (pZAnswerQuery!=null) {
+
       if (pSeminarQuery!=null) {
         for (Triple lZAnswerTriple:pZAnswerQuery.getTriples()) {
+
         for (Triple lSeminarTriple:pSeminarQuery.getTriples()) {
           add(query,lZAnswerTriple);
+
           add(query,lSeminarTriple);
 
         }
 
         }
 
       }
 
       }
Line 241: Line 397:
  
 
     // construct me from the given triple Query query
 
     // construct me from the given triple Query query
     public ZAnswerManager(TripleQuery query) {
+
     public SeminarManager(TripleQuery query) {
 
       // first query the SiDIF bases triplestore
 
       // first query the SiDIF bases triplestore
       TripleQuery lZAnswerQuery=query.query(null,"isA","ZAnswer");
+
       TripleQuery lSeminarQuery=query.query(null,"isA","Seminar");
       addZAnswers(lZAnswerQuery,query);
+
       addSeminars(lSeminarQuery,query);
 
       // then the SMW triplestore
 
       // then the SMW triplestore
       lZAnswerQuery=query.query(null,"Property:IsA","ZAnswer");
+
       lSeminarQuery=query.query(null,"Property:IsA","Seminar");
       addZAnswers(lZAnswerQuery,query);
+
       addSeminars(lSeminarQuery,query);
 
       init(query);
 
       init(query);
     } // constructor for ZAnswer Manager
+
     } // constructor for Seminar Manager
 
      
 
      
     // >>>{user defined topicmanager code}{ZAnswer}{ZAnswer}
+
     // >>>{user defined topicmanager code}{Seminar}{Seminar}
     // <<<{user defined topicmanager code}{ZAnswer}{ZAnswer}
+
     // <<<{user defined topicmanager code}{Seminar}{Seminar}
   } // class ZAnswer Manager
+
   } // class Seminar Manager
 
  /**
 
  /**
   * ZQuestion
+
   * Traininglocation
   * Z - Questions are exercise question that show two columns of terms. The task is to create pairs of terms from the left and right side that fit together
+
   * A location for a training
 
   */
 
   */
   public static class ZQuestion extends TopicBase {
+
   public static class Traininglocation extends TopicBase {
 
    
 
    
 
     public String name;
 
     public String name;
     public String day;
+
     public String url;
     public String chapter;
+
     public String coordinate;
 +
    public String address;
 +
    public String city;
 +
    public String country;
  
 
     public String getName() { return name; }
 
     public String getName() { return name; }
 
     public void setName(String pName) { name=pName; }
 
     public void setName(String pName) { name=pName; }
     public String getDay() { return day; }
+
     public String getUrl() { return url; }
     public void setDay(String pDay) { day=pDay; }
+
     public void setUrl(String pUrl) { url=pUrl; }
     public String getChapter() { return chapter; }
+
     public String getCoordinate() { return coordinate; }
     public void setChapter(String pChapter) { chapter=pChapter; }
+
     public void setCoordinate(String pCoordinate) { coordinate=pCoordinate; }
 +
    public String getAddress() { return address; }
 +
    public void setAddress(String pAddress) { address=pAddress; }
 +
    public String getCity() { return city; }
 +
    public void setCity(String pCity) { city=pCity; }
 +
    public String getCountry() { return country; }
 +
    public void setCountry(String pCountry) { country=pCountry; }
 
     /**
 
     /**
     * convert this ZQuestion to a JSON string
+
     * convert this Traininglocation to a JSON string
 
     */
 
     */
 
     public String toJson() { return JSON.toJSONString(this); }
 
     public String toJson() { return JSON.toJSONString(this); }
  
 
     /**
 
     /**
     * convert this ZQuestion to a WikiSon string
+
     * convert this Traininglocation to a WikiSon string
 +
    * @return the WikiSon representation of this Traininglocation
 
     */
 
     */
 
     public String toWikiSon() {
 
     public String toWikiSon() {
       String wikison= "{{ZQuestion\n";
+
       String wikison= "{{Traininglocation\n";
 
       wikison+=toWikiSon("name",name);
 
       wikison+=toWikiSon("name",name);
       wikison+=toWikiSon("day",day);
+
       wikison+=toWikiSon("url",url);
       wikison+=toWikiSon("chapter",chapter);
+
       wikison+=toWikiSon("coordinate",coordinate);
 +
      wikison+=toWikiSon("address",address);
 +
      wikison+=toWikiSon("city",city);
 +
      wikison+=toWikiSon("country",country);
 
       wikison+="}}\n";
 
       wikison+="}}\n";
 
       return wikison;
 
       return wikison;
 +
    }
 +
 +
    /**
 +
    * convert this Traininglocation to a SiDIF string
 +
    * @return the SiDIF representation of this Traininglocation
 +
    */
 +
    public String toSiDIF() {
 +
      String siDIF = String.format("%s isA Traininglocation\n",this.pageid);
 +
      siDIF+=propertySiDIF("name",name,"Text");
 +
      siDIF+=propertySiDIF("url",url,"URL");
 +
      siDIF+=propertySiDIF("coordinate",coordinate,"Geographic_coordinate");
 +
      siDIF+=propertySiDIF("address",address,"Text");
 +
      siDIF+=propertySiDIF("city",city,"Text");
 +
      siDIF+=propertySiDIF("country",country,"Text");
 +
      return siDIF;
 
     }
 
     }
 
   
 
   
Line 293: Line 477:
  
 
     /**
 
     /**
     * default constructor for ZQuestion
+
     * default constructor for Traininglocation
 
     */
 
     */
     public ZQuestion() {}
+
     public Traininglocation() {}
  
 
     /**
 
     /**
     * construct a ZQuestion from the given Triple
+
     * construct a Traininglocation from the given Triple
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
     * @param pZQuestionTriple - the triple to construct me from
+
     * @param pTraininglocationTriple - the triple to construct me from
 
     */
 
     */
     public ZQuestion(TripleQuery query,Triple pZQuestionTriple) {
+
     public Traininglocation(TripleQuery query,Triple pTraininglocationTriple) {
       this(query,pZQuestionTriple.getSubject().toString());
+
       this(query,pTraininglocationTriple.getSubject().toString());
 
     } // constructor
 
     } // constructor
  
 
     /**
 
     /**
     * construct a ZQuestion from the given pageId
+
     * construct a Traininglocation from the given pageId
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
 
     * @param pageid - pageid
 
     * @param pageid - pageid
 
     */
 
     */
     public ZQuestion(TripleQuery query,String pageid) {
+
     public Traininglocation(TripleQuery query,String pageid) {
 
       this.pageid=pageid;
 
       this.pageid=pageid;
 
       Triple nameTriple=query.selectSingle(pageid,"name",null);
 
       Triple nameTriple=query.selectSingle(pageid,"name",null);
 
       if (nameTriple==null)
 
       if (nameTriple==null)
         nameTriple=query.selectSingle(pageid,"Property:ZQuestion_name",null);
+
         nameTriple=query.selectSingle(pageid,"Property:Traininglocation_name",null);
 
       if (nameTriple!=null)  
 
       if (nameTriple!=null)  
 
         name=nameTriple.getObject().toString();
 
         name=nameTriple.getObject().toString();
       Triple dayTriple=query.selectSingle(pageid,"day",null);
+
       Triple urlTriple=query.selectSingle(pageid,"url",null);
       if (dayTriple==null)
+
       if (urlTriple==null)
         dayTriple=query.selectSingle(pageid,"Property:ZQuestion_day",null);
+
         urlTriple=query.selectSingle(pageid,"Property:Traininglocation_url",null);
       if (dayTriple!=null)  
+
       if (urlTriple!=null)  
         day=dayTriple.getObject().toString();
+
         url=urlTriple.getObject().toString();
       Triple chapterTriple=query.selectSingle(pageid,"chapter",null);
+
       Triple coordinateTriple=query.selectSingle(pageid,"coordinate",null);
       if (chapterTriple==null)
+
       if (coordinateTriple==null)
         chapterTriple=query.selectSingle(pageid,"Property:ZQuestion_chapter",null);
+
         coordinateTriple=query.selectSingle(pageid,"Property:Traininglocation_coordinate",null);
       if (chapterTriple!=null)  
+
       if (coordinateTriple!=null)  
         chapter=chapterTriple.getObject().toString();
+
         coordinate=coordinateTriple.getObject().toString();
 +
      Triple addressTriple=query.selectSingle(pageid,"address",null);
 +
      if (addressTriple==null)
 +
        addressTriple=query.selectSingle(pageid,"Property:Traininglocation_address",null);
 +
      if (addressTriple!=null)
 +
        address=addressTriple.getObject().toString();
 +
      Triple cityTriple=query.selectSingle(pageid,"city",null);
 +
      if (cityTriple==null)
 +
        cityTriple=query.selectSingle(pageid,"Property:Traininglocation_city",null);
 +
      if (cityTriple!=null)
 +
        city=cityTriple.getObject().toString();
 +
      Triple countryTriple=query.selectSingle(pageid,"country",null);
 +
      if (countryTriple==null)
 +
        countryTriple=query.selectSingle(pageid,"Property:Traininglocation_country",null);
 +
      if (countryTriple!=null)
 +
        country=countryTriple.getObject().toString();
 
       init(query);
 
       init(query);
     } // constructor for ZQuestion
+
     } // constructor for Traininglocation
 
      
 
      
     // >>>{user defined topic code}{ZQuestion}{ZQuestion}
+
     // >>>{user defined topic code}{Traininglocation}{Traininglocation}
     // <<<{user defined topic code}{ZQuestion}{ZQuestion}
+
     // <<<{user defined topic code}{Traininglocation}{Traininglocation}
   } // class ZQuestion
+
   } // class Traininglocation
 
   /**
 
   /**
   * Manager for ZQuestion
+
   * Manager for Traininglocation
 
   */
 
   */
   public static class ZQuestionManager extends TopicBase {
+
   public static class TraininglocationManager extends TopicBase {
 
   
 
   
     public String topicName="ZQuestion";
+
     public String topicName="Traininglocation";
     public transient List<ZQuestion> mZQuestions=new ArrayList<ZQuestion>();
+
     public transient List<Traininglocation> mTraininglocations=new ArrayList<Traininglocation>();
     public transient Map<String,ZQuestion> mZQuestionMap=new LinkedHashMap<String,ZQuestion>();
+
     public transient Map<String,Traininglocation> mTraininglocationMap=new LinkedHashMap<String,Traininglocation>();
  
 
     /**
 
     /**
     * get my ZQuestions
+
     * get my Traininglocations
 
     */
 
     */
     public List<ZQuestion> getZQuestions() {
+
     public List<Traininglocation> getTraininglocations() {
       List<ZQuestion> result=this.mZQuestions;
+
       List<Traininglocation> result=this.mTraininglocations;
 
       return result;
 
       return result;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new ZQuestion
+
     *  add a new Traininglocation
 
     */
 
     */
     public ZQuestion add(ZQuestion pZQuestion) {
+
     public Traininglocation add(Traininglocation pTraininglocation) {
       mZQuestions.add(pZQuestion);
+
       mTraininglocations.add(pTraininglocation);
       mZQuestionMap.put(pZQuestion.getPageid(),pZQuestion);
+
       mTraininglocationMap.put(pTraininglocation.getPageid(),pTraininglocation);
       return pZQuestion;
+
       return pTraininglocation;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new ZQuestion from the given triple
+
     *  add a new Traininglocation from the given triple
 
     */
 
     */
     public ZQuestion add(TripleQuery query,Triple pZQuestionTriple) {
+
     public Traininglocation add(TripleQuery query,Triple pTraininglocationTriple) {
       ZQuestion lZQuestion=new ZQuestion(query,pZQuestionTriple);
+
       Traininglocation lTraininglocation=new Traininglocation(query,pTraininglocationTriple);
       add(lZQuestion);
+
       add(lTraininglocation);
       return lZQuestion;
+
       return lTraininglocation;
 
     }
 
     }
  
     // reinitialize my mZQuestion map
+
     // reinitialize my mTraininglocation map
 
     public void reinit() {
 
     public void reinit() {
       mZQuestionMap.clear();
+
       mTraininglocationMap.clear();
       for (ZQuestion lZQuestion:mZQuestions) {
+
       for (Traininglocation lTraininglocation:mTraininglocations) {
         mZQuestionMap.put(lZQuestion.getPageid(),lZQuestion);
+
         mTraininglocationMap.put(lTraininglocation.getPageid(),lTraininglocation);
 
       }
 
       }
 
     }
 
     }
Line 381: Line 580:
 
      
 
      
 
     // get a new manager from the given json string
 
     // get a new manager from the given json string
     public static ZQuestionManager fromJson(String json) {
+
     public static TraininglocationManager fromJson(String json) {
       ZQuestionManager result=JSON.parseObject(json, ZQuestionManager.class);
+
       TraininglocationManager result=JSON.parseObject(json, TraininglocationManager.class);
 
       result.reinit();
 
       result.reinit();
 
       return result;
 
       return result;
 
     }
 
     }
  
     // default constructor for ZQuestion Manager
+
     // default constructor for Traininglocation Manager
     public ZQuestionManager() {}
+
     public TraininglocationManager() {}
  
     // add ZQuestions from the given query
+
     // add Traininglocations from the given query
     public void addZQuestions(TripleQuery pZQuestionQuery,TripleQuery query) {
+
     public void addTraininglocations(TripleQuery pTraininglocationQuery,TripleQuery query) {
       if (pZQuestionQuery!=null) {
+
       if (pTraininglocationQuery!=null) {
         for (Triple lZQuestionTriple:pZQuestionQuery.getTriples()) {
+
         for (Triple lTraininglocationTriple:pTraininglocationQuery.getTriples()) {
           add(query,lZQuestionTriple);
+
           add(query,lTraininglocationTriple);
 
         }
 
         }
 
       }
 
       }
Line 400: Line 599:
  
 
     // construct me from the given triple Query query
 
     // construct me from the given triple Query query
     public ZQuestionManager(TripleQuery query) {
+
     public TraininglocationManager(TripleQuery query) {
 
       // first query the SiDIF bases triplestore
 
       // first query the SiDIF bases triplestore
       TripleQuery lZQuestionQuery=query.query(null,"isA","ZQuestion");
+
       TripleQuery lTraininglocationQuery=query.query(null,"isA","Traininglocation");
       addZQuestions(lZQuestionQuery,query);
+
       addTraininglocations(lTraininglocationQuery,query);
 
       // then the SMW triplestore
 
       // then the SMW triplestore
       lZQuestionQuery=query.query(null,"Property:IsA","ZQuestion");
+
       lTraininglocationQuery=query.query(null,"Property:IsA","Traininglocation");
       addZQuestions(lZQuestionQuery,query);
+
       addTraininglocations(lTraininglocationQuery,query);
 
       init(query);
 
       init(query);
     } // constructor for ZQuestion Manager
+
     } // constructor for Traininglocation Manager
 
      
 
      
     // >>>{user defined topicmanager code}{ZQuestion}{ZQuestion}
+
     // >>>{user defined topicmanager code}{Traininglocation}{Traininglocation}
     // <<<{user defined topicmanager code}{ZQuestion}{ZQuestion}
+
     // <<<{user defined topicmanager code}{Traininglocation}{Traininglocation}
   } // class ZQuestion Manager
+
   } // class Traininglocation Manager
 
  /**
 
  /**
   * ChapterCR
+
   * Trainer
   * a chapter CR is a change request for the content of a chapter
+
   * A trainer is a teacher
 
   */
 
   */
   public static class ChapterCR extends TopicBase {
+
   public static class Trainer extends TopicBase {
 
    
 
    
     public String where;
+
     public String name;
     public String change;
+
     public String picture;
     public String why;
+
     public String description;
     public String enteredBy;
+
     public String description_de;
     public String enteredOn;
+
     public String rank;
    public String chapter;
 
  
     public String getWhere() { return where; }
+
     public String getName() { return name; }
     public void setWhere(String pWhere) { where=pWhere; }
+
     public void setName(String pName) { name=pName; }
     public String getChange() { return change; }
+
     public String getPicture() { return picture; }
     public void setChange(String pChange) { change=pChange; }
+
     public void setPicture(String pPicture) { picture=pPicture; }
     public String getWhy() { return why; }
+
     public String getDescription() { return description; }
     public void setWhy(String pWhy) { why=pWhy; }
+
     public void setDescription(String pDescription) { description=pDescription; }
     public String getEnteredBy() { return enteredBy; }
+
     public String getDescription_de() { return description_de; }
     public void setEnteredBy(String pEnteredBy) { enteredBy=pEnteredBy; }
+
     public void setDescription_de(String pDescription_de) { description_de=pDescription_de; }
     public String getEnteredOn() { return enteredOn; }
+
     public String getRank() { return rank; }
     public void setEnteredOn(String pEnteredOn) { enteredOn=pEnteredOn; }
+
     public void setRank(String pRank) { rank=pRank; }
    public String getChapter() { return chapter; }
 
    public void setChapter(String pChapter) { chapter=pChapter; }
 
 
     /**
 
     /**
     * convert this ChapterCR to a JSON string
+
     * convert this Trainer to a JSON string
 
     */
 
     */
 
     public String toJson() { return JSON.toJSONString(this); }
 
     public String toJson() { return JSON.toJSONString(this); }
  
 
     /**
 
     /**
     * convert this ChapterCR to a WikiSon string
+
     * convert this Trainer to a WikiSon string
 +
    * @return the WikiSon representation of this Trainer
 
     */
 
     */
 
     public String toWikiSon() {
 
     public String toWikiSon() {
       String wikison= "{{ChapterCR\n";
+
       String wikison= "{{Trainer\n";
       wikison+=toWikiSon("where",where);
+
       wikison+=toWikiSon("name",name);
       wikison+=toWikiSon("change",change);
+
       wikison+=toWikiSon("picture",picture);
       wikison+=toWikiSon("why",why);
+
       wikison+=toWikiSon("description",description);
       wikison+=toWikiSon("enteredBy",enteredBy);
+
       wikison+=toWikiSon("description_de",description_de);
       wikison+=toWikiSon("enteredOn",enteredOn);
+
       wikison+=toWikiSon("rank",rank);
      wikison+=toWikiSon("chapter",chapter);
 
 
       wikison+="}}\n";
 
       wikison+="}}\n";
 
       return wikison;
 
       return wikison;
 
     }
 
     }
 
    /** 
 
    * get the pageid for this topic
 
    */
 
    public String getPageid() { return pageid; };
 
 
    /**
 
    * default constructor for ChapterCR
 
    */
 
    public ChapterCR() {}
 
 
    /**
 
    * construct a ChapterCR from the given Triple
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pChapterCRTriple - the triple to construct me from
 
    */
 
    public ChapterCR(TripleQuery query,Triple pChapterCRTriple) {
 
      this(query,pChapterCRTriple.getSubject().toString());
 
    } // constructor
 
 
    /**
 
    * construct a ChapterCR from the given pageId
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pageid - pageid
 
    */
 
    public ChapterCR(TripleQuery query,String pageid) {
 
      this.pageid=pageid;
 
      Triple whereTriple=query.selectSingle(pageid,"where",null);
 
      if (whereTriple==null)
 
        whereTriple=query.selectSingle(pageid,"Property:ChapterCR_where",null);
 
      if (whereTriple!=null)
 
        where=whereTriple.getObject().toString();
 
      Triple changeTriple=query.selectSingle(pageid,"change",null);
 
      if (changeTriple==null)
 
        changeTriple=query.selectSingle(pageid,"Property:ChapterCR_change",null);
 
      if (changeTriple!=null)
 
        change=changeTriple.getObject().toString();
 
      Triple whyTriple=query.selectSingle(pageid,"why",null);
 
      if (whyTriple==null)
 
        whyTriple=query.selectSingle(pageid,"Property:ChapterCR_why",null);
 
      if (whyTriple!=null)
 
        why=whyTriple.getObject().toString();
 
      Triple enteredByTriple=query.selectSingle(pageid,"enteredBy",null);
 
      if (enteredByTriple==null)
 
        enteredByTriple=query.selectSingle(pageid,"Property:ChapterCR_enteredBy",null);
 
      if (enteredByTriple!=null)
 
        enteredBy=enteredByTriple.getObject().toString();
 
      Triple enteredOnTriple=query.selectSingle(pageid,"enteredOn",null);
 
      if (enteredOnTriple==null)
 
        enteredOnTriple=query.selectSingle(pageid,"Property:ChapterCR_enteredOn",null);
 
      if (enteredOnTriple!=null)
 
        enteredOn=enteredOnTriple.getObject().toString();
 
      Triple chapterTriple=query.selectSingle(pageid,"chapter",null);
 
      if (chapterTriple==null)
 
        chapterTriple=query.selectSingle(pageid,"Property:ChapterCR_chapter",null);
 
      if (chapterTriple!=null)
 
        chapter=chapterTriple.getObject().toString();
 
      init(query);
 
    } // constructor for ChapterCR
 
   
 
    // >>>{user defined topic code}{ChapterCR}{ChapterCR}
 
    // <<<{user defined topic code}{ChapterCR}{ChapterCR}
 
  } // class ChapterCR
 
  /**
 
  * Manager for ChapterCR
 
  */
 
  public static class ChapterCRManager extends TopicBase {
 
 
    public String topicName="ChapterCR";
 
    public transient List<ChapterCR> mChapterCRs=new ArrayList<ChapterCR>();
 
    public transient Map<String,ChapterCR> mChapterCRMap=new LinkedHashMap<String,ChapterCR>();
 
 
    /**
 
    * get my ChapterCR
 
    */
 
    public List<ChapterCR> getChapterCR() {
 
      List<ChapterCR> result=this.mChapterCRs;
 
      return result;
 
    }
 
 
    /**
 
    *  add a new ChapterCR
 
    */
 
    public ChapterCR add(ChapterCR pChapterCR) {
 
      mChapterCRs.add(pChapterCR);
 
      mChapterCRMap.put(pChapterCR.getPageid(),pChapterCR);
 
      return pChapterCR;
 
    }
 
 
    /**
 
    *  add a new ChapterCR from the given triple
 
    */
 
    public ChapterCR add(TripleQuery query,Triple pChapterCRTriple) {
 
      ChapterCR lChapterCR=new ChapterCR(query,pChapterCRTriple);
 
      add(lChapterCR);
 
      return lChapterCR;
 
    }
 
 
    // reinitialize my mChapterCR map
 
    public void reinit() {
 
      mChapterCRMap.clear();
 
      for (ChapterCR lChapterCR:mChapterCRs) {
 
        mChapterCRMap.put(lChapterCR.getPageid(),lChapterCR);
 
      }
 
    }
 
 
    // convert this manager to json format
 
    public String toJson() { return JSON.toJSONString(this); }
 
   
 
    // get a new manager from the given json string
 
    public static ChapterCRManager fromJson(String json) {
 
      ChapterCRManager result=JSON.parseObject(json, ChapterCRManager.class);
 
      result.reinit();
 
      return result;
 
    }
 
 
    // default constructor for ChapterCR Manager
 
    public ChapterCRManager() {}
 
 
    // add ChapterCR from the given query
 
    public void addChapterCR(TripleQuery pChapterCRQuery,TripleQuery query) {
 
      if (pChapterCRQuery!=null) {
 
        for (Triple lChapterCRTriple:pChapterCRQuery.getTriples()) {
 
          add(query,lChapterCRTriple);
 
        }
 
      }
 
    }
 
 
    // construct me from the given triple Query query
 
    public ChapterCRManager(TripleQuery query) {
 
      // first query the SiDIF bases triplestore
 
      TripleQuery lChapterCRQuery=query.query(null,"isA","ChapterCR");
 
      addChapterCR(lChapterCRQuery,query);
 
      // then the SMW triplestore
 
      lChapterCRQuery=query.query(null,"Property:IsA","ChapterCR");
 
      addChapterCR(lChapterCRQuery,query);
 
      init(query);
 
    } // constructor for ChapterCR Manager
 
   
 
    // >>>{user defined topicmanager code}{ChapterCR}{ChapterCR}
 
    // <<<{user defined topicmanager code}{ChapterCR}{ChapterCR}
 
  } // class ChapterCR Manager
 
/**
 
  * Quizkarte
 
  * Eine Quizkarte dient zum Abfragen des Wissen zu einem Seminar
 
  */
 
  public static class Quizkarte extends TopicBase {
 
 
 
    public String Punkte;
 
    public String Nummer;
 
    public String Frage;
 
    public String Question;
 
    public String Typ;
 
    public String TypeParameter;
 
    public String SeminarTag;
 
    public String bild;
 
    public String Qualität;
 
    public String context;
 
    public String A;
 
    public String A_en;
 
    public String A_comment;
 
    public String B;
 
    public String B_en;
 
    public String B_comment;
 
    public String C;
 
    public String C_en;
 
    public String C_comment;
 
    public String D;
 
    public String D_en;
 
    public String D_comment;
 
    public String E;
 
    public String E_en;
 
    public String E_comment;
 
    public String F;
 
    public String F_en;
 
    public String F_comment;
 
    public String G;
 
    public String G_en;
 
    public String G_comment;
 
    public String Lösung;
 
    public String Kommentar;
 
    public String learningGoal;
 
    public String learnItem;
 
  
    public String getPunkte() { return Punkte; }
 
    public void setPunkte(String pPunkte) { Punkte=pPunkte; }
 
    public String getNummer() { return Nummer; }
 
    public void setNummer(String pNummer) { Nummer=pNummer; }
 
    public String getFrage() { return Frage; }
 
    public void setFrage(String pFrage) { Frage=pFrage; }
 
    public String getQuestion() { return Question; }
 
    public void setQuestion(String pQuestion) { Question=pQuestion; }
 
    public String getTyp() { return Typ; }
 
    public void setTyp(String pTyp) { Typ=pTyp; }
 
    public String getTypeParameter() { return TypeParameter; }
 
    public void setTypeParameter(String pTypeParameter) { TypeParameter=pTypeParameter; }
 
    public String getSeminarTag() { return SeminarTag; }
 
    public void setSeminarTag(String pSeminarTag) { SeminarTag=pSeminarTag; }
 
    public String getBild() { return bild; }
 
    public void setBild(String pBild) { bild=pBild; }
 
    public String getQualität() { return Qualität; }
 
    public void setQualität(String pQualität) { Qualität=pQualität; }
 
    public String getContext() { return context; }
 
    public void setContext(String pContext) { context=pContext; }
 
    public String getA() { return A; }
 
    public void setA(String pA) { A=pA; }
 
    public String getA_en() { return A_en; }
 
    public void setA_en(String pA_en) { A_en=pA_en; }
 
    public String getA_comment() { return A_comment; }
 
    public void setA_comment(String pA_comment) { A_comment=pA_comment; }
 
    public String getB() { return B; }
 
    public void setB(String pB) { B=pB; }
 
    public String getB_en() { return B_en; }
 
    public void setB_en(String pB_en) { B_en=pB_en; }
 
    public String getB_comment() { return B_comment; }
 
    public void setB_comment(String pB_comment) { B_comment=pB_comment; }
 
    public String getC() { return C; }
 
    public void setC(String pC) { C=pC; }
 
    public String getC_en() { return C_en; }
 
    public void setC_en(String pC_en) { C_en=pC_en; }
 
    public String getC_comment() { return C_comment; }
 
    public void setC_comment(String pC_comment) { C_comment=pC_comment; }
 
    public String getD() { return D; }
 
    public void setD(String pD) { D=pD; }
 
    public String getD_en() { return D_en; }
 
    public void setD_en(String pD_en) { D_en=pD_en; }
 
    public String getD_comment() { return D_comment; }
 
    public void setD_comment(String pD_comment) { D_comment=pD_comment; }
 
    public String getE() { return E; }
 
    public void setE(String pE) { E=pE; }
 
    public String getE_en() { return E_en; }
 
    public void setE_en(String pE_en) { E_en=pE_en; }
 
    public String getE_comment() { return E_comment; }
 
    public void setE_comment(String pE_comment) { E_comment=pE_comment; }
 
    public String getF() { return F; }
 
    public void setF(String pF) { F=pF; }
 
    public String getF_en() { return F_en; }
 
    public void setF_en(String pF_en) { F_en=pF_en; }
 
    public String getF_comment() { return F_comment; }
 
    public void setF_comment(String pF_comment) { F_comment=pF_comment; }
 
    public String getG() { return G; }
 
    public void setG(String pG) { G=pG; }
 
    public String getG_en() { return G_en; }
 
    public void setG_en(String pG_en) { G_en=pG_en; }
 
    public String getG_comment() { return G_comment; }
 
    public void setG_comment(String pG_comment) { G_comment=pG_comment; }
 
    public String getLösung() { return Lösung; }
 
    public void setLösung(String pLösung) { Lösung=pLösung; }
 
    public String getKommentar() { return Kommentar; }
 
    public void setKommentar(String pKommentar) { Kommentar=pKommentar; }
 
    public String getLearningGoal() { return learningGoal; }
 
    public void setLearningGoal(String pLearningGoal) { learningGoal=pLearningGoal; }
 
    public String getLearnItem() { return learnItem; }
 
    public void setLearnItem(String pLearnItem) { learnItem=pLearnItem; }
 
 
     /**
 
     /**
     * convert this Quizkarte to a JSON string
+
     * convert this Trainer to a SiDIF string
 +
    * @return the SiDIF representation of this Trainer
 
     */
 
     */
     public String toJson() { return JSON.toJSONString(this); }
+
     public String toSiDIF() {
 
+
       String siDIF = String.format("%s isA Trainer\n",this.pageid);
    /**
+
       siDIF+=propertySiDIF("name",name,"Text");
    * convert this Quizkarte to a WikiSon string
+
       siDIF+=propertySiDIF("picture",picture,"Page");
    */
+
       siDIF+=propertySiDIF("description",description,"Text");
    public String toWikiSon() {
+
       siDIF+=propertySiDIF("description_de",description_de,"Text");
       String wikison= "{{Quizkarte\n";
+
       siDIF+=propertySiDIF("rank",rank,"number");
      wikison+=toWikiSon("Punkte",Punkte);
+
       return siDIF;
       wikison+=toWikiSon("Nummer",Nummer);
 
      wikison+=toWikiSon("Frage",Frage);
 
      wikison+=toWikiSon("Question",Question);
 
      wikison+=toWikiSon("Typ",Typ);
 
      wikison+=toWikiSon("TypeParameter",TypeParameter);
 
      wikison+=toWikiSon("SeminarTag",SeminarTag);
 
      wikison+=toWikiSon("bild",bild);
 
       wikison+=toWikiSon("Qualität",Qualität);
 
      wikison+=toWikiSon("context",context);
 
      wikison+=toWikiSon("A",A);
 
       wikison+=toWikiSon("A_en",A_en);
 
      wikison+=toWikiSon("A_comment",A_comment);
 
      wikison+=toWikiSon("B",B);
 
       wikison+=toWikiSon("B_en",B_en);
 
      wikison+=toWikiSon("B_comment",B_comment);
 
      wikison+=toWikiSon("C",C);
 
       wikison+=toWikiSon("C_en",C_en);
 
      wikison+=toWikiSon("C_comment",C_comment);
 
      wikison+=toWikiSon("D",D);
 
      wikison+=toWikiSon("D_en",D_en);
 
      wikison+=toWikiSon("D_comment",D_comment);
 
      wikison+=toWikiSon("E",E);
 
      wikison+=toWikiSon("E_en",E_en);
 
      wikison+=toWikiSon("E_comment",E_comment);
 
      wikison+=toWikiSon("F",F);
 
      wikison+=toWikiSon("F_en",F_en);
 
      wikison+=toWikiSon("F_comment",F_comment);
 
      wikison+=toWikiSon("G",G);
 
      wikison+=toWikiSon("G_en",G_en);
 
      wikison+=toWikiSon("G_comment",G_comment);
 
      wikison+=toWikiSon("Lösung",Lösung);
 
      wikison+=toWikiSon("Kommentar",Kommentar);
 
      wikison+=toWikiSon("learningGoal",learningGoal);
 
      wikison+=toWikiSon("learnItem",learnItem);
 
      wikison+="}}\n";
 
       return wikison;
 
 
     }
 
     }
 
   
 
   
Line 766: Line 674:
  
 
     /**
 
     /**
     * default constructor for Quizkarte
+
     * default constructor for Trainer
 
     */
 
     */
     public Quizkarte() {}
+
     public Trainer() {}
  
 
     /**
 
     /**
     * construct a Quizkarte from the given Triple
+
     * construct a Trainer from the given Triple
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
     * @param pQuizkarteTriple - the triple to construct me from
+
     * @param pTrainerTriple - the triple to construct me from
 
     */
 
     */
     public Quizkarte(TripleQuery query,Triple pQuizkarteTriple) {
+
     public Trainer(TripleQuery query,Triple pTrainerTriple) {
       this(query,pQuizkarteTriple.getSubject().toString());
+
       this(query,pTrainerTriple.getSubject().toString());
 
     } // constructor
 
     } // constructor
  
 
     /**
 
     /**
     * construct a Quizkarte from the given pageId
+
     * construct a Trainer from the given pageId
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
 
     * @param pageid - pageid
 
     * @param pageid - pageid
 
     */
 
     */
     public Quizkarte(TripleQuery query,String pageid) {
+
     public Trainer(TripleQuery query,String pageid) {
 
       this.pageid=pageid;
 
       this.pageid=pageid;
       Triple PunkteTriple=query.selectSingle(pageid,"Punkte",null);
+
       Triple nameTriple=query.selectSingle(pageid,"name",null);
       if (PunkteTriple==null)
+
       if (nameTriple==null)
         PunkteTriple=query.selectSingle(pageid,"Property:Quizkarte_Punkte",null);
+
         nameTriple=query.selectSingle(pageid,"Property:Trainer_name",null);
       if (PunkteTriple!=null)  
+
       if (nameTriple!=null)  
         Punkte=PunkteTriple.getObject().toString();
+
         name=nameTriple.getObject().toString();
       Triple NummerTriple=query.selectSingle(pageid,"Nummer",null);
+
       Triple pictureTriple=query.selectSingle(pageid,"picture",null);
       if (NummerTriple==null)
+
       if (pictureTriple==null)
         NummerTriple=query.selectSingle(pageid,"Property:Quizkarte_Nummer",null);
+
         pictureTriple=query.selectSingle(pageid,"Property:Trainer_picture",null);
       if (NummerTriple!=null)  
+
       if (pictureTriple!=null)  
         Nummer=NummerTriple.getObject().toString();
+
         picture=pictureTriple.getObject().toString();
       Triple FrageTriple=query.selectSingle(pageid,"Frage",null);
+
       Triple descriptionTriple=query.selectSingle(pageid,"description",null);
       if (FrageTriple==null)
+
       if (descriptionTriple==null)
         FrageTriple=query.selectSingle(pageid,"Property:Quizkarte_Frage",null);
+
         descriptionTriple=query.selectSingle(pageid,"Property:Trainer_description",null);
       if (FrageTriple!=null)  
+
       if (descriptionTriple!=null)  
         Frage=FrageTriple.getObject().toString();
+
         description=descriptionTriple.getObject().toString();
       Triple QuestionTriple=query.selectSingle(pageid,"Question",null);
+
       Triple description_deTriple=query.selectSingle(pageid,"description_de",null);
       if (QuestionTriple==null)
+
       if (description_deTriple==null)
         QuestionTriple=query.selectSingle(pageid,"Property:Quizkarte_Question",null);
+
         description_deTriple=query.selectSingle(pageid,"Property:Trainer_description_de",null);
       if (QuestionTriple!=null)  
+
       if (description_deTriple!=null)  
         Question=QuestionTriple.getObject().toString();
+
         description_de=description_deTriple.getObject().toString();
       Triple TypTriple=query.selectSingle(pageid,"Typ",null);
+
       Triple rankTriple=query.selectSingle(pageid,"rank",null);
       if (TypTriple==null)
+
       if (rankTriple==null)
         TypTriple=query.selectSingle(pageid,"Property:Quizkarte_Typ",null);
+
         rankTriple=query.selectSingle(pageid,"Property:Trainer_rank",null);
       if (TypTriple!=null)  
+
       if (rankTriple!=null)  
         Typ=TypTriple.getObject().toString();
+
         rank=rankTriple.getObject().toString();
      Triple TypeParameterTriple=query.selectSingle(pageid,"TypeParameter",null);
 
      if (TypeParameterTriple==null)
 
        TypeParameterTriple=query.selectSingle(pageid,"Property:Quizkarte_TypeParameter",null);
 
      if (TypeParameterTriple!=null)
 
        TypeParameter=TypeParameterTriple.getObject().toString();
 
      Triple SeminarTagTriple=query.selectSingle(pageid,"SeminarTag",null);
 
      if (SeminarTagTriple==null)
 
        SeminarTagTriple=query.selectSingle(pageid,"Property:Quizkarte_SeminarTag",null);
 
      if (SeminarTagTriple!=null)
 
        SeminarTag=SeminarTagTriple.getObject().toString();
 
      Triple bildTriple=query.selectSingle(pageid,"bild",null);
 
      if (bildTriple==null)
 
        bildTriple=query.selectSingle(pageid,"Property:Quizkarte_bild",null);
 
      if (bildTriple!=null)
 
        bild=bildTriple.getObject().toString();
 
      Triple QualitätTriple=query.selectSingle(pageid,"Qualität",null);
 
      if (QualitätTriple==null)
 
        QualitätTriple=query.selectSingle(pageid,"Property:Quizkarte_Qualität",null);
 
      if (QualitätTriple!=null)
 
        Qualität=QualitätTriple.getObject().toString();
 
      Triple contextTriple=query.selectSingle(pageid,"context",null);
 
      if (contextTriple==null)
 
        contextTriple=query.selectSingle(pageid,"Property:Quizkarte_context",null);
 
      if (contextTriple!=null)
 
        context=contextTriple.getObject().toString();
 
      Triple ATriple=query.selectSingle(pageid,"A",null);
 
      if (ATriple==null)
 
        ATriple=query.selectSingle(pageid,"Property:Quizkarte_A",null);
 
      if (ATriple!=null)
 
        A=ATriple.getObject().toString();
 
      Triple A_enTriple=query.selectSingle(pageid,"A_en",null);
 
      if (A_enTriple==null)
 
        A_enTriple=query.selectSingle(pageid,"Property:Quizkarte_A_en",null);
 
      if (A_enTriple!=null)
 
        A_en=A_enTriple.getObject().toString();
 
      Triple A_commentTriple=query.selectSingle(pageid,"A_comment",null);
 
      if (A_commentTriple==null)
 
        A_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_A_comment",null);
 
      if (A_commentTriple!=null)
 
        A_comment=A_commentTriple.getObject().toString();
 
      Triple BTriple=query.selectSingle(pageid,"B",null);
 
      if (BTriple==null)
 
        BTriple=query.selectSingle(pageid,"Property:Quizkarte_B",null);
 
      if (BTriple!=null)
 
        B=BTriple.getObject().toString();
 
      Triple B_enTriple=query.selectSingle(pageid,"B_en",null);
 
      if (B_enTriple==null)
 
        B_enTriple=query.selectSingle(pageid,"Property:Quizkarte_B_en",null);
 
      if (B_enTriple!=null)
 
        B_en=B_enTriple.getObject().toString();
 
      Triple B_commentTriple=query.selectSingle(pageid,"B_comment",null);
 
      if (B_commentTriple==null)
 
        B_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_B_comment",null);
 
      if (B_commentTriple!=null)
 
        B_comment=B_commentTriple.getObject().toString();
 
      Triple CTriple=query.selectSingle(pageid,"C",null);
 
      if (CTriple==null)
 
        CTriple=query.selectSingle(pageid,"Property:Quizkarte_C",null);
 
      if (CTriple!=null)
 
        C=CTriple.getObject().toString();
 
      Triple C_enTriple=query.selectSingle(pageid,"C_en",null);
 
      if (C_enTriple==null)
 
        C_enTriple=query.selectSingle(pageid,"Property:Quizkarte_C_en",null);
 
      if (C_enTriple!=null)
 
        C_en=C_enTriple.getObject().toString();
 
      Triple C_commentTriple=query.selectSingle(pageid,"C_comment",null);
 
      if (C_commentTriple==null)
 
        C_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_C_comment",null);
 
      if (C_commentTriple!=null)
 
        C_comment=C_commentTriple.getObject().toString();
 
      Triple DTriple=query.selectSingle(pageid,"D",null);
 
      if (DTriple==null)
 
        DTriple=query.selectSingle(pageid,"Property:Quizkarte_D",null);
 
      if (DTriple!=null)
 
        D=DTriple.getObject().toString();
 
      Triple D_enTriple=query.selectSingle(pageid,"D_en",null);
 
      if (D_enTriple==null)
 
        D_enTriple=query.selectSingle(pageid,"Property:Quizkarte_D_en",null);
 
      if (D_enTriple!=null)
 
        D_en=D_enTriple.getObject().toString();
 
      Triple D_commentTriple=query.selectSingle(pageid,"D_comment",null);
 
      if (D_commentTriple==null)
 
        D_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_D_comment",null);
 
      if (D_commentTriple!=null)
 
        D_comment=D_commentTriple.getObject().toString();
 
      Triple ETriple=query.selectSingle(pageid,"E",null);
 
      if (ETriple==null)
 
        ETriple=query.selectSingle(pageid,"Property:Quizkarte_E",null);
 
      if (ETriple!=null)
 
        E=ETriple.getObject().toString();
 
      Triple E_enTriple=query.selectSingle(pageid,"E_en",null);
 
      if (E_enTriple==null)
 
        E_enTriple=query.selectSingle(pageid,"Property:Quizkarte_E_en",null);
 
      if (E_enTriple!=null)
 
        E_en=E_enTriple.getObject().toString();
 
      Triple E_commentTriple=query.selectSingle(pageid,"E_comment",null);
 
      if (E_commentTriple==null)
 
        E_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_E_comment",null);
 
      if (E_commentTriple!=null)
 
        E_comment=E_commentTriple.getObject().toString();
 
      Triple FTriple=query.selectSingle(pageid,"F",null);
 
      if (FTriple==null)
 
        FTriple=query.selectSingle(pageid,"Property:Quizkarte_F",null);
 
      if (FTriple!=null)
 
        F=FTriple.getObject().toString();
 
      Triple F_enTriple=query.selectSingle(pageid,"F_en",null);
 
      if (F_enTriple==null)
 
        F_enTriple=query.selectSingle(pageid,"Property:Quizkarte_F_en",null);
 
      if (F_enTriple!=null)
 
        F_en=F_enTriple.getObject().toString();
 
      Triple F_commentTriple=query.selectSingle(pageid,"F_comment",null);
 
      if (F_commentTriple==null)
 
        F_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_F_comment",null);
 
      if (F_commentTriple!=null)
 
        F_comment=F_commentTriple.getObject().toString();
 
      Triple GTriple=query.selectSingle(pageid,"G",null);
 
      if (GTriple==null)
 
        GTriple=query.selectSingle(pageid,"Property:Quizkarte_G",null);
 
      if (GTriple!=null)
 
        G=GTriple.getObject().toString();
 
      Triple G_enTriple=query.selectSingle(pageid,"G_en",null);
 
      if (G_enTriple==null)
 
        G_enTriple=query.selectSingle(pageid,"Property:Quizkarte_G_en",null);
 
      if (G_enTriple!=null)
 
        G_en=G_enTriple.getObject().toString();
 
      Triple G_commentTriple=query.selectSingle(pageid,"G_comment",null);
 
      if (G_commentTriple==null)
 
        G_commentTriple=query.selectSingle(pageid,"Property:Quizkarte_G_comment",null);
 
      if (G_commentTriple!=null)
 
        G_comment=G_commentTriple.getObject().toString();
 
      Triple LösungTriple=query.selectSingle(pageid,"Lösung",null);
 
      if (LösungTriple==null)
 
        LösungTriple=query.selectSingle(pageid,"Property:Quizkarte_Lösung",null);
 
      if (LösungTriple!=null)
 
        Lösung=LösungTriple.getObject().toString();
 
      Triple KommentarTriple=query.selectSingle(pageid,"Kommentar",null);
 
      if (KommentarTriple==null)
 
        KommentarTriple=query.selectSingle(pageid,"Property:Quizkarte_Kommentar",null);
 
      if (KommentarTriple!=null)
 
        Kommentar=KommentarTriple.getObject().toString();
 
      Triple learningGoalTriple=query.selectSingle(pageid,"learningGoal",null);
 
      if (learningGoalTriple==null)
 
        learningGoalTriple=query.selectSingle(pageid,"Property:Quizkarte_learningGoal",null);
 
      if (learningGoalTriple!=null)
 
        learningGoal=learningGoalTriple.getObject().toString();
 
      Triple learnItemTriple=query.selectSingle(pageid,"learnItem",null);
 
      if (learnItemTriple==null)
 
        learnItemTriple=query.selectSingle(pageid,"Property:Quizkarte_learnItem",null);
 
      if (learnItemTriple!=null)
 
        learnItem=learnItemTriple.getObject().toString();
 
 
       init(query);
 
       init(query);
     } // constructor for Quizkarte
+
     } // constructor for Trainer
 
      
 
      
     // >>>{user defined topic code}{Quizkarte}{Quizkarte}
+
     // >>>{user defined topic code}{Trainer}{Trainer}
     // <<<{user defined topic code}{Quizkarte}{Quizkarte}
+
     // <<<{user defined topic code}{Trainer}{Trainer}
   } // class Quizkarte
+
   } // class Trainer
 
   /**
 
   /**
   * Manager for Quizkarte
+
   * Manager for Trainer
 
   */
 
   */
   public static class QuizkarteManager extends TopicBase {
+
   public static class TrainerManager extends TopicBase {
 
   
 
   
     public String topicName="Quizkarte";
+
     public String topicName="Trainer";
     public transient List<Quizkarte> mQuizkartes=new ArrayList<Quizkarte>();
+
     public transient List<Trainer> mTrainers=new ArrayList<Trainer>();
     public transient Map<String,Quizkarte> mQuizkarteMap=new LinkedHashMap<String,Quizkarte>();
+
     public transient Map<String,Trainer> mTrainerMap=new LinkedHashMap<String,Trainer>();
  
 
     /**
 
     /**
     * get my Quizkarten
+
     * get my Trainers
 
     */
 
     */
     public List<Quizkarte> getQuizkarten() {
+
     public List<Trainer> getTrainers() {
       List<Quizkarte> result=this.mQuizkartes;
+
       List<Trainer> result=this.mTrainers;
 
       return result;
 
       return result;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new Quizkarte
+
     *  add a new Trainer
 
     */
 
     */
     public Quizkarte add(Quizkarte pQuizkarte) {
+
     public Trainer add(Trainer pTrainer) {
       mQuizkartes.add(pQuizkarte);
+
       mTrainers.add(pTrainer);
       mQuizkarteMap.put(pQuizkarte.getPageid(),pQuizkarte);
+
       mTrainerMap.put(pTrainer.getPageid(),pTrainer);
       return pQuizkarte;
+
       return pTrainer;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new Quizkarte from the given triple
+
     *  add a new Trainer from the given triple
 
     */
 
     */
     public Quizkarte add(TripleQuery query,Triple pQuizkarteTriple) {
+
     public Trainer add(TripleQuery query,Triple pTrainerTriple) {
       Quizkarte lQuizkarte=new Quizkarte(query,pQuizkarteTriple);
+
       Trainer lTrainer=new Trainer(query,pTrainerTriple);
       add(lQuizkarte);
+
       add(lTrainer);
       return lQuizkarte;
+
       return lTrainer;
 
     }
 
     }
  
     // reinitialize my mQuizkarte map
+
     // reinitialize my mTrainer map
 
     public void reinit() {
 
     public void reinit() {
       mQuizkarteMap.clear();
+
       mTrainerMap.clear();
       for (Quizkarte lQuizkarte:mQuizkartes) {
+
       for (Trainer lTrainer:mTrainers) {
         mQuizkarteMap.put(lQuizkarte.getPageid(),lQuizkarte);
+
         mTrainerMap.put(lTrainer.getPageid(),lTrainer);
 
       }
 
       }
 
     }
 
     }
Line 1,014: Line 772:
 
      
 
      
 
     // get a new manager from the given json string
 
     // get a new manager from the given json string
     public static QuizkarteManager fromJson(String json) {
+
     public static TrainerManager fromJson(String json) {
       QuizkarteManager result=JSON.parseObject(json, QuizkarteManager.class);
+
       TrainerManager result=JSON.parseObject(json, TrainerManager.class);
 
       result.reinit();
 
       result.reinit();
 
       return result;
 
       return result;
 
     }
 
     }
  
     // default constructor for Quizkarte Manager
+
     // default constructor for Trainer Manager
     public QuizkarteManager() {}
+
     public TrainerManager() {}
  
     // add Quizkarten from the given query
+
     // add Trainers from the given query
     public void addQuizkarten(TripleQuery pQuizkarteQuery,TripleQuery query) {
+
     public void addTrainers(TripleQuery pTrainerQuery,TripleQuery query) {
       if (pQuizkarteQuery!=null) {
+
       if (pTrainerQuery!=null) {
         for (Triple lQuizkarteTriple:pQuizkarteQuery.getTriples()) {
+
         for (Triple lTrainerTriple:pTrainerQuery.getTriples()) {
           add(query,lQuizkarteTriple);
+
           add(query,lTrainerTriple);
 
         }
 
         }
 
       }
 
       }
Line 1,033: Line 791:
  
 
     // construct me from the given triple Query query
 
     // construct me from the given triple Query query
     public QuizkarteManager(TripleQuery query) {
+
     public TrainerManager(TripleQuery query) {
 
       // first query the SiDIF bases triplestore
 
       // first query the SiDIF bases triplestore
       TripleQuery lQuizkarteQuery=query.query(null,"isA","Quizkarte");
+
       TripleQuery lTrainerQuery=query.query(null,"isA","Trainer");
       addQuizkarten(lQuizkarteQuery,query);
+
       addTrainers(lTrainerQuery,query);
 
       // then the SMW triplestore
 
       // then the SMW triplestore
       lQuizkarteQuery=query.query(null,"Property:IsA","Quizkarte");
+
       lTrainerQuery=query.query(null,"Property:IsA","Trainer");
       addQuizkarten(lQuizkarteQuery,query);
+
       addTrainers(lTrainerQuery,query);
 
       init(query);
 
       init(query);
     } // constructor for Quizkarte Manager
+
     } // constructor for Trainer Manager
 
      
 
      
     // >>>{user defined topicmanager code}{Quizkarte}{Quizkarte}
+
     // >>>{user defined topicmanager code}{Trainer}{Trainer}
     // <<<{user defined topicmanager code}{Quizkarte}{Quizkarte}
+
     // <<<{user defined topicmanager code}{Trainer}{Trainer}
   } // class Quizkarte Manager
+
   } // class Trainer Manager
 
  /**
 
  /**
   * TrainingChapter
+
   * SeminarTopic
   * A TrainingChapter is a chapter of material for a training e.g. in Powerpoint or PDF format - the filename is given without extension
+
   * A SeminarTopic is the topic of one or more Seminars
 
   */
 
   */
   public static class TrainingChapter extends TopicBase {
+
   public static class SeminarTopic extends TopicBase {
 
    
 
    
     public String id;
+
     public String name;
     public String title;
+
     public String logo;
     public String title_en;
+
     public String level;
     public String filename;
+
     public String licensee;
     public String filename_en;
+
     public String licenseeUrl;
     public String material;
+
     public String overview;
 +
    public String page;
 +
    public String syllabus;
 +
    public String overview_en;
 +
    public String page_en;
 +
    public String syllabus_en;
 +
    public String syllabusPdf;
 +
    public String syllabusPdf_en;
  
     public String getId() { return id; }
+
     public String getName() { return name; }
     public void setId(String pId) { id=pId; }
+
     public void setName(String pName) { name=pName; }
     public String getTitle() { return title; }
+
     public String getLogo() { return logo; }
     public void setTitle(String pTitle) { title=pTitle; }
+
     public void setLogo(String pLogo) { logo=pLogo; }
     public String getTitle_en() { return title_en; }
+
     public String getLevel() { return level; }
     public void setTitle_en(String pTitle_en) { title_en=pTitle_en; }
+
     public void setLevel(String pLevel) { level=pLevel; }
     public String getFilename() { return filename; }
+
     public String getLicensee() { return licensee; }
     public void setFilename(String pFilename) { filename=pFilename; }
+
     public void setLicensee(String pLicensee) { licensee=pLicensee; }
     public String getFilename_en() { return filename_en; }
+
     public String getLicenseeUrl() { return licenseeUrl; }
     public void setFilename_en(String pFilename_en) { filename_en=pFilename_en; }
+
     public void setLicenseeUrl(String pLicenseeUrl) { licenseeUrl=pLicenseeUrl; }
     public String getMaterial() { return material; }
+
     public String getOverview() { return overview; }
     public void setMaterial(String pMaterial) { material=pMaterial; }
+
     public void setOverview(String pOverview) { overview=pOverview; }
 +
    public String getPage() { return page; }
 +
    public void setPage(String pPage) { page=pPage; }
 +
    public String getSyllabus() { return syllabus; }
 +
    public void setSyllabus(String pSyllabus) { syllabus=pSyllabus; }
 +
    public String getOverview_en() { return overview_en; }
 +
    public void setOverview_en(String pOverview_en) { overview_en=pOverview_en; }
 +
    public String getPage_en() { return page_en; }
 +
    public void setPage_en(String pPage_en) { page_en=pPage_en; }
 +
    public String getSyllabus_en() { return syllabus_en; }
 +
    public void setSyllabus_en(String pSyllabus_en) { syllabus_en=pSyllabus_en; }
 +
    public String getSyllabusPdf() { return syllabusPdf; }
 +
    public void setSyllabusPdf(String pSyllabusPdf) { syllabusPdf=pSyllabusPdf; }
 +
    public String getSyllabusPdf_en() { return syllabusPdf_en; }
 +
    public void setSyllabusPdf_en(String pSyllabusPdf_en) { syllabusPdf_en=pSyllabusPdf_en; }
 
     /**
 
     /**
     * convert this TrainingChapter to a JSON string
+
     * convert this SeminarTopic to a JSON string
 
     */
 
     */
 
     public String toJson() { return JSON.toJSONString(this); }
 
     public String toJson() { return JSON.toJSONString(this); }
  
 
     /**
 
     /**
     * convert this TrainingChapter to a WikiSon string
+
     * convert this SeminarTopic to a WikiSon string
 +
    * @return the WikiSon representation of this SeminarTopic
 
     */
 
     */
 
     public String toWikiSon() {
 
     public String toWikiSon() {
       String wikison= "{{TrainingChapter\n";
+
       String wikison= "{{SeminarTopic\n";
       wikison+=toWikiSon("id",id);
+
       wikison+=toWikiSon("name",name);
       wikison+=toWikiSon("title",title);
+
       wikison+=toWikiSon("logo",logo);
       wikison+=toWikiSon("title_en",title_en);
+
       wikison+=toWikiSon("level",level);
       wikison+=toWikiSon("filename",filename);
+
       wikison+=toWikiSon("licensee",licensee);
       wikison+=toWikiSon("filename_en",filename_en);
+
       wikison+=toWikiSon("licenseeUrl",licenseeUrl);
       wikison+=toWikiSon("material",material);
+
       wikison+=toWikiSon("overview",overview);
 +
      wikison+=toWikiSon("page",page);
 +
      wikison+=toWikiSon("syllabus",syllabus);
 +
      wikison+=toWikiSon("overview_en",overview_en);
 +
      wikison+=toWikiSon("page_en",page_en);
 +
      wikison+=toWikiSon("syllabus_en",syllabus_en);
 +
      wikison+=toWikiSon("syllabusPdf",syllabusPdf);
 +
      wikison+=toWikiSon("syllabusPdf_en",syllabusPdf_en);
 
       wikison+="}}\n";
 
       wikison+="}}\n";
 
       return wikison;
 
       return wikison;
 
     }
 
     }
 
    /** 
 
    * get the pageid for this topic
 
    */
 
    public String getPageid() { return pageid; };
 
  
 
     /**
 
     /**
     * default constructor for TrainingChapter
+
     * convert this SeminarTopic to a SiDIF string
 +
    * @return the SiDIF representation of this SeminarTopic
 
     */
 
     */
     public TrainingChapter() {}
+
     public String toSiDIF() {
 
+
       String siDIF = String.format("%s isA SeminarTopic\n",this.pageid);
    /**
+
       siDIF+=propertySiDIF("name",name,"Text");
    * construct a TrainingChapter from the given Triple
+
       siDIF+=propertySiDIF("logo",logo,"Page");
    * @param query - the TripleQuery to get the triples from
+
       siDIF+=propertySiDIF("level",level,"Text");
    * @param pTrainingChapterTriple - the triple to construct me from
+
       siDIF+=propertySiDIF("licensee",licensee,"Text");
    */
+
       siDIF+=propertySiDIF("licenseeUrl",licenseeUrl,"Text");
    public TrainingChapter(TripleQuery query,Triple pTrainingChapterTriple) {
+
       siDIF+=propertySiDIF("overview",overview,"Text");
       this(query,pTrainingChapterTriple.getSubject().toString());
+
       siDIF+=propertySiDIF("page",page,"Page");
    } // constructor
+
       siDIF+=propertySiDIF("syllabus",syllabus,"Page");
 
+
       siDIF+=propertySiDIF("overview_en",overview_en,"Text");
    /**
+
       siDIF+=propertySiDIF("page_en",page_en,"Page");
    * construct a TrainingChapter from the given pageId
+
       siDIF+=propertySiDIF("syllabus_en",syllabus_en,"Page");
    * @param query - the TripleQuery to get the triples from
+
       siDIF+=propertySiDIF("syllabusPdf",syllabusPdf,"text");
    * @param pageid - pageid
+
       siDIF+=propertySiDIF("syllabusPdf_en",syllabusPdf_en,"text");
    */
+
       return siDIF;
    public TrainingChapter(TripleQuery query,String pageid) {
 
      this.pageid=pageid;
 
       Triple idTriple=query.selectSingle(pageid,"id",null);
 
      if (idTriple==null)
 
        idTriple=query.selectSingle(pageid,"Property:TrainingChapter_id",null);
 
       if (idTriple!=null)
 
        id=idTriple.getObject().toString();
 
      Triple titleTriple=query.selectSingle(pageid,"title",null);
 
      if (titleTriple==null)
 
        titleTriple=query.selectSingle(pageid,"Property:TrainingChapter_title",null);
 
       if (titleTriple!=null)
 
        title=titleTriple.getObject().toString();
 
      Triple title_enTriple=query.selectSingle(pageid,"title_en",null);
 
      if (title_enTriple==null)
 
        title_enTriple=query.selectSingle(pageid,"Property:TrainingChapter_title_en",null);
 
       if (title_enTriple!=null)
 
        title_en=title_enTriple.getObject().toString();
 
      Triple filenameTriple=query.selectSingle(pageid,"filename",null);
 
      if (filenameTriple==null)
 
        filenameTriple=query.selectSingle(pageid,"Property:TrainingChapter_filename",null);
 
       if (filenameTriple!=null)
 
        filename=filenameTriple.getObject().toString();
 
      Triple filename_enTriple=query.selectSingle(pageid,"filename_en",null);
 
      if (filename_enTriple==null)
 
        filename_enTriple=query.selectSingle(pageid,"Property:TrainingChapter_filename_en",null);
 
       if (filename_enTriple!=null)
 
        filename_en=filename_enTriple.getObject().toString();
 
      Triple materialTriple=query.selectSingle(pageid,"material",null);
 
      if (materialTriple==null)
 
        materialTriple=query.selectSingle(pageid,"Property:TrainingChapter_material",null);
 
       if (materialTriple!=null)
 
        material=materialTriple.getObject().toString();
 
      init(query);
 
    } // constructor for TrainingChapter
 
   
 
    // >>>{user defined topic code}{TrainingChapter}{TrainingChapter}
 
    // <<<{user defined topic code}{TrainingChapter}{TrainingChapter}
 
  } // class TrainingChapter
 
  /**
 
  * Manager for TrainingChapter
 
  */
 
  public static class TrainingChapterManager extends TopicBase {
 
 
    public String topicName="TrainingChapter";
 
    public transient List<TrainingChapter> mTrainingChapters=new ArrayList<TrainingChapter>();
 
    public transient Map<String,TrainingChapter> mTrainingChapterMap=new LinkedHashMap<String,TrainingChapter>();
 
 
 
    /**
 
    * get my TrainingChapters
 
    */
 
    public List<TrainingChapter> getTrainingChapters() {
 
       List<TrainingChapter> result=this.mTrainingChapters;
 
      return result;
 
    }
 
 
 
    /**
 
    *  add a new TrainingChapter
 
    */
 
    public TrainingChapter add(TrainingChapter pTrainingChapter) {
 
      mTrainingChapters.add(pTrainingChapter);
 
      mTrainingChapterMap.put(pTrainingChapter.getPageid(),pTrainingChapter);
 
      return pTrainingChapter;
 
    }
 
 
 
    /**
 
    *  add a new TrainingChapter from the given triple
 
    */
 
    public TrainingChapter add(TripleQuery query,Triple pTrainingChapterTriple) {
 
      TrainingChapter lTrainingChapter=new TrainingChapter(query,pTrainingChapterTriple);
 
      add(lTrainingChapter);
 
      return lTrainingChapter;
 
    }
 
 
 
    // reinitialize my mTrainingChapter map
 
    public void reinit() {
 
      mTrainingChapterMap.clear();
 
      for (TrainingChapter lTrainingChapter:mTrainingChapters) {
 
        mTrainingChapterMap.put(lTrainingChapter.getPageid(),lTrainingChapter);
 
      }
 
    }
 
 
 
    // convert this manager to json format
 
    public String toJson() { return JSON.toJSONString(this); }
 
   
 
    // get a new manager from the given json string
 
    public static TrainingChapterManager fromJson(String json) {
 
      TrainingChapterManager result=JSON.parseObject(json, TrainingChapterManager.class);
 
      result.reinit();
 
      return result;
 
    }
 
 
 
    // default constructor for TrainingChapter Manager
 
    public TrainingChapterManager() {}
 
 
 
    // add TrainingChapters from the given query
 
    public void addTrainingChapters(TripleQuery pTrainingChapterQuery,TripleQuery query) {
 
      if (pTrainingChapterQuery!=null) {
 
        for (Triple lTrainingChapterTriple:pTrainingChapterQuery.getTriples()) {
 
          add(query,lTrainingChapterTriple);
 
        }
 
      }
 
    }
 
 
 
    // construct me from the given triple Query query
 
    public TrainingChapterManager(TripleQuery query) {
 
      // first query the SiDIF bases triplestore
 
      TripleQuery lTrainingChapterQuery=query.query(null,"isA","TrainingChapter");
 
       addTrainingChapters(lTrainingChapterQuery,query);
 
      // then the SMW triplestore
 
      lTrainingChapterQuery=query.query(null,"Property:IsA","TrainingChapter");
 
       addTrainingChapters(lTrainingChapterQuery,query);
 
      init(query);
 
    } // constructor for TrainingChapter Manager
 
   
 
    // >>>{user defined topicmanager code}{TrainingChapter}{TrainingChapter}
 
    // <<<{user defined topicmanager code}{TrainingChapter}{TrainingChapter}
 
  } // class TrainingChapter Manager
 
/**
 
  * TrainingMaterial
 
  * A TrainingMaterial is a collection of computer documents to be used for a training
 
  */
 
  public static class TrainingMaterial extends TopicBase {
 
 
 
    public String id;
 
    public String topic;
 
    public String folder;
 
    public String slides_de;
 
    public String slides_en;
 
    public String since;
 
 
 
    public String getId() { return id; }
 
    public void setId(String pId) { id=pId; }
 
    public String getTopic() { return topic; }
 
    public void setTopic(String pTopic) { topic=pTopic; }
 
    public String getFolder() { return folder; }
 
    public void setFolder(String pFolder) { folder=pFolder; }
 
    public String getSlides_de() { return slides_de; }
 
    public void setSlides_de(String pSlides_de) { slides_de=pSlides_de; }
 
    public String getSlides_en() { return slides_en; }
 
    public void setSlides_en(String pSlides_en) { slides_en=pSlides_en; }
 
    public String getSince() { return since; }
 
    public void setSince(String pSince) { since=pSince; }
 
    /**
 
    * convert this TrainingMaterial to a JSON string
 
    */
 
    public String toJson() { return JSON.toJSONString(this); }
 
 
 
    /**
 
    * convert this TrainingMaterial to a WikiSon string
 
    */
 
    public String toWikiSon() {
 
      String wikison= "{{TrainingMaterial\n";
 
      wikison+=toWikiSon("id",id);
 
       wikison+=toWikiSon("topic",topic);
 
      wikison+=toWikiSon("folder",folder);
 
       wikison+=toWikiSon("slides_de",slides_de);
 
      wikison+=toWikiSon("slides_en",slides_en);
 
       wikison+=toWikiSon("since",since);
 
      wikison+="}}\n";
 
       return wikison;
 
 
     }
 
     }
 
   
 
   
Line 1,283: Line 906:
  
 
     /**
 
     /**
     * default constructor for TrainingMaterial
+
     * default constructor for SeminarTopic
 
     */
 
     */
     public TrainingMaterial() {}
+
     public SeminarTopic() {}
  
 
     /**
 
     /**
     * construct a TrainingMaterial from the given Triple
+
     * construct a SeminarTopic from the given Triple
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
     * @param pTrainingMaterialTriple - the triple to construct me from
+
     * @param pSeminarTopicTriple - the triple to construct me from
 
     */
 
     */
     public TrainingMaterial(TripleQuery query,Triple pTrainingMaterialTriple) {
+
     public SeminarTopic(TripleQuery query,Triple pSeminarTopicTriple) {
       this(query,pTrainingMaterialTriple.getSubject().toString());
+
       this(query,pSeminarTopicTriple.getSubject().toString());
 
     } // constructor
 
     } // constructor
  
 
     /**
 
     /**
     * construct a TrainingMaterial from the given pageId
+
     * construct a SeminarTopic from the given pageId
 
     * @param query - the TripleQuery to get the triples from
 
     * @param query - the TripleQuery to get the triples from
 
     * @param pageid - pageid
 
     * @param pageid - pageid
 
     */
 
     */
     public TrainingMaterial(TripleQuery query,String pageid) {
+
     public SeminarTopic(TripleQuery query,String pageid) {
 
       this.pageid=pageid;
 
       this.pageid=pageid;
       Triple idTriple=query.selectSingle(pageid,"id",null);
+
       Triple nameTriple=query.selectSingle(pageid,"name",null);
       if (idTriple==null)
+
       if (nameTriple==null)
         idTriple=query.selectSingle(pageid,"Property:TrainingMaterial_id",null);
+
         nameTriple=query.selectSingle(pageid,"Property:SeminarTopic_name",null);
       if (idTriple!=null)  
+
       if (nameTriple!=null)  
         id=idTriple.getObject().toString();
+
         name=nameTriple.getObject().toString();
       Triple topicTriple=query.selectSingle(pageid,"topic",null);
+
       Triple logoTriple=query.selectSingle(pageid,"logo",null);
       if (topicTriple==null)
+
       if (logoTriple==null)
         topicTriple=query.selectSingle(pageid,"Property:TrainingMaterial_topic",null);
+
         logoTriple=query.selectSingle(pageid,"Property:SeminarTopic_logo",null);
       if (topicTriple!=null)  
+
       if (logoTriple!=null)  
         topic=topicTriple.getObject().toString();
+
         logo=logoTriple.getObject().toString();
       Triple folderTriple=query.selectSingle(pageid,"folder",null);
+
       Triple levelTriple=query.selectSingle(pageid,"level",null);
       if (folderTriple==null)
+
       if (levelTriple==null)
         folderTriple=query.selectSingle(pageid,"Property:TrainingMaterial_folder",null);
+
         levelTriple=query.selectSingle(pageid,"Property:SeminarTopic_level",null);
       if (folderTriple!=null)  
+
       if (levelTriple!=null)  
         folder=folderTriple.getObject().toString();
+
         level=levelTriple.getObject().toString();
       Triple slides_deTriple=query.selectSingle(pageid,"slides_de",null);
+
       Triple licenseeTriple=query.selectSingle(pageid,"licensee",null);
       if (slides_deTriple==null)
+
       if (licenseeTriple==null)
         slides_deTriple=query.selectSingle(pageid,"Property:TrainingMaterial_slides_de",null);
+
         licenseeTriple=query.selectSingle(pageid,"Property:SeminarTopic_licensee",null);
       if (slides_deTriple!=null)  
+
       if (licenseeTriple!=null)  
         slides_de=slides_deTriple.getObject().toString();
+
         licensee=licenseeTriple.getObject().toString();
       Triple slides_enTriple=query.selectSingle(pageid,"slides_en",null);
+
       Triple licenseeUrlTriple=query.selectSingle(pageid,"licenseeUrl",null);
       if (slides_enTriple==null)
+
       if (licenseeUrlTriple==null)
         slides_enTriple=query.selectSingle(pageid,"Property:TrainingMaterial_slides_en",null);
+
         licenseeUrlTriple=query.selectSingle(pageid,"Property:SeminarTopic_licenseeUrl",null);
       if (slides_enTriple!=null)  
+
       if (licenseeUrlTriple!=null)  
         slides_en=slides_enTriple.getObject().toString();
+
         licenseeUrl=licenseeUrlTriple.getObject().toString();
       Triple sinceTriple=query.selectSingle(pageid,"since",null);
+
       Triple overviewTriple=query.selectSingle(pageid,"overview",null);
       if (sinceTriple==null)
+
       if (overviewTriple==null)
         sinceTriple=query.selectSingle(pageid,"Property:TrainingMaterial_since",null);
+
         overviewTriple=query.selectSingle(pageid,"Property:SeminarTopic_overview",null);
       if (sinceTriple!=null)  
+
       if (overviewTriple!=null)  
         since=sinceTriple.getObject().toString();
+
         overview=overviewTriple.getObject().toString();
      init(query);
+
       Triple pageTriple=query.selectSingle(pageid,"page",null);
    } // constructor for TrainingMaterial
+
       if (pageTriple==null)
   
+
         pageTriple=query.selectSingle(pageid,"Property:SeminarTopic_page",null);
    // >>>{user defined topic code}{TrainingMaterial}{TrainingMaterial}
+
       if (pageTriple!=null)  
    // <<<{user defined topic code}{TrainingMaterial}{TrainingMaterial}
+
         page=pageTriple.getObject().toString();
  } // class TrainingMaterial
+
       Triple syllabusTriple=query.selectSingle(pageid,"syllabus",null);
  /**
+
       if (syllabusTriple==null)
  * Manager for TrainingMaterial
+
         syllabusTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabus",null);
  */
+
       if (syllabusTriple!=null)  
  public static class TrainingMaterialManager extends TopicBase {
+
         syllabus=syllabusTriple.getObject().toString();
+
       Triple overview_enTriple=query.selectSingle(pageid,"overview_en",null);
    public String topicName="TrainingMaterial";
+
       if (overview_enTriple==null)
    public transient List<TrainingMaterial> mTrainingMaterials=new ArrayList<TrainingMaterial>();
+
         overview_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_overview_en",null);
    public transient Map<String,TrainingMaterial> mTrainingMaterialMap=new LinkedHashMap<String,TrainingMaterial>();
+
       if (overview_enTriple!=null)  
 
+
         overview_en=overview_enTriple.getObject().toString();
    /**
+
       Triple page_enTriple=query.selectSingle(pageid,"page_en",null);
    * get my TrainingMaterials
+
       if (page_enTriple==null)
    */
+
         page_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_page_en",null);
    public List<TrainingMaterial> getTrainingMaterials() {
+
       if (page_enTriple!=null)  
      List<TrainingMaterial> result=this.mTrainingMaterials;
+
         page_en=page_enTriple.getObject().toString();
      return result;
+
       Triple syllabus_enTriple=query.selectSingle(pageid,"syllabus_en",null);
    }
+
       if (syllabus_enTriple==null)
 
+
         syllabus_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabus_en",null);
    /**
+
       if (syllabus_enTriple!=null)  
    *  add a new TrainingMaterial
+
         syllabus_en=syllabus_enTriple.getObject().toString();
    */
+
       Triple syllabusPdfTriple=query.selectSingle(pageid,"syllabusPdf",null);
    public TrainingMaterial add(TrainingMaterial pTrainingMaterial) {
+
       if (syllabusPdfTriple==null)
      mTrainingMaterials.add(pTrainingMaterial);
+
         syllabusPdfTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabusPdf",null);
      mTrainingMaterialMap.put(pTrainingMaterial.getPageid(),pTrainingMaterial);
+
       if (syllabusPdfTriple!=null)  
      return pTrainingMaterial;
+
         syllabusPdf=syllabusPdfTriple.getObject().toString();
    }
+
       Triple syllabusPdf_enTriple=query.selectSingle(pageid,"syllabusPdf_en",null);
 
+
       if (syllabusPdf_enTriple==null)
    /**
+
         syllabusPdf_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabusPdf_en",null);
    *  add a new TrainingMaterial from the given triple
+
       if (syllabusPdf_enTriple!=null)  
    */
+
         syllabusPdf_en=syllabusPdf_enTriple.getObject().toString();
    public TrainingMaterial add(TripleQuery query,Triple pTrainingMaterialTriple) {
 
      TrainingMaterial lTrainingMaterial=new TrainingMaterial(query,pTrainingMaterialTriple);
 
      add(lTrainingMaterial);
 
      return lTrainingMaterial;
 
    }
 
 
 
    // reinitialize my mTrainingMaterial map
 
    public void reinit() {
 
      mTrainingMaterialMap.clear();
 
      for (TrainingMaterial lTrainingMaterial:mTrainingMaterials) {
 
        mTrainingMaterialMap.put(lTrainingMaterial.getPageid(),lTrainingMaterial);
 
      }
 
    }
 
 
 
    // convert this manager to json format
 
    public String toJson() { return JSON.toJSONString(this); }
 
   
 
    // get a new manager from the given json string
 
    public static TrainingMaterialManager fromJson(String json) {
 
      TrainingMaterialManager result=JSON.parseObject(json, TrainingMaterialManager.class);
 
      result.reinit();
 
      return result;
 
    }
 
 
 
    // default constructor for TrainingMaterial Manager
 
    public TrainingMaterialManager() {}
 
 
 
    // add TrainingMaterials from the given query
 
    public void addTrainingMaterials(TripleQuery pTrainingMaterialQuery,TripleQuery query) {
 
      if (pTrainingMaterialQuery!=null) {
 
        for (Triple lTrainingMaterialTriple:pTrainingMaterialQuery.getTriples()) {
 
          add(query,lTrainingMaterialTriple);
 
        }
 
      }
 
    }
 
 
 
    // construct me from the given triple Query query
 
    public TrainingMaterialManager(TripleQuery query) {
 
      // first query the SiDIF bases triplestore
 
      TripleQuery lTrainingMaterialQuery=query.query(null,"isA","TrainingMaterial");
 
      addTrainingMaterials(lTrainingMaterialQuery,query);
 
      // then the SMW triplestore
 
      lTrainingMaterialQuery=query.query(null,"Property:IsA","TrainingMaterial");
 
      addTrainingMaterials(lTrainingMaterialQuery,query);
 
      init(query);
 
    } // constructor for TrainingMaterial Manager
 
   
 
    // >>>{user defined topicmanager code}{TrainingMaterial}{TrainingMaterial}
 
    // <<<{user defined topicmanager code}{TrainingMaterial}{TrainingMaterial}
 
  } // class TrainingMaterial Manager
 
/**
 
  * Seminar
 
  * Ein Seminar ist die Durchfuehrung einer Ausbildungsveranstaltung an einem bestimmten Ort in einem bestimmten Zeitraum zu einem bestimmten Thema
 
  */
 
  public static class Seminar extends TopicBase {
 
 
 
    public String kind;
 
    public String lang;
 
    public String thema;
 
    public String year;
 
    public String month;
 
    public String inHouse;
 
    public String city;
 
    public String from;
 
    public String to;
 
    public String title;
 
    public String contact;
 
    public String customer;
 
 
 
    public String getKind() { return kind; }
 
    public void setKind(String pKind) { kind=pKind; }
 
    public String getLang() { return lang; }
 
    public void setLang(String pLang) { lang=pLang; }
 
    public String getThema() { return thema; }
 
    public void setThema(String pThema) { thema=pThema; }
 
    public String getYear() { return year; }
 
    public void setYear(String pYear) { year=pYear; }
 
    public String getMonth() { return month; }
 
    public void setMonth(String pMonth) { month=pMonth; }
 
    public String getInHouse() { return inHouse; }
 
    public void setInHouse(String pInHouse) { inHouse=pInHouse; }
 
    public String getCity() { return city; }
 
    public void setCity(String pCity) { city=pCity; }
 
    public String getFrom() { return from; }
 
    public void setFrom(String pFrom) { from=pFrom; }
 
    public String getTo() { return to; }
 
    public void setTo(String pTo) { to=pTo; }
 
    public String getTitle() { return title; }
 
    public void setTitle(String pTitle) { title=pTitle; }
 
    public String getContact() { return contact; }
 
    public void setContact(String pContact) { contact=pContact; }
 
    public String getCustomer() { return customer; }
 
    public void setCustomer(String pCustomer) { customer=pCustomer; }
 
    /**
 
    * convert this Seminar to a JSON string
 
    */
 
    public String toJson() { return JSON.toJSONString(this); }
 
 
 
    /**
 
    * convert this Seminar to a WikiSon string
 
    */
 
    public String toWikiSon() {
 
      String wikison= "{{Seminar\n";
 
      wikison+=toWikiSon("kind",kind);
 
      wikison+=toWikiSon("lang",lang);
 
      wikison+=toWikiSon("thema",thema);
 
      wikison+=toWikiSon("year",year);
 
      wikison+=toWikiSon("month",month);
 
      wikison+=toWikiSon("inHouse",inHouse);
 
      wikison+=toWikiSon("city",city);
 
      wikison+=toWikiSon("from",from);
 
      wikison+=toWikiSon("to",to);
 
      wikison+=toWikiSon("title",title);
 
      wikison+=toWikiSon("contact",contact);
 
      wikison+=toWikiSon("customer",customer);
 
      wikison+="}}\n";
 
      return wikison;
 
    }
 
 
    /** 
 
    * get the pageid for this topic
 
    */
 
    public String getPageid() { return pageid; };
 
 
 
    /**
 
    * default constructor for Seminar
 
    */
 
    public Seminar() {}
 
 
 
    /**
 
    * construct a Seminar from the given Triple
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pSeminarTriple - the triple to construct me from
 
    */
 
    public Seminar(TripleQuery query,Triple pSeminarTriple) {
 
      this(query,pSeminarTriple.getSubject().toString());
 
    } // constructor
 
 
 
    /**
 
    * construct a Seminar from the given pageId
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pageid - pageid
 
    */
 
    public Seminar(TripleQuery query,String pageid) {
 
      this.pageid=pageid;
 
      Triple kindTriple=query.selectSingle(pageid,"kind",null);
 
      if (kindTriple==null)
 
        kindTriple=query.selectSingle(pageid,"Property:Seminar_kind",null);
 
      if (kindTriple!=null)
 
        kind=kindTriple.getObject().toString();
 
      Triple langTriple=query.selectSingle(pageid,"lang",null);
 
      if (langTriple==null)
 
        langTriple=query.selectSingle(pageid,"Property:Seminar_lang",null);
 
      if (langTriple!=null)
 
        lang=langTriple.getObject().toString();
 
      Triple themaTriple=query.selectSingle(pageid,"thema",null);
 
      if (themaTriple==null)
 
        themaTriple=query.selectSingle(pageid,"Property:Seminar_thema",null);
 
      if (themaTriple!=null)
 
        thema=themaTriple.getObject().toString();
 
      Triple yearTriple=query.selectSingle(pageid,"year",null);
 
      if (yearTriple==null)
 
        yearTriple=query.selectSingle(pageid,"Property:Seminar_year",null);
 
      if (yearTriple!=null)
 
        year=yearTriple.getObject().toString();
 
      Triple monthTriple=query.selectSingle(pageid,"month",null);
 
      if (monthTriple==null)
 
        monthTriple=query.selectSingle(pageid,"Property:Seminar_month",null);
 
      if (monthTriple!=null)
 
        month=monthTriple.getObject().toString();
 
      Triple inHouseTriple=query.selectSingle(pageid,"inHouse",null);
 
      if (inHouseTriple==null)
 
        inHouseTriple=query.selectSingle(pageid,"Property:Seminar_inHouse",null);
 
      if (inHouseTriple!=null)
 
        inHouse=inHouseTriple.getObject().toString();
 
      Triple cityTriple=query.selectSingle(pageid,"city",null);
 
      if (cityTriple==null)
 
        cityTriple=query.selectSingle(pageid,"Property:Seminar_city",null);
 
      if (cityTriple!=null)
 
        city=cityTriple.getObject().toString();
 
      Triple fromTriple=query.selectSingle(pageid,"from",null);
 
      if (fromTriple==null)
 
        fromTriple=query.selectSingle(pageid,"Property:Seminar_from",null);
 
      if (fromTriple!=null)
 
        from=fromTriple.getObject().toString();
 
      Triple toTriple=query.selectSingle(pageid,"to",null);
 
      if (toTriple==null)
 
        toTriple=query.selectSingle(pageid,"Property:Seminar_to",null);
 
      if (toTriple!=null)
 
        to=toTriple.getObject().toString();
 
      Triple titleTriple=query.selectSingle(pageid,"title",null);
 
      if (titleTriple==null)
 
        titleTriple=query.selectSingle(pageid,"Property:Seminar_title",null);
 
      if (titleTriple!=null)
 
        title=titleTriple.getObject().toString();
 
      Triple contactTriple=query.selectSingle(pageid,"contact",null);
 
      if (contactTriple==null)
 
        contactTriple=query.selectSingle(pageid,"Property:Seminar_contact",null);
 
      if (contactTriple!=null)
 
        contact=contactTriple.getObject().toString();
 
      Triple customerTriple=query.selectSingle(pageid,"customer",null);
 
      if (customerTriple==null)
 
        customerTriple=query.selectSingle(pageid,"Property:Seminar_customer",null);
 
      if (customerTriple!=null)
 
        customer=customerTriple.getObject().toString();
 
      init(query);
 
    } // constructor for Seminar
 
   
 
    // >>>{user defined topic code}{Seminar}{Seminar}
 
    // <<<{user defined topic code}{Seminar}{Seminar}
 
  } // class Seminar
 
  /**
 
  * Manager for Seminar
 
  */
 
  public static class SeminarManager extends TopicBase {
 
 
    public String topicName="Seminar";
 
    public transient List<Seminar> mSeminars=new ArrayList<Seminar>();
 
    public transient Map<String,Seminar> mSeminarMap=new LinkedHashMap<String,Seminar>();
 
 
 
    /**
 
    * get my Seminars
 
    */
 
    public List<Seminar> getSeminars() {
 
      List<Seminar> result=this.mSeminars;
 
      return result;
 
    }
 
 
 
    /**
 
    *  add a new Seminar
 
    */
 
    public Seminar add(Seminar pSeminar) {
 
      mSeminars.add(pSeminar);
 
      mSeminarMap.put(pSeminar.getPageid(),pSeminar);
 
      return pSeminar;
 
    }
 
 
 
    /**
 
    *  add a new Seminar from the given triple
 
    */
 
    public Seminar add(TripleQuery query,Triple pSeminarTriple) {
 
      Seminar lSeminar=new Seminar(query,pSeminarTriple);
 
      add(lSeminar);
 
      return lSeminar;
 
    }
 
 
 
    // reinitialize my mSeminar map
 
    public void reinit() {
 
      mSeminarMap.clear();
 
      for (Seminar lSeminar:mSeminars) {
 
        mSeminarMap.put(lSeminar.getPageid(),lSeminar);
 
      }
 
    }
 
 
 
    // convert this manager to json format
 
    public String toJson() { return JSON.toJSONString(this); }
 
   
 
    // get a new manager from the given json string
 
    public static SeminarManager fromJson(String json) {
 
      SeminarManager result=JSON.parseObject(json, SeminarManager.class);
 
      result.reinit();
 
      return result;
 
    }
 
 
 
    // default constructor for Seminar Manager
 
    public SeminarManager() {}
 
 
 
    // add Seminars from the given query
 
    public void addSeminars(TripleQuery pSeminarQuery,TripleQuery query) {
 
      if (pSeminarQuery!=null) {
 
        for (Triple lSeminarTriple:pSeminarQuery.getTriples()) {
 
          add(query,lSeminarTriple);
 
        }
 
      }
 
    }
 
 
 
    // construct me from the given triple Query query
 
    public SeminarManager(TripleQuery query) {
 
      // first query the SiDIF bases triplestore
 
      TripleQuery lSeminarQuery=query.query(null,"isA","Seminar");
 
      addSeminars(lSeminarQuery,query);
 
      // then the SMW triplestore
 
      lSeminarQuery=query.query(null,"Property:IsA","Seminar");
 
      addSeminars(lSeminarQuery,query);
 
      init(query);
 
    } // constructor for Seminar Manager
 
   
 
    // >>>{user defined topicmanager code}{Seminar}{Seminar}
 
    // <<<{user defined topicmanager code}{Seminar}{Seminar}
 
  } // class Seminar Manager
 
/**
 
  * SeminarInterview
 
  * A seminarinterview clarifies and documens the prerequisites and expectations of participants of a Seminar
 
  */
 
  public static class SeminarInterview extends TopicBase {
 
 
 
    public String Teilnehmer;
 
    public String versucht;
 
    public String anmeldeQuelle;
 
    public String empfehlung;
 
    public String erreicht;
 
    public String Rolle;
 
    public String Ausbildung;
 
    public String Umfeld;
 
    public String UMLVorkenntnisse;
 
    public String Erwartungen;
 
    public String comment;
 
    public String SeminarVeranstaltung;
 
 
 
    public String getTeilnehmer() { return Teilnehmer; }
 
    public void setTeilnehmer(String pTeilnehmer) { Teilnehmer=pTeilnehmer; }
 
    public String getVersucht() { return versucht; }
 
    public void setVersucht(String pVersucht) { versucht=pVersucht; }
 
    public String getAnmeldeQuelle() { return anmeldeQuelle; }
 
    public void setAnmeldeQuelle(String pAnmeldeQuelle) { anmeldeQuelle=pAnmeldeQuelle; }
 
    public String getEmpfehlung() { return empfehlung; }
 
    public void setEmpfehlung(String pEmpfehlung) { empfehlung=pEmpfehlung; }
 
    public String getErreicht() { return erreicht; }
 
    public void setErreicht(String pErreicht) { erreicht=pErreicht; }
 
    public String getRolle() { return Rolle; }
 
    public void setRolle(String pRolle) { Rolle=pRolle; }
 
    public String getAusbildung() { return Ausbildung; }
 
    public void setAusbildung(String pAusbildung) { Ausbildung=pAusbildung; }
 
    public String getUmfeld() { return Umfeld; }
 
    public void setUmfeld(String pUmfeld) { Umfeld=pUmfeld; }
 
    public String getUMLVorkenntnisse() { return UMLVorkenntnisse; }
 
    public void setUMLVorkenntnisse(String pUMLVorkenntnisse) { UMLVorkenntnisse=pUMLVorkenntnisse; }
 
    public String getErwartungen() { return Erwartungen; }
 
    public void setErwartungen(String pErwartungen) { Erwartungen=pErwartungen; }
 
    public String getComment() { return comment; }
 
    public void setComment(String pComment) { comment=pComment; }
 
    public String getSeminarVeranstaltung() { return SeminarVeranstaltung; }
 
    public void setSeminarVeranstaltung(String pSeminarVeranstaltung) { SeminarVeranstaltung=pSeminarVeranstaltung; }
 
    /**
 
    * convert this SeminarInterview to a JSON string
 
    */
 
    public String toJson() { return JSON.toJSONString(this); }
 
 
 
    /**
 
    * convert this SeminarInterview to a WikiSon string
 
    */
 
    public String toWikiSon() {
 
      String wikison= "{{SeminarInterview\n";
 
      wikison+=toWikiSon("Teilnehmer",Teilnehmer);
 
      wikison+=toWikiSon("versucht",versucht);
 
      wikison+=toWikiSon("anmeldeQuelle",anmeldeQuelle);
 
      wikison+=toWikiSon("empfehlung",empfehlung);
 
      wikison+=toWikiSon("erreicht",erreicht);
 
      wikison+=toWikiSon("Rolle",Rolle);
 
      wikison+=toWikiSon("Ausbildung",Ausbildung);
 
      wikison+=toWikiSon("Umfeld",Umfeld);
 
      wikison+=toWikiSon("UMLVorkenntnisse",UMLVorkenntnisse);
 
      wikison+=toWikiSon("Erwartungen",Erwartungen);
 
      wikison+=toWikiSon("comment",comment);
 
      wikison+=toWikiSon("SeminarVeranstaltung",SeminarVeranstaltung);
 
      wikison+="}}\n";
 
      return wikison;
 
    }
 
 
    /** 
 
    * get the pageid for this topic
 
    */
 
    public String getPageid() { return pageid; };
 
 
 
    /**
 
    * default constructor for SeminarInterview
 
    */
 
    public SeminarInterview() {}
 
 
 
    /**
 
    * construct a SeminarInterview from the given Triple
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pSeminarInterviewTriple - the triple to construct me from
 
    */
 
    public SeminarInterview(TripleQuery query,Triple pSeminarInterviewTriple) {
 
      this(query,pSeminarInterviewTriple.getSubject().toString());
 
    } // constructor
 
 
 
    /**
 
    * construct a SeminarInterview from the given pageId
 
    * @param query - the TripleQuery to get the triples from
 
    * @param pageid - pageid
 
    */
 
    public SeminarInterview(TripleQuery query,String pageid) {
 
      this.pageid=pageid;
 
      Triple TeilnehmerTriple=query.selectSingle(pageid,"Teilnehmer",null);
 
      if (TeilnehmerTriple==null)
 
        TeilnehmerTriple=query.selectSingle(pageid,"Property:SeminarInterview_Teilnehmer",null);
 
      if (TeilnehmerTriple!=null)
 
        Teilnehmer=TeilnehmerTriple.getObject().toString();
 
      Triple versuchtTriple=query.selectSingle(pageid,"versucht",null);
 
      if (versuchtTriple==null)
 
        versuchtTriple=query.selectSingle(pageid,"Property:SeminarInterview_versucht",null);
 
      if (versuchtTriple!=null)
 
        versucht=versuchtTriple.getObject().toString();
 
      Triple anmeldeQuelleTriple=query.selectSingle(pageid,"anmeldeQuelle",null);
 
      if (anmeldeQuelleTriple==null)
 
        anmeldeQuelleTriple=query.selectSingle(pageid,"Property:SeminarInterview_anmeldeQuelle",null);
 
      if (anmeldeQuelleTriple!=null)
 
        anmeldeQuelle=anmeldeQuelleTriple.getObject().toString();
 
      Triple empfehlungTriple=query.selectSingle(pageid,"empfehlung",null);
 
      if (empfehlungTriple==null)
 
        empfehlungTriple=query.selectSingle(pageid,"Property:SeminarInterview_empfehlung",null);
 
      if (empfehlungTriple!=null)
 
        empfehlung=empfehlungTriple.getObject().toString();
 
      Triple erreichtTriple=query.selectSingle(pageid,"erreicht",null);
 
      if (erreichtTriple==null)
 
        erreichtTriple=query.selectSingle(pageid,"Property:SeminarInterview_erreicht",null);
 
      if (erreichtTriple!=null)
 
        erreicht=erreichtTriple.getObject().toString();
 
       Triple RolleTriple=query.selectSingle(pageid,"Rolle",null);
 
       if (RolleTriple==null)
 
         RolleTriple=query.selectSingle(pageid,"Property:SeminarInterview_Rolle",null);
 
       if (RolleTriple!=null)  
 
         Rolle=RolleTriple.getObject().toString();
 
       Triple AusbildungTriple=query.selectSingle(pageid,"Ausbildung",null);
 
       if (AusbildungTriple==null)
 
         AusbildungTriple=query.selectSingle(pageid,"Property:SeminarInterview_Ausbildung",null);
 
       if (AusbildungTriple!=null)  
 
         Ausbildung=AusbildungTriple.getObject().toString();
 
       Triple UmfeldTriple=query.selectSingle(pageid,"Umfeld",null);
 
       if (UmfeldTriple==null)
 
         UmfeldTriple=query.selectSingle(pageid,"Property:SeminarInterview_Umfeld",null);
 
       if (UmfeldTriple!=null)  
 
         Umfeld=UmfeldTriple.getObject().toString();
 
       Triple UMLVorkenntnisseTriple=query.selectSingle(pageid,"UMLVorkenntnisse",null);
 
       if (UMLVorkenntnisseTriple==null)
 
         UMLVorkenntnisseTriple=query.selectSingle(pageid,"Property:SeminarInterview_UMLVorkenntnisse",null);
 
       if (UMLVorkenntnisseTriple!=null)  
 
         UMLVorkenntnisse=UMLVorkenntnisseTriple.getObject().toString();
 
       Triple ErwartungenTriple=query.selectSingle(pageid,"Erwartungen",null);
 
       if (ErwartungenTriple==null)
 
         ErwartungenTriple=query.selectSingle(pageid,"Property:SeminarInterview_Erwartungen",null);
 
       if (ErwartungenTriple!=null)  
 
         Erwartungen=ErwartungenTriple.getObject().toString();
 
       Triple commentTriple=query.selectSingle(pageid,"comment",null);
 
       if (commentTriple==null)
 
         commentTriple=query.selectSingle(pageid,"Property:SeminarInterview_comment",null);
 
       if (commentTriple!=null)  
 
         comment=commentTriple.getObject().toString();
 
       Triple SeminarVeranstaltungTriple=query.selectSingle(pageid,"SeminarVeranstaltung",null);
 
       if (SeminarVeranstaltungTriple==null)
 
         SeminarVeranstaltungTriple=query.selectSingle(pageid,"Property:SeminarInterview_SeminarVeranstaltung",null);
 
       if (SeminarVeranstaltungTriple!=null)  
 
         SeminarVeranstaltung=SeminarVeranstaltungTriple.getObject().toString();
 
 
       init(query);
 
       init(query);
     } // constructor for SeminarInterview
+
     } // constructor for SeminarTopic
 
      
 
      
     // >>>{user defined topic code}{SeminarInterview}{SeminarInterview}
+
     // >>>{user defined topic code}{SeminarTopic}{SeminarTopic}
     // <<<{user defined topic code}{SeminarInterview}{SeminarInterview}
+
     // <<<{user defined topic code}{SeminarTopic}{SeminarTopic}
   } // class SeminarInterview
+
   } // class SeminarTopic
 
   /**
 
   /**
   * Manager for SeminarInterview
+
   * Manager for SeminarTopic
 
   */
 
   */
   public static class SeminarInterviewManager extends TopicBase {
+
   public static class SeminarTopicManager extends TopicBase {
 
   
 
   
     public String topicName="SeminarInterview";
+
     public String topicName="SeminarTopic";
     public transient List<SeminarInterview> mSeminarInterviews=new ArrayList<SeminarInterview>();
+
     public transient List<SeminarTopic> mSeminarTopics=new ArrayList<SeminarTopic>();
     public transient Map<String,SeminarInterview> mSeminarInterviewMap=new LinkedHashMap<String,SeminarInterview>();
+
     public transient Map<String,SeminarTopic> mSeminarTopicMap=new LinkedHashMap<String,SeminarTopic>();
  
 
     /**
 
     /**
     * get my SeminarInterviews
+
     * get my SeminarTopics
 
     */
 
     */
     public List<SeminarInterview> getSeminarInterviews() {
+
     public List<SeminarTopic> getSeminarTopics() {
       List<SeminarInterview> result=this.mSeminarInterviews;
+
       List<SeminarTopic> result=this.mSeminarTopics;
 
       return result;
 
       return result;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new SeminarInterview
+
     *  add a new SeminarTopic
 
     */
 
     */
     public SeminarInterview add(SeminarInterview pSeminarInterview) {
+
     public SeminarTopic add(SeminarTopic pSeminarTopic) {
       mSeminarInterviews.add(pSeminarInterview);
+
       mSeminarTopics.add(pSeminarTopic);
       mSeminarInterviewMap.put(pSeminarInterview.getPageid(),pSeminarInterview);
+
       mSeminarTopicMap.put(pSeminarTopic.getPageid(),pSeminarTopic);
       return pSeminarInterview;
+
       return pSeminarTopic;
 
     }
 
     }
  
 
     /**
 
     /**
     *  add a new SeminarInterview from the given triple
+
     *  add a new SeminarTopic from the given triple
 
     */
 
     */
     public SeminarInterview add(TripleQuery query,Triple pSeminarInterviewTriple) {
+
     public SeminarTopic add(TripleQuery query,Triple pSeminarTopicTriple) {
       SeminarInterview lSeminarInterview=new SeminarInterview(query,pSeminarInterviewTriple);
+
       SeminarTopic lSeminarTopic=new SeminarTopic(query,pSeminarTopicTriple);
       add(lSeminarInterview);
+
       add(lSeminarTopic);
       return lSeminarInterview;
+
       return lSeminarTopic;
 
     }
 
     }
  
     // reinitialize my mSeminarInterview map
+
     // reinitialize my mSeminarTopic map
 
     public void reinit() {
 
     public void reinit() {
       mSeminarInterviewMap.clear();
+
       mSeminarTopicMap.clear();
       for (SeminarInterview lSeminarInterview:mSeminarInterviews) {
+
       for (SeminarTopic lSeminarTopic:mSeminarTopics) {
         mSeminarInterviewMap.put(lSeminarInterview.getPageid(),lSeminarInterview);
+
         mSeminarTopicMap.put(lSeminarTopic.getPageid(),lSeminarTopic);
 
       }
 
       }
 
     }
 
     }
Line 1,866: Line 1,044:
 
      
 
      
 
     // get a new manager from the given json string
 
     // get a new manager from the given json string
     public static SeminarInterviewManager fromJson(String json) {
+
     public static SeminarTopicManager fromJson(String json) {
       SeminarInterviewManager result=JSON.parseObject(json, SeminarInterviewManager.class);
+
       SeminarTopicManager result=JSON.parseObject(json, SeminarTopicManager.class);
 
       result.reinit();
 
       result.reinit();
 
       return result;
 
       return result;
 
     }
 
     }
  
     // default constructor for SeminarInterview Manager
+
     // default constructor for SeminarTopic Manager
     public SeminarInterviewManager() {}
+
     public SeminarTopicManager() {}
  
     // add SeminarInterviews from the given query
+
     // add SeminarTopics from the given query
     public void addSeminarInterviews(TripleQuery pSeminarInterviewQuery,TripleQuery query) {
+
     public void addSeminarTopics(TripleQuery pSeminarTopicQuery,TripleQuery query) {
       if (pSeminarInterviewQuery!=null) {
+
       if (pSeminarTopicQuery!=null) {
         for (Triple lSeminarInterviewTriple:pSeminarInterviewQuery.getTriples()) {
+
         for (Triple lSeminarTopicTriple:pSeminarTopicQuery.getTriples()) {
           add(query,lSeminarInterviewTriple);
+
           add(query,lSeminarTopicTriple);
 
         }
 
         }
 
       }
 
       }
Line 1,885: Line 1,063:
  
 
     // construct me from the given triple Query query
 
     // construct me from the given triple Query query
     public SeminarInterviewManager(TripleQuery query) {
+
     public SeminarTopicManager(TripleQuery query) {
 
       // first query the SiDIF bases triplestore
 
       // first query the SiDIF bases triplestore
       TripleQuery lSeminarInterviewQuery=query.query(null,"isA","SeminarInterview");
+
       TripleQuery lSeminarTopicQuery=query.query(null,"isA","SeminarTopic");
       addSeminarInterviews(lSeminarInterviewQuery,query);
+
       addSeminarTopics(lSeminarTopicQuery,query);
 
       // then the SMW triplestore
 
       // then the SMW triplestore
       lSeminarInterviewQuery=query.query(null,"Property:IsA","SeminarInterview");
+
       lSeminarTopicQuery=query.query(null,"Property:IsA","SeminarTopic");
       addSeminarInterviews(lSeminarInterviewQuery,query);
+
       addSeminarTopics(lSeminarTopicQuery,query);
 
       init(query);
 
       init(query);
     } // constructor for SeminarInterview Manager
+
     } // constructor for SeminarTopic Manager
 
      
 
      
     // >>>{user defined topicmanager code}{SeminarInterview}{SeminarInterview}
+
     // >>>{user defined topicmanager code}{SeminarTopic}{SeminarTopic}
     // <<<{user defined topicmanager code}{SeminarInterview}{SeminarInterview}
+
     // <<<{user defined topicmanager code}{SeminarTopic}{SeminarTopic}
   } // class SeminarInterview Manager
+
   } // class SeminarTopic Manager
  
 
}
 
}
 +
</source>

Latest revision as of 15:23, 9 December 2017

java code

@// This is a rythm template
@// the args are the standard wikiTask arguments
@import org.sidif.triple.TripleQuery
@import org.sidif.triple.Triple
@import com.alibaba.fastjson.JSON
@args() {
  String title 
  String logo
  org.sidif.wiki.WikiTask wikiTask
  org.sidif.triple.TripleStore tripleStore
}


@def static {

  /**
   * Base class
   */
  static abstract class TopicBase {
    // each Topic has a pageid - for non subobject thats the pagename
    public String pageid;

    /**
     * get a WikiSon version of the given name value
     * 
     * @param name
     * @param value
     * @return - the string representation
     */
    public String toWikiSon(String name, String value) {
      String result = "<!-- " + name + " is null-->\n";
      if (value != null)
        result = "|" + name + "=" + value + "\n";
      return result;
    }

    /**
     * get the SiDIF representation of the given property
     * 
     * @param name - the name of the property
     * @param value - the value of the property
     * @param type - the type of the property
     * @return - the SiDIF Sting representation of the property
     */
    public static String propertySiDIF(String name, String value, String type) {
      // default is a comment line which can be filled by uncommenting
      String result = String.format("# is is %s of it\n",name);;
      // if the value is not empty
      if ((value != null) && (!("".equals(value.trim())))) {
        // do we need to quote the result?
        String quote = "";
        // this depends on the Type
        if ("Text".equals(type)) {
          quote = "\"";
        }
        // create a SIDIF Property line like
        // "John" is lastname of it
        // convert double quotes to single quotes - FIXME - should we escape instead?
        value=value.replace("\"","'");
        result = String.format("%s%s%s is %s of it\n",quote,value,quote,name);
      }
      // return the SiDIF property line
      return result;
    }

    /**
     * get me as a String
     * 
     * @param name
     * @param value
     * @return
     */
    public static String propertySiDIF(String name, String value) {
      String result = propertySiDIF(name, value, "Text");
      return result;
    }

    /**
     * check if the given boolean String value is true
     * 
     * @param value
     * @return true if the value is not null and has true/TRUE as it's string
     *         content
     */
    public boolean isTrue(String value) {
      boolean result = false;
      if (value != null && value.toLowerCase().equals("true")) {
        result = true;
      }
      return result;
    }

    /**
     * initialize
     */
    public void init(TripleQuery query) {
    }
  } // TopicBase
 /**
  * Seminar
  * Ein Seminar ist die Durchfuehrung einer Ausbildungsveranstaltung an einem bestimmten Ort in einem bestimmten Zeitraum zu einem bestimmten Thema
  */
  public static class Seminar extends TopicBase {
  
    public String kind;
    public String lang;
    public String year;
    public String month;
    public String price;
    public String inHouse;
    public String exam_fee;
    public String from;
    public String modeldayprice;
    public String to;
    public String title;
    public String contact;
    public String customer;
    public String documentation;
    public String trainer;
    public String city;
    public String thema;

    public String getKind() { return kind; }
    public void setKind(String pKind) { kind=pKind; }
    public String getLang() { return lang; }
    public void setLang(String pLang) { lang=pLang; }
    public String getYear() { return year; }
    public void setYear(String pYear) { year=pYear; }
    public String getMonth() { return month; }
    public void setMonth(String pMonth) { month=pMonth; }
    public String getPrice() { return price; }
    public void setPrice(String pPrice) { price=pPrice; }
    public String getInHouse() { return inHouse; }
    public void setInHouse(String pInHouse) { inHouse=pInHouse; }
    public String getExam_fee() { return exam_fee; }
    public void setExam_fee(String pExam_fee) { exam_fee=pExam_fee; }
    public String getFrom() { return from; }
    public void setFrom(String pFrom) { from=pFrom; }
    public String getModeldayprice() { return modeldayprice; }
    public void setModeldayprice(String pModeldayprice) { modeldayprice=pModeldayprice; }
    public String getTo() { return to; }
    public void setTo(String pTo) { to=pTo; }
    public String getTitle() { return title; }
    public void setTitle(String pTitle) { title=pTitle; }
    public String getContact() { return contact; }
    public void setContact(String pContact) { contact=pContact; }
    public String getCustomer() { return customer; }
    public void setCustomer(String pCustomer) { customer=pCustomer; }
    public String getDocumentation() { return documentation; }
    public void setDocumentation(String pDocumentation) { documentation=pDocumentation; }
    public String getTrainer() { return trainer; }
    public void setTrainer(String pTrainer) { trainer=pTrainer; }
    public String getCity() { return city; }
    public void setCity(String pCity) { city=pCity; }
    public String getThema() { return thema; }
    public void setThema(String pThema) { thema=pThema; }
    /**
     * convert this Seminar to a JSON string
     */
    public String toJson() { return JSON.toJSONString(this); }

    /**
     * convert this Seminar to a WikiSon string
     * @return the WikiSon representation of this Seminar
     */
    public String toWikiSon() {
      String wikison= "{{Seminar\n";
      wikison+=toWikiSon("kind",kind);
      wikison+=toWikiSon("lang",lang);
      wikison+=toWikiSon("year",year);
      wikison+=toWikiSon("month",month);
      wikison+=toWikiSon("price",price);
      wikison+=toWikiSon("inHouse",inHouse);
      wikison+=toWikiSon("exam_fee",exam_fee);
      wikison+=toWikiSon("from",from);
      wikison+=toWikiSon("modeldayprice",modeldayprice);
      wikison+=toWikiSon("to",to);
      wikison+=toWikiSon("title",title);
      wikison+=toWikiSon("contact",contact);
      wikison+=toWikiSon("customer",customer);
      wikison+=toWikiSon("documentation",documentation);
      wikison+=toWikiSon("trainer",trainer);
      wikison+=toWikiSon("city",city);
      wikison+=toWikiSon("thema",thema);
      wikison+="}}\n";
      return wikison;
    }

    /**
     * convert this Seminar to a SiDIF string
     * @return the SiDIF representation of this Seminar
     */
    public String toSiDIF() {
      String siDIF = String.format("%s isA Seminar\n",this.pageid);
      siDIF+=propertySiDIF("kind",kind,"Page");
      siDIF+=propertySiDIF("lang",lang,"Text");
      siDIF+=propertySiDIF("year",year,"Text");
      siDIF+=propertySiDIF("month",month,"Text");
      siDIF+=propertySiDIF("price",price,"Number");
      siDIF+=propertySiDIF("inHouse",inHouse,"Boolean");
      siDIF+=propertySiDIF("exam_fee",exam_fee,"Number");
      siDIF+=propertySiDIF("from",from,"Date");
      siDIF+=propertySiDIF("modeldayprice",modeldayprice,"Number");
      siDIF+=propertySiDIF("to",to,"Date");
      siDIF+=propertySiDIF("title",title,"Text");
      siDIF+=propertySiDIF("contact",contact,"Text");
      siDIF+=propertySiDIF("customer",customer,"Text");
      siDIF+=propertySiDIF("documentation",documentation,"Text");
      siDIF+=propertySiDIF("trainer",trainer,"Page");
      siDIF+=propertySiDIF("city",city,"Page");
      siDIF+=propertySiDIF("thema",thema,"Page");
      return siDIF;
    }
 
    /**  
     * get the pageid for this topic
     */
    public String getPageid() { return pageid; };

    /**
     * default constructor for Seminar
     */
    public Seminar() {}

    /**
     * construct a Seminar from the given Triple
     * @param query - the TripleQuery to get the triples from
     * @param pSeminarTriple - the triple to construct me from
     */
    public Seminar(TripleQuery query,Triple pSeminarTriple) {
      this(query,pSeminarTriple.getSubject().toString());
    } // constructor

    /**
     * construct a Seminar from the given pageId
     * @param query - the TripleQuery to get the triples from
     * @param pageid - pageid
     */
    public Seminar(TripleQuery query,String pageid) {
      this.pageid=pageid;
      Triple kindTriple=query.selectSingle(pageid,"kind",null);
      if (kindTriple==null)
        kindTriple=query.selectSingle(pageid,"Property:Seminar_kind",null);
      if (kindTriple!=null) 
        kind=kindTriple.getObject().toString();
      Triple langTriple=query.selectSingle(pageid,"lang",null);
      if (langTriple==null)
        langTriple=query.selectSingle(pageid,"Property:Seminar_lang",null);
      if (langTriple!=null) 
        lang=langTriple.getObject().toString();
      Triple yearTriple=query.selectSingle(pageid,"year",null);
      if (yearTriple==null)
        yearTriple=query.selectSingle(pageid,"Property:Seminar_year",null);
      if (yearTriple!=null) 
        year=yearTriple.getObject().toString();
      Triple monthTriple=query.selectSingle(pageid,"month",null);
      if (monthTriple==null)
        monthTriple=query.selectSingle(pageid,"Property:Seminar_month",null);
      if (monthTriple!=null) 
        month=monthTriple.getObject().toString();
      Triple priceTriple=query.selectSingle(pageid,"price",null);
      if (priceTriple==null)
        priceTriple=query.selectSingle(pageid,"Property:Seminar_price",null);
      if (priceTriple!=null) 
        price=priceTriple.getObject().toString();
      Triple inHouseTriple=query.selectSingle(pageid,"inHouse",null);
      if (inHouseTriple==null)
        inHouseTriple=query.selectSingle(pageid,"Property:Seminar_inHouse",null);
      if (inHouseTriple!=null) 
        inHouse=inHouseTriple.getObject().toString();
      Triple exam_feeTriple=query.selectSingle(pageid,"exam_fee",null);
      if (exam_feeTriple==null)
        exam_feeTriple=query.selectSingle(pageid,"Property:Seminar_exam_fee",null);
      if (exam_feeTriple!=null) 
        exam_fee=exam_feeTriple.getObject().toString();
      Triple fromTriple=query.selectSingle(pageid,"from",null);
      if (fromTriple==null)
        fromTriple=query.selectSingle(pageid,"Property:Seminar_from",null);
      if (fromTriple!=null) 
        from=fromTriple.getObject().toString();
      Triple modeldaypriceTriple=query.selectSingle(pageid,"modeldayprice",null);
      if (modeldaypriceTriple==null)
        modeldaypriceTriple=query.selectSingle(pageid,"Property:Seminar_modeldayprice",null);
      if (modeldaypriceTriple!=null) 
        modeldayprice=modeldaypriceTriple.getObject().toString();
      Triple toTriple=query.selectSingle(pageid,"to",null);
      if (toTriple==null)
        toTriple=query.selectSingle(pageid,"Property:Seminar_to",null);
      if (toTriple!=null) 
        to=toTriple.getObject().toString();
      Triple titleTriple=query.selectSingle(pageid,"title",null);
      if (titleTriple==null)
        titleTriple=query.selectSingle(pageid,"Property:Seminar_title",null);
      if (titleTriple!=null) 
        title=titleTriple.getObject().toString();
      Triple contactTriple=query.selectSingle(pageid,"contact",null);
      if (contactTriple==null)
        contactTriple=query.selectSingle(pageid,"Property:Seminar_contact",null);
      if (contactTriple!=null) 
        contact=contactTriple.getObject().toString();
      Triple customerTriple=query.selectSingle(pageid,"customer",null);
      if (customerTriple==null)
        customerTriple=query.selectSingle(pageid,"Property:Seminar_customer",null);
      if (customerTriple!=null) 
        customer=customerTriple.getObject().toString();
      Triple documentationTriple=query.selectSingle(pageid,"documentation",null);
      if (documentationTriple==null)
        documentationTriple=query.selectSingle(pageid,"Property:Seminar_documentation",null);
      if (documentationTriple!=null) 
        documentation=documentationTriple.getObject().toString();
      Triple trainerTriple=query.selectSingle(pageid,"trainer",null);
      if (trainerTriple==null)
        trainerTriple=query.selectSingle(pageid,"Property:Seminar_trainer",null);
      if (trainerTriple!=null) 
        trainer=trainerTriple.getObject().toString();
      Triple cityTriple=query.selectSingle(pageid,"city",null);
      if (cityTriple==null)
        cityTriple=query.selectSingle(pageid,"Property:Seminar_city",null);
      if (cityTriple!=null) 
        city=cityTriple.getObject().toString();
      Triple themaTriple=query.selectSingle(pageid,"thema",null);
      if (themaTriple==null)
        themaTriple=query.selectSingle(pageid,"Property:Seminar_thema",null);
      if (themaTriple!=null) 
        thema=themaTriple.getObject().toString();
      init(query);
    } // constructor for Seminar
    
    // >>>{user defined topic code}{Seminar}{Seminar}
    // <<<{user defined topic code}{Seminar}{Seminar}
  } // class Seminar
  /**
   * Manager for Seminar
   */
  public static class SeminarManager extends TopicBase {
 
    public String topicName="Seminar";
    public transient List<Seminar> mSeminars=new ArrayList<Seminar>();
    public transient Map<String,Seminar> mSeminarMap=new LinkedHashMap<String,Seminar>();

    /**
     * get my Seminars
     */
    public List<Seminar> getSeminars() {
      List<Seminar> result=this.mSeminars;
      return result;
    }

    /**
     *  add a new Seminar 
     */
    public Seminar add(Seminar pSeminar) {
      mSeminars.add(pSeminar);
      mSeminarMap.put(pSeminar.getPageid(),pSeminar);
      return pSeminar;
    }

    /**
     *  add a new Seminar from the given triple
     */
    public Seminar add(TripleQuery query,Triple pSeminarTriple) {
      Seminar lSeminar=new Seminar(query,pSeminarTriple);
      add(lSeminar);
      return lSeminar;
    }

    // reinitialize my mSeminar map
    public void reinit() {
      mSeminarMap.clear();
      for (Seminar lSeminar:mSeminars) {
        mSeminarMap.put(lSeminar.getPageid(),lSeminar);
      }
    }

    // convert this manager to json format 
    public String toJson() { return JSON.toJSONString(this); }
    
    // get a new manager from the given json string
    public static SeminarManager fromJson(String json) {
      SeminarManager result=JSON.parseObject(json, SeminarManager.class);
      result.reinit();
      return result;
    }

    // default constructor for Seminar Manager
    public SeminarManager() {}

    // add Seminars from the given query
    public void addSeminars(TripleQuery pSeminarQuery,TripleQuery query) {
      if (pSeminarQuery!=null) {
        for (Triple lSeminarTriple:pSeminarQuery.getTriples()) {
          add(query,lSeminarTriple);
        }
      }
    }

    // construct me from the given triple Query query
    public SeminarManager(TripleQuery query) {
      // first query the SiDIF bases triplestore
      TripleQuery lSeminarQuery=query.query(null,"isA","Seminar");
      addSeminars(lSeminarQuery,query);
      // then the SMW triplestore
      lSeminarQuery=query.query(null,"Property:IsA","Seminar");
      addSeminars(lSeminarQuery,query);
      init(query);
    } // constructor for Seminar Manager
    
    // >>>{user defined topicmanager code}{Seminar}{Seminar}
    // <<<{user defined topicmanager code}{Seminar}{Seminar}
  } // class Seminar Manager
 /**
  * Traininglocation
  * A location for a training
  */
  public static class Traininglocation extends TopicBase {
  
    public String name;
    public String url;
    public String coordinate;
    public String address;
    public String city;
    public String country;

    public String getName() { return name; }
    public void setName(String pName) { name=pName; }
    public String getUrl() { return url; }
    public void setUrl(String pUrl) { url=pUrl; }
    public String getCoordinate() { return coordinate; }
    public void setCoordinate(String pCoordinate) { coordinate=pCoordinate; }
    public String getAddress() { return address; }
    public void setAddress(String pAddress) { address=pAddress; }
    public String getCity() { return city; }
    public void setCity(String pCity) { city=pCity; }
    public String getCountry() { return country; }
    public void setCountry(String pCountry) { country=pCountry; }
    /**
     * convert this Traininglocation to a JSON string
     */
    public String toJson() { return JSON.toJSONString(this); }

    /**
     * convert this Traininglocation to a WikiSon string
     * @return the WikiSon representation of this Traininglocation
     */
    public String toWikiSon() {
      String wikison= "{{Traininglocation\n";
      wikison+=toWikiSon("name",name);
      wikison+=toWikiSon("url",url);
      wikison+=toWikiSon("coordinate",coordinate);
      wikison+=toWikiSon("address",address);
      wikison+=toWikiSon("city",city);
      wikison+=toWikiSon("country",country);
      wikison+="}}\n";
      return wikison;
    }

    /**
     * convert this Traininglocation to a SiDIF string
     * @return the SiDIF representation of this Traininglocation
     */
    public String toSiDIF() {
      String siDIF = String.format("%s isA Traininglocation\n",this.pageid);
      siDIF+=propertySiDIF("name",name,"Text");
      siDIF+=propertySiDIF("url",url,"URL");
      siDIF+=propertySiDIF("coordinate",coordinate,"Geographic_coordinate");
      siDIF+=propertySiDIF("address",address,"Text");
      siDIF+=propertySiDIF("city",city,"Text");
      siDIF+=propertySiDIF("country",country,"Text");
      return siDIF;
    }
 
    /**  
     * get the pageid for this topic
     */
    public String getPageid() { return pageid; };

    /**
     * default constructor for Traininglocation
     */
    public Traininglocation() {}

    /**
     * construct a Traininglocation from the given Triple
     * @param query - the TripleQuery to get the triples from
     * @param pTraininglocationTriple - the triple to construct me from
     */
    public Traininglocation(TripleQuery query,Triple pTraininglocationTriple) {
      this(query,pTraininglocationTriple.getSubject().toString());
    } // constructor

    /**
     * construct a Traininglocation from the given pageId
     * @param query - the TripleQuery to get the triples from
     * @param pageid - pageid
     */
    public Traininglocation(TripleQuery query,String pageid) {
      this.pageid=pageid;
      Triple nameTriple=query.selectSingle(pageid,"name",null);
      if (nameTriple==null)
        nameTriple=query.selectSingle(pageid,"Property:Traininglocation_name",null);
      if (nameTriple!=null) 
        name=nameTriple.getObject().toString();
      Triple urlTriple=query.selectSingle(pageid,"url",null);
      if (urlTriple==null)
        urlTriple=query.selectSingle(pageid,"Property:Traininglocation_url",null);
      if (urlTriple!=null) 
        url=urlTriple.getObject().toString();
      Triple coordinateTriple=query.selectSingle(pageid,"coordinate",null);
      if (coordinateTriple==null)
        coordinateTriple=query.selectSingle(pageid,"Property:Traininglocation_coordinate",null);
      if (coordinateTriple!=null) 
        coordinate=coordinateTriple.getObject().toString();
      Triple addressTriple=query.selectSingle(pageid,"address",null);
      if (addressTriple==null)
        addressTriple=query.selectSingle(pageid,"Property:Traininglocation_address",null);
      if (addressTriple!=null) 
        address=addressTriple.getObject().toString();
      Triple cityTriple=query.selectSingle(pageid,"city",null);
      if (cityTriple==null)
        cityTriple=query.selectSingle(pageid,"Property:Traininglocation_city",null);
      if (cityTriple!=null) 
        city=cityTriple.getObject().toString();
      Triple countryTriple=query.selectSingle(pageid,"country",null);
      if (countryTriple==null)
        countryTriple=query.selectSingle(pageid,"Property:Traininglocation_country",null);
      if (countryTriple!=null) 
        country=countryTriple.getObject().toString();
      init(query);
    } // constructor for Traininglocation
    
    // >>>{user defined topic code}{Traininglocation}{Traininglocation}
    // <<<{user defined topic code}{Traininglocation}{Traininglocation}
  } // class Traininglocation
  /**
   * Manager for Traininglocation
   */
  public static class TraininglocationManager extends TopicBase {
 
    public String topicName="Traininglocation";
    public transient List<Traininglocation> mTraininglocations=new ArrayList<Traininglocation>();
    public transient Map<String,Traininglocation> mTraininglocationMap=new LinkedHashMap<String,Traininglocation>();

    /**
     * get my Traininglocations
     */
    public List<Traininglocation> getTraininglocations() {
      List<Traininglocation> result=this.mTraininglocations;
      return result;
    }

    /**
     *  add a new Traininglocation 
     */
    public Traininglocation add(Traininglocation pTraininglocation) {
      mTraininglocations.add(pTraininglocation);
      mTraininglocationMap.put(pTraininglocation.getPageid(),pTraininglocation);
      return pTraininglocation;
    }

    /**
     *  add a new Traininglocation from the given triple
     */
    public Traininglocation add(TripleQuery query,Triple pTraininglocationTriple) {
      Traininglocation lTraininglocation=new Traininglocation(query,pTraininglocationTriple);
      add(lTraininglocation);
      return lTraininglocation;
    }

    // reinitialize my mTraininglocation map
    public void reinit() {
      mTraininglocationMap.clear();
      for (Traininglocation lTraininglocation:mTraininglocations) {
        mTraininglocationMap.put(lTraininglocation.getPageid(),lTraininglocation);
      }
    }

    // convert this manager to json format 
    public String toJson() { return JSON.toJSONString(this); }
    
    // get a new manager from the given json string
    public static TraininglocationManager fromJson(String json) {
      TraininglocationManager result=JSON.parseObject(json, TraininglocationManager.class);
      result.reinit();
      return result;
    }

    // default constructor for Traininglocation Manager
    public TraininglocationManager() {}

    // add Traininglocations from the given query
    public void addTraininglocations(TripleQuery pTraininglocationQuery,TripleQuery query) {
      if (pTraininglocationQuery!=null) {
        for (Triple lTraininglocationTriple:pTraininglocationQuery.getTriples()) {
          add(query,lTraininglocationTriple);
        }
      }
    }

    // construct me from the given triple Query query
    public TraininglocationManager(TripleQuery query) {
      // first query the SiDIF bases triplestore
      TripleQuery lTraininglocationQuery=query.query(null,"isA","Traininglocation");
      addTraininglocations(lTraininglocationQuery,query);
      // then the SMW triplestore
      lTraininglocationQuery=query.query(null,"Property:IsA","Traininglocation");
      addTraininglocations(lTraininglocationQuery,query);
      init(query);
    } // constructor for Traininglocation Manager
    
    // >>>{user defined topicmanager code}{Traininglocation}{Traininglocation}
    // <<<{user defined topicmanager code}{Traininglocation}{Traininglocation}
  } // class Traininglocation Manager
 /**
  * Trainer
  * A trainer is a teacher
  */
  public static class Trainer extends TopicBase {
  
    public String name;
    public String picture;
    public String description;
    public String description_de;
    public String rank;

    public String getName() { return name; }
    public void setName(String pName) { name=pName; }
    public String getPicture() { return picture; }
    public void setPicture(String pPicture) { picture=pPicture; }
    public String getDescription() { return description; }
    public void setDescription(String pDescription) { description=pDescription; }
    public String getDescription_de() { return description_de; }
    public void setDescription_de(String pDescription_de) { description_de=pDescription_de; }
    public String getRank() { return rank; }
    public void setRank(String pRank) { rank=pRank; }
    /**
     * convert this Trainer to a JSON string
     */
    public String toJson() { return JSON.toJSONString(this); }

    /**
     * convert this Trainer to a WikiSon string
     * @return the WikiSon representation of this Trainer
     */
    public String toWikiSon() {
      String wikison= "{{Trainer\n";
      wikison+=toWikiSon("name",name);
      wikison+=toWikiSon("picture",picture);
      wikison+=toWikiSon("description",description);
      wikison+=toWikiSon("description_de",description_de);
      wikison+=toWikiSon("rank",rank);
      wikison+="}}\n";
      return wikison;
    }

    /**
     * convert this Trainer to a SiDIF string
     * @return the SiDIF representation of this Trainer
     */
    public String toSiDIF() {
      String siDIF = String.format("%s isA Trainer\n",this.pageid);
      siDIF+=propertySiDIF("name",name,"Text");
      siDIF+=propertySiDIF("picture",picture,"Page");
      siDIF+=propertySiDIF("description",description,"Text");
      siDIF+=propertySiDIF("description_de",description_de,"Text");
      siDIF+=propertySiDIF("rank",rank,"number");
      return siDIF;
    }
 
    /**  
     * get the pageid for this topic
     */
    public String getPageid() { return pageid; };

    /**
     * default constructor for Trainer
     */
    public Trainer() {}

    /**
     * construct a Trainer from the given Triple
     * @param query - the TripleQuery to get the triples from
     * @param pTrainerTriple - the triple to construct me from
     */
    public Trainer(TripleQuery query,Triple pTrainerTriple) {
      this(query,pTrainerTriple.getSubject().toString());
    } // constructor

    /**
     * construct a Trainer from the given pageId
     * @param query - the TripleQuery to get the triples from
     * @param pageid - pageid
     */
    public Trainer(TripleQuery query,String pageid) {
      this.pageid=pageid;
      Triple nameTriple=query.selectSingle(pageid,"name",null);
      if (nameTriple==null)
        nameTriple=query.selectSingle(pageid,"Property:Trainer_name",null);
      if (nameTriple!=null) 
        name=nameTriple.getObject().toString();
      Triple pictureTriple=query.selectSingle(pageid,"picture",null);
      if (pictureTriple==null)
        pictureTriple=query.selectSingle(pageid,"Property:Trainer_picture",null);
      if (pictureTriple!=null) 
        picture=pictureTriple.getObject().toString();
      Triple descriptionTriple=query.selectSingle(pageid,"description",null);
      if (descriptionTriple==null)
        descriptionTriple=query.selectSingle(pageid,"Property:Trainer_description",null);
      if (descriptionTriple!=null) 
        description=descriptionTriple.getObject().toString();
      Triple description_deTriple=query.selectSingle(pageid,"description_de",null);
      if (description_deTriple==null)
        description_deTriple=query.selectSingle(pageid,"Property:Trainer_description_de",null);
      if (description_deTriple!=null) 
        description_de=description_deTriple.getObject().toString();
      Triple rankTriple=query.selectSingle(pageid,"rank",null);
      if (rankTriple==null)
        rankTriple=query.selectSingle(pageid,"Property:Trainer_rank",null);
      if (rankTriple!=null) 
        rank=rankTriple.getObject().toString();
      init(query);
    } // constructor for Trainer
    
    // >>>{user defined topic code}{Trainer}{Trainer}
    // <<<{user defined topic code}{Trainer}{Trainer}
  } // class Trainer
  /**
   * Manager for Trainer
   */
  public static class TrainerManager extends TopicBase {
 
    public String topicName="Trainer";
    public transient List<Trainer> mTrainers=new ArrayList<Trainer>();
    public transient Map<String,Trainer> mTrainerMap=new LinkedHashMap<String,Trainer>();

    /**
     * get my Trainers
     */
    public List<Trainer> getTrainers() {
      List<Trainer> result=this.mTrainers;
      return result;
    }

    /**
     *  add a new Trainer 
     */
    public Trainer add(Trainer pTrainer) {
      mTrainers.add(pTrainer);
      mTrainerMap.put(pTrainer.getPageid(),pTrainer);
      return pTrainer;
    }

    /**
     *  add a new Trainer from the given triple
     */
    public Trainer add(TripleQuery query,Triple pTrainerTriple) {
      Trainer lTrainer=new Trainer(query,pTrainerTriple);
      add(lTrainer);
      return lTrainer;
    }

    // reinitialize my mTrainer map
    public void reinit() {
      mTrainerMap.clear();
      for (Trainer lTrainer:mTrainers) {
        mTrainerMap.put(lTrainer.getPageid(),lTrainer);
      }
    }

    // convert this manager to json format 
    public String toJson() { return JSON.toJSONString(this); }
    
    // get a new manager from the given json string
    public static TrainerManager fromJson(String json) {
      TrainerManager result=JSON.parseObject(json, TrainerManager.class);
      result.reinit();
      return result;
    }

    // default constructor for Trainer Manager
    public TrainerManager() {}

    // add Trainers from the given query
    public void addTrainers(TripleQuery pTrainerQuery,TripleQuery query) {
      if (pTrainerQuery!=null) {
        for (Triple lTrainerTriple:pTrainerQuery.getTriples()) {
          add(query,lTrainerTriple);
        }
      }
    }

    // construct me from the given triple Query query
    public TrainerManager(TripleQuery query) {
      // first query the SiDIF bases triplestore
      TripleQuery lTrainerQuery=query.query(null,"isA","Trainer");
      addTrainers(lTrainerQuery,query);
      // then the SMW triplestore
      lTrainerQuery=query.query(null,"Property:IsA","Trainer");
      addTrainers(lTrainerQuery,query);
      init(query);
    } // constructor for Trainer Manager
    
    // >>>{user defined topicmanager code}{Trainer}{Trainer}
    // <<<{user defined topicmanager code}{Trainer}{Trainer}
  } // class Trainer Manager
 /**
  * SeminarTopic
  * A SeminarTopic is the topic of one or more Seminars
  */
  public static class SeminarTopic extends TopicBase {
  
    public String name;
    public String logo;
    public String level;
    public String licensee;
    public String licenseeUrl;
    public String overview;
    public String page;
    public String syllabus;
    public String overview_en;
    public String page_en;
    public String syllabus_en;
    public String syllabusPdf;
    public String syllabusPdf_en;

    public String getName() { return name; }
    public void setName(String pName) { name=pName; }
    public String getLogo() { return logo; }
    public void setLogo(String pLogo) { logo=pLogo; }
    public String getLevel() { return level; }
    public void setLevel(String pLevel) { level=pLevel; }
    public String getLicensee() { return licensee; }
    public void setLicensee(String pLicensee) { licensee=pLicensee; }
    public String getLicenseeUrl() { return licenseeUrl; }
    public void setLicenseeUrl(String pLicenseeUrl) { licenseeUrl=pLicenseeUrl; }
    public String getOverview() { return overview; }
    public void setOverview(String pOverview) { overview=pOverview; }
    public String getPage() { return page; }
    public void setPage(String pPage) { page=pPage; }
    public String getSyllabus() { return syllabus; }
    public void setSyllabus(String pSyllabus) { syllabus=pSyllabus; }
    public String getOverview_en() { return overview_en; }
    public void setOverview_en(String pOverview_en) { overview_en=pOverview_en; }
    public String getPage_en() { return page_en; }
    public void setPage_en(String pPage_en) { page_en=pPage_en; }
    public String getSyllabus_en() { return syllabus_en; }
    public void setSyllabus_en(String pSyllabus_en) { syllabus_en=pSyllabus_en; }
    public String getSyllabusPdf() { return syllabusPdf; }
    public void setSyllabusPdf(String pSyllabusPdf) { syllabusPdf=pSyllabusPdf; }
    public String getSyllabusPdf_en() { return syllabusPdf_en; }
    public void setSyllabusPdf_en(String pSyllabusPdf_en) { syllabusPdf_en=pSyllabusPdf_en; }
    /**
     * convert this SeminarTopic to a JSON string
     */
    public String toJson() { return JSON.toJSONString(this); }

    /**
     * convert this SeminarTopic to a WikiSon string
     * @return the WikiSon representation of this SeminarTopic
     */
    public String toWikiSon() {
      String wikison= "{{SeminarTopic\n";
      wikison+=toWikiSon("name",name);
      wikison+=toWikiSon("logo",logo);
      wikison+=toWikiSon("level",level);
      wikison+=toWikiSon("licensee",licensee);
      wikison+=toWikiSon("licenseeUrl",licenseeUrl);
      wikison+=toWikiSon("overview",overview);
      wikison+=toWikiSon("page",page);
      wikison+=toWikiSon("syllabus",syllabus);
      wikison+=toWikiSon("overview_en",overview_en);
      wikison+=toWikiSon("page_en",page_en);
      wikison+=toWikiSon("syllabus_en",syllabus_en);
      wikison+=toWikiSon("syllabusPdf",syllabusPdf);
      wikison+=toWikiSon("syllabusPdf_en",syllabusPdf_en);
      wikison+="}}\n";
      return wikison;
    }

    /**
     * convert this SeminarTopic to a SiDIF string
     * @return the SiDIF representation of this SeminarTopic
     */
    public String toSiDIF() {
      String siDIF = String.format("%s isA SeminarTopic\n",this.pageid);
      siDIF+=propertySiDIF("name",name,"Text");
      siDIF+=propertySiDIF("logo",logo,"Page");
      siDIF+=propertySiDIF("level",level,"Text");
      siDIF+=propertySiDIF("licensee",licensee,"Text");
      siDIF+=propertySiDIF("licenseeUrl",licenseeUrl,"Text");
      siDIF+=propertySiDIF("overview",overview,"Text");
      siDIF+=propertySiDIF("page",page,"Page");
      siDIF+=propertySiDIF("syllabus",syllabus,"Page");
      siDIF+=propertySiDIF("overview_en",overview_en,"Text");
      siDIF+=propertySiDIF("page_en",page_en,"Page");
      siDIF+=propertySiDIF("syllabus_en",syllabus_en,"Page");
      siDIF+=propertySiDIF("syllabusPdf",syllabusPdf,"text");
      siDIF+=propertySiDIF("syllabusPdf_en",syllabusPdf_en,"text");
      return siDIF;
    }
 
    /**  
     * get the pageid for this topic
     */
    public String getPageid() { return pageid; };

    /**
     * default constructor for SeminarTopic
     */
    public SeminarTopic() {}

    /**
     * construct a SeminarTopic from the given Triple
     * @param query - the TripleQuery to get the triples from
     * @param pSeminarTopicTriple - the triple to construct me from
     */
    public SeminarTopic(TripleQuery query,Triple pSeminarTopicTriple) {
      this(query,pSeminarTopicTriple.getSubject().toString());
    } // constructor

    /**
     * construct a SeminarTopic from the given pageId
     * @param query - the TripleQuery to get the triples from
     * @param pageid - pageid
     */
    public SeminarTopic(TripleQuery query,String pageid) {
      this.pageid=pageid;
      Triple nameTriple=query.selectSingle(pageid,"name",null);
      if (nameTriple==null)
        nameTriple=query.selectSingle(pageid,"Property:SeminarTopic_name",null);
      if (nameTriple!=null) 
        name=nameTriple.getObject().toString();
      Triple logoTriple=query.selectSingle(pageid,"logo",null);
      if (logoTriple==null)
        logoTriple=query.selectSingle(pageid,"Property:SeminarTopic_logo",null);
      if (logoTriple!=null) 
        logo=logoTriple.getObject().toString();
      Triple levelTriple=query.selectSingle(pageid,"level",null);
      if (levelTriple==null)
        levelTriple=query.selectSingle(pageid,"Property:SeminarTopic_level",null);
      if (levelTriple!=null) 
        level=levelTriple.getObject().toString();
      Triple licenseeTriple=query.selectSingle(pageid,"licensee",null);
      if (licenseeTriple==null)
        licenseeTriple=query.selectSingle(pageid,"Property:SeminarTopic_licensee",null);
      if (licenseeTriple!=null) 
        licensee=licenseeTriple.getObject().toString();
      Triple licenseeUrlTriple=query.selectSingle(pageid,"licenseeUrl",null);
      if (licenseeUrlTriple==null)
        licenseeUrlTriple=query.selectSingle(pageid,"Property:SeminarTopic_licenseeUrl",null);
      if (licenseeUrlTriple!=null) 
        licenseeUrl=licenseeUrlTriple.getObject().toString();
      Triple overviewTriple=query.selectSingle(pageid,"overview",null);
      if (overviewTriple==null)
        overviewTriple=query.selectSingle(pageid,"Property:SeminarTopic_overview",null);
      if (overviewTriple!=null) 
        overview=overviewTriple.getObject().toString();
      Triple pageTriple=query.selectSingle(pageid,"page",null);
      if (pageTriple==null)
        pageTriple=query.selectSingle(pageid,"Property:SeminarTopic_page",null);
      if (pageTriple!=null) 
        page=pageTriple.getObject().toString();
      Triple syllabusTriple=query.selectSingle(pageid,"syllabus",null);
      if (syllabusTriple==null)
        syllabusTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabus",null);
      if (syllabusTriple!=null) 
        syllabus=syllabusTriple.getObject().toString();
      Triple overview_enTriple=query.selectSingle(pageid,"overview_en",null);
      if (overview_enTriple==null)
        overview_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_overview_en",null);
      if (overview_enTriple!=null) 
        overview_en=overview_enTriple.getObject().toString();
      Triple page_enTriple=query.selectSingle(pageid,"page_en",null);
      if (page_enTriple==null)
        page_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_page_en",null);
      if (page_enTriple!=null) 
        page_en=page_enTriple.getObject().toString();
      Triple syllabus_enTriple=query.selectSingle(pageid,"syllabus_en",null);
      if (syllabus_enTriple==null)
        syllabus_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabus_en",null);
      if (syllabus_enTriple!=null) 
        syllabus_en=syllabus_enTriple.getObject().toString();
      Triple syllabusPdfTriple=query.selectSingle(pageid,"syllabusPdf",null);
      if (syllabusPdfTriple==null)
        syllabusPdfTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabusPdf",null);
      if (syllabusPdfTriple!=null) 
        syllabusPdf=syllabusPdfTriple.getObject().toString();
      Triple syllabusPdf_enTriple=query.selectSingle(pageid,"syllabusPdf_en",null);
      if (syllabusPdf_enTriple==null)
        syllabusPdf_enTriple=query.selectSingle(pageid,"Property:SeminarTopic_syllabusPdf_en",null);
      if (syllabusPdf_enTriple!=null) 
        syllabusPdf_en=syllabusPdf_enTriple.getObject().toString();
      init(query);
    } // constructor for SeminarTopic
    
    // >>>{user defined topic code}{SeminarTopic}{SeminarTopic}
    // <<<{user defined topic code}{SeminarTopic}{SeminarTopic}
  } // class SeminarTopic
  /**
   * Manager for SeminarTopic
   */
  public static class SeminarTopicManager extends TopicBase {
 
    public String topicName="SeminarTopic";
    public transient List<SeminarTopic> mSeminarTopics=new ArrayList<SeminarTopic>();
    public transient Map<String,SeminarTopic> mSeminarTopicMap=new LinkedHashMap<String,SeminarTopic>();

    /**
     * get my SeminarTopics
     */
    public List<SeminarTopic> getSeminarTopics() {
      List<SeminarTopic> result=this.mSeminarTopics;
      return result;
    }

    /**
     *  add a new SeminarTopic 
     */
    public SeminarTopic add(SeminarTopic pSeminarTopic) {
      mSeminarTopics.add(pSeminarTopic);
      mSeminarTopicMap.put(pSeminarTopic.getPageid(),pSeminarTopic);
      return pSeminarTopic;
    }

    /**
     *  add a new SeminarTopic from the given triple
     */
    public SeminarTopic add(TripleQuery query,Triple pSeminarTopicTriple) {
      SeminarTopic lSeminarTopic=new SeminarTopic(query,pSeminarTopicTriple);
      add(lSeminarTopic);
      return lSeminarTopic;
    }

    // reinitialize my mSeminarTopic map
    public void reinit() {
      mSeminarTopicMap.clear();
      for (SeminarTopic lSeminarTopic:mSeminarTopics) {
        mSeminarTopicMap.put(lSeminarTopic.getPageid(),lSeminarTopic);
      }
    }

    // convert this manager to json format 
    public String toJson() { return JSON.toJSONString(this); }
    
    // get a new manager from the given json string
    public static SeminarTopicManager fromJson(String json) {
      SeminarTopicManager result=JSON.parseObject(json, SeminarTopicManager.class);
      result.reinit();
      return result;
    }

    // default constructor for SeminarTopic Manager
    public SeminarTopicManager() {}

    // add SeminarTopics from the given query
    public void addSeminarTopics(TripleQuery pSeminarTopicQuery,TripleQuery query) {
      if (pSeminarTopicQuery!=null) {
        for (Triple lSeminarTopicTriple:pSeminarTopicQuery.getTriples()) {
          add(query,lSeminarTopicTriple);
        }
      }
    }

    // construct me from the given triple Query query
    public SeminarTopicManager(TripleQuery query) {
      // first query the SiDIF bases triplestore
      TripleQuery lSeminarTopicQuery=query.query(null,"isA","SeminarTopic");
      addSeminarTopics(lSeminarTopicQuery,query);
      // then the SMW triplestore
      lSeminarTopicQuery=query.query(null,"Property:IsA","SeminarTopic");
      addSeminarTopics(lSeminarTopicQuery,query);
      init(query);
    } // constructor for SeminarTopic Manager
    
    // >>>{user defined topicmanager code}{SeminarTopic}{SeminarTopic}
    // <<<{user defined topicmanager code}{SeminarTopic}{SeminarTopic}
  } // class SeminarTopic Manager

}
Showing below 0 pages.

Retrieved from "https://wiki.bitplan.com/index.php?title=Concept:Seminar/Java&oldid=5362#smw-result"