this.collectionURI = parameters.getParameter("collection", "xmldb:exist: this.defaultUser = parameters.getParameter("user", "guest"); this.defaultPassword = parameters.getParameter("password", "guest"); this.createSession = parameters.getParameterAsBoolean("create-session", false);
this.collectionURI = parameters.getParameter(COLLECTION_URI, this.defaultCollectionURI); this.user = parameters.getParameter(USER, this.defaultUser); this.password = parameters.getParameter(PASSWORD, this.defaultPassword); this.createSession = parameters.getParameterAsBoolean(CREATE_SESSION, this.defaultCreateSession);
	public void setup(SourceResolver resolver, Map objectModel, String source,						Parameters parameters) throws ProcessingException,			SAXException, IOException {		super.setup(resolver, objectModel, source, parameters);		this.objectModel = objectModel;		this.inputSource = resolver.resolveURI(source);		this.collectionURI = parameters.getParameter("collection",				"xmldb:exist:///db");		this.defaultUser = parameters.getParameter("user", "guest");		this.defaultPassword = parameters.getParameter("password", "guest");		this.createSession = parameters.getParameterAsBoolean("create-session",				false);		this.expandXIncludes = parameters.getParameterAsBoolean(				"expand-xincludes", false);		this.optionalParameters = new HashMap();		String paramNames[] = parameters.getNames();		for (int i = 0; i < paramNames.length; i++) {			String param = paramNames[i];			if (!(param.equals("collection") || param.equals("user")					|| param.equals("password")					|| param.equals("create-session") || param					.equals("expand-xincludes"))) {				this.optionalParameters.put(param, parameters						.getParameter(param, ""));			}		}		try {			Class driver = Class.forName(DRIVER);			Database database = (Database)driver.newInstance();			DatabaseManager.registerDatabase(database);		} catch(Exception e) {			throw new ProcessingException("Failed to initialize database driver: " + e.getMessage(), e);		}	}