public final PropertyType findConcretePropertyType( final QName elemName, final PropertyType pt ) { // LOG.debug( "Checking if '" + elemName + "' is a valid substitution for '" + pt.getName() + "'" ); for ( final PropertyType substitutionPt : pt.getSubstitutions() ) { // TODO !substitutionPt.isAbstract() if ( elemName.equals( substitutionPt.getName() ) ) { // LOG.debug( "Yep. Substitutable for '" + substitutionPt.getName() + "'" ); return substitutionPt; } } // LOG.debug( "Nope." ); return null; }
int min = prop.getMinOccurs(); int max = prop.getMaxOccurs(); List<PropertyType> subs = Arrays.asList( prop.getSubstitutions() ); StringBuilder propTypeInstance = new StringBuilder( "new " ); propTypeInstance.append( prop.getClass().getSimpleName() ).append( "( " );