Package org.eobjects.metamodel.schema

Examples of org.eobjects.metamodel.schema.Schema


        if (parentFile != null && !parentFile.exists()) {
          parentFile.mkdirs();
        }
        dataContext = new CsvDataContext(file, getConfiguration(separatorChar, quoteChar));

        final Schema schema = dataContext.getDefaultSchema();
        dataContext.executeUpdate(new UpdateScript() {
          @Override
          public void run(UpdateCallback callback) {
            TableCreationBuilder tableBuilder = callback.createTable(schema, "table");
            for (String header : headers) {
View Full Code Here


    return outputWriter;
  }

  private static Table getTable(UpdateableDataContext dataContext, final String sheetName, final InputColumn<?>[] columns) {
    final Schema schema = dataContext.getDefaultSchema();
    Table table = schema.getTableByName(sheetName);
    if (table == null) {
      final MutableRef<Table> tableRef = new MutableRef<Table>();
      dataContext.executeUpdate(new UpdateScript() {
        @Override
        public void run(UpdateCallback callback) {
View Full Code Here

      return;
    }
    DefaultMutableTreeNode node = (DefaultMutableTreeNode) path.getLastPathComponent();
    Object userObject = node.getUserObject();
    if (userObject instanceof Schema) {
      final Schema schema = (Schema) userObject;
      int button = e.getButton();

      if (button == MouseEvent.BUTTON2 || button == MouseEvent.BUTTON3) {
        JPopupMenu popup = new JPopupMenu();
        popup.setLabel(schema.getName());
        JMenuItem addTableItem = WidgetFactory.createMenuItem("Add all schema tables to source",
            "images/actions/toggle-source-table.png");
        addTableItem.addActionListener(new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            TableMouseListener tableMouseListener = _tableMouseListenerProvider.get();
            Table[] tables = schema.getTables();
            for (Table table : tables) {
              tableMouseListener.addTable(table);
            }
          }
        });
View Full Code Here

    if (value instanceof Datastore) {
      component = _rendererDelegate.getTreeCellRendererComponent(tree, ((Datastore) value).getName(), selected,
          expanded, leaf, row, hasFocus);
      icon = IconUtils.getDatastoreIcon((Datastore) value, IconUtils.ICON_SIZE_SMALL);
    } else if (value instanceof Schema) {
      Schema schema = ((Schema) value);
      String schemaName = schema.getName();
      component = _rendererDelegate.getTreeCellRendererComponent(tree, schemaName, selected, expanded, leaf, row,
          hasFocus);
      icon = imageManager.getImageIcon("images/model/schema.png", IconUtils.ICON_SIZE_SMALL);
      if (SchemaComparator.isInformationSchema(schema)) {
        icon = imageManager.getImageIcon("images/model/schema_information.png", IconUtils.ICON_SIZE_SMALL);
View Full Code Here

      _schemaNode = schemaNode;
    }

    @Override
    protected Void doInBackground() throws Exception {
      Schema schema = (Schema) _schemaNode.getUserObject();
      Table[] tables = schema.getTables();
      for (Table table : tables) {
        String name = table.getName();
        logger.debug("Publishing table name: {}", name);
        publish(table);
      }
View Full Code Here

TOP

Related Classes of org.eobjects.metamodel.schema.Schema

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.