library.setReadOnly( );
	public void addLibrary( String libraryFileName, String namespace )			throws DesignFileException, SemanticException	{		if ( StringUtil.isBlank( namespace ) )			namespace = StringUtil.extractFileName( libraryFileName );		if ( isDuplicateNamespace( namespace ) )		{			throw new LibraryException(					module,					new String[]{namespace},					LibraryException.DESIGN_EXCEPTION_DUPLICATE_LIBRARY_NAMESPACE );		}		//	the library has already been included.				URL url = module.findResource( libraryFileName, IResourceLocator.LIBRARY );		if ( url != null && module.getLibraryByLocation( url.toString( ) ) != null )		{			throw new LibraryException( module, new String[]{url.toString( )},					LibraryException.DESIGN_EXCEPTION_LIBRARY_ALREADY_INCLUDED );		}						Library library = module.loadLibrary( libraryFileName, namespace );		assert library != null;			getActivityStack( ).startTrans( );		LibraryRecord record = new LibraryRecord( module, library, true );		getActivityStack( ).execute( record );		// Add includedLibraries		IncludeLibrary includeLibrary = StructureFactory.createIncludeLibrary( );		includeLibrary.setFileName( libraryFileName );		includeLibrary.setNamespace( namespace );		ElementPropertyDefn propDefn = module				.getPropertyDefn( Module.INCLUDE_LIBRARIES_PROP );		PropertyCommand propCommand = new PropertyCommand( module, module );		propCommand.addItem( new CachedMemberRef( propDefn ), includeLibrary );		getActivityStack( ).commit( );	}