public boolean finish ( ) { boolean ok = true ; java . util . Iterator iter ; logger . debug ( "Now finish " + getName ( ) + " id= " + getID ( ) ) ; authorityName = null ; dataType = null ; dataFormatType = null ; defaultService = null ; gc = null ; tc = null ; docs = new ArrayList <> ( ) ; metadata = new ArrayList <> ( ) ; properties = new ArrayList <> ( ) ; creators = new ArrayList <> ( ) ; contributors = new ArrayList <> ( ) ; dates = new ArrayList <> ( ) ; keywords = new ArrayList <> ( ) ; projects = new ArrayList <> ( ) ; publishers = new ArrayList <> ( ) ; variables = new ArrayList <> ( ) ; canonicalize ( ) ; // canonicalize thredds metadata transfer2PublicMetadata ( tm , true ) ; // add local metadata transfer2PublicMetadata ( tmi , true ) ; // add local inherited metadata transferInheritable2PublicMetadata ( ( InvDatasetImpl ) getParent ( ) ) ; // add inheritable metadata from parents // build the expanded access list access = new ArrayList <> ( ) ; // add access element if urlPath is specified if ( ( urlPath != null ) && ( getServiceDefault ( ) != null ) ) { InvAccessImpl a = new InvAccessImpl ( this , urlPath , getServiceDefault ( ) ) ; a . setSize ( size ) ; a . finish ( ) ; addExpandedAccess ( a ) ; } // add local access elements iter = accessLocal . iterator ( ) ; while ( iter . hasNext ( ) ) { InvAccessImpl a = ( InvAccessImpl ) iter . next ( ) ; a . finish ( ) ; addExpandedAccess ( a ) ; } // recurse into child datasets. if ( ! ( this instanceof InvCatalogRef ) ) { for ( InvDataset invDataset : this . getDatasets ( ) ) { InvDatasetImpl curDs = ( InvDatasetImpl ) invDataset ; ok &= curDs . finish ( ) ; } } return ok ; }
Finish constructing after all elements have been added . This does the inheritence thing This can be called again if new elements are added .