Package org.teiid.metadata

Examples of org.teiid.metadata.MetadataStore


           
        final boolean cache = "cached".equalsIgnoreCase(vdb.getPropertyValue("UseConnectorMetadata")); //$NON-NLS-1$ //$NON-NLS-2$
        final File cacheFile = buildCachedModelFileName(unit, vdb, model.getName());
        boolean loaded = false;
        if (cache) {
        MetadataStore store = this.serializer.loadSafe(cacheFile, MetadataStore.class);
        if (store != null) {
          vdbStore.addStore(store);
          loaded = true;
        }
        }
View Full Code Here


        exceptionMessage = status;
        continue;
      }
      loaded = null;
        try {
          MetadataStore store = cm.getMetadata(model.getName(), this.vdbRepository.getBuiltinDatatypes(), model.getProperties());
          if (cache) {
            this.serializer.saveAttachment(cacheFile, store);
          }
          vdbStore.addStore(store);
          loaded = true;
View Full Code Here

        UTIL = new TranslationUtility(getMetadata());
        TranslationHelper.loadUDFs(UDF, UTIL);
    }
   
    public static TransformationMetadata getMetadata() {
      MetadataStore store = new MetadataStore();
      Schema modeshape = RealMetadataFactory.createPhysicalModel("modeshape", store);
      Table nt_base = RealMetadataFactory.createPhysicalGroup("nt_base", modeshape);
      nt_base.setNameInSource("\"nt:base\"");
    List<Column> cols = RealMetadataFactory.createElements(nt_base, new String[] { "jcr_path",
        "mode_properties", "jcr_primaryType", "prop" }, new String[] {
View Full Code Here

@SuppressWarnings("nls")
public class TestVisitors {

    public static QueryMetadataInterface exampleSalesforce() {
      MetadataStore store = new MetadataStore();
        // Create models
        Schema salesforceModel = RealMetadataFactory.createPhysicalModel("SalesforceModel", store); //$NON-NLS-1$
      
        // Create Account group
        Table accountTable = RealMetadataFactory.createPhysicalGroup("Account", salesforceModel); //$NON-NLS-1$
View Full Code Here

        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

            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

        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

    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

  }
 
  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

 
    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

TOP

Related Classes of org.teiid.metadata.MetadataStore

Copyright © 2018 www.massapicom. 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.