rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
this.rootFile = rootFile;
protected LocalFile(final LocalFileSystem fileSystem, final FileName name) throws FileSystemException { super(name, fileSystem); }
LocalFileName localFileName = (LocalFileName) getName(); String fileName = localFileName.getRootFile() + getName().getPathDecoded();
String fileName = rootFile + getName().getPathDecoded();
protected void doAttach() throws Exception { if (file == null) { // Remove the "file:///" LocalFileName localFileName = (LocalFileName) getName(); String fileName = localFileName.getRootFile() + getName().getPathDecoded(); // fileName = UriParser.d...
parameterList = new ParameterList();
public final void reset() { scene = new Scene(); bucketRenderer = new BucketRenderer(); progressiveRenderer = new ProgressiveRenderer(); shadersTable = new HashMap<String, Shader>(); currentShader = null; includeSearchPath = new SearchPath("include"); textureSearchPa...
dependencies.add(service.getValue()); PropertyValue filter = bean.getPropertyValues().getPropertyValue (OsgiServiceProxyFactoryBean.FILTER_ATTRIBUTE); return true;
PropertyValue serviceFilter = bean.getPropertyValues().getPropertyValue(OsgiServiceProxyFactoryBean.FILTER_ATTRIBUTE); String clazz = (String) service.getValue(); String query = serviceFilter != null ? (String) serviceFilter.getValue() : null; Filter filter = getFilter(clazz, query); dependencies.add(new Dependency(fi...
private boolean addBeanDependency(BeanDefinition bean, HashSet dependencies) { if (bean.getBeanClassName().equals(OsgiServiceProxyFactoryBean.class.getName())) { PropertyValue service = bean.getPropertyValues().getPropertyValue (OsgiServiceProxyFactoryBean.INTERFACE_ATTRIBUTE); if (service == null) { throw...
getBundleContext().removeServiceListener(this); if (getParent() == null) { setParent(getParentApplicationContext(getBundleContext())); }
getBundleContext().removeServiceListener(this);
protected void completeContextInitialization() { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); BundleContext bc = LocalBundleContext.getContext(); try { Thread.currentThread().setContextClassLoader(savedCcl); LocalBundleContext.setContext(getBundleContext()); dependencies.clear(); getBun...
protected HashSet findServiceDependencies() {
protected void findServiceDependencies() {
protected HashSet findServiceDependencies() { // Get bean types, but do not instantiate lazy singletons or templates String[] beans = getBeanFactory().getBeanDefinitionNames(); HashSet dependencies = new HashSet(); for (int i = 0; i < beans.length; i++) { BeanDefinition bean = getBeanFactory().getBeanDefinition(...
HashSet dependencies = new HashSet();
HashSet d = new HashSet();
protected HashSet findServiceDependencies() { // Get bean types, but do not instantiate lazy singletons or templates String[] beans = getBeanFactory().getBeanDefinitionNames(); HashSet dependencies = new HashSet(); for (int i = 0; i < beans.length; i++) { BeanDefinition bean = getBeanFactory().getBeanDefinition(...
if (!addBeanDependency(bean, dependencies)) {
if (!addBeanDependency(bean, d)) {
protected HashSet findServiceDependencies() { // Get bean types, but do not instantiate lazy singletons or templates String[] beans = getBeanFactory().getBeanDefinitionNames(); HashSet dependencies = new HashSet(); for (int i = 0; i < beans.length; i++) { BeanDefinition bean = getBeanFactory().getBeanDefinition(...
addBeanDependency((BeanDefinition) values[p].getValue(), dependencies);
addBeanDependency((BeanDefinition) values[p].getValue(), d);
protected HashSet findServiceDependencies() { // Get bean types, but do not instantiate lazy singletons or templates String[] beans = getBeanFactory().getBeanDefinitionNames(); HashSet dependencies = new HashSet(); for (int i = 0; i < beans.length; i++) { BeanDefinition bean = getBeanFactory().getBeanDefinition(...
return dependencies;
dependencies = d;
protected HashSet findServiceDependencies() { // Get bean types, but do not instantiate lazy singletons or templates String[] beans = getBeanFactory().getBeanDefinitionNames(); HashSet dependencies = new HashSet(); for (int i = 0; i < beans.length; i++) { BeanDefinition bean = getBeanFactory().getBeanDefinition(...
boolean unsatisfiedServices = false; for (Iterator i = dependencies.iterator(); i.hasNext();) { String filter = null; String clazz = (String) i.next(); try { ServiceReference[] serviceReferences = getBundleContext().getServiceReferences(clazz, filter); if (serviceReferences == null || serviceReferences.length == 0) { u...
boolean unsatisfiedServices = false; for (Iterator i = dependencies.iterator(); i.hasNext();) { Dependency dependency = (Dependency) i.next(); if (!dependency.isSatisfied()) { unsatisfiedDependencies.add(dependency); unsatisfiedServices = true; } } return unsatisfiedServices;
protected synchronized boolean hasUnsatisifiedServiceDependencies() { boolean unsatisfiedServices = false; for (Iterator i = dependencies.iterator(); i.hasNext();) { String filter = null; String clazz = (String) i.next(); try { ServiceReference[] serviceReferences = getBundleContext().getServiceReferen...
if (dependencies.isEmpty()) {
if (unsatisfiedDependencies.isEmpty()) {
public synchronized void serviceChanged(ServiceEvent serviceEvent) { if (dependencies.isEmpty()) { // already completed. return; } String[] classes = (String[]) serviceEvent.getServiceReference() .getProperty(Constants.OBJECTCLASS); switch (serviceEvent.getType()) { case ServiceEvent.REGISTERED: for (int...
String[] classes = (String[]) serviceEvent.getServiceReference() .getProperty(Constants.OBJECTCLASS); switch (serviceEvent.getType()) { case ServiceEvent.REGISTERED: for (int i = 0; i < classes.length; i++) { unsatisfiedDependencies.remove(classes[i]); } break; case ServiceEvent.UNREGISTERING: for (int i = 0; i < clas...
for (Iterator i = dependencies.iterator(); i.hasNext();) { Dependency dependency = (Dependency) i.next(); if (dependency.matches(serviceEvent)) { switch (serviceEvent.getType()) { case ServiceEvent.MODIFIED: case ServiceEvent.REGISTERED: unsatisfiedDependencies.remove(dependency); break; case ServiceEvent.UNREGISTERING...
public synchronized void serviceChanged(ServiceEvent serviceEvent) { if (dependencies.isEmpty()) { // already completed. return; } String[] classes = (String[]) serviceEvent.getServiceReference() .getProperty(Constants.OBJECTCLASS); switch (serviceEvent.getType()) { case ServiceEvent.REGISTERED: for (int...
}
}else { registerListener(); }
public synchronized void serviceChanged(ServiceEvent serviceEvent) { if (dependencies.isEmpty()) { // already completed. return; } String[] classes = (String[]) serviceEvent.getServiceReference() .getProperty(Constants.OBJECTCLASS); switch (serviceEvent.getType()) { case ServiceEvent.REGISTERED: for (int...
caps.add( Capability.LAST_MODIFIED );
caps.add( Capability.GET_LAST_MODIFIED );
protected void addCapabilities( final Collection caps ) { caps.add( Capability.CREATE ); caps.add( Capability.DELETE ); caps.add( Capability.GET_TYPE ); caps.add( Capability.LAST_MODIFIED ); caps.add( Capability.LIST_CHILDREN ); caps.add( Capability.READ_CONTENT ); ...
return "JDBCConnection{" + (con == null ? "" : con.getClass()) + '}';
return "JDBCConnection{" + (con == null ? "" : con.getClass().getName()) + "}, "+getDialectIdentifier();
public String toString() { return "JDBCConnection{" + (con == null ? "" : con.getClass()) + '}'; }
public static File getTestDirectory()
public static String getTestDirectory()
public static File getTestDirectory() { if (baseDir == null) { final String baseDirProp = System.getProperty("test.basedir"); baseDir = getCanonicalFile(new File(baseDirProp)); } return baseDir; }
*/
public static File getTestDirectory() { if (baseDir == null) { final String baseDirProp = System.getProperty("test.basedir"); baseDir = getCanonicalFile(new File(baseDirProp)); } return baseDir; }
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] defaultValue)
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] overwriddenValue)
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] defaultValue) { if (data == null) { return defaultValue; } char[] ret = data.getData(type); if (ret == null) { return defaultValue; } return ret; }
if (data == null)
if (overwriddenValue != null) { return overwriddenValue; } if (data == null)
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] defaultValue) { if (data == null) { return defaultValue; } char[] ret = data.getData(type); if (ret == null) { return defaultValue; } return ret; }
return defaultValue;
return null;
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] defaultValue) { if (data == null) { return defaultValue; } char[] ret = data.getData(type); if (ret == null) { return defaultValue; } return ret; }
char[] ret = data.getData(type); if (ret == null) { return defaultValue; } return ret;
return data.getData(type);
public static char[] getData(UserAuthenticationData data, UserAuthenticationData.Type type, char[] defaultValue) { if (data == null) { return defaultValue; } char[] ret = data.getData(type); if (ret == null) { return defaultValue; } return ret; }
auth.userName,
username,
public FileName parseUri(final VfsComponentContext context, FileName base, final String filename) throws FileSystemException { final StringBuffer name = new StringBuffer(); // Extract the scheme and authority parts final Authority auth = extractToPath(filename, name); // Decode and ad...
domain,
public FileName parseUri(final VfsComponentContext context, FileName base, final String filename) throws FileSystemException { final StringBuffer name = new StringBuffer(); // Extract the scheme and authority parts final Authority auth = extractToPath(filename, name); // Decode and ad...
public boolean build(AggregateTraceable primitives) {
public boolean build(PrimitiveList primitives) {
public boolean build(AggregateTraceable primitives) { Timer t = new Timer(); t.start(); this.primitives = primitives; int n = primitives.numPrimitives(); // compute bounds bounds = primitives.getWorldBounds(null); // create grid from number of objects bounds.e...
int n = primitives.numPrimitives();
int n = primitives.getNumPrimitives();
public boolean build(AggregateTraceable primitives) { Timer t = new Timer(); t.start(); this.primitives = primitives; int n = primitives.numPrimitives(); // compute bounds bounds = primitives.getWorldBounds(null); // create grid from number of objects bounds.e...
getGridIndex(primitives.getObjectBound(i, 0), primitives.getObjectBound(i, 2), primitives.getObjectBound(i, 4), imin); getGridIndex(primitives.getObjectBound(i, 1), primitives.getObjectBound(i, 3), primitives.getObjectBound(i, 5), imax);
getGridIndex(primitives.getPrimitiveBound(i, 0), primitives.getPrimitiveBound(i, 2), primitives.getPrimitiveBound(i, 4), imin); getGridIndex(primitives.getPrimitiveBound(i, 1), primitives.getPrimitiveBound(i, 3), primitives.getPrimitiveBound(i, 5), imax);
public boolean build(AggregateTraceable primitives) { Timer t = new Timer(); t.start(); this.primitives = primitives; int n = primitives.numPrimitives(); // compute bounds bounds = primitives.getWorldBounds(null); // create grid from number of objects bounds.e...
public void intersect(Ray r, Instance parent, IntersectionState state) {
public void intersect(Ray r, IntersectionState state) {
public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound...
primitives.intersectPrimitive(r, parent, i, state);
primitives.intersectPrimitive(r, i, state);
public void intersect(Ray r, Instance parent, IntersectionState state) { float intervalMin = r.getMin(); float intervalMax = r.getMax(); float orgX = r.ox; float dirX = r.dx, invDirX = 1 / dirX; float t1, t2; t1 = (bounds.getMinimum().x - orgX) * invDirX; t2 = (bound...
if (LOG.isLoggable(Level.FINE)) { LOG.fine("Script "+getLocation()+" completed"); }
public void execute(final DynamicContext ctx) { Connection con = ctx.getConnection(); ScriptEl scriptEl = getElement(); ContentEl content = getContent(con.getDialectIdentifier()); if (content == ContentEl.NULL_CONTENT) { warnEmptyContent(); return; } b...
List<String> l = new ArrayList();
List<String> l = new ArrayList<String>();
public static List<String> getColumn(final ResultSet rs, final int columnPos) { List<String> l = new ArrayList(); try { while (rs.next()) { l.add(rs.getString(columnPos)); } } catch (SQLException e) { throw new JDBCException(e); } re...
SunflowAPI api = runBenchmark ? new Benchmark() : SunflowAPI.create(input); if (runBenchmark) api.build();
if (runBenchmark) { new Benchmark(showFrame).execute(); System.exit(0); } SunflowAPI api = SunflowAPI.create(input);
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...
con.getConnection();
Connection connection = con.getConnection(); progressCallback.step(1, "Connection "+connection.toString()+" registered");
public void init(final ConfigurationEl configuration, final ScriptsContext ctx) { final List<ConnectionEl> connections = configuration.getConnections(); for (ConnectionEl c : connections) { final ConnectionManager con = new ConnectionManager(ctx, c); con.getCo...
ctx.getProgressCallback().step(5, "Registering database connections");
final List<ScriptingElement> scripts = configuration.getScriptingElements(); progressCallback = ctx.getProgressCallback().fork(50, scripts.size());
public void init(final ConfigurationEl configuration, final ScriptsContext ctx) { final List<ConnectionEl> connections = configuration.getConnections(); for (ConnectionEl c : connections) { final ConnectionManager con = new ConnectionManager(ctx, c); con.getCo...
ctx.getProgressCallback().step(5, "Parsing row sets"); final List<ScriptingElement> scripts = configuration.getScriptingElements();
public void init(final ConfigurationEl configuration, final ScriptsContext ctx) { final List<ConnectionEl> connections = configuration.getConnections(); for (ConnectionEl c : connections) { final ConnectionManager con = new ConnectionManager(ctx, c); con.getCo...
progressCallback.step(1, s.getLocation()+" prepared");
public void init(final ConfigurationEl configuration, final ScriptsContext ctx) { final List<ConnectionEl> connections = configuration.getConnections(); for (ConnectionEl c : connections) { final ConnectionManager con = new ConnectionManager(ctx, c); con.getCo...
accel = null; builtAccel = 0;
public boolean update(ParameterList pl, SunflowAPI api) { return primitives.update(pl, api); }
showPrefixCheckBox.addActionListener(this);
public OptionDialog(Frame owner) { super(owner); isUsingSpreadActivatingAlgorithmForDisambiguationBox = new JCheckBox("isUsingSpreadActivatingAlgorithm", true); isUsingSpreadActivatingAlgorithmForDisambiguationBox.addActionListener(this); shortestSpreadActivatingAlgorithmForDisambiguatio...
} else if (e.getSource() == showPrefixCheckBox) { DODDLE.getCurrentProject().getConstructClassPanel().getConceptTree().updateUI(); DODDLE.getCurrentProject().getConstructPropertyPanel().getConceptTree().updateUI();
public void actionPerformed(ActionEvent e) { if (e.getSource() == constructComplexWordTreeBox) { boolean isEnable = constructComplexWordTreeBox.isSelected(); trimInternalComplexWordConceptBox.setEnabled(isEnable); addAbstractInternalComplexWordConceptBox.setEnabled(isEnable);...
m_requiredPerm = new FilePermission( m_file.getAbsolutePath(), "read" );
protected void doAttach() throws Exception { if( m_file == null ) { m_file = new File( m_fileName ); } }
final SecurityManager sm = System.getSecurityManager(); if( sm != null ) { sm.checkPermission( m_requiredPerm ); }
protected File doReplicateFile( final FileSelector selector ) throws FileSystemException { return m_file; }
String name = api.getUniqueName("teapot");
String name; if (p.peekNextToken("name")) name = p.getNextToken(); else name = api.getUniqueName("teapot");
private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ...
String name = api.getUniqueName("gumbo"); UI.printInfo("[API] Reading teapot: %s ... ", name);
String name; if (p.peekNextToken("name")) name = p.getNextToken(); else name = api.getUniqueName("gumbo"); UI.printInfo("[API] Reading gumbo: %s ... ", name);
private void parseObjectBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); String[] shaders = null; boolean multiShader = false; if (p.peekNextToken("shaders")) { int n = p.getNextInt(); shaders = new String[n]; for (int i ...
return (String[]) ret.toArray();
return (String[]) ret.toArray(new String[ret.size()]);
protected String[] getApplicationContextLocations(Bundle bundle) { Dictionary manifestHeaders = bundle.getHeaders(); String contextLocationsHeader = (String) manifestHeaders.get(CONTEXT_LOCATION_HEADER); if (contextLocationsHeader != null) { String[] locs = StringUtils.tokenizeToStringArray(contextLocationsHeader...
assertTrue(root.getType().equals(FileType.FOLDER));
assertTrue(root.getType().hasChildren());
public void testRootFolderExists() throws FileSystemException { FileObject root = manager.resolveFile("ram:///", defaultRamFs); assertTrue(root.getType().equals(FileType.FOLDER)); try { root.delete(); fail(); } catch (FileSystemException e) { } ...
File tmp = File.createTempFile("foo", "bar"); resource = new OsgiBundleResource(bundle, "file:" + tmp.toString()); assertNotNull(resource.getURL()); resource = new OsgiBundleResource(bundle, "file:foo" + tmp.toString()); try { resource.getURL(); fail("should have thrown exception"); } catch (Exception ex) { }
public void testGetURL() throws Exception { assertNotNull(resource.getURL()); resource = new OsgiBundleResource(bundle, "bundle:foo" + path); try { resource.getURL(); fail("should have thrown exception"); } catch (Exception ex) { // expected } }
} if (pos == 0 && uri.charAt(pos) != '!') { pos = maxlen;
protected String extractRootName(final StringBuffer uri) throws FileSystemException { // Looking for <name>!<abspath> (staring at the end) int maxlen = uri.length(); int pos = maxlen-1; for (; pos > 0 && uri.charAt(pos) != '!'; pos--) { } // Extract the nam...
public void intersect(Ray r, IntersectionState istate) {
public void intersect(Ray r, IntersectionState state) {
public void intersect(Ray r, IntersectionState istate) { Ray localRay = r.transform(w2o); geometry.intersect(localRay, this, istate); // FIXME: transfer max distance to current ray r.setMax(localRay.getMax()); }
geometry.intersect(localRay, this, istate);
state.current = this; geometry.intersect(localRay, state);
public void intersect(Ray r, IntersectionState istate) { Ray localRay = r.transform(w2o); geometry.intersect(localRay, this, istate); // FIXME: transfer max distance to current ray r.setMax(localRay.getMax()); }
geometry.prepareShadingState(this, state);
geometry.prepareShadingState(state);
public void prepareShadingState(ShadingState state) { geometry.prepareShadingState(this, state); }
indices[pidx + 0] = vbase + v00; indices[pidx + 1] = vbase + v01; indices[pidx + 2] = vbase + v11; indices[pidx + 3] = vbase + v10;
indices[pidx + 0] = vbase + v01; indices[pidx + 1] = vbase + v00; indices[pidx + 2] = vbase + v10; indices[pidx + 3] = vbase + v11;
public PrimitiveList tesselate() { float[] vertices = new float[patches.length * (subdivs + 1) * (subdivs + 1) * 3]; float[] normals = smooth ? new float[patches.length * (subdivs + 1) * (subdivs + 1) * 3] : null; float[] uvs = new float[patches.length * (subdivs + 1) * (subdivs + 1) * 2]; ...
return url.openConnection().getContentLength();
final URLConnection conn = url.openConnection(); final InputStream in = conn.getInputStream(); try { return conn.getContentLength(); } finally { in.close(); }
protected long doGetContentSize() throws Exception { return url.openConnection().getContentLength(); }
return url.openConnection().getLastModified();
final URLConnection conn = url.openConnection(); final InputStream in = conn.getInputStream(); try { return conn.getLastModified(); } finally { in.close(); }
protected long doGetLastModifiedTime() throws Exception { return url.openConnection().getLastModified(); }
url.openConnection().connect();
final URLConnection conn = url.openConnection(); final InputStream in = conn.getInputStream(); try { if (conn instanceof HttpURLConnection) { final int status = ((HttpURLConnection)conn).getResponseCode(); if ( HttpURLConnection.HTTP_OK != status) { return FileType.IMAGINARY; } } return FileType.FILE; } finally { in....
protected FileType doGetType() throws Exception { // Attempt to connect try { url.openConnection().connect(); } catch ( final FileNotFoundException e ) { return FileType.IMAGINARY; } return FileType.FILE; }
return FileType.FILE;
protected FileType doGetType() throws Exception { // Attempt to connect try { url.openConnection().connect(); } catch ( final FileNotFoundException e ) { return FileType.IMAGINARY; } return FileType.FILE; }
conceptTreePanel.checkAllMultipleInheritanceNode(propertyTreeModel);
public TreeModel getTreeModel(Set nounIDSet, Set<Concept> verbConceptSet, String type) { Set<List<Concept>> pathSet = treeMaker.getPathList(verbConceptSet); removeNounConceptPath(pathSet); trimmedConceptNum = 0; TreeModel propertyTreeModel = treeMaker.getTrimmedTreeModel(pathSet, project...
p.checkNextToken("resolution"); api.parameter("resolutionX", p.getNextInt()); api.parameter("resolutionY", p.getNextInt()); p.checkNextToken("aa"); api.parameter("aa.min", p.getNextInt()); api.parameter("aa.max", p.getNextInt());
if (p.peekNextToken("resolution")) { api.parameter("resolutionX", p.getNextInt()); api.parameter("resolutionY", p.getNextInt()); } if (p.peekNextToken("aa")) { api.parameter("aa.min", p.getNextInt()); api.parameter("aa.max", p.getNextInt()); }
private void parseImageBlock(SunflowAPI api) throws IOException, ParserException { p.checkNextToken("{"); p.checkNextToken("resolution"); api.parameter("resolutionX", p.getNextInt()); api.parameter("resolutionY", p.getNextInt()); p.checkNextToken("aa"); api.parameter("aa.mi...
} else if (p.peekNextToken("spherical")) { UI.printInfo(Module.API, "Reading spherical light ..."); p.checkNextToken("color"); Color pow = parseColor(); p.checkNextToken("radiance"); pow.mul(p.getNextFloat()); p.checkNextToken("center"); float cx = p.getNextFloat(); float cy = p.getNextFloat(); float cz = p.getNextFloa...
private void parseLightBlock(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("type"); if (p.peekNextToken("mesh")) { UI.printWarning(Module.API, "Deprecated light type: mesh"); p.checkNextToken("name"); String name =...
if (rootNode.getChildCount() == 0) { trimmedTreeModel = new DefaultTreeModel(null); }
private TreeModel getTrimmedTreeModel(Concept trimmedTreeRootConcept, List<List<Concept>> trimmedConceptList) { ConceptTreeNode rootNode = new ConceptTreeNode(trimmedTreeRootConcept, project); TreeModel trimmedTreeModel = new DefaultTreeModel(rootNode); for (List<Concept> list : trimmedConceptL...
final NodeList filesCaches = config.getElementsByTagName("files-cache"); if (filesCaches.getLength() > 0) { final Element filesCache = (Element) filesCaches.item(0); addFilesCache(filesCache); }
private void configure(final String configUri) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setIgnoringElementContentWhitespace(true); ...
new QueryHelper("select * from t1 union select * from t2").execute(c, new QueryCallback() {
new QueryHelper("select count(*) from t1, t2").execute(c, new QueryCallback() {
public void test() throws EtlExecutorException { EtlExecutor etlExecutor = newEtlExecutor(); Connection c = getConnection("cancelTest"); final Thread etlThread = Thread.currentThread(); interrupted = false; new Thread() { public void run() { try { ...
fail("Tables T1,T2 rows must be rolled back");
assertEquals(0, parameters.getParameter("1"));
public void test() throws EtlExecutorException { EtlExecutor etlExecutor = newEtlExecutor(); Connection c = getConnection("cancelTest"); final Thread etlThread = Thread.currentThread(); interrupted = false; new Thread() { public void run() { try { ...
fail("Tables T1,T2 rows must be rolled back");
assertEquals(0, parameters.getParameter("1"));
public void processRow(final ParametersCallback parameters) { fail("Tables T1,T2 rows must be rolled back"); }
inputDocArea.setText("");
public void actionPerformed(ActionEvent e) { Object[] removeElements = docList.getSelectedValues(); DefaultListModel model = (DefaultListModel) docList.getModel(); for (int i = 0; i < removeElements.length; i++) { model.removeElement(removeElements[i]); ...
inputDocArea.setText("");
public void actionPerformed(ActionEvent e) { Object[] removeElements = inputDocList.getSelectedValues(); DefaultListModel model = (DefaultListModel) inputDocList.getModel(); for (int i = 0; i < removeElements.length; i++) { model.removeElement(removeElements[i]); ...
writer.write("<h3>" + doc.getFile().getAbsolutePath() + "</h3>");
public String getTargetHtmlLines(String word) { StringWriter writer = new StringWriter(); writer.write("<html><body>"); ListModel listModel = inputDocList.getModel(); for (int i = 0; i < listModel.getSize(); i++) { Document doc = (Document) listModel.getElementAt(i); ...
line = line.replaceAll(word, "<bold><font color=red>" + word + "</font></bold>"); writer.write((j + 1) + "行目: " + line + "<br>");
line = line.replaceAll(word, "<b><font color=red>" + word + "</font></b>"); buf.append("<b><font color=navy>" + (j + 1) + "行目: </font></b>" + line + "<br>");
public String getTargetHtmlLines(String word) { StringWriter writer = new StringWriter(); writer.write("<html><body>"); ListModel listModel = inputDocList.getModel(); for (int i = 0; i < listModel.getSize(); i++) { Document doc = (Document) listModel.getElementAt(i); ...
} if (0 < buf.toString().length()) { writer.write("<h3>" + doc.getFile().getAbsolutePath() + "</h3>"); writer.write(buf.toString());
public String getTargetHtmlLines(String word) { StringWriter writer = new StringWriter(); writer.write("<html><body>"); ListModel listModel = inputDocList.getModel(); for (int i = 0; i < listModel.getSize(); i++) { Document doc = (Document) listModel.getElementAt(i); ...
mesh.shader(new SimpleShader());
Shader s = api.shader("ra3shader"); mesh.shader(s == null ? new SimpleShader() : s);
public boolean parse(String filename, SunflowAPI api) { try { UI.printInfo("[RA3] Reading geometry: \"%s\" ...", filename); File file = new File(filename); FileInputStream stream = new FileInputStream(filename); MappedByteBuffer map = stream.getChannel().map(FileCh...
if (JANINO_NOT_FOUND!=null) { throw new JaninoProviderException("Janino not found on the class path. " + "Check if connection classpath attribute points to janino.jar", JANINO_NOT_FOUND); }
public Connection connect(ConnectionParameters connectionParameters) { if (JANINO_NOT_FOUND!=null) { throw new JaninoProviderException("Janino not found on the class path. " + "Check if connection classpath attribute points to janino.jar", JANINO_NOT_FOUND); } retu...
row = new HashMap<String, Object>();
row = new TreeMap<String, Object>(String.CASE_INSENSITIVE_ORDER);
public final void set(String name, Object value) { if (row == null) { row = new HashMap<String, Object>(); } row.put(name, value); }
final String message = REZ.getString( "init-replicator.error" ); throw new FileSystemException( message, e );
throw new FileSystemException( "vfs.impl/init-replicator.error", null, e );
public void init() throws FileSystemException { if ( replicatorComponent != null ) { try { AccessController.doPrivileged( new InitAction() ); } catch ( final PrivilegedActionException e ) { final String message = R...
final String message = REZ.getString( "replicate-file.error", srcFile.getName() ); throw new FileSystemException( message, e );
throw new FileSystemException( "vfs.impl/replicate-file.error", new Object[]{srcFile.getName()}, e );
public File replicateFile( FileObject srcFile, FileSelector selector ) throws FileSystemException { try { final ReplicateAction action = new ReplicateAction( srcFile, selector ); return (File)AccessController.doPrivileged( action ); } catch ( final Privile...
final String message = REZ.getString( "jar-entry-no-access.error" ); throw new UnsupportedOperationException( message );
throw new UnsupportedOperationException( "vfs.provider.jar/jar-entry-no-access.error" );
public JarEntry getJarEntry() throws IOException { final String message = REZ.getString( "jar-entry-no-access.error" ); throw new UnsupportedOperationException( message ); }
final String message = REZ.getString( "jar-file-no-access.error" ); throw new UnsupportedOperationException( message );
throw new UnsupportedOperationException( "vfs.provider.jar/jar-file-no-access.error" );
public JarFile getJarFile() throws IOException { final String message = REZ.getString( "jar-file-no-access.error" ); throw new UnsupportedOperationException( message ); }
TarBuffer( final InputStream input, final int blockSize, final int recordSize )
TarBuffer( final InputStream input )
TarBuffer( final InputStream input, final int blockSize, final int recordSize ) { m_input = input; initialize( blockSize, recordSize ); }
m_input = input; initialize( blockSize, recordSize );
this( input, TarBuffer.DEFAULT_BLOCKSIZE );
TarBuffer( final InputStream input, final int blockSize, final int recordSize ) { m_input = input; initialize( blockSize, recordSize ); }
throw new IllegalStateException("Filter string '"
throw (IllegalStateException)new IllegalStateException("Filter string '"
public boolean isSatisfied() { ServiceReference[] refs; try { refs = getBundleContext().getServiceReferences(clazz, filter.toString()); } catch (InvalidSyntaxException e) { throw new IllegalStateException("Filter string '" ...
+ e.getMessage(), e);
+ e.getMessage()).initCause(e);
public boolean isSatisfied() { ServiceReference[] refs; try { refs = getBundleContext().getServiceReferences(clazz, filter.toString()); } catch (InvalidSyntaxException e) { throw new IllegalStateException("Filter string '" ...
throw new IllegalArgumentException("Filter string '"
throw (IllegalStateException)new IllegalArgumentException("Filter string '"
private Filter getFilter (String serviceInterface, String serviceFilter) { StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = serviceFilter != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (serviceFilter != null) { sb.append(serviceFilter); } sb.append("("...
+ e.getMessage(), e);
+ e.getMessage()).initCause(e);
private Filter getFilter (String serviceInterface, String serviceFilter) { StringBuffer sb = new StringBuffer(); boolean andFilterWithInterfaceName = serviceFilter != null; if (andFilterWithInterfaceName) { sb.append("(&"); } if (serviceFilter != null) { sb.append(serviceFilter); } sb.append("("...
throw new IllegalStateException("Filter string '"
throw (IllegalStateException)new IllegalStateException("Filter string '"
private void registerListener() { StringBuffer sb = new StringBuffer(100 * unsatisfiedDependencies.size()); sb.append("(|"); for (Iterator i = unsatisfiedDependencies.iterator(); i.hasNext();) { ((Dependency) i.next()).appendTo(sb); } sb.append(')'); String filte...
+ e.getMessage(), e);
+ e.getMessage()).initCause(e);
private void registerListener() { StringBuffer sb = new StringBuffer(100 * unsatisfiedDependencies.size()); sb.append("(|"); for (Iterator i = unsatisfiedDependencies.iterator(); i.hasNext();) { ((Dependency) i.next()).appendTo(sb); } sb.append(')'); String filte...
if (ThisParameter.NAME.equals(name)) {
if (ThisParameter.NAME.equalsIgnoreCase(name)) {
public Object getParameter(final String name) { if (ThisParameter.NAME.equals(name)) { return thisParameter; } return properties.get(name); }
throw new FileSystemException( "Not implemented." );
return file.doGetAttribute( attrName );
public Object getAttribute( String attrName ) throws FileSystemException { // TODO - implement this throw new FileSystemException( "Not implemented." ); }
if( file.isFolder() ) { final String message = REZ.getString( "read-folder.error", file ); throw new FileSystemException( message ); }
public InputStream getInputStream() throws FileSystemException { if ( !file.exists() ) { final String message = REZ.getString( "read-no-exist.error", file ); throw new FileSystemException( message ); } if ( state != STATE_NONE ) { final String m...
throw new FileSystemException( "Not implemented." );
if( !file.exists() ) { final String message = REZ.getString( "get-last-modified-no-exist.error", file ); throw new FileSystemException( message ); } return file.doGetLastModifiedTime();
public long getLastModifiedTime() throws FileSystemException { // TODO - implement this throw new FileSystemException( "Not implemented." ); }
if( file.isFolder() ) { final String message = REZ.getString( "write-folder.error", file ); throw new FileSystemException( message ); }
public OutputStream getOutputStream() throws FileSystemException { if ( state != STATE_NONE ) { final String message = REZ.getString( "write-in-use.error", file ); throw new FileSystemException( message ); } // Get the raw output stream OutputStream outstr...
if( file.isFolder() ) { final String message = REZ.getString( "get-size-folder.error", file ); throw new FileSystemException( message ); }
public long getSize() throws FileSystemException { // Do some checking if ( !file.exists() ) { final String message = REZ.getString( "get-size-no-exist.error", file ); throw new FileSystemException( message ); } if ( state == STATE_WRITING ) { ...
throw new FileSystemException( "Not implemented." );
file.doSetAttribute( attrName, value );
public void setAttribute( String attrName, Object value ) throws FileSystemException { // TODO - implement this throw new FileSystemException( "Not implemented." ); }
throw new FileSystemException( "Not implemented." );
if( !file.exists() ) { final String message = REZ.getString( "set-last-modified-no-exist.error", file ); throw new FileSystemException( message ); } file.doSetLastModifiedTime( modTime );
public void setLastModifiedTime( long modTime ) throws FileSystemException { // TODO - implement this throw new FileSystemException( "Not implemented." ); }
if (resource != null && (resource instanceof StringResource) && !content.isEmpty()) {
if (resource instanceof StringResource && !content.isEmpty()) {
final void append(final Resource resource) { if (resource != null) { //If string rsource and we already have content if (resource != null && (resource instanceof StringResource) && !content.isEmpty()) { final int lastIndex = content.size() - 1; Resource las...
private SharedRandomContentInputStream(final FileObject fo, final long fileStart, final long start, final long end, final InputStream is) throws FileSystemException
private SharedRandomContentInputStream(final FileObject fo, final long fileStart, final long fileEnd, final InputStream is) throws FileSystemException
private SharedRandomContentInputStream(final FileObject fo, final long fileStart, final long start, final long end, final InputStream is) throws FileSystemException { super(is); if (!fo.getFileSystem().hasCapability(Capability.RANDOM_ACCESS_READ)) { throw new FileSystemException("vfs.util/missing-capability.error...
this.start = start; this.end = end;
this.fileEnd = fileEnd;
private SharedRandomContentInputStream(final FileObject fo, final long fileStart, final long start, final long end, final InputStream is) throws FileSystemException { super(is); if (!fo.getFileSystem().hasCapability(Capability.RANDOM_ACCESS_READ)) { throw new FileSystemException("vfs.util/missing-capability.error...
return end > -1 && (start + pos) >= end;
return fileEnd > -1 && (getFilePosition() >= fileEnd);
private boolean checkEnd() { return end > -1 && (start + pos) >= end; }
rac.seek(this.fileStart+start); return new SharedRandomContentInputStream(fo, this.fileStart+start, start, end, rac.getInputStream());
rac.seek(newFileStart); return new SharedRandomContentInputStream( fo, newFileStart, newFileEnd, rac.getInputStream());
public InputStream newStream(long start, long end) { try { RandomAccessContent rac = fo.getContent().getRandomAccessContent(RandomAccessMode.READ); rac.seek(this.fileStart+start); return new SharedRandomContentInputStream(fo, this.fileStart+start, start, end, rac.getInputStream()); } catch (IOException e) {...
if (fileEnd > -1 && calcFilePosition(n) > fileEnd) { n = fileEnd - getFilePosition(); }
public synchronized long skip(long n) throws IOException { if (checkEnd()) { return -1; } long nskip = super.skip(n); pos+=nskip; resetCount+=nskip; return nskip; }
} else if (n<' ') { if (previousChar==' ' || previousChar=='\n') {
} else if (n <= ' ') { if (previousChar == ' ' || previousChar == '\n') {
private int readNormalizedChar() throws IOException { for (int n;(n = reader.read())>=0;) { if (!keepFormat) { //Normalize char \r,\n->\n ; any whitespace transformed to space //If previous char was also a whitespace - this char is ignored if (n=='\n'...
getContentPane().add(logoLabel, BorderLayout.CENTER); JLabel versionInfoLabel = new JLabel("Beta Version: " + DODDLE.VERSION); versionInfoLabel.setFont(versionInfoLabel.getFont().deriveFont(Font.PLAIN, 14)); JLabel copyRightLabel = new JLabel("Copyright (C) 2004-2006 MMM Project"); copyRightLabel.setFont(versionInfoLab...
JEditorPane editor = new JEditorPane("text/html", ""); editor.addHyperlinkListener(this); editor.setEditable(false); StringBuilder builder = new StringBuilder(); builder.append("<font face=TimesNewRoman>"); builder.append("Beta Version: " + DODDLE.VERSION + "<br>"); builder.append("Copyright (C) 2004-2006 MMM Project<b...
public SplashWindow() { ImageIcon logo = Utils.getImageIcon("doddle_splash.png"); JLabel logoLabel = new JLabel(logo); getContentPane().add(logoLabel, BorderLayout.CENTER); JLabel versionInfoLabel = new JLabel("Beta Version: " + DODDLE.VERSION); versionInfoLabel.setFont(versionInf...
JPanel infoPanel = new JPanel(); infoPanel.setBorder(BorderFactory.createLineBorder(Color.black)); infoPanel.setLayout(new GridLayout(3, 1)); infoPanel.add(versionInfoLabel); infoPanel.add(copyRightLabel); infoPanel.add(urlLabel); getContentPane().add(infoPanel, BorderLayout.SOUTH);
JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.setBorder(BorderFactory.createLineBorder(Color.black)); panel.add(logoLabel, BorderLayout.CENTER); panel.add(editor, BorderLayout.SOUTH); getContentPane().add(panel);
public SplashWindow() { ImageIcon logo = Utils.getImageIcon("doddle_splash.png"); JLabel logoLabel = new JLabel(logo); getContentPane().add(logoLabel, BorderLayout.CENTER); JLabel versionInfoLabel = new JLabel("Beta Version: " + DODDLE.VERSION); versionInfoLabel.setFont(versionInf...