* @return Repository
*/
private Repository parseRepository( String tagName, XmlPullParser parser, boolean strict )
throws IOException, XmlPullParserException
{
Repository repository = new Repository();
java.util.Set parsed = new java.util.HashSet();
while ( parser.nextTag() == XmlPullParser.START_TAG )
{
if ( checkFieldWithDuplicate( parser, "releases", null, parsed ) )
{
repository.setReleases( parseRepositoryPolicy( "releases", parser, strict ) );
}
else if ( checkFieldWithDuplicate( parser, "snapshots", null, parsed ) )
{
repository.setSnapshots( parseRepositoryPolicy( "snapshots", parser, strict ) );
}
else if ( checkFieldWithDuplicate( parser, "id", null, parsed ) )
{
repository.setId( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "name", null, parsed ) )
{
repository.setName( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "url", null, parsed ) )
{
repository.setUrl( getTrimmedValue( parser.nextText() ) );
}
else if ( checkFieldWithDuplicate( parser, "layout", null, parsed ) )
{
repository.setLayout( getTrimmedValue( parser.nextText() ) );
}
else
{
if ( strict )
{