本文整理汇总了Python中arelle.ModelRenderingObject.StructuralNode.aspects[coveredAspect]方法的典型用法代码示例。如果您正苦于以下问题:Python StructuralNode.aspects[coveredAspect]方法的具体用法?Python StructuralNode.aspects[coveredAspect]怎么用?Python StructuralNode.aspects[coveredAspect]使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类arelle.ModelRenderingObject.StructuralNode
的用法示例。
在下文中一共展示了StructuralNode.aspects[coveredAspect]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addRelationship
# 需要导入模块: from arelle.ModelRenderingObject import StructuralNode [as 别名]
# 或者: from arelle.ModelRenderingObject.StructuralNode import aspects[coveredAspect] [as 别名]
def addRelationship(relAxisObj, rel, structuralNode, cartesianProductNestedArgs, selfStructuralNodes=None):
variableQname = relAxisObj.variableQname
conceptQname = relAxisObj.conceptQname
coveredAspect = relAxisObj.coveredAspect(structuralNode)
if not coveredAspect:
return None
if selfStructuralNodes is not None:
fromConceptQname = rel.fromModelObject.qname
# is there an ordinate for this root object?
if fromConceptQname in selfStructuralNodes:
childStructuralNode = selfStructuralNodes[fromConceptQname]
else:
childStructuralNode = StructuralNode(structuralNode, relAxisObj)
structuralNode.childStructuralNodes.append(childStructuralNode)
selfStructuralNodes[fromConceptQname] = childStructuralNode
if variableQname:
childStructuralNode.variables[variableQname] = []
if conceptQname:
childStructuralNode.variables[conceptQname] = fromConceptQname
childStructuralNode.aspects[coveredAspect] = fromConceptQname
relChildStructuralNode = StructuralNode(childStructuralNode, relAxisObj)
childStructuralNode.childStructuralNodes.append(relChildStructuralNode)
else:
relChildStructuralNode = StructuralNode(structuralNode, relAxisObj)
structuralNode.childStructuralNodes.append(relChildStructuralNode)
if variableQname:
relChildStructuralNode.variables[variableQname] = rel
toConceptQname = rel.toModelObject.qname
if conceptQname:
relChildStructuralNode.variables[conceptQname] = toConceptQname
relChildStructuralNode.aspects[coveredAspect] = toConceptQname
analyzeCartesianProductHdrs(relChildStructuralNode, *cartesianProductNestedArgs)
return relChildStructuralNode
示例2: addRelationship
# 需要导入模块: from arelle.ModelRenderingObject import StructuralNode [as 别名]
# 或者: from arelle.ModelRenderingObject.StructuralNode import aspects[coveredAspect] [as 别名]
def addRelationship(breakdownNode, relDefinitionNode, rel, structuralNode, cartesianProductNestedArgs, selfStructuralNodes=None):
variableQname = relDefinitionNode.variableQname
conceptQname = relDefinitionNode.conceptQname
coveredAspect = relDefinitionNode.coveredAspect(structuralNode)
if not coveredAspect:
return None
if selfStructuralNodes is not None:
fromConceptQname = rel.fromModelObject.qname
# is there an ordinate for this root object?
if fromConceptQname in selfStructuralNodes:
childStructuralNode = selfStructuralNodes[fromConceptQname]
else:
childStructuralNode = StructuralNode(structuralNode, breakdownNode, relDefinitionNode)
structuralNode.childStructuralNodes.append(childStructuralNode)
selfStructuralNodes[fromConceptQname] = childStructuralNode
if variableQname:
childStructuralNode.variables[variableQname] = []
if conceptQname:
childStructuralNode.variables[conceptQname] = fromConceptQname
childStructuralNode.aspects[coveredAspect] = fromConceptQname
relChildStructuralNode = StructuralNode(childStructuralNode, breakdownNode, relDefinitionNode)
childStructuralNode.childStructuralNodes.append(relChildStructuralNode)
else:
relChildStructuralNode = StructuralNode(structuralNode, breakdownNode, relDefinitionNode)
structuralNode.childStructuralNodes.append(relChildStructuralNode)
preferredLabel = rel.preferredLabel
if preferredLabel == XbrlConst.periodStartLabel:
relChildStructuralNode.tagSelector = "table.periodStart"
elif preferredLabel == XbrlConst.periodStartLabel:
relChildStructuralNode.tagSelector = "table.periodEnd"
if variableQname:
relChildStructuralNode.variables[variableQname] = rel
toConceptQname = rel.toModelObject.qname
if conceptQname:
relChildStructuralNode.variables[conceptQname] = toConceptQname
relChildStructuralNode.aspects[coveredAspect] = toConceptQname
cartesianProductExpander(relChildStructuralNode, *cartesianProductNestedArgs)
return relChildStructuralNode