src/main/java/org/xmlet/xsdparser/xsdelements/elementswrapper/ReferenceBase.java
public static ReferenceBase createFromXsd(XsdAbstractElement element) {
        String ref = getRef(element);
        String name = getName(element);

        if (!(element instanceof XsdNamedElements)){
            return new ConcreteElement(element);
        }

        if (ref == null){
            if (name == null){
                return new ConcreteElement(element);
            } else {
                return new NamedConcreteElement((XsdNamedElements) element, name);
            }
        } else {
            return new UnsolvedReference((XsdNamedElements) element);
        }
    }
public static ReferenceBase createFromXsd(XsdAbstractElement element) {
        String ref = getRef(element);
        String name = getName(element);

        if (!(element instanceof XsdNamedElements)){
            return new ConcreteElement(element);
        }

        if (ref == null){
            if (name == null){
                return new ConcreteElement(element);
            } else {
                return new NamedConcreteElement((XsdNamedElements) element, name);
            }
        } else {
            return new UnsolvedReference((XsdNamedElements) element);
        }
    }
public static ReferenceBase createFromXsd ( XsdAbstractElement element ) { String ref = getRef ( element ) ; String name = getName ( element ) ; if ( ! ( element instanceof XsdNamedElements ) ) { return new ConcreteElement ( element ) ; } if ( ref == null ) { if ( name == null ) { return new ConcreteElement ( element ) ; } else { return new NamedConcreteElement ( ( XsdNamedElements ) element , name ) ; } } else { return new UnsolvedReference ( ( XsdNamedElements ) element ) ; } }
This method creates a ReferenceBase object that serves as a wrapper to {@link XsdAbstractElement} objects.
If a {@link XsdAbstractElement} has a ref attribute it results in a {@link UnsolvedReference} object. If it
doesn't have a ref attribute and has a name attribute it's a {@link NamedConcreteElement}. If it isn't a
{@link UnsolvedReference} or a {@link NamedConcreteElement} then it's a {@link ConcreteElement}.
@param element The element which will be "wrapped".
@return A wrapper object for the element received.
This method creates a ReferenceBase object that serves as a wrapper to {