The EXTRACT SERVICE of DATA FORMATS ANALYZER is implemented in the DfaExtractor.py file as a DfaExtractor module class.
Provides methods to extract information and descriptions data about attributes, elements and types from the given XSD schema.
Attributes data are stored in the extractedAttributesdictionary with the following structure:
DICTIONARY{
Attribute name (STRING):DICTIONARY{
parents (STRING):LIST[Parent name (STRING)],
description (STRING):LIST[Attribute documentation (STRING)]
}
}
Elements data are stored in the extractedElementsdictionary with the following structure:
DICTIONARY{
Element name (STRING):DICTIONARY{
attributes (STRING):LIST[Attribute name (STRING)],
children (STRING):LIST[Child name (STRING)],
parents (STRING):LIST[Parent name (STRING)],
description (STRING):LIST[Element documentation (STRING)]
}
}
Types data are stored in the extractedTypesdictionary with the following structure:
DICTIONARY{
Type name (STRING):DICTIONARY{
attributes (STRING):LIST[Attribute name (STRING)],
children (STRING):LIST[Child name (STRING)],
usages (STRING):DICTIONARY{
attributes (STRING):LIST[Attribute name (STRING)],
elements (STRING):LIST[Element name (STRING)]
},
description (STRING):LIST[Type documentation (STRING)]
}
}
Substitution groups data are stored in the substitutionGroupsdictionary with the following structure:
DICTIONARY{
Head element name (STRING):LIST[Element name (STRING)]
}
Parameters:
Extracts information and if requested also descriptions data about attributes, elements and types from the given XSD schema.
Parameters:
Returns: The tuple containing extractedAttributes, extractedElements and extractedTypesdictionaries. It has the following structure: TUPLE(3*DICTIONARY).
Extracts attribute names from a given <*:element> element in the XSD schema.
Parameters:
Saves the attribute name in the extractedAttributesdictionary and in the attributes lists of extractedElements and extractedTypesdictionaries.
Parameters:
Saves the attribute documentation in the extractedAttributesdictionary.
Parameters:
Extracts element names from a given <*:element> element in the XSD schema.
Parameters:
Saves the element name in the extractedElementsdictionary, children and parents lists of extractedElementsdictionary and in the children lists of extractedTypesdictionary.
Parameters:
Saves the element documentation in the extractedElementsdictionary.
Parameters:
Saves the type name in the extractedTypesdictionary.
Parameters:
Saves and extracts type usages to the usage lists of extractedTypesdictionary.
Parameters:
Saves the type documentation in the extractedTypesdictionary.
Parameters:
Returns a clean documentation for saving in the extractedAttributes, extractedElements or extractedTypesdictionary.
Parameters:
Returns: The string with a clean documentation from the given <*:documentation> element.
Returns a clean documentation text from the given child element of the <*:documentation> element.
Parameters:
Returns: The string with a clean documentation text from the given child element of the <*:documentation> element.
Extracts and saves a substitution group for the given <*:element> element in the substitutionGroupsdictionary.
Parameters:
Processes the substitutionGroupsdictionary to update the extractedElementsdictionary to take substitution groups into account.
Processes the extractedTypesdictionary to update the extractedElements and extractedAttributesdictionaries to take types into account.