public XSSFPivotCacheDefinition()
            : base()
        {

            ctPivotCacheDefinition = new CT_PivotCacheDefinition();
            CreateDefaultValues();
        }
 public void ReadFrom(Stream is1)
 {
     try
     {
         //XmlOptions options  = new XmlOptions(DEFAULT_XML_OPTIONS);
         ////Removing root element
         //options.LoadReplaceDocumentElement=(/*setter*/null);
         XmlDocument xmldoc = ConvertStreamToXml(is1);
         ctPivotCacheDefinition = CT_PivotCacheDefinition.Parse(xmldoc.DocumentElement, NamespaceManager);
     }
     catch (XmlException e)
     {
         throw new IOException(e.Message);
     }
 }
 public static CT_PivotCacheDefinition Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_PivotCacheDefinition ctObj = new CT_PivotCacheDefinition();
     ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
     if (node.Attributes["invalid"] != null)
         ctObj.invalid = XmlHelper.ReadBool(node.Attributes["invalid"]);
     if (node.Attributes["saveData"] != null)
         ctObj.saveData = XmlHelper.ReadBool(node.Attributes["saveData"]);
     if (node.Attributes["refreshOnLoad"] != null)
         ctObj.refreshOnLoad = XmlHelper.ReadBool(node.Attributes["refreshOnLoad"]);
     if (node.Attributes["optimizeMemory"] != null)
         ctObj.optimizeMemory = XmlHelper.ReadBool(node.Attributes["optimizeMemory"]);
     if (node.Attributes["enableRefresh"] != null)
         ctObj.enableRefresh = XmlHelper.ReadBool(node.Attributes["enableRefresh"]);
     ctObj.refreshedBy = XmlHelper.ReadString(node.Attributes["refreshedBy"]);
     if (node.Attributes["refreshedDate"] != null)
         ctObj.refreshedDate = XmlHelper.ReadDouble(node.Attributes["refreshedDate"]);
     if (node.Attributes["refreshedDateIso"] != null)
         if (node.Attributes["backgroundQuery"] != null)
             ctObj.backgroundQuery = XmlHelper.ReadBool(node.Attributes["backgroundQuery"]);
     if (node.Attributes["missingItemsLimit"] != null)
         ctObj.missingItemsLimit = XmlHelper.ReadUInt(node.Attributes["missingItemsLimit"]);
     if (node.Attributes["createdVersion"] != null)
         ctObj.createdVersion = XmlHelper.ReadByte(node.Attributes["createdVersion"]);
     if (node.Attributes["refreshedVersion"] != null)
         ctObj.refreshedVersion = XmlHelper.ReadByte(node.Attributes["refreshedVersion"]);
     if (node.Attributes["minRefreshableVersion"] != null)
         ctObj.minRefreshableVersion = XmlHelper.ReadByte(node.Attributes["minRefreshableVersion"]);
     if (node.Attributes["recordCount"] != null)
         ctObj.recordCount = XmlHelper.ReadUInt(node.Attributes["recordCount"]);
     if (node.Attributes["upgradeOnRefresh"] != null)
         ctObj.upgradeOnRefresh = XmlHelper.ReadBool(node.Attributes["upgradeOnRefresh"]);
     if (node.Attributes["tupleCache1"] != null)
         ctObj.tupleCache1 = XmlHelper.ReadBool(node.Attributes["tupleCache1"]);
     if (node.Attributes["supportSubquery"] != null)
         ctObj.supportSubquery = XmlHelper.ReadBool(node.Attributes["supportSubquery"]);
     if (node.Attributes["supportAdvancedDrill"] != null)
         ctObj.supportAdvancedDrill = XmlHelper.ReadBool(node.Attributes["supportAdvancedDrill"]);
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "cacheSource")
             ctObj.cacheSource = CT_CacheSource.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "cacheFields")
             ctObj.cacheFields = CT_CacheFields.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "cacheHierarchies")
             ctObj.cacheHierarchies = CT_CacheHierarchies.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "kpis")
             ctObj.kpis = CT_PCDKPIs.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "tupleCache")
             ctObj.tupleCache = CT_TupleCache.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "calculatedItems")
             ctObj.calculatedItems = CT_CalculatedItems.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "calculatedMembers")
             ctObj.calculatedMembers = CT_CalculatedMembers.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "dimensions")
             ctObj.dimensions = CT_Dimensions.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "measureGroups")
             ctObj.measureGroups = CT_MeasureGroups.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "maps")
             ctObj.maps = CT_MeasureDimensionMaps.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }