rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public JaninoConnection() { super(Driver.DIALECT_IDENTIFIER);
public JaninoConnection(ConnectionParameters parameters) { super(Driver.DIALECT_IDENTIFIER, parameters);
public JaninoConnection() { super(Driver.DIALECT_IDENTIFIER); }
protected AbstractConnection(DialectIdentifier dialectIdentifier, ConnectionParameters parameters) { this(parameters); if (dialectIdentifier==null) { throw new IllegalArgumentException("Dialect identifier cannot be null"); } this.dialectIdentifier = dialectIdentifier;
protected AbstractConnection() {
protected AbstractConnection(DialectIdentifier dialectIdentifier, ConnectionParameters parameters) { this(parameters); if (dialectIdentifier==null) { throw new IllegalArgumentException("Dialect identifier cannot be null"); } this.dialectIdentifier = dialectIdentifier; }
final String packagePath = getPackageName( getClass() ).replace( '.', File.separatorChar ); m_testBaseDir = getCanonicalFile( new File( m_baseDir, packagePath ) );
m_testBaseDir = m_baseDir;
public AbstractVfsTestCase( final String name ) { super( name ); final String baseDirProp = System.getProperty( "test.basedir" ); m_baseDir = getCanonicalFile( new File( baseDirProp ) ); final String packagePath = getPackageName( getClass() ).replace( '.', File.separatorChar ); ...
this.absPath = absPath;
if ( absPath != null && absPath.length() > 0 ) { this.absPath = absPath; } else { this.absPath = ROOT_PATH; }
public DefaultFileName( final String scheme, final String absPath ) { this.scheme = scheme; this.absPath = absPath; }
super( context, rootName );
super( context, rootName, null );
public UrlFileSystem( final FileSystemProviderContext context, final FileName rootName ) { super( context, rootName ); }
if ( port != null && port.length() > 0 && !port.equals( getDefaultPort() ) )
if ( port != getDefaultPort() )
protected void appendRootUri( final StringBuffer buffer ) { buffer.append( getScheme() ); buffer.append( "://" ); if ( userInfo != null && userInfo.length() != 0 ) { buffer.append( userInfo ); buffer.append( "@" ); } buffer.append( hostName ); ...
final String port = extractPort( name ); if ( port != null && port.length() == 0 ) { throw new FileSystemException( "vfs.provider/missing-port.error", uri ); } auth.port = port;
auth.port = extractPort( name, uri );
protected static Authority extractToPath( final String uri, final StringBuffer name ) throws FileSystemException { final Authority auth = new Authority(); // Extract the scheme auth.scheme = UriParser.extractScheme( uri, name ); // E...
if (input == null && !runBenchmark) usage(false);
public static void main(String[] args) { if (args.length > 0) { boolean showFrame = true; String sampler = "bucket"; boolean noRender = false; String filename = null; String input = null; String accel = null; int i = 0; i...
if (runRTBenchmark) { new RealtimeBenchmark(showFrame, threads); return; } if (input == null) usage(false);
public static void main(String[] args) { if (args.length > 0) { boolean showFrame = true; String sampler = "bucket"; boolean noRender = false; String filename = null; String input = null; String accel = null; int i = 0; i...
System.out.println(" -rtbench Run realtime ray-tracing benchmark");
public static void usage(boolean verbose) { System.out.println("Usage: SunflowGUI [options] scenefile"); if (verbose) { System.out.println("Sunflow v" + SunflowAPI.VERSION + " textmode"); System.out.println("Renders the specified scene file"); System.out.println("Optio...
progress.step(1, locations.get(i).toString());
progress.step(1, locations.get(i).toString()+" executed");
public void execute(final EtlContext ctx) { final ProgressCallback progress = ctx.getProgressCallback() .fork(executors.size()); DynamicContext dynCtx = new DynamicContext(ctx); for (int i = 0, n = executors.size(); i < n; i++) { ExecutableElement exec = executors.get(...
if (LOG.isLoggable(Level.FINE)) { LOG.fine("Commiting connection "+c); }
public void commit() { for (Connection c : getAllConnections()) { c.commit(); } }
throw new FileSystemException("vfs.provider.ftp/login.error", new Object[]{hostname, username}, null);
throw new FileSystemException("vfs.provider.ftp/login.error", new Object[]{hostname, UserAuthenticatorUtils.toString(username)}, null);
public static FTPClient createConnection(String hostname, int port, char[] username, char[] password, String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException { // Determine the username and password to use if (username == null) { username = "anonym...
super( context, rootName );
super( context, rootName, null );
public SmbFileSystem( final FileSystemProviderContext context, final FileName rootName ) { super( context, rootName ); }
if ( share == null )
if ( share == null || share.length() == 0 )
public static SmbFileName parseUri( final String uri ) throws FileSystemException { final StringBuffer name = new StringBuffer(); // Extract the scheme and authority parts final Authority auth = extractToPath( uri, name ); // Decode and adjust separators UriParser.decode...
public Geometry(PrimitiveList primitives) { this.primitives = primitives;
public Geometry(Tesselatable tesselatable) { this.tesselatable = tesselatable; primitives = null;
public Geometry(PrimitiveList primitives) { this.primitives = primitives; accel = null; builtAccel = 0; }
if (tesselatable != null) { UI.printInfo("[GEO] Tesselating geometry ..."); primitives = tesselatable.tesselate(); }
private synchronized void build() { // double check flag if (builtAccel != 0) return; int n = primitives.getNumPrimitives(); if (n >= 10) UI.printInfo("[GEO] Building acceleration structure for %d primitives ...", n); if (n > 20000000) accel = new ...
return primitives.getNumPrimitives();
return primitives == null ? 0 : primitives.getNumPrimitives();
int getNumPrimitives() { return primitives.getNumPrimitives(); }
return primitives.getWorldBounds(o2w);
return primitives == null ? tesselatable.getWorldBounds(o2w) : primitives.getWorldBounds(o2w);
BoundingBox getWorldBounds(Matrix4 o2w) { return primitives.getWorldBounds(o2w); }
if (tesselatable != null) return tesselatable.update(pl, api);
public boolean update(ParameterList pl, SunflowAPI api) { // clear acceleration structure so it will be rebuilt accel = null; builtAccel = 0; // update primitives return primitives.update(pl, api); }
if (noGI) api.giEngine(null);
public static void main(String[] args) { if (args.length > 0) { boolean showFrame = true; String sampler = "bucket"; boolean noRender = false; String filename = null; String input = null; int i = 0; int threads = 0; boole...
public UrlFileObject( UrlFileSystem fs, FileName fileName, URL url )
public UrlFileObject( final UrlFileSystem fs, final FileName fileName )
public UrlFileObject( UrlFileSystem fs, FileName fileName, URL url ) { super( fileName, fs ); this.url = url; }
this.url = url;
public UrlFileObject( UrlFileSystem fs, FileName fileName, URL url ) { super( fileName, fs ); this.url = url; }
public Properties getServiceProperties() {
public Properties getServiceProperties(String beanName) {
public Properties getServiceProperties() { Properties p = new Properties(); String name = getSymbolicName(); if (StringUtils.hasLength(name)) { p.put(Constants.BUNDLE_SYMBOLICNAME, name); } String version = getBundleVersion(); if (StringUtils.hasLength(version)) { p.put(Constants.BUNDLE_VERSION, version); }...
p.put(BEAN_NAME_PROPERTY_KEY, beanName);
public Properties getServiceProperties() { Properties p = new Properties(); String name = getSymbolicName(); if (StringUtils.hasLength(name)) { p.put(Constants.BUNDLE_SYMBOLICNAME, name); } String version = getBundleVersion(); if (StringUtils.hasLength(version)) { p.put(Constants.BUNDLE_VERSION, version); }...
public Connection getConnection() { if (connection == null) { connection = getConnection(connectionEl); }
private Connection getConnection(final ConnectionEl connectionEl) { try { if (driver != null) { Properties info = new Properties(); final String u = connectionEl.getUser();
public Connection getConnection() { if (connection == null) { connection = getConnection(connectionEl); } return connection; }
return connection;
if (u != null) { info.put("user", u); } final String p = connectionEl.getPassword(); if (p != null) { info.put("password", p); } final Connection c = driver.connect(connectionEl.getUrl(), info); c.setAutoCommit(false); return c; } else { Class.forName(connectionEl.getDriver()); final Connection c = DriverManager.g...
public Connection getConnection() { if (connection == null) { connection = getConnection(connectionEl); } return connection; }
final FileInfo code = new FileInfo( "code", FileType.FOLDER ); base.addChild( code ); code.addChild( "ClassToLoad.class", FileType.FILE );
private FileInfo buildExpectedStructure() { // Build the expected structure final FileInfo base = new FileInfo( "test", FileType.FOLDER ); base.addChild( "file1.txt", FileType.FILE ); base.addChild( "empty.txt", FileType.FILE ); base.addChild( "emptydir", FileType.FOLDER ); ...
folder.getContent();
folder.getContent().getInputStream();
public void testNoContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getContent(); fail(); } catch( FileSystemException e ) { final String messag...
final String message = REZ.getString( "get-folder-content.error", folder );
final String message = REZ.getString( "read-folder.error", folder );
public void testNoContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getContent(); fail(); } catch( FileSystemException e ) { final String messag...
folder.getURL().openConnection();
folder.getURL().openConnection().getInputStream();
public void testNoURLContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getURL().openConnection(); fail(); } catch( IOException e ) { final Strin...
final String message = REZ.getString( "get-folder-content.error", folder );
final String message = REZ.getString( "read-folder.error", folder );
public void testNoURLContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getURL().openConnection(); fail(); } catch( IOException e ) { final Strin...
geometry("teapot", new Teapot());
geometry("teapot", (Tesselatable) new Teapot());
private void createGeometry() { // light source parameter("source", new Point3(-15.5945f, -30.0581f, 45.967f)); parameter("dir", new Vector3(15.5945f, 30.0581f, -45.967f)); parameter("radius", 60.0f); parameter("radiance", Color.white().mul(3)); light("light", new Direction...
geometry("gumbo", new Gumbo());
geometry("gumbo", (Tesselatable) new Gumbo());
private void createGeometry() { // light source parameter("source", new Point3(-15.5945f, -30.0581f, 45.967f)); parameter("dir", new Vector3(15.5945f, 30.0581f, -45.967f)); parameter("radius", 60.0f); parameter("radiance", Color.white().mul(3)); light("light", new Direction...
return new Color(1);
return new Color(1f);
public static Color white() { return new Color(1); }
public FakeGIEngine(Vector3 up, Color sky, Color ground) { this.up = new Vector3(up).normalize(); this.sky = sky; this.ground = ground; up.normalize();
public FakeGIEngine(Options options) { up = options.getVector("gi.fake.up", new Vector3(0, 1, 0)).normalize(); sky = options.getColor("gi.fake.sky", Color.WHITE).copy(); ground = options.getColor("gi.fake.ground", Color.BLACK).copy();
public FakeGIEngine(Vector3 up, Color sky, Color ground) { this.up = new Vector3(up).normalize(); this.sky = sky; this.ground = ground; up.normalize(); sky.mul((float) Math.PI); ground.mul((float) Math.PI); }
AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies);;
AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext( BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies);
AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, ...
m_manager.addProvider( "zip", new ZipFileSystemProvider() ); return m_manager.resolveFile( uri );
getManager().addProvider( "zip", new ZipFileSystemProvider() ); return getManager().resolveFile( uri );
protected FileObject getBaseFolder() throws Exception { File zipFile = getTestResource( "test.zip" ); String uri = "zip:" + zipFile.getAbsolutePath() + "!basedir"; m_manager.addProvider( "zip", new ZipFileSystemProvider() ); return m_manager.resolveFile( uri ); }
protected JDBCConnection connect(ConnectionParameters parameters, Properties props) throws SQLException { return new JDBCConnection(getConnection(parameters.getUrl(), props));
public JDBCConnection connect(ConnectionParameters params) { if (params.getUrl() == null) { throw new IllegalArgumentException("URL parameter is required for JDBC driver connection"); } try { Properties props = new Properties(); props.putAll(params.getProperties()); if (params.getUser() != null) { props.put("user", pa...
protected JDBCConnection connect(ConnectionParameters parameters, Properties props) throws SQLException { return new JDBCConnection(getConnection(parameters.getUrl(), props)); }
public final double getRandom(int j, int dim, int n) {
public final double getRandom(int j, int dim) {
public final double getRandom(int j, int dim, int n) { switch (dim) { case 0: return QMC.mod1(qmcD0I + (double) j / (double) n); case 1: return QMC.mod1(qmcD1I + QMC.halton(0, j)); default: return QMC.mod1(QMC.halton(d + dim, i) + ...
return QMC.mod1(qmcD0I + (double) j / (double) n);
return QMC.mod1(qmcD0I + QMC.halton(0, j));
public final double getRandom(int j, int dim, int n) { switch (dim) { case 0: return QMC.mod1(qmcD0I + (double) j / (double) n); case 1: return QMC.mod1(qmcD1I + QMC.halton(0, j)); default: return QMC.mod1(QMC.halton(d + dim, i) + ...
return QMC.mod1(qmcD1I + QMC.halton(0, j));
return QMC.mod1(qmcD1I + QMC.halton(1, j));
public final double getRandom(int j, int dim, int n) { switch (dim) { case 0: return QMC.mod1(qmcD0I + (double) j / (double) n); case 1: return QMC.mod1(qmcD1I + QMC.halton(0, j)); default: return QMC.mod1(QMC.halton(d + dim, i) + ...
return QMC.mod1(QMC.halton(d + dim, i) + QMC.halton(dim - 1, j));
return QMC.mod1(QMC.halton(d + dim, i) + QMC.halton(dim, j));
public final double getRandom(int j, int dim, int n) { switch (dim) { case 0: return QMC.mod1(qmcD0I + (double) j / (double) n); case 1: return QMC.mod1(qmcD1I + QMC.halton(0, j)); default: return QMC.mod1(QMC.halton(d + dim, i) + ...
return server.traceRefraction(this, new Ray(p, r.getDirection()), 0);
return traceRefraction(new Ray(p, r.getDirection()), 0);
public final Color traceTransparency() { return server.traceRefraction(this, new Ray(p, r.getDirection()), 0); }
return new Color(0);
return new Color(0f);
public static Color black() { return new Color(0); }
public ConnectionParameters(Map<String, String> properties, String url, String user, String password, String schema, String catalog) {
public ConnectionParameters(Map<String, String> properties, String url, String user, String password, String schema, String catalog, ThisParameter context) {
public ConnectionParameters(Map<String, String> properties, String url, String user, String password, String schema, String catalog) { this.properties = properties; this.url = url; this.user = user; this.password = password; this.schema = schema; this.catalog = catalog; ...
this.context = context;
public ConnectionParameters(Map<String, String> properties, String url, String user, String password, String schema, String catalog) { this.properties = properties; this.url = url; this.user = user; this.password = password; this.schema = schema; this.catalog = catalog; ...
StAXFeatureHandler(StAXFeatureHandler staxenv) {
StAXFeatureHandler() {
StAXFeatureHandler(StAXFeatureHandler staxenv) { handlers = new ArrayList(); this.staxenv = staxenv; }
this.staxenv = staxenv;
StAXFeatureHandler(StAXFeatureHandler staxenv) { handlers = new ArrayList(); this.staxenv = staxenv; }
String doddleHome = file.getParentFile().getPath() + "/";
String doddleHome = file.getParentFile().getPath() + File.separator;
public void exec() { SplashWindow splashWindow = new SplashWindow(); try { String jarPath = DODDLE.class.getClassLoader().getResource("").getFile(); File file = new File(jarPath); String doddleHome = file.getParentFile().getPath() + "/"; EDRDic.ID_DEFINITION...
DODDLE.initOptions(new String[] { "lang=ja"});
DODDLE.LANG = "en"; DODDLE.initOptions(new String[] { "lang=en"});
public void exec() { SplashWindow splashWindow = new SplashWindow(); try { String jarPath = DODDLE.class.getClassLoader().getResource("").getFile(); File file = new File(jarPath); String doddleHome = file.getParentFile().getPath() + "/"; EDRDic.ID_DEFINITION...
setParam(opts, PASSIVE_MODE, Boolean.valueOf(passiveMode));
setParam(opts, PASSIVE_MODE, passiveMode?Boolean.TRUE:Boolean.FALSE);
public void setPassiveMode(FileSystemOptions opts, boolean passiveMode) { setParam(opts, PASSIVE_MODE, Boolean.valueOf(passiveMode)); }
char token, Annotation annotation ) { super(token, annotation);
Annotation annotation, List symbols ) throws IllegalSymbolException { this(annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolException( "Can't create BasisSymbol for an empty list. Use the Gap symbol." ); } this.symbols = ListT...
protected SimpleBasisSymbol( char token, Annotation annotation ) { super(token, annotation); }
final int n = m.getColumnCount();
columnsCount = m.getColumnCount();
public ResultSetAdapter(ResultSet resultSet, ParametersCallback parametersCallback, JDBCTypesConverter converter) { this.params = parametersCallback; this.resultSet = resultSet; columnsMap = new ColumnsMap(); this.converter = converter; try { ...
for (int i = 1; i <= n; i++) {
for (int i = 1; i <= columnsCount; i++) {
public ResultSetAdapter(ResultSet resultSet, ParametersCallback parametersCallback, JDBCTypesConverter converter) { this.params = parametersCallback; this.resultSet = resultSet; columnsMap = new ColumnsMap(); this.converter = converter; try { ...
row = new Object[n];
public ResultSetAdapter(ResultSet resultSet, ParametersCallback parametersCallback, JDBCTypesConverter converter) { this.params = parametersCallback; this.resultSet = resultSet; columnsMap = new ColumnsMap(); this.converter = converter; try { ...
boolean res = resultSet.next(); Arrays.fill(row, null); return res;
return resultSet.next();
public boolean next() { try { boolean res = resultSet.next(); Arrays.fill(row, null); return res; } catch (SQLException e) { throw new JDBCException("Unable to move cursor to the next row", e); } }
public EllipticalBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double dimensionRatio)
public EllipticalBeadRenderer()
public EllipticalBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double dimensionRatio) { super(beadDepth, beadDisplacement, beadOutline, beadFill, beadStroke); dimensionRatio = 2.0F; }
super(beadDepth, beadDisplacement, beadOutline, beadFill, beadStroke);
super();
public EllipticalBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke, double dimensionRatio) { super(beadDepth, beadDisplacement, beadOutline, beadFill, beadStroke); dimensionRatio = 2.0F; }
public RectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke)
public RectangularBeadRenderer()
public RectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke) { super(beadDepth, beadDisplacement, bea...
super(beadDepth, beadDisplacement, beadOutline, beadFill, beadStroke);
super();
public RectangularBeadRenderer(double beadDepth, double beadDisplacement, Paint beadOutline, Paint beadFill, Stroke beadStroke) { super(beadDepth, beadDisplacement, bea...
public FilteringRenderer( SequenceRenderer renderer, FeatureFilter filter, boolean recurse ) { super(renderer); try { setFilter(filter); setRecurse(recurse); } catch (ChangeVetoException cve) { throw new AssertionFailure("Assertion Failure: Should have no listeners", cve); }
public FilteringRenderer() { filter = FeatureFilter.all; recurse = false;
public FilteringRenderer( SequenceRenderer renderer, FeatureFilter filter, boolean recurse ) { super(renderer); try { setFilter(filter); setRecurse(recurse); } catch (ChangeVetoException cve) { throw new AssertionFailure("Assertion Failure: Should have no listeners", cve); } }
public static Location union(Collection locs) { List locList = new ArrayList(); for (Iterator li = locs.iterator(); li.hasNext(); ) { Location loc = (Location) li.next(); for (Iterator bi = loc.blockIterator(); bi.hasNext(); ) { locList.add(bi.next()); } }
public static Location union(Location locA, Location locB) { if(isDecorated(locA) || isDecorated(locB)) { handleDecorations(); }
public static Location union(Collection locs) { List locList = new ArrayList(); for (Iterator li = locs.iterator(); li.hasNext(); ) { Location loc = (Location) li.next(); for (Iterator bi = loc.blockIterator(); bi.hasNext(); ) { locList.add(bi.next()); } } return _union(locList); }
return _union(locList);
if( locA.isContiguous() && locB.isContiguous() && locA.overlaps(locB) ) { return buildLoc( Math.min(locA.getMin(), locB.getMin()), Math.max(locA.getMax(), locB.getMax()) ); } else { List locList = new ArrayList(); for(Iterator i = locA.blockIterator(); i.hasNext(); ) { locList.add(i.next()); } for(Iterator i ...
public static Location union(Collection locs) { List locList = new ArrayList(); for (Iterator li = locs.iterator(); li.hasNext(); ) { Location loc = (Location) li.next(); for (Iterator bi = loc.blockIterator(); bi.hasNext(); ) { locList.add(bi.next()); } } return _union(locList); }
}
public static Location union(Collection locs) { List locList = new ArrayList(); for (Iterator li = locs.iterator(); li.hasNext(); ) { Location loc = (Location) li.next(); for (Iterator bi = loc.blockIterator(); bi.hasNext(); ) { locList.add(bi.next()); } } return _union(locList); }
if (state != null)
if (state != null) {
void add(ShadingState state) { if (n == 0) { c = Color.black(); sampled = true; } if (state != null) c.add(state.getResult()); n++; }
if (state.getResult().isNan()) UI.printError(Module.BCKT, "NaN shading sample!"); else if (state.getResult().isInf()) UI.printError(Module.BCKT, "Inf shading sample!"); }
void add(ShadingState state) { if (n == 0) { c = Color.black(); sampled = true; } if (state != null) c.add(state.getResult()); n++; }
if (c.isNan()) UI.printError(Module.BCKT, "NaN shading sample!"); else if (c.isInf()) UI.printError(Module.BCKT, "Inf shading sample!");
void set(ShadingState state) { if (state == null) c = Color.BLACK; else { c = state.getResult(); shader = state.getShader(); instance = state.getInstance(); if (state.getNormal() != null) { nx = s...
stack = new StackNode[64];
stack = new StackNode[MAX_STACK_SIZE * 2];
public IntersectionState() { stack = new StackNode[64]; for (int i = 0; i < stack.length; i++) stack[i] = new StackNode(); }
+ "/ConfigurableBundleCreatorTestsTests$1-bundle.properties", bundleCreator.getSettingsLocation());
+ "/ConfigurableBundleCreatorTestsTest$1-bundle.properties", bundleCreator.getSettingsLocation());
public void testGetSettingsLocation() throws Exception { assertEquals(bundleCreator.getClass().getPackage().getName().replace('.', '/') + "/ConfigurableBundleCreatorTestsTests$1-bundle.properties", bundleCreator.getSettingsLocation()); }
props.load(new ClassPathResource("org/springframework/osgi/test/ConfigurableBundleCreatorTestsTests$1-bundle.properties").getInputStream());
props.load(new ClassPathResource("org/springframework/osgi/test/ConfigurableBundleCreatorTestsTest$1-bundle.properties").getInputStream());
public void testPropertiesLoading() throws Exception { Properties testSettings = bundleCreator.getSettings(); Properties props = new Properties(); props.load(new ClassPathResource("org/springframework/osgi/test/ConfigurableBundleCreatorTestsTests$1-bundle.properties").getInputStream()); assertEquals(props.getPrope...
settings.setProperty(ROOT_DIR, super.getRootPath());
protected Properties getSettings() throws Exception { Properties settings = new Properties(DEFAULT_SETTINGS); Resource resource = new ClassPathResource(getSettingsLocation()); if (resource.exists()) { InputStream stream = resource.getInputStream(); try { if (stream != null) { settings.load(stream); l...
public void construct( Matcher m, Tree[] cases, boolean doBinding) { this._m = m; super.initialize( _m.selector, _m.owner, _m.resultType, doBinding ); for( int i = 0; i < cases.length; i++ ) { addCase( (CaseDef) cases[i], i); } _m.tree = toTree();
public void construct( Matcher m, Tree[] cases) { construct(m, cases, true);
public void construct( Matcher m, Tree[] cases, boolean doBinding) { this._m = m; super.initialize( _m.selector, _m.owner, _m.resultType, doBinding ); for( int i = 0; i < cases.length; i++ ) { addCase( (CaseDef) cases[i], i); } _m.tree = toTree(); ...
ConfigurableApplicationContext ctx = contextFactory.createApplicationContextWithBundleContext(null, bundleContext, applicationContextLocations, plugins, true);
ConfigurableApplicationContext ctx = contextFactory.createApplicationContextWithBundleContext(bundleContext, applicationContextLocations, plugins, true);
private void startBundle(Bundle bundle) { String[] applicationContextLocations = getApplicationContextLocations(bundle); if (applicationContextLocations == null) { return; // Nothing to do... } BundleContext bundleContext = OsgiResourceUtils.getBundleContext(bundle); if (bundleContext == null) { log.error("Co...
throw new IllegalStateException("Exception retrieving bundle context", e);
throw (IllegalStateException)new IllegalStateException("Exception retrieving bundle context").initCause(e);
public static BundleContext getBundleContext(Bundle bundle) { if (bundle == null) return null; try {// Retrieve bundle context from Equinox Method m = bundle.getClass().getDeclaredMethod("getContext", new Class[0]); m.setAccessible(true); return (BundleContext) m.invoke(bundle, new Object[0]); ...
int[] triangles = new int[data.length / 9];
int[] triangles = new int[3 * (data.length / 9)];
public boolean parse(String filename, SunflowAPI api) { try { UI.printInfo("[RA2] Reading geometry: \"%s\" ...", filename); File file = new File(filename); FileInputStream stream = new FileInputStream(filename); MappedByteBuffer map = stream.getChannel().map(FileCh...
filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath());
filesystem = new LocalFileSystem(rootName, rootFile.getAbsolutePath(), properties);
public synchronized FileObject findFile(final FileObject baseFile, final String uri, final FileSystemOptions properties) throws FileSystemException { // Parse the name final StringBuffer buffer = new StringBuffer(uri); final String scheme = UriParser.extractScheme(uri, buffer); ...
super( context, rootName );
super( context, rootName, null );
public LocalFileSystem( final FileSystemProviderContext context, final DefaultFileName rootName, final String rootFile ) { super( context, rootName ); this.rootFile = rootFile; }
if (children.add(baseName))
if (children.add(baseName.getBaseName()))
public void attachChild(final FileName baseName, final FileType type) throws Exception { final FileType oldType = doGetType(); if (children.add(baseName)) { childrenChanged(baseName, type); } maybeTypeChanged(oldType); }
ConceptTreeNode rootNode = (ConceptTreeNode) classTreeModel.getRoot(); Set<ConceptTreeNode> replaceNodeSet = new HashSet<ConceptTreeNode>(); Set<String> conceptIdSetForReplaceSubConcepts = disambiguationPanel .getConceptIdSetForReplaceSubConcepts(); checkReplaceSubConcepts(rootNode, conceptIdSetForReplaceSubConcepts, ...
private TreeModel makeClassTreeModel(Set<Concept> nounConceptSet) { TreeModel classTreeModel = null; if (project.getDisambiguationPanel().getConstructionTypePanel().isNewConstruction()) { constructClassPanel.init(); if (project.getDisambigu...
ConceptTreeNode rootNode = (ConceptTreeNode) propertyTreeModel.getRoot(); Set<ConceptTreeNode> replaceNodeSet = new HashSet<ConceptTreeNode>(); Set<String> conceptIdSetForReplaceSubConcepts = disambiguationPanel .getConceptIdSetForReplaceSubConcepts(); checkReplaceSubConcepts(rootNode, conceptIdSetForReplaceSubConcepts...
private TreeModel makePropertyTreeModel(Set<Concept> verbConceptSet) { TreeModel propertyTreeModel = null; if (project.getDisambiguationPanel().getConstructionTypePanel().isNewConstruction()) { constructPropertyPanel.init(); if (project.get...
TreeModel model = treeMaker.getTrimmedTreeModel(pathSet, project);
TreeModel model = treeMaker.getTrimmedTreeModel(pathSet, project, ConceptTreeMaker.DODDLE_CLASS_ROOT_ID);
public TreeModel getTreeModel(Set<Concept> conceptSet) { Set pathSet = treeMaker.getPathList(conceptSet); trimmedConceptNum = 0; TreeModel model = treeMaker.getTrimmedTreeModel(pathSet, project); trimmedConceptNum = treeMaker.getTrimmedConceptNum(); beforeTrimmingConceptNum = tree...
* とりあえず,「移動」と「行為」概念の下位概念については,動詞的概念とみなす.ほとんどの動詞的概念は,
* とりあえず,「移動」,「行為」,「状態」,「変化」,「現象」概念の下位概念については,動詞的概念とみなす.ほとんどの動詞的概念は,
public Set<Concept> getVerbConceptSet(Set<Concept> inputConceptSet) { Set<Concept> verbConceptSet = new HashSet<Concept>(); Set<String> allVerbIDSet = new HashSet<String>(); // for (Iterator i = inputIDSet.iterator(); i.hasNext();) { // String id = (String) i.next(); // // ...
allVerbIDSet.addAll(getSubIDSet("3aa963")); allVerbIDSet.addAll(getSubIDSet("30f7e5")); allVerbIDSet.addAll(getSubIDSet("3f9856"));
public Set<Concept> getVerbConceptSet(Set<Concept> inputConceptSet) { Set<Concept> verbConceptSet = new HashSet<Concept>(); Set<String> allVerbIDSet = new HashSet<String>(); // for (Iterator i = inputIDSet.iterator(); i.hasNext();) { // String id = (String) i.next(); // // ...
System.setProperty("org.osgi.framework.bootdelegation", "javax.*,org.w3c.*,sun.*,org.xml.*,com.sun.*");
public void start() throws Exception { // passed the configuration option as System properties then arguments // (there is no dependency on the main class). System.setProperty("eclipse.ignoreApp", "true"); System.setProperty("osgi.clean", "true"); System.setProperty("osgi.noShutdown", "true"); // System.setPrope...
final String port,
final int port,
private SmbFileName( final String scheme, final String hostName, final String port, final String userInfo, final String share, final String path ) { super( scheme, hostName, port, userIn...
public String getDefaultPort()
public int getDefaultPort()
public String getDefaultPort() { return "139"; }
return "139";
return 139;
public String getDefaultPort() { return "139"; }
update(name);
if (lookupGeometry(name) != null) update(name); else UI.printError("[API] Unable to update geometry \"%s\" - geometry object was not found", name);
public final void geometry(String name, PrimitiveList primitives) { if (primitives != null) { // we are declaring a geometry for the first time if (renderObjects.containsKey(name)) { UI.printError("[API] Unable to declare geometry \"%s\", name is already in use", name); ...
if (update(name) && geoname != null) scene.addInstance(renderObjects.get(name).getInstance());
if (lookupInstance(name) != null) { if (update(name) && geoname != null) scene.addInstance(renderObjects.get(name).getInstance()); } else UI.printError("[API] Unable to update instance \"%s\" - instance object was not found", name);
public final void instance(String name, String geoname) { if (geoname != null) { // we are declaring this instance for the first time if (renderObjects.containsKey(name)) { UI.printError("[API] Unable to declare instance \"%s\", name is already in use", name); ...
if (update(name) && light != null) scene.addLight(light);
if (lookupLight(name) != null) { if (update(name) && light != null) scene.addLight(light); } else UI.printError("[API] Unable to update instance \"%s\" - instance object was not found", name);
public final void light(String name, LightSource light) { if (light != null) { // we are declaring this light for the first time if (renderObjects.containsKey(name)) { UI.printError("[API] Unable to declare light \"%s\", name is already in use", name); retu...
public final Geometry lookupGeometry(String name) {
private final Geometry lookupGeometry(String name) {
public final Geometry lookupGeometry(String name) { RenderObjectHandle handle = renderObjects.get(name); if (handle == null) return null; return handle.getGeometry(); }
if (handle == null) return null; return handle.getGeometry();
return (handle == null) ? null : handle.getGeometry();
public final Geometry lookupGeometry(String name) { RenderObjectHandle handle = renderObjects.get(name); if (handle == null) return null; return handle.getGeometry(); }
update(name);
if (lookupShader(name) != null) update(name); else UI.printError("[API] Unable to update shader \"%s\" - shader object was not found", name);
public final void shader(String name, Shader shader) { if (shader != null) { // we are declaring a shader for the first time if (renderObjects.containsKey(name)) { UI.printError("[API] Unable to declare shader \"%s\", name is already in use", name); return;...
scene.setShaderOverride(shader(name), photonOverride);
scene.setShaderOverride(lookupShader(name), photonOverride);
public final void shaderOverride(String name, boolean photonOverride) { scene.setShaderOverride(shader(name), photonOverride); }
UI.printError("[API] Unable to update \"%s\" -- removing", name); renderObjects.remove(name);
UI.printError("[API] Unable to update \"%s\" - removing", name); remove(name);
public boolean update(String name) { RenderObjectHandle obj = renderObjects.get(name); boolean success; if (obj == null) { UI.printError("[API] Unable to update \"%s\" - object was not defined yet", name); success = false; } else { UI.printDetailed("[API]...
else if (n > 1)
else if (n > 2)
public Geometry(PrimitiveList primitives) { this.primitives = primitives; // TODO: construct appropriate acceleration structure from parameters accel = null; int n = primitives.getNumPrimitives(); if (n == 1) accel = new SimpleAccelerator(); else if (n > 1) ...
if (accel != null) accel.build(primitives);
else accel = new NullAccelerator(); accel.build(primitives);
public Geometry(PrimitiveList primitives) { this.primitives = primitives; // TODO: construct appropriate acceleration structure from parameters accel = null; int n = primitives.getNumPrimitives(); if (n == 1) accel = new SimpleAccelerator(); else if (n > 1) ...
if (instance.getBounds() == null)
if (instance.getBounds() == null) {
public void addInstance(Instance instance) { if (instance.getBounds() == null) infiniteInstanceList.add(instance); else { instanceList.add(instance); changedGeometry = true; } }
else { instanceList.add(instance); changedGeometry = true;
} else { if (instance.getBounds().isEmpty()) UI.printWarning("[API] Instance has an empty bounding box - ignoring."); else { instanceList.add(instance); changedGeometry = true; }
public void addInstance(Instance instance) { if (instance.getBounds() == null) infiniteInstanceList.add(instance); else { instanceList.add(instance); changedGeometry = true; } }