setStructure(RequestOutputPlotStructureEnum::ONE_FILE); //default prefix $this->setFilePrefix("plot"); //force page construction $this->getPage(); } public function setStructure($type) { $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOT_STRUCTURE, true); $node->setValue($type); } public function getStructure() { $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOT_STRUCTURE); return (($node == NULL) ? RequestOutputPlotStructureEnum::ONE_FILE : $node->getValue()); } public function setWriteContextFile($write) { $this->setAttribute(REQUESTOUTPUTPLOT_WRITECONTEXTFILE, $write); } public function getWriteContextFile() { return $this->getAttribute(REQUESTOUTPUTPLOT_WRITECONTEXTFILE); } public function setFilePrefix($prefix) { $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOT_FILEPREFIX, true); $node->setValue($prefix); } public function getFilePrefix() { $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOT_FILEPREFIX); return (($node == NULL) ? "" : $node->getValue()); } public function getPage() { $node = $this->getChildInstanceByName(REQUESTOUTPUTPLOTPAGE_NAME); if (!isset($node)) { $node = new RequestOutputPlotPageNodeClass(); $this->addChild($node); } return $node; } public function addPostProcessing($process = "") { $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME); if ($node == NULL) { $node = new RequestOutputPostProcessingNodeClass(); $this->addChild($node); } if ($process != "") $node->addPostProcessing($process); return $node; } public function isPostProcessing($process) { $node = $this->getChildInstanceByName(REQUESTOUTPUTPOSTPROCESSING_NAME); if ($node == NULL) return false; return $node->isPostProcessing($process); } public function loadFromNode($xmlNode) { $structureXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOT_STRUCTURE); if (isset($structureXmlNode)) $this->setStructure($this->getXmlNodeValue($structureXmlNode)); $this->setWriteContextFile($this->getXmlNodeAttribute($xmlNode, REQUESTOUTPUTPLOT_WRITECONTEXTFILE)); $fileprefixXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOT_FILEPREFIX); if (isset($fileprefixXmlNode)) $this->setFilePrefix($this->getXmlNodeValue($fileprefixXmlNode)); $pageXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPLOTPAGE_NAME); if (isset($pageXmlNode)) $this->getPage()->loadFromNode($pageXmlNode); $postprocessingXmlNode = $this->getXmlNodeChildByTagName($xmlNode, REQUESTOUTPUTPOSTPROCESSING_NAME); if (isset($postprocessingXmlNode)) $this->addPostProcessing()->loadFromNode($postprocessingXmlNode); } } ?>