public static void main( String[] args ) { Workspace ws = new DefaultWorkspace(new File("/home/stranger/.deegree/deegree-workspace-utah-3.2-pre9-20120717.234406-9")); ws.initAll(); ws.destroy(); }
workspace.initAll(); } catch ( ResourceInitException e1 ) { LOG.error( "Initialization of secure proxy failed: {}", e1.getLocalizedMessage() );
public static void main( String[] args ) { if ( args.length == 0 ) { System.out.println( "You must specify the workspace location." ); return; } File wsloc = new File( args[0] ); if ( !wsloc.isDirectory() ) { System.out.println( "Workspace location does not exist or is not a directory." ); return; } Workspace ws = null; try { ws = new DefaultWorkspace( wsloc ); ws.initAll(); new FeatureLayerExtractor( ws ).extract(); new ThemeExtractor( ws ).transform(); } catch ( Throwable e ) { System.out.println( "There was a problem transforming the configuration." ); e.printStackTrace(); } finally { if ( ws != null ) { ws.destroy(); } } }
user, pass ); workspace.getLocationHandler().addExtraResource( loc ); workspace.initAll(); connProvider = workspace.getResource( ConnectionProviderProvider.class, db_id ); } else {
workspace.initAll(); } catch ( ResourceInitException e ) { LOG.error( "Initialization failed: {}", e.getLocalizedMessage() );
ws.initAll(); DefaultResourceIdentifier<FeatureStore> identifier = new DefaultResourceIdentifier<FeatureStore>( FeatureStoreProvider.class,
loc = new DefaultResourceLocation<FeatureStore>( new File( inputFileName ), id ); Workspace ws = new DefaultWorkspace( new File( "nix" ) ); ws.initAll(); ws.add( loc ); ws.prepare( id );
url, user, pass ) ); workspace.initAll(); connProvider = workspace.getResource( ConnectionProviderProvider.class, "style" );
/** * Simple importer for SE files, with hardcoded 'configtool' on localhost. * * @param args * @throws XMLStreamException * @throws FactoryConfigurationError * @throws IOException */ public static void main( String[] args ) throws XMLStreamException, FactoryConfigurationError, IOException { Style style = new SymbologyParser( true ).parse( XMLInputFactory.newInstance().createXMLStreamReader( new FileInputStream( args[0] ) ) ); Workspace workspace = new DefaultWorkspace( new File( "nonexistant" ) ); ResourceLocation<ConnectionProvider> loc = ConnectionProviderUtils.getSyntheticProvider( "configtool", "jdbc:postgresql://localhost/configtool", "postgres", "postgres" ); workspace.getLocationHandler().addExtraResource( loc ); workspace.initAll(); if ( style.isSimple() ) { new PostgreSQLWriter( "configtool", "schematest", workspace ).write( style, null ); } else { new PostgreSQLWriter( "configtool", "schematest", workspace ).write( new FileInputStream( args[0] ), style.getName() ); } workspace.destroy(); }
workspace.startup(); workspace.getLocationHandler().addExtraResource( loc ); workspace.initAll();