private void writeClassData ( ) { try ( PrintStream out = new PrintStream ( ExampleHelpers . openExampleFileOuputStream ( "classes.csv" ) ) ) { out . println ( "Id" + ",Label" + ",Description" + ",URL" + ",Image" + ",Number of direct instances" + ",Number of direct subclasses" + ",Direct superclasses" + ",All superclasses" + ",Related properties" ) ; List < Entry < EntityIdValue , ClassRecord > > list = new ArrayList <> ( this . classRecords . entrySet ( ) ) ; Collections . sort ( list , new ClassUsageRecordComparator ( ) ) ; for ( Entry < EntityIdValue , ClassRecord > entry : list ) { if ( entry . getValue ( ) . itemCount > 0 || entry . getValue ( ) . subclassCount > 0 ) { printClassRecord ( out , entry . getValue ( ) , entry . getKey ( ) ) ; } } } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Writes the data collected about classes to a file .