public static final ProjectFile setProjectNameAndRead ( File directory ) throws MPXJException { List < String > projects = listProjectNames ( directory ) ; if ( ! projects . isEmpty ( ) ) { P3DatabaseReader reader = new P3DatabaseReader ( ) ; reader . setProjectName ( projects . get ( 0 ) ) ; return reader . read ( directory ) ; } return null ; }
Convenience method which locates the first P3 database in a directory and opens it .