/** * Constructs the CatalogGen for the given config document. * * @param configDocURL - the URL of the configuration document */ public CatalogGen( URL configDocURL) { // Create a InvCatalogFactory with CATALOG_GEN_CONFIG MetadataType registered. log.debug( "CatalogGen(URL): create catalog and CatalogGenConfig converter." ); this.catFactory = InvCatalogFactory.getDefaultFactory( true ); this.catFactory.registerMetadataConverter( MetadataType.CATALOG_GEN_CONFIG.toString(), new CatGenConfigMetadataFactory()); // Read the given XML config file. log.debug( "CatalogGen(URL): reading the config doc <" + configDocURL.toString() + ">."); this.catalog = this.catFactory.readXML( configDocURL.toString()); log.debug( "CatalogGen(URL): done."); }
/** * Constructs the CatalogGen for the given config document. * * @param configDocURL - the URL of the configuration document */ public CatalogGen( URL configDocURL) { // Create a InvCatalogFactory with CATALOG_GEN_CONFIG MetadataType registered. log.debug( "CatalogGen(URL): create catalog and CatalogGenConfig converter." ); this.catFactory = InvCatalogFactory.getDefaultFactory( true ); this.catFactory.registerMetadataConverter( MetadataType.CATALOG_GEN_CONFIG.toString(), new CatGenConfigMetadataFactory()); // Read the given XML config file. log.debug( "CatalogGen(URL): reading the config doc <" + configDocURL.toString() + ">."); this.catalog = this.catFactory.readXML( configDocURL.toString()); log.debug( "CatalogGen(URL): done."); }
/** * Constructs the CatalogGen for the given config document InputStream. * * @param configDocInputStream - the InputStream from which to read the config document. * @param configDocURL - the URL for the config document. */ public CatalogGen( InputStream configDocInputStream, URL configDocURL ) { // Create a InvCatalogFactory with CATALOG_GEN_CONFIG MetadataType registered. log.debug( "CatalogGen(InputStream): create catalog and CatalogGenConfig converter." ); this.catFactory = new InvCatalogFactory( "default", true ); this.catFactory.registerMetadataConverter( MetadataType.CATALOG_GEN_CONFIG.toString(), new CatGenConfigMetadataFactory() ); // Read the given XML config file. log.debug( "CatalogGen(InputStream): reading the config doc <" + configDocURL.toString() + ">." ); this.catalog = this.catFactory.readXML( configDocInputStream, URI.create( configDocURL.toExternalForm()) ); log.debug( "CatalogGen(InputStream): CatalogGenConfig doc <" + this.catalog.getName() + "> read."); }
/** * Constructs the CatalogGen for the given config document InputStream. * * @param configDocInputStream - the InputStream from which to read the config document. * @param configDocURL - the URL for the config document. */ public CatalogGen( InputStream configDocInputStream, URL configDocURL ) { // Create a InvCatalogFactory with CATALOG_GEN_CONFIG MetadataType registered. log.debug( "CatalogGen(InputStream): create catalog and CatalogGenConfig converter." ); this.catFactory = new InvCatalogFactory( "default", true ); this.catFactory.registerMetadataConverter( MetadataType.CATALOG_GEN_CONFIG.toString(), new CatGenConfigMetadataFactory() ); // Read the given XML config file. log.debug( "CatalogGen(InputStream): reading the config doc <" + configDocURL.toString() + ">." ); this.catalog = this.catFactory.readXML( configDocInputStream, URI.create( configDocURL.toExternalForm()) ); log.debug( "CatalogGen(InputStream): CatalogGenConfig doc <" + this.catalog.getName() + "> read."); }