protected < T extends RelationDefinition > void add ( T td , Map < RelationID , T > schema ) { if ( ! isStillMutable ) { throw new IllegalStateException ( "Too late, cannot add a schema" ) ; } schema . put ( td . getID ( ) , td ) ; if ( td . getID ( ) . hasSchema ( ) ) { RelationID noSchemaID = td . getID ( ) . getSchemalessID ( ) ; if ( ! schema . containsKey ( noSchemaID ) ) { schema . put ( noSchemaID , td ) ; } else { LOGGER . warn ( "DUPLICATE TABLE NAMES, USE QUALIFIED NAMES:\n" + td + "\nAND\n" + schema . get ( noSchemaID ) ) ; //schema.remove(noSchemaID); // TODO (ROMAN 8 Oct 2015): think of a better way of resolving ambiguities } } }
Inserts a new data definition to this metadata object .