contentNode =
new EntityEnumeratingProducerNode( "content", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
new CompositeProducerNode( new ProducerNode[] {
- new EntityEnumeratingProducerNode( "city", DatabaseTopics.getInstance(), TopicsAdapterDefinition.getInstance(), "main_url='c' and exists(select * from content_x_topic where content_id=${content.id} and topic_id=id)", "",
- new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
- new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
- new CompositeProducerNode( new ProducerNode[] {
- new GeneratingProducerNode(
- "/producer/bolivia.indymedia.org/${city.filename}/article.template",
- "${config.storageRoot}/${language.code}/${content.date.formatted.yyyy}/${content.date.formatted.MM}/${content.id}.shtml"
- ),
- new ContentMarkingProducerNode( "content" )
- } )
- )
+ new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
+ new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
+ new CompositeProducerNode( new ProducerNode[] {
+ new GeneratingProducerNode(
+ "/producer/bolivia.indymedia.org/article.template",
+ "${config.storageRoot}/${language.code}/${content.date.formatted.yyyy}/${content.date.formatted.MM}/${content.id}.shtml"
+ ),
+ new ContentMarkingProducerNode( "content" )
+ } )
)
),
new ContentMarkingProducerNode( "content")
)
)
);
-
- aProducerNode.addSubNode(
- new EntityEnumeratingProducerNode( "city", DatabaseTopics.getInstance(), TopicsAdapterDefinition.getInstance(), "main_url='c'", "",
- new EntityListProducerNode("newswire", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
- "is_published='1' and to_article_type = ${articletype.newswire} and exists(select * from content_x_topic where content_id=id and topic_id=${city.id})", "date desc, webdb_create desc", 40, 0,
- new EntityListProducerNode("languages", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(),
- "", "code", 10, 0,
- new EntityListProducerNode("startspecial", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
- "is_published='1' and to_article_type = ${articletype.startspecial} and "+
- "exists(select * from content_x_topic where content_id=id and topic_id=${city.id})", "date desc, webdb_create desc", 1, 0,
- new EntityListProducerNode("features", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
- "is_published='1' and to_article_type = ${articletype.feature} and exists(select * from content_x_topic where content_id=id and topic_id=${city.id})", "date desc, webdb_create desc", 10, 0,
- new EntityListProducerNode("breaking", DatabaseBreaking.getInstance(), BreakingAdapterDefinition.getInstance(),
- "", "webdb_create desc", 5, 0,
- new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
- new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
- new GeneratingProducerNode(
- "/producer/bolivia.indymedia.org/${city.filename}/startpage.template",
- "${config.storageRoot}/${city.filename}/${language.code}/index.shtml"
- )
- )
- )
- )
- )
- )
- )
- )
- )
- );
}
catch (Throwable t) {
logger.printError("BoliviaProducerLocalizer.setupStartPageFactory: Exception "+t.getMessage());
)
)
);
- aProducerNode.addSubNode(
- new EntityEnumeratingProducerNode( "city", DatabaseTopics.getInstance(), TopicsAdapterDefinition.getInstance(), "main_url='c'", "",
- new EntityListProducerNode("languages", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(),
- "", "code", 10, 0,
- new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
- new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
- new GeneratingProducerNode(
- "/producer/bolivia.indymedia.org/${city.filename}/navigation.template",
- "${config.storageRoot}/${city.filename}/${language.code}/navigation.inc"
- )
- )
- )
- )
- )
- );
}
catch (Throwable t) {
logger.printError("BoliviaProducerLocalizer.setupStaticFactory: Exception "+t.getMessage());
)
)
);
-
-// topic pages per city:
- topicPageNode =
- new EntityBatchingProducerNode( "articles", "batch", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
- "is_published='1' and to_article_type = ${articletype.newswire} and " +
- "id in (select content_id from content_x_topic where topic_id = ${topic.id}) and " +
- "id in (select content_id from content_x_topic where topic_id = ${city.id})", "date asc, webdb_create asc", 6, 5, 0,
- new EntityListProducerNode("languages", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(),
- "", "code", 10, 0,
- new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
- new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
- new GeneratingProducerNode(
- "/producer/bolivia.indymedia.org/${city.filename}/topic.template",
- "${config.storageRoot}/${city.filename}/${language.code}/${topic.filename}/${topic.filename}${batch.current.identifier}.shtml"
- )
- )
- )
- ),
- new EntityListProducerNode("languages", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(),
- "", "code", 10, 0,
- new EntityEnumeratingProducerNode( "language", DatabaseLanguage.getInstance(), LanguageAdapterDefinition.getInstance(), "", "",
- new ResourceBundleProducerNode("lang", "bundles.producer_${language.code}",
- new GeneratingProducerNode(
- "/producer/bolivia.indymedia.org/${city.filename}/topicnavigation.template",
- "${config.storageRoot}/${city.filename}/${language.code}/${topic.filename}/${topic.filename}navigation.inc"
- )
- )
- )
- )
- );
- topicPageNode.addVerb("new", 3);
- topicPageNode.addVerb("all", -1);
-
- aProducerNode.addSubNode(
- new EntityEnumeratingProducerNode( "city", DatabaseTopics.getInstance(), TopicsAdapterDefinition.getInstance(), "main_url='c'", "",
- new EntityEnumeratingProducerNode( "topic", DatabaseTopics.getInstance(), TopicsAdapterDefinition.getInstance(), "((main_url is null) or main_url<>'c')", "",
- new EntityListProducerNode("topicspecial", DatabaseContent.getInstance(), ContentAdapterDefinition.getInstance(),
- "is_published='1' and to_article_type = ${articletype.topicspecial} and "+
- "id in (select content_id from content_x_topic where topic_id = ${topic.id}) and "+
- "id in (select content_id from content_x_topic where topic_id = ${city.id})", "date, webdb_create", 1, 0,
- topicPageNode
- )
- )
- )
- );
}
catch (Throwable t) {
logger.printError("BoliviaProducerLocalizer.setupTopicsFactory: Exception "+t.getMessage());