Examples of parseXmi()


Examples of org.pentaho.metadata.util.XmiParser.parseXmi()

      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
View Full Code Here

Examples of org.pentaho.metadata.util.XmiParser.parseXmi()

    }
    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)
View Full Code Here

Examples of org.pentaho.metadata.util.XmiParser.parseXmi()

        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);
View Full Code Here

Examples of org.pentaho.metadata.util.XmiParser.parseXmi()

    try {
      byte[] is = IOUtils.toByteArray( inputStream );
      xmi = new String( is, "UTF-8" );

      // now, try to see if the xmi can be parsed (ie, check if it's valid xmi)
      Domain domain = xmiParser.parseXmi( new java.io.ByteArrayInputStream( is ) );

      boolean changed = false;
      if ( domain.getLogicalModels().size() > 1 ) {
        Iterator<LogicalModel> iterator = domain.getLogicalModels().iterator();
        while ( iterator.hasNext() ) {
View Full Code Here

Examples of org.pentaho.metadata.util.XmiParser.parseXmi()

   * @throws Exception
   */
  private static final Domain loadDomain( final String domainId, final String domainFile ) throws Exception {
    final InputStream in = PentahoMetadataDomainRepositoryTest.class.getResourceAsStream( domainFile );
    final XmiParser parser = new XmiParser();
    final Domain domain = parser.parseXmi( in );
    domain.setId( domainId );
    IOUtils.closeQuietly( in );
    return domain;
  }

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.