* @param xmlStreamReader
*/
private ModelBase parseModelBase(String tagName, XMLStreamReader xmlStreamReader, boolean strict, String encoding)
throws IOException, XMLStreamException
{
ModelBase modelBase = new ModelBase();
modelBase.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT )
{
if ( xmlStreamReader.getLocalName().equals( "dependencies" ) )
{
if ( parsed.contains( "dependencies" ) )
{
throw new XMLStreamException( "Duplicated tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() );
}
parsed.add( "dependencies" );
java.util.List dependencies = new java.util.ArrayList();
modelBase.setDependencies( dependencies );
while ( xmlStreamReader.nextTag() == XMLStreamConstants.START_ELEMENT )
{
if ( xmlStreamReader.getLocalName().equals( "dependency" ) )
{
modelBase.addDependency( parseDependency( "dependency", xmlStreamReader, strict, encoding ) );
}
else
{
throw new XMLStreamException( "Unrecognised tag: '" + xmlStreamReader.getLocalName() + "'", xmlStreamReader.getLocation() );
}