Example #1
0
 /**
  * Constructor
  *
  * @param string              $uniqueName
  * @param string              $name
  * @param string              $caption
  * @param string              $description
  * @param Datatype            $datatype
  * @param                     array               PropertyType $type
  * @param PropertyContentType $contentType
  */
 public function __construct($uniqueName, $name, $caption, $description, DataType $datatype, PropertyType $type, PropertyContentType $contentType)
 {
     parent::__construct($uniqueName, $name, $caption, $description);
     $this->contentType = $contentType;
     assert($datatype != null);
     assert($type != null);
     $this->datatype = $datatype;
     $this->type = $type;
 }
Example #2
0
 /**
  * Constructor
  */
 public function __construct(XMLALevel $level, $uniqueName, $name, $caption, $description, $parentMemberUniqueName, MemberType $type, $childMemberCount, $ordinal, array $propertyValueMap)
 {
     parent::__construct($uniqueName, $name, $caption, $description);
     $this->ordinal = $ordinal;
     assert($level != null);
     assert($type != null);
     $this->level = $level;
     $this->parentMemberUniqueName = $parentMemberUniqueName;
     $this->type = $type;
     $this->childMemberCount = $childMemberCount;
     $this->propertyValueMap = $propertyValueMap;
 }
Example #3
0
 /**
  * Constructor
  *
  * @param
  */
 public function __construct(XMLADimension $dimension, $uniqueName, $name, $caption, $description, $all, $defaultMemberUniqueName)
 {
     if (empty($dimension) || $dimension == NULL) {
         throw new OLAPException('XMLAHierarchy: $dimension cannot be NULL');
     }
     parent::__construct($uniqueName, $name, $caption, $description);
     $this->dimension = $dimension;
     $this->all = (bool) $all;
     $this->defaultMemberUniqueName = $defaultMemberUniqueName;
     $this->hierarchyRestrictions = array('CATALOG_NAME' => $this->dimension->getCube()->getSchema()->getCatalog()->getName(), 'SCHEMA_NAME' => $this->dimension->getCube()->getSchema()->getName(), 'CUBE_NAME' => $this->dimension->getCube()->getName(), 'DIMENSION_UNIQUE_NAME' => $this->dimension->getUniqueName(), 'HIERARCHY_UNIQUE_NAME' => $this->getUniqueName());
     $this->levels = new LazyMetadataList(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_LEVELS), new XMLAConnectionContext($this->dimension->getCube()->getSchema()->getCatalog()->getMetaData()->getConnection(), $this->dimension->getCube()->getSchema()->getCatalog()->getMetaData(), $this->dimension->getCube()->getSchema()->getCatalog(), $this->dimension->getCube()->getSchema(), $this->dimension->getCube(), $this->dimension, $this, NULL), new XMLALevelHandler($this->dimension->getCube()), $this->hierarchyRestrictions);
 }
Example #4
0
 /**
  * Constructor
  *
  * @param XMLACube      $cube
  * @param               $uniqueName
  * @param               $name
  * @param               $caption
  * @param               $description
  * @param DimensionType $type
  * @param               $defaultHierarchyUniqueName
  * @param               $ordinal
  */
 public function __construct(XMLACube $cube, $uniqueName, $name, $caption, $description, DimensionType $type, $defaultHierarchyUniqueName, $ordinal)
 {
     if (empty($cube) || $cube == NULL) {
         throw new OLAPException('XMLADimension: $cube cannot be NULL');
     }
     parent::__construct($uniqueName, $name, $caption, $description);
     $this->defaultHierarchyUniqueName = $defaultHierarchyUniqueName;
     $this->cube = $cube;
     $this->type = $type;
     $this->ordinal = (int) $ordinal;
     $this->dimensionRestrictions = array('CATALOG_NAME' => $this->cube->getSchema()->getCatalog()->getName(), 'SCHEMA_NAME' => $this->cube->getSchema()->getName(), 'CUBE_NAME' => $this->cube->getName(), 'DIMENSION_UNIQUE_NAME' => $this->getUniqueName());
     $this->hierarchies = new LazyMetadataList(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_HIERARCHIES), new XMLAConnectionContext($this->cube->getSchema()->getCatalog()->getMetadata()->getConnection(), $this->cube->getSchema()->getCatalog()->getMetadata(), $this->cube->getSchema()->getCatalog(), $this->cube->getSchema(), $this->cube, $this, NULL, NULL), new XMLAHierarchyHandler($this->cube), $this->dimensionRestrictions);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param XMLAHierarchy $hierarchy
  * @param string        $uniqueName  Unique name
  * @param string        $name        Name
  * @param string        $caption     Caption
  * @param string        $description Description
  * @param integer       $depth       Distance to root
  * @param LevelType     $type        Level type
  * @param boolean       $calculated  Whether level is calculated
  * @param integer       $cardinality Number of members in this level
  */
 public function __construct(XMLAHierarchy $hierarchy, $uniqueName, $name, $caption, $description, $depth, LevelType $type = NULL, $calculated, $cardinality)
 {
     parent::__construct($uniqueName, $name, $caption, $description);
     assert($hierarchy != null);
     $this->type = $type;
     $this->calculated = $calculated;
     $this->cardinality = $cardinality;
     $this->depth = $depth;
     $this->hierarchy = $hierarchy;
     $levelRestrictions = array("CATALOG_NAME" => $hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getName(), "SCHEMA_NAME" => $hierarchy->getDimension()->getCube()->getSchema()->getName(), "CUBE_NAME" => $hierarchy->getDimension()->getCube()->getName(), "DIMENSION_UNIQUE_NAME" => $hierarchy->getDimension()->getUniqueName(), "HIERARCHY_UNIQUE_NAME" => $hierarchy->getUniqueName(), "LEVEL_UNIQUE_NAME" => $this->getUniqueName());
     $this->propertyList = new LazyMetadataList(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_PROPERTIES), XMLAConnectionContext::createAtLevel($this), new XMLAPropertyHandler(), $levelRestrictions);
     try {
         if ($hierarchy->getDimension()->getDimensionType() == DimensionType::getEnum(DimensionType::MEASURE)) {
             $restrictions = array("CATALOG_NAME" => $hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getName(), "SCHEMA_NAME" => $hierarchy->getDimension()->getCube()->getSchema()->getName(), "CUBE_NAME" => $hierarchy->getDimension()->getCube()->getName());
             $this->memberList = new LazyMetadataList(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_MEASURES), new XMLAConnectionContext($hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getMetadata()->getConnection(), $hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getMetadata(), $hierarchy->getDimension()->getCube()->getSchema()->getCatalog(), $hierarchy->getDimension()->getCube()->getSchema(), $hierarchy->getDimension()->getCube(), $hierarchy->getDimension(), $hierarchy, $this), new XMLAMeasureHandler($hierarchy->getDimension(), $restrictions));
         } else {
             $this->memberList = new LazyMetadataList(new XMLAMetadataRequest(XMLAMetadataRequest::MDSCHEMA_MEMBERS), new XMLAConnectionContext($hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getMetadata()->getConnection(), $hierarchy->getDimension()->getCube()->getSchema()->getCatalog()->getMetadata(), $hierarchy->getDimension()->getCube()->getSchema()->getCatalog(), $hierarchy->getDimension()->getCube()->getSchema(), $hierarchy->getDimension()->getCube(), $hierarchy->getDimension(), $hierarchy, $this), new XMLAMemberHandler(), $levelRestrictions);
         }
     } catch (OlapException $e) {
         throw new RuntimeException("Programming error", $e);
     }
 }