Package org.pentaho.metadata.repository

Examples of org.pentaho.metadata.repository.InMemoryMetadataDomainRepository


    try
    {
      final InputStream stream = createStream(resourceManager, contextKey, xmiFile);
      try
      {
        final InMemoryMetadataDomainRepository repo = new InMemoryMetadataDomainRepository();
        final XmiParser parser = new XmiParser();
        final Domain domain = parser.parseXmi(stream);
        domain.setId(domainId);
        repo.storeDomain(domain, true);
        return repo;
      }
      finally
      {
        stream.close();
View Full Code Here


    {
      throw new ResourceLoadingException("Your resource-key must have a domain-id factory key defined.");
    }
    try
    {
      final InMemoryMetadataDomainRepository repo = new InMemoryMetadataDomainRepository();
      final XmiParser parser = new XmiParser();
      final Domain domain = parser.parseXmi(stream);
      domain.setId(String.valueOf(o));
      repo.storeDomain(domain, true);
      return new SimpleResource(key, repo, IMetadataDomainRepository.class, version);
    }
    catch (ResourceCreationException e)
    {
      throw e;
View Full Code Here

      try
      {
        final InputStream stream = createStream(resourceManager, contextKey, xmiFile);
        try
        {
          final InMemoryMetadataDomainRepository repo = new InMemoryMetadataDomainRepository();
          final XmiParser parser = new XmiParser();
          final Domain domain = parser.parseXmi(stream);
          // add a couple of agg types to the quantity ordered physical column
          final IPhysicalTable table = ((SqlPhysicalModel) domain.getPhysicalModels().get(0)).getPhysicalTables().get(7);
          final IPhysicalColumn col = table.getPhysicalColumns().get(3);
          final List<AggregationType> list = new ArrayList<AggregationType>();
          list.add(AggregationType.SUM);
          list.add(AggregationType.AVERAGE);
          col.setAggregationList(list);
          domain.setId(domainId);
          repo.storeDomain(domain, true);
          return repo;
        }
        finally
        {
          stream.close();
View Full Code Here

    }
    catch (Exception e)
    {
      context.error(e);
    }
    return new InMemoryMetadataDomainRepository();
  }
View Full Code Here

    }
    catch (Exception e)
    {
      context.error(e);
    }
    return new InMemoryMetadataDomainRepository();
  }
View Full Code Here

TOP

Related Classes of org.pentaho.metadata.repository.InMemoryMetadataDomainRepository

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.