public function handle(DOMElement $row, XMLAConnectionContext $context, NamedList $list)
 {
     /*
           Example:
     
           <row>
               <CATALOG_NAME>FoodMart</CATALOG_NAME>
               <SCHEMA_NAME>FoodMart</SCHEMA_NAME>
               <CUBE_NAME>Warehouse</CUBE_NAME>
               <SET_NAME>[Top Sellers]</SET_NAME>
               <SCOPE>1</SCOPE>
           </row>
     */
     $setName = XMLAUtil::stringElement($row, 'SET_NAME');
     $list->add(new XMLANamedSet($context->getCube($row), $setName));
 }
 public function handle(DOMElement $row, XMLAConnectionContext $context, NamedList $list)
 {
     /*
           Example:
     
           <row>
               <CATALOG_NAME>FoodMart</CATALOG_NAME>
               <SCHEMA_NAME>FoodMart</SCHEMA_NAME>
               <CUBE_NAME>Sales</CUBE_NAME>
               <MEASURE_NAME>Profit</MEASURE_NAME>
               <MEASURE_UNIQUE_NAME>[Measures].[Profit]</MEASURE_UNIQUE_NAME>
               <MEASURE_CAPTION>Profit</MEASURE_CAPTION>
               <MEASURE_AGGREGATOR>127</MEASURE_AGGREGATOR>
               <DATA_TYPE>130</DATA_TYPE>
               <MEASURE_IS_VISIBLE>true</MEASURE_IS_VISIBLE>
               <DESCRIPTION>Sales Cube - Profit Member</DESCRIPTION>
           </row>
     */
     $measureName = XMLAUtil::stringElement($row, 'MEASURE_NAME');
     $measureUniqueName = XMLAUtil::stringElement($row, 'MEASURE_UNIQUE_NAME');
     $measureCaption = XMLAUtil::stringElement($row, 'MEASURE_CAPTION');
     $description = XMLAUtil::stringElement($row, 'DESCRIPTION');
     $measureAggregator = NULL;
     /*$measureAggregator =
       MeasureAggregator::getDictionary ( )::forOrdinal (
          XMLAUtil::integerElement (
             $row, 'MEASURE_AGGREGATOR' ) );*/
     // Figure out datatype
     $datatype = NULL;
     $ordinalDatatype = DataType::getDictionary()->forName(XMLAUtil::stringElement($row, 'DATA_TYPE'));
     if ($ordinalDatatype == null) {
         $datatype = Datatype::getDictionary()->forOrdinal(XMLAUtil::integerElement($row, 'DATA_TYPE'));
     } else {
         $datatype = $ordinalDatatype;
     }
     $measureIsVisible = XMLAUtil::booleanElement($row, 'MEASURE_IS_VISIBLE');
     $member = $context->getCube($row)->getMetadataReader()->lookupMemberByUniqueName($measureUniqueName);
     if ($member == null) {
         throw new OLAPException('The server failed to resolve a member with the same unique name as a measure named ' . $measureUniqueName);
     }
     $list->add(new XMLAMeasure($member->getLevel(), $measureUniqueName, $measureName, $measureCaption, $description, null, $measureAggregator, $datatype, $measureIsVisible, $member->getOrdinal()));
 }