avoid doing setRefersToXXX( null )
The code in buildExplicitLinks() is written like: setRefersToXXX( getXXX() ); if( getRefersToXXX() == null ) ... Therefore, when getXXX() return null, we still do setRefersToXXX() so isSetRefersToXXX() will returns true ! This lead to a NPE in NS.findXXX().