src/main/java/org/xmlet/xsdparser/core/XsdParserCore.java
private void replaceUnsolvedReference(Map<String, List<NamedConcreteElement>> concreteElementsMap, UnsolvedReference unsolvedReference) {
        List<NamedConcreteElement> concreteElements = concreteElementsMap.get(unsolvedReference.getRef());

        if (concreteElements != null){
            Map<String, String> oldElementAttributes = unsolvedReference.getElement().getAttributesMap();

            for (NamedConcreteElement concreteElement : concreteElements) {
                NamedConcreteElement substitutionElementWrapper;

                if (!unsolvedReference.isTypeRef()){
                    XsdNamedElements substitutionElement = concreteElement.getElement().clone(oldElementAttributes);

                    substitutionElementWrapper = (NamedConcreteElement) ReferenceBase.createFromXsd(substitutionElement);
                } else {
                    substitutionElementWrapper = concreteElement;
                }

                unsolvedReference.getParent().replaceUnsolvedElements(substitutionElementWrapper);
            }
        } else {
            storeUnsolvedItem(unsolvedReference);
        }
    }
private void replaceUnsolvedReference(Map<String, List<NamedConcreteElement>> concreteElementsMap, UnsolvedReference unsolvedReference) {
        List<NamedConcreteElement> concreteElements = concreteElementsMap.get(unsolvedReference.getRef());

        if (concreteElements != null){
            Map<String, String> oldElementAttributes = unsolvedReference.getElement().getAttributesMap();

            for (NamedConcreteElement concreteElement : concreteElements) {
                NamedConcreteElement substitutionElementWrapper;

                if (!unsolvedReference.isTypeRef()){
                    XsdNamedElements substitutionElement = concreteElement.getElement().clone(oldElementAttributes);

                    substitutionElementWrapper = (NamedConcreteElement) ReferenceBase.createFromXsd(substitutionElement);
                } else {
                    substitutionElementWrapper = concreteElement;
                }

                unsolvedReference.getParent().replaceUnsolvedElements(substitutionElementWrapper);
            }
        } else {
            storeUnsolvedItem(unsolvedReference);
        }
    }
private void replaceUnsolvedReference ( Map < String , List < NamedConcreteElement > > concreteElementsMap , UnsolvedReference unsolvedReference ) { List < NamedConcreteElement > concreteElements = concreteElementsMap . get ( unsolvedReference . getRef ( ) ) ; if ( concreteElements != null ) { Map < String , String > oldElementAttributes = unsolvedReference . getElement ( ) . getAttributesMap ( ) ; for ( NamedConcreteElement concreteElement : concreteElements ) { NamedConcreteElement substitutionElementWrapper ; if ( ! unsolvedReference . isTypeRef ( ) ) { XsdNamedElements substitutionElement = concreteElement . getElement ( ) . clone ( oldElementAttributes ) ; substitutionElementWrapper = ( NamedConcreteElement ) ReferenceBase . createFromXsd ( substitutionElement ) ; } else { substitutionElementWrapper = concreteElement ; } unsolvedReference . getParent ( ) . replaceUnsolvedElements ( substitutionElementWrapper ) ; } } else { storeUnsolvedItem ( unsolvedReference ) ; } }
Replaces a single {@link UnsolvedReference} object, with the respective {@link NamedConcreteElement} object. If
there isn't a {@link NamedConcreteElement} object to replace the {@link UnsolvedReference} object, information
is stored informing the user of this Project of the occurrence.
@param concreteElementsMap The map containing all named concreteElements.
@param unsolvedReference The unsolved reference to solve.
Replaces a single {