Examples of CatalogFactory


Examples of org.apache.commons.chain.CatalogFactory

   * @param context
   *            The Context we are processing
   * @return The Command to process for this Context
   */
  protected Command getCommand(Context context) {
    CatalogFactory catalogFactory = CatalogFactory.getInstance();
    String catalogName = getCatalogName();
    Catalog catalog;

    if (catalogName == null) {
      catalog = catalogFactory.getCatalog();
      catalogName = "{default}"; // for debugging purposes
    } else {
      catalog = catalogFactory.getCatalog(catalogName);
    }

    if (catalog == null) {
      throw new IllegalArgumentException("Cannot find catalog '" + catalogName + "'");
    }
View Full Code Here

Examples of org.apache.commons.chain.CatalogFactory

    private boolean catalogExists() {
        String catalogName = getCatalogName();
        if (catalogName == null) {
            return false;
        }
        CatalogFactory catalogFactory = CatalogFactory.getInstance();

        return (catalogFactory.getCatalog(catalogName) != null);
    }
View Full Code Here

Examples of org.apache.commons.chain.CatalogFactory

    /**
     * @return <code>Catalog</code> for the <code>catalogName</code>
     */
    private Catalog getCatalog() {
        CatalogFactory catalogFactory = CatalogFactory.getInstance();
        return catalogFactory.getCatalog(getCatalogName());
    }
View Full Code Here

Examples of org.apache.commons.chain.CatalogFactory

     *
     * @param context The Context we are processing
     * @return The Command to process for this Context
     */
    protected Command getCommand(Context context) {
        CatalogFactory catalogFactory = CatalogFactory.getInstance();
        String catalogName = getCatalogName();
        Catalog catalog;

        if (catalogName == null) {
            catalog = catalogFactory.getCatalog();
            catalogName = "{default}"; // for debugging purposes
        } else {
            catalog = catalogFactory.getCatalog(catalogName);
        }

        if (catalog == null) {
            throw new IllegalArgumentException("Cannot find catalog '"
                + catalogName + "'");
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.CatalogFactory

    factory.setRestrictIngestPermissions(false);
    factory.setRestrictQueryPermissions(false);
    factory.setTransactionIdFactory(UuidTransactionIdFactory.class.getCanonicalName());
    cs = factory.createCatalogService();
   
    CatalogFactory catalogFactory = new CatalogFactory();
    catalogFactory.setCatalogId("TestCatalog1");
    catalogFactory.setDictionaryFactories(null);
    catalogFactory.setIndexFactory(getInMemoryDSFactory(tmpDirPath + "/1/"));
    catalogFactory.setRestrictIngestPermissions(false);
    catalogFactory.setRestrictQueryPermissions(false);
    cs.addCatalog(catalogFactory.createCatalog());
    catalogFactory.setCatalogId("TestCatalog2");
    catalogFactory.setIndexFactory(getInMemoryDSFactory(tmpDirPath + "/2/"));
    cs.addCatalog(catalogFactory.createCatalog());
  }
View Full Code Here

Examples of org.apache.oodt.cas.catalog.system.CatalogFactory

      factory.setRestrictQueryPermissions(false);
      factory.setTransactionIdFactory(UuidTransactionIdFactory.class
          .getCanonicalName());
      cs = factory.createCatalogService();
 
      CatalogFactory catalogFactory = new CatalogFactory();
      catalogFactory.setCatalogId("TestCatalog1");
      catalogFactory.setDictionaryFactories(null);
      catalogFactory
          .setIndexFactory(getInMemoryDSFactory(testDir.getAbsolutePath() + "/index/1/"));
      catalogFactory.setRestrictIngestPermissions(false);
      catalogFactory.setRestrictQueryPermissions(false);
      cs.addCatalog(catalogFactory.createCatalog());
      catalogFactory.setCatalogId("TestCatalog2");
      catalogFactory
          .setIndexFactory(getInMemoryDSFactory(testDir.getAbsolutePath() + "/index/2/"));
      cs.addCatalog(catalogFactory.createCatalog());
    }catch (Exception e) {
      e.printStackTrace();
      TestCase.fail(e.getMessage());
    }
  }
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.catalog.CatalogFactory

     *            The class name of the service factory used to create new
     *            Catalog objects.
     * @return A newly constructed {@link Catalog} object.
     */
    public static Catalog getCatalogServiceFromFactory(String serviceFactory) {
        CatalogFactory factory = null;
        Class<CatalogFactory> clazz = null;

        try {
            clazz = (Class<CatalogFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCatalog();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading metadata store factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.catalog.CatalogFactory

     *            Catalog objects.
     * @return A newly constructed {@link Catalog} object.
     */
    @SuppressWarnings("unchecked")
    public static Catalog getCatalogServiceFromFactory(String serviceFactory) {
        CatalogFactory factory = null;
        Class<CatalogFactory> clazz = null;

        try {
            clazz = (Class<CatalogFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCatalog();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading metadata store factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.catalog.CatalogFactory

     *            The class name of the service factory used to create new
     *            Catalog objects.
     * @return A newly constructed {@link Catalog} object.
     */
    public static Catalog getCatalogServiceFromFactory(String serviceFactory) {
        CatalogFactory factory = null;
        Class<CatalogFactory> clazz = null;

        try {
            clazz = (Class<CatalogFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCatalog();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading metadata store factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.geoserver.catalog.CatalogFactory

    LayerInfo l;
    StyleInfo s;
   
    protected void setUp() throws Exception {
        catalog = new CatalogImpl();
        CatalogFactory factory = catalog.getFactory();
       
        ns = factory.createNamespace();
        ns.setPrefix( "nsPrefix" );
        ns.setURI( "nsURI" );
       
        ws = factory.createWorkspace();
        ws.setName( "wsName");
       
        ds = factory.createDataStore();
        ds.setEnabled(true);
        ds.setName( "dsName");
        ds.setDescription("dsDescription");
        ds.setWorkspace( ws );
       
        ft = factory.createFeatureType();
        ft.setEnabled(true);
        ft.setName( "ftName" );
        ft.setAbstract( "ftAbstract" );
        ft.setDescription( "ftDescription" );
        ft.setStore( ds );
        ft.setNamespace( ns );

        cs = factory.createCoverageStore();
        cs.setName("csName");
        cs.setType("fakeCoverageType");
        cs.setURL("file://fake");
       
        cv = factory.createCoverage();
        cv.setName("cvName");
        cv.setStore(cs);
       
        s = factory.createStyle();
        s.setName( "styleName" );
        s.setFilename( "styleFilename" );
       
        l = factory.createLayer();
        l.setEnabled(true);
        l.setResource( ft );
        l.setDefaultStyle( s );
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.