public Segment(Cube cube, XBRLRender xBRLRender) { Cube = cube; XBRLRender = xBRLRender; BaseSetKey baseSetKey = new BaseSetKey(XBRLConstants.Arcrole_ParentChild, Cube.LinkRoleUri, null, null); ChildNetworkModel = new NetworkModel(XBRLRender.XBRLModel, baseSetKey); ChildNetworkModel.Create(); }
public Cube(string linkRoleUri, NetworkModel networkModel, XBRLRender xBRLRender) { LinkRoleUri = linkRoleUri; ParentNetworkModel = networkModel; XBRLRender = xBRLRender; RoleTypes = ParentNetworkModel.XBRLModel.RoleTypeDict[LinkRoleUri]; RoleTypes[0].GenLabel(ParentNetworkModel.XBRLModel); Definition = RoleTypes[0].Label; if (Definition == null) { Definition = RoleTypes[0].Definition; if (Definition == null) { Definition = LinkRoleUri; } } Definition.Trim(); string cubeType = CubeType; string lower = Definition.ToLower(); if (cubeType == "statement" && !(lower.Contains("parenthetical") || lower.Contains("(table") || lower.Contains("(detail") || lower.Contains("(polic") ) && XBRLRender.IsStatementNamespace) { if (lower.Contains("148600") || lower.Contains("148610") || ((lower.Contains("stockholder") || lower.Contains("shareholder") || lower.Contains("change")) && (lower.Contains("equity") || lower.Contains("deficit"))) || ((lower.Contains("partners") || lower.Contains("accounts")) && lower.Contains("capital")) || (lower.Contains("statement") && lower.Contains("equity")) ) { IsStatementOfEquity = true; } else { IsStatementOfEquity = false; } IsStatementOfCashflow = false; if (lower.Contains("cash") && !lower.Contains("supplement")) { int cashIndex = lower.IndexOf("cash"); string cashSub = lower.Substring(cashIndex); if (cashSub.Contains("flow")) { IsStatementOfCashflow = true; } } } }