<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://profiwiki.bitplan.com/index.php?action=history&amp;feed=atom&amp;title=GenerateProperties</id>
	<title>GenerateProperties - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://profiwiki.bitplan.com/index.php?action=history&amp;feed=atom&amp;title=GenerateProperties"/>
	<link rel="alternate" type="text/html" href="http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;action=history"/>
	<updated>2026-04-30T05:53:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;diff=420&amp;oldid=prev</id>
		<title>Wf: transfered by WikiBackup wikiTask at 2017-11-05T18:06:09Z</title>
		<link rel="alternate" type="text/html" href="http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;diff=420&amp;oldid=prev"/>
		<updated>2017-11-05T18:06:11Z</updated>

		<summary type="html">&lt;p&gt;transfered by WikiBackup wikiTask at 2017-11-05T18:06:09Z&lt;/p&gt;
&lt;a href=&quot;http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;amp;diff=420&amp;amp;oldid=324&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Wf</name></author>
	</entry>
	<entry>
		<id>http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;diff=324&amp;oldid=prev</id>
		<title>Wf: transfered by WikiBackup wikiTask at 2016-02-17T08:25:22Z</title>
		<link rel="alternate" type="text/html" href="http://profiwiki.bitplan.com/index.php?title=GenerateProperties&amp;diff=324&amp;oldid=prev"/>
		<updated>2016-02-17T08:25:23Z</updated>

		<summary type="html">&lt;p&gt;transfered by WikiBackup wikiTask at 2016-02-17T08:25:22Z&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Action&lt;br /&gt;
|name=GenerateProperties&lt;br /&gt;
|servicetype=WikiTask&lt;br /&gt;
|inputtype=Page&lt;br /&gt;
|input={{FULLPAGENAME}}#sidif&lt;br /&gt;
|actionpage={{FULLPAGENAME}}#template&lt;br /&gt;
|output={{FULLPAGENAME}}#result&lt;br /&gt;
|engine=rythm&lt;br /&gt;
|author=Wf&lt;br /&gt;
|since=2015/11/18&lt;br /&gt;
|comment=This saves a lot of work!&lt;br /&gt;
|storemode=property&lt;br /&gt;
}}&lt;br /&gt;
__NOCACHE__&lt;br /&gt;
&lt;br /&gt;
* {{Link|target=Concept:Action}}&lt;br /&gt;
* {{Link|target=Template:Action}}&lt;br /&gt;
* {{Link|target=Template:Wikitask}}&lt;br /&gt;
= input =&lt;br /&gt;
=== sidif ===&lt;br /&gt;
&amp;lt;source lang='java' id='sidif'&amp;gt;&lt;br /&gt;
Presentation isA Context&lt;br /&gt;
&amp;quot;Presentation#sidif&amp;quot;is sidif of it&lt;br /&gt;
Bigstock needs Properties&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Training sidif ===&lt;br /&gt;
&amp;lt;source lang='java' id='trainingsidif'&amp;gt;&lt;br /&gt;
Training isA Context&lt;br /&gt;
&amp;quot;Training#sidif&amp;quot;is sidif of it&lt;br /&gt;
Quizkarte needs Properties&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
=== Syllabus sidif ===&lt;br /&gt;
&amp;lt;source lang='java' id='syllabussidif'&amp;gt;&lt;br /&gt;
Syllabus isA Context&lt;br /&gt;
&amp;quot;Syllabus#sidif&amp;quot;is sidif of it&lt;br /&gt;
LearningGoal needs Properties&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CRM Sidif ===&lt;br /&gt;
&amp;lt;source lang='java' id='crmsidif'&amp;gt;&lt;br /&gt;
CRM isA Context&lt;br /&gt;
&amp;quot;CRM#sidif&amp;quot;is sidif of it&lt;br /&gt;
Organization needs Properties&lt;br /&gt;
Person needs Properties&lt;br /&gt;
Contact needs Properties&lt;br /&gt;
SocialLink needs Properties&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= template =&lt;br /&gt;
&amp;lt;source lang='java' id='dialog'&amp;gt;&lt;br /&gt;
@// This is a rythm template&lt;br /&gt;
@import org.sidif.triple.TripleQuery&lt;br /&gt;
@import org.sidif.triple.Triple&lt;br /&gt;
@import org.sidif.wiki.SSLWiki&lt;br /&gt;
@import com.bitplan.topic.ContextSetting.TripleStoreMode&lt;br /&gt;
@import com.alibaba.fastjson.JSON&lt;br /&gt;
@import com.bitplan.mediawiki.japi.MediawikiApi&lt;br /&gt;
@import com.bitplan.mediawiki.japi.Mediawiki&lt;br /&gt;
@import com.bitplan.mediawiki.japi.api.Api&lt;br /&gt;
@include(wiki.SiDIFTemplates.propertiesdefs)&lt;br /&gt;
@args() {&lt;br /&gt;
  String title &lt;br /&gt;
  String logo&lt;br /&gt;
  org.sidif.wiki.WikiTask wikiTask&lt;br /&gt;
  org.sidif.triple.TripleStore tripleStore&lt;br /&gt;
}&lt;br /&gt;
@{&lt;br /&gt;
  TripleQuery query=tripleStore.query();&lt;br /&gt;
  TripleQuery needed=query.query(null,&amp;quot;needs&amp;quot;,&amp;quot;Properties&amp;quot;);&lt;br /&gt;
  Triple contextTriple=query.selectSingle(null,&amp;quot;isA&amp;quot;,&amp;quot;Context&amp;quot;);&lt;br /&gt;
  String contextName=contextTriple.getSubject().toString();&lt;br /&gt;
  Triple sidifTriple=query.selectSingle(contextName,&amp;quot;sidif&amp;quot;, null);&lt;br /&gt;
  String contextSidif=sidifTriple.getObject().toString();&lt;br /&gt;
  // now get the context&lt;br /&gt;
  ContextSetting contextSetting=ContextSetting.fromWikiTask(wikiTask);&lt;br /&gt;
  contextSetting.setContextName(contextName);&lt;br /&gt;
  contextSetting.setSidifInput(contextSidif);&lt;br /&gt;
  contextSetting.setTripleStoreMode(TripleStoreMode.SiDIF);&lt;br /&gt;
  Context context = ContextFactory.getInstance().getContext(contextSetting);&lt;br /&gt;
}&lt;br /&gt;
@(wikiTask.getWiki().getIsoTimeStamp())&lt;br /&gt;
@(needed.size()) Topics need Properties to be generated&lt;br /&gt;
@for (Triple neededTriple:needed.getTriples()) {&lt;br /&gt;
@{&lt;br /&gt;
  String topicName=neededTriple.getSubject().toString();&lt;br /&gt;
  Topic topic=context.byName(topicName);&lt;br /&gt;
}&lt;br /&gt;
== Topic: @(topicName) ==&lt;br /&gt;
=== properties of @(topic.name) ===&lt;br /&gt;
@for (Property property:topic.getProperties()) {&lt;br /&gt;
==== [[Property:@(topic.name) @(property.name)]] ====&lt;br /&gt;
@{&lt;br /&gt;
  Throwable error=null;&lt;br /&gt;
  try {&lt;br /&gt;
    // get the Rythm template result&lt;br /&gt;
    org.rythmengine.utils.RawData pageContentRaw=property(topic,property);&lt;br /&gt;
    String pageContent=pageContentRaw.toString();&lt;br /&gt;
    String pageTitle=&amp;quot;Property:&amp;quot;+topic.name+&amp;quot; &amp;quot;+property.name;&lt;br /&gt;
    SSLWiki wiki=(SSLWiki)wikiTask.getWiki();&lt;br /&gt;
    String currentContent=wiki.getPageContent(pageTitle);&lt;br /&gt;
    // if (currentContent==null || currentContent.length()==0) {&lt;br /&gt;
      String summary=&amp;quot;generated by GenerateProperties at &amp;quot;+wiki.getIsoTimeStamp();&lt;br /&gt;
      wiki.edit(pageTitle,pageContent,summary);&lt;br /&gt;
    // }&lt;br /&gt;
  } catch (Throwable th) {&lt;br /&gt;
    error=th;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
@if (error) {&lt;br /&gt;
&amp;lt;span style='color:red'&amp;gt;Error: @(error.getMessage())&amp;lt;/span&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@property(topic,property)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
{{#default_form:Action}}&lt;br /&gt;
&lt;br /&gt;
= result =&lt;br /&gt;
2016-02-10T06:54:11Z&lt;br /&gt;
1 Topics need Properties to be generated&lt;br /&gt;
&lt;br /&gt;
== Topic: Bigstock ==&lt;br /&gt;
=== properties of Bigstock ===&lt;br /&gt;
==== [[Property:Bigstock id]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Property&lt;br /&gt;
|name=id&lt;br /&gt;
|label=id&lt;br /&gt;
|documentation=the id of the bigstock photo&lt;br /&gt;
|type=Special:Types/Text&lt;br /&gt;
|index=1&lt;br /&gt;
|sortPos=&lt;br /&gt;
|primaryKey=true&lt;br /&gt;
|mandatory=true&lt;br /&gt;
|namespace=&lt;br /&gt;
|size=8&lt;br /&gt;
|uploadable=false&lt;br /&gt;
|defaultValue=&lt;br /&gt;
|inputType=&lt;br /&gt;
|allowedValues=&lt;br /&gt;
|values_from=&lt;br /&gt;
|showInGrid=false&lt;br /&gt;
|isLink=false&lt;br /&gt;
|topic=Concept:Bigstock&lt;br /&gt;
|storemode=property&lt;br /&gt;
}}&lt;br /&gt;
[[Has type::Text]]&lt;br /&gt;
This is a Property with type {{#show: {{FULLPAGENAMEE}} | ?Property type#- }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== [[Property:Bigstock file]] ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Property&lt;br /&gt;
|name=file&lt;br /&gt;
|label=file&lt;br /&gt;
|documentation=the downloaded bigstock file - if it is downloaded a license has been paid for&lt;br /&gt;
|type=Special:Types/Page&lt;br /&gt;
|index=2&lt;br /&gt;
|sortPos=&lt;br /&gt;
|primaryKey=false&lt;br /&gt;
|mandatory=false&lt;br /&gt;
|namespace=File&lt;br /&gt;
|size=100&lt;br /&gt;
|uploadable=true&lt;br /&gt;
|defaultValue=&lt;br /&gt;
|inputType=&lt;br /&gt;
|allowedValues=&lt;br /&gt;
|values_from=namespace=File&lt;br /&gt;
|showInGrid=false&lt;br /&gt;
|isLink=false&lt;br /&gt;
|topic=Concept:Bigstock&lt;br /&gt;
|storemode=property&lt;br /&gt;
}}&lt;br /&gt;
[[Has type::Page]]&lt;br /&gt;
This is a Property with type {{#show: {{FULLPAGENAMEE}} | ?Property type#- }}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&amp;lt;headertabs/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wf</name></author>
	</entry>
</feed>