* @param element
*/
private Organization parseOrganization(String tagName, Element element, boolean strict, String encoding)
throws IOException, DocumentException
{
Organization organization = new Organization();
organization.setModelEncoding( encoding );
java.util.Set parsed = new java.util.HashSet();
for ( Iterator i = element.nodeIterator(); i.hasNext(); )
{
Node node = (Node) i.next();
if ( node.getNodeType() != Node.ELEMENT_NODE )
{
}
else
{
Element childElement = (Element) node;
if ( childElement.getName().equals( "name" ) )
{
if ( parsed.contains( "name" ) )
{
throw new DocumentException( "Duplicated tag: '" + element.getName() + "'");
}
parsed.add( "name" );
organization.setName( getTrimmedValue( childElement.getText() ) );
}
else if ( childElement.getName().equals( "url" ) )
{
if ( parsed.contains( "url" ) )
{
throw new DocumentException( "Duplicated tag: '" + element.getName() + "'");
}
parsed.add( "url" );
organization.setUrl( getTrimmedValue( childElement.getText() ) );
}
else if ( childElement.getName().equals( "logo" ) )
{
if ( parsed.contains( "logo" ) )
{
throw new DocumentException( "Duplicated tag: '" + element.getName() + "'");
}
parsed.add( "logo" );
organization.setLogo( getTrimmedValue( childElement.getText() ) );
}
else
{
if ( strict )
{