/*
  * Private constructor for common work needed by both public
  * constructors.
  */
 private XmiWriterMDRImpl(MDRModelImplementation theParent, Object theModel, String version) {
   if (theModel == null) {
     throw new IllegalArgumentException("A model must be provided");
   }
   if (theParent == null) {
     throw new IllegalArgumentException("A parent must be provided");
   }
   this.modelImpl = theParent;
   this.model = theModel;
   config = new OutputConfig();
   config.setEncoding(ENCODING);
   config.setReferenceProvider(new XmiReferenceProviderImpl(modelImpl.getObjectToId()));
   config.setHeaderProvider(new XmiHeaderProviderImpl(version));
 }