Package cascading.lingual.common

Examples of cascading.lingual.common.Target


    boolean doNotWrite = false;

    try
      {
      Target target = null;

      if( getOptions().isDDL() )
        target = new DDLTarget( getPrinter(), getOptions() );
      if( getOptions().isListSchemas() || getOptions().isSchemaActions() )
        target = new SchemaTarget( getPrinter(), getOptions() );
      else if( getOptions().isListTables() || getOptions().isTableActions() )
        target = new TableTarget( getPrinter(), getOptions() );
      else if( getOptions().isListStereotypes() || getOptions().isStereotypeActions() )
        target = new StereotypeTarget( getPrinter(), getOptions() );
      else if( getOptions().isListFormats() || getOptions().isFormatActions() )
        target = new FormatTarget( getPrinter(), getOptions() );
      else if( getOptions().isListProtocols() || getOptions().isProtocolActions() )
        target = new ProtocolTarget( getPrinter(), getOptions() );
      else if( getOptions().isListProviders() || getOptions().isProviderActions() )
        target = new ProviderTarget( getPrinter(), getOptions() );
      else if( getOptions().isListRepos() || getOptions().isRepoActions() )
        target = new RepoTarget( getPrinter(), getOptions() );

      if( target == null )
        return getOptions().printInvalidOptionMessage( getErrPrintStream(), "no command given: missing --add, --rename, --remove, --update, --validate, --show" );

      if( !( target instanceof ProtocolTarget || target instanceof FormatTarget ) && getOptions().hasProperties() )
        return getOptions().printInvalidOptionMessage( getErrPrintStream(), "--properties may only be added to formats or protocols via --add or --update" );

      return target.handle( platformBroker );
      }
    catch( Throwable throwable )
      {
      doNotWrite = true;
      Throwables.propagate( throwable );
View Full Code Here

TOP

Related Classes of cascading.lingual.common.Target

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.