public boolean setMetadata ( int iid , Object metaData ) { if ( iid < 0 || iid > loadCounter ) { System . out . println ( "Internal id " + iid + " is out of range!" ) ; return false ; } MetaDataEntity mde = new MetaDataEntity ( iid , metaData ) ; PrimaryIndex < Integer , MetaDataEntity > primaryIndex = iidToMetadataDB . getPrimaryIndex ( Integer . class , MetaDataEntity . class ) ; if ( primaryIndex . contains ( iid ) ) { primaryIndex . put ( null , mde ) ; return true ; } else { return false ; } }
This method is used to set the metadata of a previously indexed vector . If the metadata is already set this methods replaces it .