while( it.hasNext() ){
Element licenseTag = (Element) it.next();
String licenseURI = licenseTag.getAttributeValue("about", RDF);
if( licenseURI == null )
continue;
License license = License.findByValue( licenseURI );
{
ArrayList permitsValues = new ArrayList();
ArrayList requiresValues = new ArrayList();
List permitsTags = licenseTag.getChildren("permits", NS );
Iterator sit = permitsTags.iterator();
while(sit.hasNext() ){
Element permitTag = (Element) sit.next();
permitsValues.add( License.Behaviour.findByValue( permitTag.getAttributeValue( "resource", RDF) ));
}
List requiresTags = licenseTag.getChildren( "requires", NS);
sit = requiresTags.iterator();
while(sit.hasNext()){
Element requireTag = (Element) sit.next();
requiresValues.add( License.Behaviour.findByValue(requireTag.getAttributeValue("resource", RDF)));
}
license = new License( licenseURI,
(License.Behaviour[]) requiresValues.toArray( new License.Behaviour[requiresValues.size()]),
(License.Behaviour[]) permitsValues.toArray( new License.Behaviour[permitsValues.size()]) );
}