public function handle(DOMElement $row, XMLAConnectionContext $context, NamedList $list)
 {
     /*
           Example:
     
           <row>
        <CATALOG_NAME>FoodMart</CATALOG_NAME>
        <SCHEMA_NAME>FoodMart</SCHEMA_NAME>
        <CUBE_NAME>HR</CUBE_NAME>
        <DIMENSION_UNIQUE_NAME>[Store]</DIMENSION_UNIQUE_NAME>
        <HIERARCHY_UNIQUE_NAME>[Store]</HIERARCHY_UNIQUE_NAME>
        <LEVEL_UNIQUE_NAME>[Store].[Store Name]</LEVEL_UNIQUE_NAME>
        <PROPERTY_NAME>Store Manager</PROPERTY_NAME>
        <PROPERTY_CAPTION>Store Manager</PROPERTY_CAPTION>
        <PROPERTY_TYPE>1</PROPERTY_TYPE>
        <DATA_TYPE>130</DATA_TYPE>
        <PROPERTY_CONTENT_TYPE>0</PROPERTY_CONTENT_TYPE>
        <DESCRIPTION>HR Cube - Store Hierarchy - Store
            Name Level - Store Manager Property</DESCRIPTION>
           </row>
     */
     $description = XMLAUtil::stringElement($row, 'DESCRIPTION');
     $uniqueName = XMLAUtil::stringElement($row, 'DESCRIPTION');
     $caption = XMLAUtil::stringElement($row, 'PROPERTY_CAPTION');
     $name = XMLAUtil::stringElement($row, 'PROPERTY_NAME');
     $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;
     }
     $contentTypeOrdinal = XMLAUtil::integerElement($row, 'PROPERTY_CONTENT_TYPE');
     $contentType = $contentTypeOrdinal == null ? null : PropertyContentType::getDictionary()->forOrdinal($contentTypeOrdinal);
     $propertyType = XMLAUtil::integerElement($row, 'PROPERTY_TYPE');
     $type = PropertyType::getDictionary()->forMask($propertyType);
     $list->add(new XMLAProperty($uniqueName, $name, $caption, $description, $datatype, $type, $contentType));
 }
Пример #2
0
 public function getContentType()
 {
     return PropertyContentType::getEnum(PropertyContentType::REGULAR);
 }