/** * Returns the {@code EntityResolver} stored in this parameters object. * Result is <b>null</b> if no such object has been set. * * @return the {@code EntityResolver} or <b>null</b> */ public EntityResolver getEntityResolver() { return (EntityResolver) fetchProperty(PROP_ENTITY_RESOLVER); }
@Override public XMLBuilderParametersImpl setEntityResolver(final EntityResolver resolver) { storeProperty(PROP_ENTITY_RESOLVER, resolver); return this; }
(EntityResolver) fetchBeanHelper().createBean(decl, CatalogResolver.class); final FileSystem fileSystem = xmlParams.getFileHandler().getFileSystem(); if (fileSystem != null) final String basePath = xmlParams.getFileHandler().getBasePath(); if (basePath != null) BeanHelper.setProperty(resolver, "interpolator", ci); xmlParams.setEntityResolver(resolver);
/** * Creates a new instance of a parameters object for XML configurations. * * @return the new parameters object */ public XMLBuilderParameters xml() { return createParametersProxy(new XMLBuilderParametersImpl(), XMLBuilderParameters.class, FileBasedBuilderParameters.class, HierarchicalBuilderParameters.class); }
/** * Returns the current base path of this configuration builder. This is used * for instance by all file-based child configurations. * * @return the base path */ private String getBasePath() { return currentXMLParameters.getFileHandler().getBasePath(); }
@Override public void inheritFrom(final Map<String, ?> source) { super.inheritFrom(source); copyPropertiesFrom(source, PROP_DOCUMENT_BUILDER, PROP_ENTITY_RESOLVER, PROP_SCHEMA_VALIDATION, PROP_VALIDATING); }
/** * Initializes a parameters object for an XML configuration with properties * already set for this parent builder. * * @param params the parameters object */ private void initChildXMLParameters(final XMLBuilderProperties<?> params) { params.setEntityResolver(currentXMLParameters.getEntityResolver()); }
if (currentParameters.getBasePath() != null) currentXMLParameters.setBasePath(currentParameters.getBasePath()); (FileBasedConfigurationBuilder) defBuilder; final URL url = fileBuilder.getFileHandler().getURL(); currentXMLParameters.setBasePath((url != null) ? url .toExternalForm() : fileBuilder.getFileHandler() .getBasePath());
registerConfiguredProviders(config); setUpCurrentXMLParameters(); currentXMLParameters.setFileSystem(initFileSystem(config)); initSystemProperties(config, getBasePath()); registerConfiguredLookups(config, result);
/** * Sets up an XML parameters object which is used to store properties * related to XML and file-based configurations during creation of the * result configuration. The properties stored in this object can be * inherited to child configurations. * * @throws ConfigurationException if an error occurs */ private void setUpCurrentXMLParameters() throws ConfigurationException { currentXMLParameters = new XMLBuilderParametersImpl(); initDefaultBasePath(); }
/** * Initializes a parameters object for a file-based configuration with * properties already set for this parent builder. This method handles * properties like a default file system or a base path. * * @param params the parameters object */ private void initChildFileBasedParameters( final FileBasedBuilderProperties<?> params) { params.setBasePath(getBasePath()); params.setFileSystem(currentXMLParameters.getFileHandler() .getFileSystem()); }
@Override public XMLBuilderParametersImpl setDocumentBuilder( final DocumentBuilder docBuilder) { storeProperty(PROP_DOCUMENT_BUILDER, docBuilder); return this; }
@Override public XMLBuilderParametersImpl setPublicID(final String pubID) { storeProperty(PROP_PUBLIC_ID, pubID); return this; }
@Override public XMLBuilderParametersImpl setSystemID(final String sysID) { storeProperty(PROP_SYSTEM_ID, sysID); return this; }
@Override public XMLBuilderParametersImpl setSchemaValidation(final boolean f) { storeProperty(PROP_SCHEMA_VALIDATION, Boolean.valueOf(f)); return this; } }
@Override public XMLBuilderParametersImpl setValidating(final boolean f) { storeProperty(PROP_VALIDATING, Boolean.valueOf(f)); return this; }