}
private MetaTypeInformationImpl fromDocuments( Bundle bundle )
{
MetaDataReader reader = new MetaDataReader();
// get the descriptors, return nothing if none
Enumeration docs = bundle.findEntries( METATYPE_DOCUMENTS_LOCATION, "*.xml", false );
if ( docs == null || !docs.hasMoreElements() )
{
return null;
}
MetaTypeInformationImpl cmti = new MetaTypeInformationImpl( bundle );
while ( docs.hasMoreElements() )
{
URL doc = ( URL ) docs.nextElement();
try
{
MetaData metaData = reader.parse( doc );
if ( metaData != null )
{
cmti.addMetaData( metaData );
}
}