Package cascading.lingual.catalog

Examples of cascading.lingual.catalog.Protocol


  @Override
  protected boolean performRename( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    Protocol oldProtocol = getSource( platformBroker );
    Protocol newProtocol = Protocol.getProtocol( getOptions().getRenameName() );

    if( oldProtocol == null )
      return false;

    return catalog.renameProtocol( schemaName, oldProtocol, newProtocol );
View Full Code Here


  @Override
  protected boolean performRemove( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String schemaName = getOptions().getSchemaName();
    Protocol protocol = getSource( platformBroker );

    return catalog.removeProtocol( schemaName, protocol );
    }
View Full Code Here

    SchemaCatalog catalog = platformBroker.getSchemeCatalog();

    if( getRequestedSourceName() == null )
      return null;

    Protocol protocol = Protocol.getProtocol( getRequestedSourceName() );

    if( !catalog.getSchemaDefinedProtocols( getOptions().getSchemaName() ).contains( protocol ) )
      return null;

    return protocol;
View Full Code Here

    String protocolName = getOptions().getProtocolName();

    if( protocolName == null )
      throw new IllegalArgumentException( "update action must have a protocol name value" );

    Protocol protocol = getSource( platformBroker );

    if( protocol == null )
      return emptyList();

    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
View Full Code Here

  @Override
  protected List<String> performAdd( PlatformBroker platformBroker )
    {
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    String protocolName = getOptions().getProtocolName();
    Protocol protocol = Protocol.getProtocol( protocolName );
    String schemaName = getOptions().getSchemaName();
    Map<String, String> properties = getOptions().getProperties();
    List<String> schemes = getOptions().getSchemes();
    String providerName = getOptions().getProviderName();

    catalog.addUpdateProtocol( schemaName, protocol, schemes, properties, providerName );

    return asList( protocol.getName() );
    }
View Full Code Here

    }

  @Override
  protected Map performShow( PlatformBroker platformBroker )
    {
    Protocol protocol = Protocol.getProtocol( getRequestedSourceName() );
    SchemaCatalog catalog = platformBroker.getSchemeCatalog();
    SchemaDef schemaDef = getSchemaDefChecked( catalog, getOptions().getSchemaName(), true );

    if( !schemaDef.getAllProtocols().contains( protocol ) )
      return null;
View Full Code Here

    String stereotypeName = getOptions().getStereotypeName();

    if( stereotypeName != null )
      tableDef.setStereotypeName( stereotypeName );

    Protocol protocol = Protocol.getProtocol( getOptions().getProtocolName() );

    if( protocol != null )
      tableDef.setProtocol( protocol );

    Format format = Format.getFormat( getOptions().getFormatName() );
View Full Code Here

  protected List<String> performAdd( PlatformBroker platformBroker )
    {
    String schemaName = getOptions().getSchemaName();
    String tableName = getOptions().getTableName();
    String addURI = getOptions().getAddOrUpdateURI();
    Protocol protocol = Protocol.getProtocol( getOptions().getProtocolName() );
    Format format = Format.getFormat( getOptions().getFormatName() );

    String stereotypeName = getOptions().getStereotypeName();

    SchemaCatalogManager catalogManager = platformBroker.getCatalogManager();
View Full Code Here

    TableDef table = schemaDef.findTableFor( identifier );

    if( table != null && table.getProtocol() != null )
      return table.getActualProtocol();

    Protocol protocol = ProtocolProperties.findProtocolFor( schemaDef, identifier );

    if( protocol == null )
      protocol = schemaDef.findDefaultProtocol();

    return protocol;
View Full Code Here

    catalog( "--schema", DDL_TEST_SCHEMA, "--add", getSchemaPath( DDL_TEST_SCHEMA ) );

    SchemaCatalog catalog = getSchemaCatalog();
    SchemaCatalogManager schemaCatalogManager = platformBroker.getCatalogManager();

    Protocol defaultProtocol = catalog.getSchemaDef( DDL_TEST_SCHEMA ).findDefaultProtocol();

    DDLParser parser = new DDLParser( schemaCatalogManager, DDL_TEST_SCHEMA, defaultProtocol.toString(), "csv" );

    File testFile = new File( DDL_FILE );

    assertTrue( "test file " + testFile + "not found in " + new File( "" ).getAbsolutePath(), testFile.exists() );
View Full Code Here

TOP

Related Classes of cascading.lingual.catalog.Protocol

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.