/** * Constructor takes an org.osid.repository.Asset and extracts all * data for easier presentation. */ public AssetPresentationBean( org.osid.repository.Asset asset ) { parts = new java.util.ArrayList(); try { assetId = asset.getId().getIdString(); displayName = asset.getDisplayName(); description = asset.getDescription(); content = ( Integer )asset.getContent(); org.osid.repository.RecordIterator rit = asset.getRecords(); while( rit.hasNextRecord() ) { org.osid.repository.Record record = rit.nextRecord(); org.osid.repository.PartIterator pit = record.getParts(); while( pit.hasNextPart() ) { parts.add( pit.nextPart() ); } } } catch( Throwable t ) { log.warn( "AssetPresentationBean() failed to loop through Asset, " + "Record, Parts: " + t.getMessage(), t ); } this.asset = asset; }
/** * Constructor takes an org.osid.repository.Asset and extracts all * data for easier presentation. */ public AssetPresentationBean( org.osid.repository.Asset asset ) { parts = new java.util.ArrayList(); try { assetId = asset.getId().getIdString(); displayName = asset.getDisplayName(); description = asset.getDescription(); content = ( Integer )asset.getContent(); org.osid.repository.RecordIterator rit = asset.getRecords(); while( rit.hasNextRecord() ) { org.osid.repository.Record record = rit.nextRecord(); org.osid.repository.PartIterator pit = record.getParts(); while( pit.hasNextPart() ) { parts.add( pit.nextPart() ); } } } catch( Throwable t ) { log.warn( "AssetPresentationBean() failed to loop through Asset, " + "Record, Parts: " + t.getMessage(), t ); } this.asset = asset; }
title = asset.getDisplayName(); if (title != null)