application/hub/starter.php -text svneol=unset#text/plain
application/hub/templates/.htaccess -text svneol=unset#text/plain
application/hub/templates/xml/.htaccess -text svneol=unset#text/plain
-application/hub/templates/xml/.xml -text svneol=unset#application/xml
+application/hub/templates/xml/.xml -text svneol=unset#text/plain
application/hub/templates/xml/announcement/.htaccess -text svneol=unset#text/plain
-application/hub/templates/xml/announcement/self_announcement.xml -text svneol=unset#application/xml
+application/hub/templates/xml/announcement/self_announcement.xml -text svneol=unset#text/plain
application/hub/templates/xml/cruncher/.htaccess svneol=native#text/plain
application/hub/templates/xml/cruncher/producer/.htaccess svneol=native#text/plain
-application/hub/templates/xml/cruncher/producer/test_unit.xml -text svneol=unset#application/xml
+application/hub/templates/xml/cruncher/producer/test_unit.xml -text svneol=unset#text/plain
+application/hub/templates/xml/cruncher/producer/work_unit.xml -text svneol=unset#text/plain
application/hub/templates/xml/node/.htaccess -text svneol=unset#text/plain
-application/hub/templates/xml/node/node_status.xml -text svneol=unset#application/xml
+application/hub/templates/xml/node/node_status.xml -text svneol=unset#text/plain
application/hub/templates/xml/object_registry/.htaccess -text svneol=unset#text/plain
-application/hub/templates/xml/object_registry/object_registry.xml -text svneol=unset#application/xml
+application/hub/templates/xml/object_registry/object_registry.xml -text svneol=unset#text/plain
application/hub/templates/xml/self_connect/.htaccess -text svneol=unset#text/plain
-application/hub/templates/xml/self_connect/self_connect.xml -text svneol=unset#application/xml
+application/hub/templates/xml/self_connect/self_connect.xml -text svneol=unset#text/plain
/clear-cache.sh -text
db/.htaccess -text svneol=unset#text/plain
db/news/.htaccess -text svneol=unset#text/plain
* @param $resource XML parser resource (currently ignored)
* @param $characters Characters to handle
* @return void
- * @todo Find something useful with this!
*/
public function characterHandler ($resource, $characters) {
// Trim all spaces away
/**
* Starts the object-list
*
+ * @param $objectCount Count of all objects
* @return void
+ * @todo Handle $objectCount
*/
- private function startObjectList () {
+ private function startObjectList ($objectCount) {
// Push the node name on the stacker
$this->getStackerInstance()->pushNamed('object_registry', 'object-list');
}
* Sub nodes in the XML tree
*/
private $subNodes = array(
+ 'meta-data',
+ 'global-project-identifier',
+ 'cipher',
+ 'cipher-function',
+ 'cipher-name',
+ 'unprocessed-data',
+ 'cruncher-key-list',
+ 'cruncher-key',
+ 'key-id',
+ 'key-value'
);
/**
* @param $resource XML parser resource (currently ignored)
* @param $characters Characters to handle
* @return void
- * @todo Find something useful with this!
*/
public function characterHandler ($resource, $characters) {
// Trim all spaces away
return false;
} // END - if
- // Get current XML node name as an array index
- $nodeName = $this->getStackerInstance()->getNamed('cruncher_test_unit');
-
- $this->partialStub('TODO: Do something with the gathered data.');
+ // Assign the found characters to variable and use the last entry from
+ // stack as the name
+ parent::assignVariable($this->getStackerInstance()->getNamed('cruncher_test_unit'), $characters);
}
/**
$this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-test-unit');
}
+ /**
+ * Starts the meta-data
+ *
+ * @return void
+ */
+ private function startMetaData () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'meta-data');
+ }
+
+ /**
+ * Starts the global-project-identifier
+ *
+ * @return void
+ */
+ private function startGlobalProjectIdentifier () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'global-project-identifier');
+ }
+
+ /**
+ * Finishes the global-project-identifier
+ *
+ * @return void
+ */
+ private function finishGlobalProjectIdentifier () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the cipher
+ *
+ * @return void
+ */
+ private function startCipher () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher');
+ }
+
+ /**
+ * Starts the cipher-function
+ *
+ * @return void
+ */
+ private function startCipherFunction () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-function');
+ }
+
+ /**
+ * Finishes the cipher-function
+ *
+ * @return void
+ */
+ private function finishCipherFunction () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the cipher-name
+ *
+ * @return void
+ */
+ private function startCipherName () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cipher-name');
+ }
+
+ /**
+ * Finishes the cipher-name
+ *
+ * @return void
+ */
+ private function finishCipherName () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cipher
+ *
+ * @return void
+ */
+ private function finishCipher () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the meta-data
+ *
+ * @return void
+ */
+ private function finishMetaData () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the unprocessed-data
+ *
+ * @return void
+ */
+ private function startUnprocessedData () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'unprocessed-data');
+ }
+
+ /**
+ * Starts the cruncher-key-list
+ *
+ * @param $keyCount Count of keys in this test unit
+ * @return void
+ * @todo Handle $keyCount
+ */
+ private function startCruncherKeyList ($keyCount) {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key-list');
+ }
+
+ /**
+ * Starts the cruncher-key
+ *
+ * @return void
+ */
+ private function startCruncherKey () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'cruncher-key');
+ }
+
+ /**
+ * Starts the key-id
+ *
+ * @return void
+ */
+ private function startKeyId () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-id');
+ }
+
+ /**
+ * Finishes the key-id
+ *
+ * @return void
+ */
+ private function finishKeyId () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Starts the key-value
+ *
+ * @return void
+ */
+ private function startKeyValue () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('cruncher_test_unit', 'key-value');
+ }
+
+ /**
+ * Finishes the key-value
+ *
+ * @return void
+ */
+ private function finishKeyValue () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cruncher-key
+ *
+ * @return void
+ */
+ private function finishCruncherKey () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the cruncher-key-list
+ *
+ * @return void
+ */
+ private function finishCruncherKeyList () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
+ /**
+ * Finishes the unprocessed-data
+ *
+ * @return void
+ */
+ private function finishUnprocessedData () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('cruncher_test_unit');
+ }
+
/**
* Finishes the test-unit
*
along with this program. If not, see <http://www.gnu.org/licenses/>
//-->
<cruncher-test-unit>
+ <!--
+ This node stores meta-data which is needed to manage this test unit.
+ //-->
+ <meta-data>
+ <!--
+ The global project identifier, or short GPI, identifies every crunching
+ project in the global cloud (aka "hub" project). Therefore it has to be
+ unique (globally unique). This is ensured by hashing the node's hub-id
+ and some more data (will be specified later on).
+ //-->
+ <global-project-identifier>{?global_project_idendifier?}</global-project-identifier>
+ <!--
+ The used cipher to crunch the given keys. Currently only 'mcrypt' is
+ supported as "cipher function".
+ //-->
+ <cipher>
+ <cipher-function>{?cipher_function?}</cipher-function>
+ <cipher-name>{?cipher_name?}</cipher-name>
+ </cipher>
+ </meta-data>
+ <!--
+ The data the cruncher shall process for this test unit.
+ //-->
+ <unprocessed-data>
+ <!--
+ Because this is a WU for crunchers, there is always a key list.
+ //-->
+ <cruncher-key-list key-count="{?key_count?}">
+ <!-- A single key to crunch. //-->
+ <cruncher-key>
+ <key-id>{?key_id?}</key-id>
+ <key-value><![CDATA[{?key_value?}]]></key-value>
+ </cruncher-key>
+ </cruncher-key-list>
+ </unprocessed-data>
</cruncher-test-unit>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+A XML template for the producer to produce work units
+
+@author Roland Haeder <webmaster@ship-simu.org>
+@version 0.0.0
+@copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+@license GNU GPL 3.0 or any newer version
+@link http://www.ship-simu.org
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>
+//-->
+<cruncher-work-unit>
+ <!--
+ This node stores meta-data which is needed to manage this work unit (WU).
+ //-->
+ <meta-data>
+ <!--
+ The global project identifier, or short GPI, identifies every crunching
+ project in the cloud (aka "hub" project). Therefore it has to be unique
+ (globally unique). This is ensured by hashing the node's hub-id and some
+ more data (will be specified later on).
+ //-->
+ <global-project-identifier>{?global_project_idendifier?}</global-project-identifier>
+ <!--
+ The used cipher to crunch the given keys. Currently only 'mcrypt' is
+ supported as "cipher function".
+ //-->
+ <cipher>
+ <cipher-function>{?cipher_function?}</cipher-function>
+ <cipher-name>{?cipher_name?}</cipher-name>
+ </cipher>
+ <!--
+ The node's hub-id. This is required to verify the GPI.
+ //-->
+ <hub-id>{?hub_id?}</hub-id>
+ <!--
+ The node's current session-id. This is required to verify the hub-id.
+ //-->
+ <session-id>{?session_id?}</session-id>
+ </meta-data>
+ <!--
+ The data the cruncher shall process for this work unit.
+ //-->
+ <unprocessed-data>
+ <!--
+ Because this is a WU for crunchers, there is always a key list.
+ //-->
+ <cruncher-key-list key-count="{?key_count?}">
+ <!-- A single key to crunch. //-->
+ <cruncher-key>
+ <key-id>{?key_id?}</key-id>
+ <key-value><![CDATA[{?key_value?}]]></key-value>
+ </cruncher-key>
+ </cruncher-key-list>
+ </unprocessed-data>
+</cruncher-work-unit>
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>
//-->
-<node-status-list>
+<node-status-list status-count="{?status_count?}">
<!-- This hub cannot be reached from outside by TCP only. //-->
<node-status status="unreachable_tcp" />
<!-- This hub cannot be reached from outside by UDP only. //-->
If you don't do so, you may be banned because of unknown object types your
node tries to advertise/share.
//-->
- <object-list>
+ <object-list object-count="{?object_count?}">
<!-- A single object type we want to share. //-->
<object-list-entry>
<!-- The actual name, this must be the same as tag names are. //-->
./application/hub/main/tasks/hub/ping/class_HubPingTask.php:73: * @todo 0% done
./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:53: * @todo 0%
./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
-./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:247: * @todo Find something useful with this!
./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:240: * @todo Find something useful with this!
./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:251: * @todo Find something useful with this!
+./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:324: * @todo Handle $objectCount
./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
-./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:231: * @todo Find something useful with this!
+./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:391: * @todo Handle $keyCount
./application/hub/main/tools/class_HubTools.php:128: // @TODO We may want to encapsulate this PHP call into an own class
./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:105: * @todo Does a query needs to perform some actions as an active task?
./application/hub/main/visitor/tasks/class_ActiveTaskVisitor.php:116: * @todo Does a queue needs to perform some actions as an active task?