Examples of MetadataStore


Examples of org.teiid.metadata.MetadataStore

        helpTestVisitor(metadata, input, EMPTY_CONTEXT, null, output);
    }
   
    /** create fake BQT metadata to test this case, name in source is important */
    private QueryMetadataInterface getOracleSpecificMetadata() {
      MetadataStore metadataStore = new MetadataStore();
      Schema foo = RealMetadataFactory.createPhysicalModel("BQT1", metadataStore); //$NON-NLS-1$
        Table table = RealMetadataFactory.createPhysicalGroup("SmallA", foo); //$NON-NLS-1$
        Table dual = RealMetadataFactory.createPhysicalGroup("DUAL", foo); //$NON-NLS-1$
        table.setNameInSource("SmallishA");//$NON-NLS-1$
        String[] elemNames = new String[] {
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

            input,
            output);       
    }
   
    @Test public void testUniqueidentifier() throws Exception {
      MetadataStore metadataStore = new MetadataStore();
      Schema foo = RealMetadataFactory.createPhysicalModel("foo", metadataStore); //$NON-NLS-1$
        Table table = RealMetadataFactory.createPhysicalGroup("bar", foo); //$NON-NLS-1$
        String[] elemNames = new String[] {
            "x"  //$NON-NLS-1$
        };
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

        LDAPSearchDetails searchDetails = searchParser.translateSQLQueryToLDAPSearch(query);
    return searchDetails;
  }
   
    public static QueryMetadataInterface exampleLdap() {
      MetadataStore metadataStore = new MetadataStore();

        // Create models
        Schema ldapModel = RealMetadataFactory.createPhysicalModel("LdapModel", metadataStore); //$NON-NLS-1$
       
        // Create physical groups
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

    addEntriesPlusVisibilities(vdb, new VDBMetaData());
  }
   
  public MetadataStore getMetadataStore(Collection<Datatype> systemDatatypes) throws IOException {
    if (this.store == null) {
      this.store = new MetadataStore();
        ArrayList<Index> tmp = new ArrayList<Index>();
      for (VirtualFile f : indexFiles) {
        Index index = new Index(f, true);
        index.setDoCache(true);
              tmp.add(index);
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

  }
 
  public void deployVDB(String vdbName, String vdbPath) throws Exception {
   
    IndexMetadataFactory imf = VDBMetadataFactory.loadMetadata(new File(vdbPath).toURI().toURL());
    MetadataStore metadata = imf.getMetadataStore(repo.getSystemStore().getDatatypes());
    LinkedHashMap<String, Resource> entries = imf.getEntriesPlusVisibilities();
   
        deployVDB(vdbName, metadata, entries);   
  }
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

 
    public static TransformationMetadata exampleBQTCached() {
        return CACHED_BQT;
    }
    public static MetadataStore exampleBQTStore() {
      MetadataStore metadataStore = new MetadataStore();
     
        Schema bqt1 = createPhysicalModel("BQT1", metadataStore); //$NON-NLS-1$
        Schema bqt2 = createPhysicalModel("BQT2", metadataStore); //$NON-NLS-1$
        Schema bqt3 = createPhysicalModel("BQT3", metadataStore); //$NON-NLS-1$
        Schema lob = createPhysicalModel("LOB", metadataStore); //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

     * Metadata for Materialized Views
     * @return
     * @since 4.2
     */
    public static QueryMetadataInterface exampleMaterializedView() {
      MetadataStore metadataStore = new MetadataStore();
        Schema virtModel = createVirtualModel("MatView", metadataStore); //$NON-NLS-1$
        Schema physModel = createPhysicalModel("MatTable", metadataStore); //$NON-NLS-1$
        Schema physModel_virtSrc = createPhysicalModel("MatSrc", metadataStore); //$NON-NLS-1$
       
        Table physTable = createPhysicalGroup("info", physModel); //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

 
    @Test public void testCrossSourceStartJoin() throws Exception {
        String sql = "select p.Description, sum(AMOUNT) from s3 p, s2 c, s1 b, o1 f " +
            "where p.PRODUCTID = f.PRODUCT and c.CurrencyCode = f.CURRENCY and b.BOOKID = f.BOOK and b.Name = 'xyz' and c.Name = 'abc' Group by p.Description";
       
        MetadataStore metadataStore = new MetadataStore();
     
        Schema oracle = createPhysicalModel("oracle", metadataStore); //$NON-NLS-1$
        Schema sybase = createPhysicalModel("sybase", metadataStore); //$NON-NLS-1$
       
        // Create physical groups
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

      Table dup1 = mf1.addTable("dup");
     
      mf.addColumn("x", DataTypeManager.DefaultDataTypes.STRING, dup);
      mf1.addColumn("x", DataTypeManager.DefaultDataTypes.STRING, dup1);
     
      MetadataStore ms = mf.getMetadataStore();
      ms.addSchema(mf1.getMetadataStore().getSchemas().values().iterator().next());
     
      server.deployVDB("test", ms, new LinkedHashMap<String, Resource>());
      Connection conn = server.createConnection("jdbc:teiid:test"); //$NON-NLS-1$
     
      Properties importProperties = new Properties();
View Full Code Here

Examples of org.teiid.metadata.MetadataStore

  static FakeServer server = new FakeServer();
 
  @BeforeClass public static void oneTimeSetup() {
      server.setUseCallingThread(true);
      MetadataStore ms = new MetadataStore();
      Schema s = new Schema();
      s.setName("test");
      FunctionMethod function = new FunctionMethod("foo", null, FunctionCategoryConstants.MISCELLANEOUS, PushDown.CANNOT_PUSHDOWN, TestLocalConnections.class.getName(), "blocking", new FunctionParameter[0], new FunctionParameter("result", DataTypeManager.DefaultDataTypes.INTEGER), true, FunctionMethod.Determinism.NONDETERMINISTIC);
      s.addFunction(function);
      ms.addSchema(s);
      server.deployVDB("test", ms, new LinkedHashMap<String, Resource>());
  }
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.