private Collection < String > getTypeAttributeGroups ( XsdComplexType complexType , Stream < XsdAttributeGroup > extensionAttributeGroups ) { Stream < XsdAttributeGroup > attributeGroups = complexType . getXsdAttributes ( ) . filter ( attribute -> attribute . getParent ( ) instanceof XsdAttributeGroup ) . map ( attribute -> ( XsdAttributeGroup ) attribute . getParent ( ) ) . distinct ( ) ; attributeGroups = Stream . concat ( attributeGroups , extensionAttributeGroups ) ; attributeGroups = Stream . concat ( attributeGroups , complexType . getXsdAttributeGroup ( ) ) ; List < XsdAttributeGroup > attributeGroupList = attributeGroups . distinct ( ) . collect ( Collectors . toList ( ) ) ; attributeGroupList . forEach ( this :: addAttributeGroup ) ; if ( ! attributeGroupList . isEmpty ( ) ) { return getBaseAttributeGroupInterface ( complexType . getXsdAttributeGroup ( ) . collect ( Collectors . toList ( ) ) ) ; } return Collections . emptyList ( ) ; }
Obtains the attribute groups of a given element that are present in its type attribute .