src/main/java/org/xmlet/xsdparser/core/XsdParserCore.java
private void storeUnsolvedItem(UnsolvedReference unsolvedReference) {
        if (parserUnsolvedElementsMap.isEmpty()){
            parserUnsolvedElementsMap.add(new UnsolvedReferenceItem(unsolvedReference));
        } else {
            Optional<UnsolvedReferenceItem> innerEntry =
                    parserUnsolvedElementsMap.stream()
                            .filter(unsolvedReferenceObj ->
                                    unsolvedReferenceObj.getUnsolvedReference()
                                            .getRef()
                                            .equals(unsolvedReference.getRef()))
                            .findFirst();

            if (innerEntry.isPresent()){
                innerEntry.ifPresent(entry -> entry.getParents().add(unsolvedReference.getParent()));
            } else {
                parserUnsolvedElementsMap.add(new UnsolvedReferenceItem(unsolvedReference));
            }
        }
    }
private void storeUnsolvedItem(UnsolvedReference unsolvedReference) {
        if (parserUnsolvedElementsMap.isEmpty()){
            parserUnsolvedElementsMap.add(new UnsolvedReferenceItem(unsolvedReference));
        } else {
            Optional<UnsolvedReferenceItem> innerEntry =
                    parserUnsolvedElementsMap.stream()
                            .filter(unsolvedReferenceObj ->
                                    unsolvedReferenceObj.getUnsolvedReference()
                                            .getRef()
                                            .equals(unsolvedReference.getRef()))
                            .findFirst();

            if (innerEntry.isPresent()){
                innerEntry.ifPresent(entry -> entry.getParents().add(unsolvedReference.getParent()));
            } else {
                parserUnsolvedElementsMap.add(new UnsolvedReferenceItem(unsolvedReference));
            }
        }
    }
private void storeUnsolvedItem ( UnsolvedReference unsolvedReference ) { if ( parserUnsolvedElementsMap . isEmpty ( ) ) { parserUnsolvedElementsMap . add ( new UnsolvedReferenceItem ( unsolvedReference ) ) ; } else { Optional < UnsolvedReferenceItem > innerEntry = parserUnsolvedElementsMap . stream ( ) . filter ( unsolvedReferenceObj -> unsolvedReferenceObj . getUnsolvedReference ( ) . getRef ( ) . equals ( unsolvedReference . getRef ( ) ) ) . findFirst ( ) ; if ( innerEntry . isPresent ( ) ) { innerEntry . ifPresent ( entry -> entry . getParents ( ) . add ( unsolvedReference . getParent ( ) ) ) ; } else { parserUnsolvedElementsMap . add ( new UnsolvedReferenceItem ( unsolvedReference ) ) ; } } }
Saves an occurrence of an element which couldn't be resolved in the {@link XsdParser#replaceUnsolvedReference}
method, which can be accessed at the end of the parsing process in order to verify if were there were any
references that couldn't be solved.
@param unsolvedReference The unsolved reference which couldn't be resolved.
Saves an occurrence of an element which couldn t be resolved in the {