}
} else broker.addDocument(collection, document);
	public DocumentImpl store(InputSource src) throws SAXException, IOException {		LOG.debug("storing document ...");		try {			final InputStream is = src.getByteStream();			if (is != null)				is.reset();			else {				final Reader cs = src.getCharacterStream();				if (cs != null)					cs.reset();			}		} catch (IOException e) {			LOG.debug("could not reset input source", e);		}		try {			progress = new ProgressIndicator(currentLine);			document.setMaxDepth(document.getMaxDepth() + 1);			document.calculateTreeLevelStartPoints();			validate = false;			if (document.getDoctype() == null) {				// we don't know the doctype				// set it to the root node's tag name				final DocumentTypeImpl dt =					new DocumentTypeImpl(rootNode.getTagName(), null, document.getFileName());				document.setDocumentType(dt);			}			if (broker.getDatabaseType() != DBBroker.NATIVE) {				broker.storeDocument(document);				broker.saveCollection(collection);			}			document.setChildCount(0);			parser.parse(src);			if(broker.getDatabaseType() == DBBroker.NATIVE)				broker.addDocument(collection, document);			broker.closeDocument();			broker.flush();			if (document.getFileName().equals("/db/system/users.xml") && privileged == false) {				// inform the security manager that system data has changed				LOG.debug("users.xml changed");				broker.getBrokerPool().reloadSecurityManager(broker);			}			return document;		} catch (NullPointerException npe) {			LOG.debug("null pointer", npe);			throw new SAXException(npe);		} catch (PermissionDeniedException e) {			throw new SAXException("permission denied");		}	}