* @param parser
*/
private Activation parseActivation(String tagName, XmlPullParser parser, boolean strict, String encoding)
throws IOException, XmlPullParserException
{
Activation activation = new Activation();
activation.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( parser.getName().equals( "activeByDefault" ) )
{
if ( parsed.contains( "activeByDefault" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "activeByDefault" );
activation.setActiveByDefault( getBooleanValue( getTrimmedValue( parser.nextText()), "activeByDefault", parser ) );
}
else if ( parser.getName().equals( "jdk" ) )
{
if ( parsed.contains( "jdk" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "jdk" );
activation.setJdk( getTrimmedValue( parser.nextText()) );
}
else if ( parser.getName().equals( "os" ) )
{
if ( parsed.contains( "os" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "os" );
activation.setOs( parseActivationOS( "os", parser, strict, encoding ) );
}
else if ( parser.getName().equals( "property" ) )
{
if ( parsed.contains( "property" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "property" );
activation.setProperty( parseActivationProperty( "property", parser, strict, encoding ) );
}
else if ( parser.getName().equals( "file" ) )
{
if ( parsed.contains( "file" ) )
{
throw new XmlPullParserException( "Duplicated tag: '" + parser.getName() + "'", parser, null);
}
parsed.add( "file" );
activation.setFile( parseActivationFile( "file", parser, strict, encoding ) );
}
else
{
if ( strict )
{