rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
FileObject folder = m_baseFolder.resolveFile( "dir1" );
FileObject folder = baseFolder.resolveFile( "dir1" );
public void testNoContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getContent().getInputStream(); fail(); } catch( FileSystemException e ) { as...
FileObject unknownFile = m_baseFolder.resolveFile( "unknown-file" );
FileObject unknownFile = baseFolder.resolveFile( "unknown-file" );
public void testNoContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getContent().getInputStream(); fail(); } catch( FileSystemException e ) { as...
FileObject folder = m_baseFolder.resolveFile( "dir1" );
FileObject folder = baseFolder.resolveFile( "dir1" );
public void testNoURLContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getURL().openConnection().getInputStream(); fail(); } catch( IOException e ) { ...
FileObject unknownFile = m_baseFolder.resolveFile( "unknown-file" );
FileObject unknownFile = baseFolder.resolveFile( "unknown-file" );
public void testNoURLContent() throws Exception { // Try getting the content of a folder FileObject folder = m_baseFolder.resolveFile( "dir1" ); try { folder.getURL().openConnection().getInputStream(); fail(); } catch( IOException e ) { ...
FileObject folder = m_baseFolder.resolveFile( "dir1" );
FileObject folder = baseFolder.resolveFile( "dir1" );
public void testParent() throws FileSystemException { // Test when both exist FileObject folder = m_baseFolder.resolveFile( "dir1" ); FileObject child = folder.resolveFile( "file3.txt" ); assertTrue( "folder exists", folder.exists() ); assertTrue( "child exists", child.exists()...
folder = m_baseFolder.resolveFile( "unknown-folder" );
folder = baseFolder.resolveFile( "unknown-folder" );
public void testParent() throws FileSystemException { // Test when both exist FileObject folder = m_baseFolder.resolveFile( "dir1" ); FileObject child = folder.resolveFile( "file3.txt" ); assertTrue( "folder exists", folder.exists() ); assertTrue( "child exists", child.exists()...
final FileSystem fileSystem = m_baseFolder.getFileSystem();
final FileSystem fileSystem = baseFolder.getFileSystem();
public void testParent() throws FileSystemException { // Test when both exist FileObject folder = m_baseFolder.resolveFile( "dir1" ); FileObject child = folder.resolveFile( "file3.txt" ); assertTrue( "folder exists", folder.exists() ); assertTrue( "child exists", child.exists()...
m_manager.setBaseFile( m_baseFolder );
manager.setBaseFile( baseFolder );
public void testRelativeURI() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); // Locate the base dir FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file ); // Locate a child file = m_manager.res...
FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file );
FileObject file = manager.resolveFile( "." ); assertSame( "file object", baseFolder, file );
public void testRelativeURI() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); // Locate the base dir FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file ); // Locate a child file = m_manager.res...
file = m_manager.resolveFile( "some-child" ); assertSame( "file object", m_baseFolder, file.getParent() );
file = manager.resolveFile( "some-child" ); assertSame( "file object", baseFolder, file.getParent() );
public void testRelativeURI() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); // Locate the base dir FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file ); // Locate a child file = m_manager.res...
file = m_manager.resolveFile( "some-folder/some-file" ); assertSame( "file object", m_baseFolder, file.getParent().getParent() );
file = manager.resolveFile( "some-folder/some-file" ); assertSame( "file object", baseFolder, file.getParent().getParent() );
public void testRelativeURI() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); // Locate the base dir FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file ); // Locate a child file = m_manager.res...
file = m_manager.resolveFile( ".." ); assertSame( "file object", m_baseFolder.getParent(), file );
file = manager.resolveFile( ".." ); assertSame( "file object", baseFolder.getParent(), file );
public void testRelativeURI() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); // Locate the base dir FileObject file = m_manager.resolveFile( "." ); assertSame( "file object", m_baseFolder, file ); // Locate a child file = m_manager.res...
m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath();
manager.setBaseFile( baseFolder ); final String path = baseFolder.getName().getPath();
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" );
FileObject file = manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
file = m_manager.resolveFile( "%2e" );
file = manager.resolveFile( "%2e" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
file = m_manager.resolveFile( "a%25" );
file = manager.resolveFile( "a%25" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
file = m_manager.resolveFile( "dir%2fchild" );
file = manager.resolveFile( "dir%2fchild" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
file = m_manager.resolveFile( "dir%5cchild" );
file = manager.resolveFile( "dir%5cchild" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
m_manager.resolveFile( "%" );
manager.resolveFile( "%" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
m_manager.resolveFile( "%5" );
manager.resolveFile( "%5" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
m_manager.resolveFile( "%q" );
manager.resolveFile( "%q" );
public void testRelativeUriEncoding() throws Exception { // Build base dir m_manager.setBaseFile( m_baseFolder ); final String path = m_baseFolder.getName().getPath(); // Encode "some file" FileObject file = m_manager.resolveFile( "%73%6f%6d%65%20%66%69%6c%65" ); assertE...
FileObject file = m_baseFolder.resolveFile( "file1.txt" );
FileObject file = baseFolder.resolveFile( "file1.txt" );
public void testReuse() throws Exception { // Get the test file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); assertEquals( FileType.FILE, file.getType() ); // Get the file content FileContent content = file.getContent(); assertSameContent( m_charContent, co...
assertSameContent( m_charContent, content );
assertSameContent( charContent, content );
public void testReuse() throws Exception { // Get the test file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); assertEquals( FileType.FILE, file.getType() ); // Get the file content FileContent content = file.getContent(); assertSameContent( m_charContent, co...
final FileName rootName = m_baseFolder.getFileSystem().getRoot().getName();
final FileName rootName = baseFolder.getFileSystem().getRoot().getName();
public void testRootFileName() throws Exception { // Locate the root file final FileName rootName = m_baseFolder.getFileSystem().getRoot().getName(); // Test that the root path is "/" assertEquals( "root path", "/", rootName.getPath() ); // Test that the root basname is "" ...
assertSameStructure( m_baseFolder, baseInfo );
assertSameStructure( baseFolder, baseInfo );
public void testStructure() throws Exception { final FileInfo baseInfo = buildExpectedStructure(); assertSameStructure( m_baseFolder, baseInfo ); }
FileObject file = m_baseFolder.resolveFile( "file1.txt" );
FileObject file = baseFolder.resolveFile( "file1.txt" );
public void testType() throws Exception { // Test a file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); assertSame( FileType.FILE, file.getType() ); // Test a folder file = m_baseFolder.resolveFile( "dir1" ); assertSame( FileType.FOLDER, file.getType() ); ...
file = m_baseFolder.resolveFile( "dir1" );
file = baseFolder.resolveFile( "dir1" );
public void testType() throws Exception { // Test a file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); assertSame( FileType.FILE, file.getType() ); // Test a folder file = m_baseFolder.resolveFile( "dir1" ); assertSame( FileType.FOLDER, file.getType() ); ...
file = m_baseFolder.resolveFile( "unknown-child" );
file = baseFolder.resolveFile( "unknown-child" );
public void testType() throws Exception { // Test a file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); assertSame( FileType.FILE, file.getType() ); // Test a folder file = m_baseFolder.resolveFile( "dir1" ); assertSame( FileType.FOLDER, file.getType() ); ...
FileObject file = m_baseFolder.resolveFile( "some-dir/" );
FileObject file = baseFolder.resolveFile( "some-dir/" );
public void testURL() throws Exception { FileObject file = m_baseFolder.resolveFile( "some-dir/" ); URL url = file.getURL(); assertEquals( file.getName().getURI(), url.toExternalForm() ); URL parentURL = new URL( url, ".." ); assertEquals( m_baseFolder.getURL(), parentURL ); ...
assertEquals( m_baseFolder.getURL(), parentURL );
assertEquals( baseFolder.getURL(), parentURL );
public void testURL() throws Exception { FileObject file = m_baseFolder.resolveFile( "some-dir/" ); URL url = file.getURL(); assertEquals( file.getName().getURI(), url.toExternalForm() ); URL parentURL = new URL( url, ".." ); assertEquals( m_baseFolder.getURL(), parentURL ); ...
FileObject file = m_baseFolder.resolveFile( "file1.txt" );
FileObject file = baseFolder.resolveFile( "file1.txt" );
public void testURLContent() throws Exception { // Test non-empty file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); URLConnection urlCon = file.getURL().openConnection(); assertSameURLContent( m_charContent, urlCon ); // Test empty file file = m_baseFolder....
assertSameURLContent( m_charContent, urlCon );
assertSameURLContent( charContent, urlCon );
public void testURLContent() throws Exception { // Test non-empty file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); URLConnection urlCon = file.getURL().openConnection(); assertSameURLContent( m_charContent, urlCon ); // Test empty file file = m_baseFolder....
file = m_baseFolder.resolveFile( "empty.txt" );
file = baseFolder.resolveFile( "empty.txt" );
public void testURLContent() throws Exception { // Test non-empty file FileObject file = m_baseFolder.resolveFile( "file1.txt" ); URLConnection urlCon = file.getURL().openConnection(); assertSameURLContent( m_charContent, urlCon ); // Test empty file file = m_baseFolder....
final FileObject[] objects = { m_baseFolder };
final FileObject[] objects = { baseFolder };
public void testVFSClassLoader() throws Exception { final FileObject[] objects = { m_baseFolder }; VFSClassLoader loader = new VFSClassLoader( objects, m_manager ); Class testClass = loader.loadClass( "code.ClassToLoad" ); assertTrue( verifyPackage( testClass.getPackage() )...
new VFSClassLoader( objects, m_manager );
new VFSClassLoader( objects, manager );
public void testVFSClassLoader() throws Exception { final FileObject[] objects = { m_baseFolder }; VFSClassLoader loader = new VFSClassLoader( objects, m_manager ); Class testClass = loader.loadClass( "code.ClassToLoad" ); assertTrue( verifyPackage( testClass.getPackage() )...
assertSameURLContent( m_charContent, urlCon );
assertSameURLContent( charContent, urlCon );
public void testVFSClassLoader() throws Exception { final FileObject[] objects = { m_baseFolder }; VFSClassLoader loader = new VFSClassLoader( objects, m_manager ); Class testClass = loader.loadClass( "code.ClassToLoad" ); assertTrue( verifyPackage( testClass.getPackage() )...
} UserAuthenticator proxyAuth = HttpFileSystemConfigBuilder.getInstance().getProxyAuthenticator(fileSystemOptions); if (proxyAuth != null) { UserAuthenticationData authData = UserAuthenticatorUtils.authenticate(proxyAuth, new UserAuthenticationData.Type[] { UserAuthenticationData.USERNAME, UserAuthenticationData.PASSW...
public static HttpClient createConnection(String hostname, int port, String username, String password, FileSystemOptions fileSystemOptions) throws FileSystemException { HttpClient client; try { client = new HttpClient(new MultiThreadedHttpConnectionManager()); final Hos...
state.setIntersection(this, 0, (float) (u * inv_det), (float) (v * inv_det));
state.setIntersection(this, this.t / 3, (float) (u * inv_det), (float) (v * inv_det));
public void intersect(Ray r, IntersectionState state) { int a, b, c; if (mesh.triangles == null) { a = 3 * (t + 0); b = 3 * (t + 1); c = 3 * (t + 2); } else { a = 3 * mesh.triangles[t + 0]; b = 3 * mesh.t...
mesh.prepareShadingState(null, t / 3, state);
mesh.prepareShadingState(state);
public void prepareShadingState(ShadingState state) { mesh.prepareShadingState(null, t / 3, state); }
state.setIntersection(this, 0, u, v);
state.setIntersection(this, flags >>> 2, u, v);
public void intersect(Ray r, IntersectionState state) { switch (flags & 3) { case 0: { float det = 1.0f / (r.dx + nu * r.dy + nv * r.dz); float t = (nd - r.ox - nu * r.oy - nv * r.oz) * det; if (!r.isInside(t)) ...
Mesh.this.prepareShadingState(null, flags >>> 2, state);
Mesh.this.prepareShadingState(state);
public void prepareShadingState(ShadingState state) { Mesh.this.prepareShadingState(null, flags >>> 2, state); }
int nTriangles = numPrimitives();
int nTriangles = getNumPrimitives();
public void init(SunflowAPI api) { if (points == null) UI.printWarning("[TRI] Incomplete mesh, cannot initialize"); else { int nTriangles = numPrimitives(); if (smallTriangles) { for (int i = 0; i < nTriangles; i++) api.primitive(new S...
public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) {
public void intersectPrimitive(Ray r, int primID, IntersectionState state) {
public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // ray-triangle intersection here int a, b, c, tri = primID * 3; if (triangles == null) { a = 3 * (tri + 0); b = 3 * (tri + 1); c = 3 * (tri + 2); } else { ...
state.setIntersection(parent, primID, (float) (u * inv_det), (float) (v * inv_det));
state.setIntersection(primID, (float) (u * inv_det), (float) (v * inv_det));
public void intersectPrimitive(Ray r, Instance parent, int primID, IntersectionState state) { // ray-triangle intersection here int a, b, c, tri = primID * 3; if (triangles == null) { a = 3 * (tri + 0); b = 3 * (tri + 1); c = 3 * (tri + 2); } else { ...
public void prepareShadingState(Instance parent, int primID, ShadingState state) {
public void prepareShadingState(ShadingState state) {
public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); float u = state.getU(); float v = state.getV(); float w = 1 - u - v; state.getRay().getPoint(state.getPoint()); int tri = 3 * primID; int index0 = tri + 0, index1 = tri +...
Instance parent = (state.getObject() instanceof Instance) ? (Instance) state.getObject() : null; int primID = state.getPrimitiveID();
public void prepareShadingState(Instance parent, int primID, ShadingState state) { state.init(); float u = state.getU(); float v = state.getV(); float w = 1 - u - v; state.getRay().getPoint(state.getPoint()); int tri = 3 * primID; int index0 = tri + 0, index1 = tri +...
return "OnErrorEl{" + "type=" + type + ", message=" + message + ", codes=" + codes + ", retry=" + retry + '}';
StringBuilder res = new StringBuilder("OnError{"); if (type!=null) { res.append("type=").append(type).append(", "); } if (message!=null) { res.append("message=").append(message).append(", "); } if (codes!=null) { res.append("codes=").append(codes).append(", "); } res.append("retry=").append(retry).append('}'); return ...
public String toString() { return "OnErrorEl{" + "type=" + type + ", message=" + message + ", codes=" + codes + ", retry=" + retry + '}'; }
public void setContextClassloader(int contextClassloader) { if (!CL_OPTIONS.getValues(null).contains(new Integer(contextClassloader))) throw new IllegalArgumentException("illegal constant:" + contextClassloader);
public void setContextClassloader(String classloaderManagementOption) { if (classloaderManagementOption == null) throw new IllegalArgumentException("non-null argument required");
public void setContextClassloader(int contextClassloader) { if (!CL_OPTIONS.getValues(null).contains(new Integer(contextClassloader))) throw new IllegalArgumentException("illegal constant:" + contextClassloader); this.contextClassloader = contextClassloader; }
this.contextClassloader = contextClassloader;
this.contextClassloader = CL_OPTIONS.asNumber(classloaderManagementOption.replace("-", "_")).intValue();
public void setContextClassloader(int contextClassloader) { if (!CL_OPTIONS.getValues(null).contains(new Integer(contextClassloader))) throw new IllegalArgumentException("illegal constant:" + contextClassloader); this.contextClassloader = contextClassloader; }
iwModel.setIsSystemAdded(true);
public void initDataWithMem(Set<String> wordSet) { clearData(); Set<String> matchedWordSet = new HashSet<String>(); for (String word : wordSet) { InputWordModel iwModel = setInputWord(word, project); if (iwModel != null) { matchedWordSet.add(iwModel.getMatch...
return read(b, off, len);
int retLen = Math.min(len, getLeftBytes()); RamFileRandomAccessContent.this.readFully(b, off, retLen); return retLen; } public int available() throws IOException { return getLeftBytes();
public RamFileRandomAccessContent(RamFileObject file, RandomAccessMode mode) { super(); this.buf = file.getData().getBuffer(); this.file = file; this.mode = mode; rafis = new InputStream() { public int read() throws IOException { try { return readByte(); } catch (EOFException e) { retu...
m_manager.addProvider( "jar", new JarFileSystemProvider() ); return m_manager.resolveFile( uri );
getManager().addProvider( "jar", new JarFileSystemProvider() ); return getManager().resolveFile( uri );
protected FileObject getBaseFolder() throws Exception { File jarFile = getTestResource( "test.jar" ); String uri = "jar:" + jarFile.getAbsolutePath() + "!basedir"; m_manager.addProvider( "jar", new JarFileSystemProvider() ); return m_manager.resolveFile( uri ); }
Translator.getString("DisambiguationPanel.PartialMatchOption.Construction"), true);
Translator.getString("DisambiguationPanel.PartialMatchOption.Construction"), false);
PartialMatchedOptionPanel() { constructionBox = new JCheckBox( Translator.getString("DisambiguationPanel.PartialMatchOption.Construction"), true); constructionBox.addActionListener(this); trimmingBox = new JCheckBox(Translator.getString("DisambiguationPanel.Pa...
trimmingBox = new JCheckBox(Translator.getString("DisambiguationPanel.PartialMatchOption.Trimming"), true);
trimmingBox = new JCheckBox(Translator.getString("DisambiguationPanel.PartialMatchOption.Trimming"), false); trimmingBox.setEnabled(false);
PartialMatchedOptionPanel() { constructionBox = new JCheckBox( Translator.getString("DisambiguationPanel.PartialMatchOption.Construction"), true); constructionBox.addActionListener(this); trimmingBox = new JCheckBox(Translator.getString("DisambiguationPanel.Pa...
.getString("DisambiguationPanel.PartialMatchOption.AddAbstractConcept"), true);
.getString("DisambiguationPanel.PartialMatchOption.AddAbstractConcept"), false); addAbstractConceptBox.setEnabled(false);
PartialMatchedOptionPanel() { constructionBox = new JCheckBox( Translator.getString("DisambiguationPanel.PartialMatchOption.Construction"), true); constructionBox.addActionListener(this); trimmingBox = new JCheckBox(Translator.getString("DisambiguationPanel.Pa...
public boolean isWriteable()
public boolean isWriteable() throws FileSystemException
public boolean isWriteable() { return false; }
if ((e.getModifiersEx() & MouseEvent.CTRL_DOWN_MASK) == MouseEvent.CTRL_DOWN_MASK)
if ((e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK)
public void mousePressed(MouseEvent e) { mx = e.getX(); my = e.getY(); switch (e.getButton()) { case MouseEvent.BUTTON1: dragging = true; zooming = false; break; case MouseEvent.BUTTON2: { ...
return new URL(UriParser.extractScheme(name.getURI(), buf), null, -1,
return new URL(UriParser.extractScheme(name.getURI(), buf), "", -1,
public URL getURL() throws FileSystemException { final StringBuffer buf = new StringBuffer(); try { return (URL) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws MalformedURLException { ...
return new URL(UriParser.extractScheme(name.getURI(), buf), null, -1,
return new URL(UriParser.extractScheme(name.getURI(), buf), "", -1,
public Object run() throws MalformedURLException { return new URL(UriParser.extractScheme(name.getURI(), buf), null, -1, buf.toString(), new DefaultURLStreamHandler(fs.getContext(), fs.getFileSystemOptions())); }
public CompoundRichLocation(ComparableTerm term, Collection members) { if (term==null) throw new IllegalArgumentException("Term cannot be null"); if (members==null || members.size()<2) throw new IllegalArgumentException("Must have at least two members"); if (RichLocation.Tools.isMultiSource(members)) throw new IllegalA...
public CompoundRichLocation(Collection members) { this(getJoinTerm(), members); }
public CompoundRichLocation(ComparableTerm term, Collection members) { if (term==null) throw new IllegalArgumentException("Term cannot be null"); if (members==null || members.size()<2) throw new IllegalArgumentException("Must have at least two members"); if (RichLocation.Tools.isMultiSource(...
JPanel p1 = new JPanel(); p1.add(automaticDisAmbiguationButton);
public DisambiguationPanel(ConstructClassPanel tp, ConstructPropertyPanel pp, DODDLEProject p) { project = p; constructClassPanel = tp; constructPropertyPanel = pp; inputModule = new InputModule(project); wordCorrespondConceptSetMap = new HashMap<String, Set<Concept>>(); co...
JPanel p2 = new JPanel(); p2.add(constructNounTreeButton); p2.add(constructNounAndVerbTreeButton);
public DisambiguationPanel(ConstructClassPanel tp, ConstructPropertyPanel pp, DODDLEProject p) { project = p; constructClassPanel = tp; constructPropertyPanel = pp; inputModule = new InputModule(project); wordCorrespondConceptSetMap = new HashMap<String, Set<Concept>>(); co...
buttonPanel.setLayout(new BorderLayout()); buttonPanel.add(p1, BorderLayout.WEST); buttonPanel.add(p2, BorderLayout.EAST);
buttonPanel.setLayout(new GridLayout(2, 1)); buttonPanel.add(constructNounTreeButton); buttonPanel.add(constructNounAndVerbTreeButton); JPanel optionPanel = new JPanel(); optionPanel.add(constructionTypePanel); optionPanel.add(perfectMatchedOptionPanel); optionPanel.add(partialMatchedOptionPanel); optionPanel.add(butt...
public DisambiguationPanel(ConstructClassPanel tp, ConstructPropertyPanel pp, DODDLEProject p) { project = p; constructClassPanel = tp; constructPropertyPanel = pp; inputModule = new InputModule(project); wordCorrespondConceptSetMap = new HashMap<String, Set<Concept>>(); co...
add(buttonPanel, BorderLayout.SOUTH);
add(southPanel, BorderLayout.SOUTH);
public DisambiguationPanel(ConstructClassPanel tp, ConstructPropertyPanel pp, DODDLEProject p) { project = p; constructClassPanel = tp; constructPropertyPanel = pp; inputModule = new InputModule(project); wordCorrespondConceptSetMap = new HashMap<String, Set<Concept>>(); co...
if (wordSet == null) { wordSet = new HashSet<String>(); }
public void addInputWordSet(Set<String> ws) { wordSet.addAll(ws); if (DODDLE.IS_USING_DB) { inputModule.initDataWithDB(wordSet); } else { inputModule.initDataWithMem(wordSet); } initWordList(); }
wordListPanel.add(new EditPanel(), BorderLayout.SOUTH);
private JPanel getWordListPanel() { JPanel perfectMatchedWordListPanel = getPerfectMatchedWordListPanel(); JPanel partialMatchedWordListPanel = getPartialMatchedWordListPanel(); wordListTabbedPane = new JTabbedPane(); wordListTabbedPane.add(Translator.getString("DisambiguationPanel.Perfe...
TreeModel model = constructClassPanel.getDefaultConceptTreeModel(pathToRootSet);
TreeModel model = constructClassPanel.getDefaultConceptTreeModel(pathToRootSet, ConceptTreeMaker.DODDLE_CLASS_ROOT_ID);
private void selectCorrectConcept(JList wordJList) { if (!wordJList.isSelectionEmpty() && !conceptSetJList.isSelectionEmpty()) { InputWordModel iwModel = (InputWordModel) wordJList.getSelectedValue(); Object[] evalConcepts = conceptSetJList.getSelectedValues(); String word = ...
if (correspondConceptSet == null) { correspondConceptSet = new HashSet<Concept>(); }
public Set<Concept> setInputConceptSet() { inputConceptSet = new HashSet<Concept>(); for (InputWordModel iwModel : inputWordModelSet) { Set<Concept> correspondConceptSet = wordCorrespondConceptSetMap.get(iwModel.getWord()); if (correspondConceptSet.size() == 0) { i...
if (stream != null) stream.close();
stream.close();
protected void postProcessBundleContext(BundleContext context) throws Exception { log.debug("post processing: creating test bundle"); // create the actual jar createJar(); if (log.isTraceEnabled()) log.trace("created jar " + dumpJarContent(new JarInputStream(new FileInputStream(tempFile)))); log.debug("installi...
costingNanos = 0; pickingNanos = 0; splitedNanos = 0; nodeingNanos = 0;
public boolean build(final ArrayList<BoundedPrimitive> objects) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); ...
buildTree(bounds.getMinimum().x, bounds.getMaximum().x, bounds.getMinimum().y, bounds.getMaximum().y, bounds.getMinimum().z, bounds.getMaximum().z, task, 1, tempTree, 0, tempList);
BuildStats stats = new BuildStats(); buildTree(bounds.getMinimum().x, bounds.getMaximum().x, bounds.getMinimum().y, bounds.getMaximum().y, bounds.getMinimum().z, bounds.getMaximum().z, task, 1, tempTree, 0, tempList, stats);
public boolean build(final ArrayList<BoundedPrimitive> objects) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); ...
int numNodes = numNodes(0); int numLeaves = numLeaves(0); int numObjects = numObjects(0); UI.printInfo("[KDT] KDTree stats:"); UI.printInfo("[KDT] * Nodes: %d", numNodes); UI.printInfo("[KDT] * Leaves: %d", numLeaves); UI.printInfo("[KDT] * Objects: min %d", minObjects(0)); UI.printInfo("[KDT]...
stats.printStats();
public boolean build(final ArrayList<BoundedPrimitive> objects) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); ...
UI.printInfo("[KDT] Cost time: (%3d%%) %s", 100 * costingNanos / t.nanos(), Timer.toString(costingNanos)); UI.printInfo("[KDT] Pick time: (%3d%%) %s", 100 * pickingNanos / t.nanos(), Timer.toString(pickingNanos)); UI.printInfo("[KDT] Split time: (%3d%%) %s", 100 * splitedNanos / t.nanos(), Tim...
public boolean build(final ArrayList<BoundedPrimitive> objects) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); ...
int maxN = maxObjects(0);
int maxN = stats.maxObjects;
public boolean build(final ArrayList<BoundedPrimitive> objects) { UI.printInfo("[KDT] KDTree settings"); UI.printInfo("[KDT] * Max Leaf Size: %d", maxPrims); UI.printInfo("[KDT] * Max Depth: %d", MAX_DEPTH); UI.printInfo("[KDT] * Traversal cost: %.2f", TRAVERSAL_COST); ...
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) {
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList, BuildStats stats) {
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
costingNanos -= System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
costingNanos += System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
pickingNanos -= System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
pickingNanos += System.nanoTime(); splitedNanos -= System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
splitedNanos += System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
nodeingNanos -= System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
nodeingNanos += System.nanoTime();
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(minx, bestSplit, miny, maxy, minz, maxz, taskL, depth + 1, tempTree, nextOffset, tempList);
buildTree(minx, bestSplit, miny, maxy, minz, maxz, taskL, depth + 1, tempTree, nextOffset, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(bestSplit, maxx, miny, maxy, minz, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList);
buildTree(bestSplit, maxx, miny, maxy, minz, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(minx, maxx, miny, bestSplit, minz, maxz, taskL, depth + 1, tempTree, nextOffset, tempList);
buildTree(minx, maxx, miny, bestSplit, minz, maxz, taskL, depth + 1, tempTree, nextOffset, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(minx, maxx, bestSplit, maxy, minz, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList);
buildTree(minx, maxx, bestSplit, maxy, minz, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(minx, maxx, miny, maxy, minz, bestSplit, taskL, depth + 1, tempTree, nextOffset, tempList);
buildTree(minx, maxx, miny, maxy, minz, bestSplit, taskL, depth + 1, tempTree, nextOffset, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
buildTree(minx, maxx, miny, maxy, bestSplit, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList);
buildTree(minx, maxx, miny, maxy, bestSplit, maxz, taskR, depth + 1, tempTree, nextOffset + 2, tempList, stats);
private void buildTree(float minx, float maxx, float miny, float maxy, float minz, float maxz, BuildTask task, int depth, IntArray tempTree, int offset, ArrayList<BoundedPrimitive> tempList) { // get node bounding box extents if (task.numObjects > maxPrims && depth < MAX_DEPTH) { float dx =...
final String port,
final int port,
private FtpFileName( final String scheme, final String hostName, final String port, final String userInfo, final String userName, final String password, final String path )...
public String getDefaultPort()
public int getDefaultPort()
public String getDefaultPort() { return "21"; }
return "21";
return 21;
public String getDefaultPort() { return "21"; }
if (isSystemAdded() && project.isPerfectMatchedSystemAddedWordCheckBox()) { buf.append(" (added)"); }
public String toString() { StringBuffer buf = new StringBuffer(inputWord); if (isPartialMatchWord() && project.isPartialMatchedComplexWordCheckBox()) { buf.append(" " + wordListStr); } if (isPartialMatchWord() && project.isPartialMatchedMatchedWordBox()) { buf.appen...
StringBuffer buf = new StringBuffer(80); String scheme = UriParser.extractScheme(uri, buf);
final URL url = new URL(uri);
public FileObject findFile(final FileObject baseFile, final String uri, final FileSystemOptions fileSystemOptions) throws FileSystemException { try { StringBuffer buf = new StringBuffer(80); String scheme = Uri...
final URL url; if ("res".equals(scheme)) { String resourceName = buf.toString(); ClassLoader cl = UrlFileSystemConfigBuilder.getInstance().getClassLoader(fileSystemOptions); if (cl == null) { cl = getClass().getClassLoader(); } url = cl.getResource(resourceName); if (url == null) { throw new FileSystemException("vfs....
URL rootUrl = new URL(url, "/");
public FileObject findFile(final FileObject baseFile, final String uri, final FileSystemOptions fileSystemOptions) throws FileSystemException { try { StringBuffer buf = new StringBuffer(80); String scheme = Uri...
return UrlFileSystemConfigBuilder.getInstance();
return org.apache.commons.vfs.provider.res.ResourcelFileSystemConfigBuilder.getInstance();
public FileSystemConfigBuilder getConfigBuilder() { return UrlFileSystemConfigBuilder.getInstance(); }
assertTrue( verifyPackage( testClass.getPackage() ) );
public void testVFSClassLoader() throws Exception { final FileObject[] objects = { m_baseFolder }; VFSClassLoader loader = new VFSClassLoader( objects, m_manager ); Class testClass = loader.loadClass( "code.ClassToLoad" ); Object testObject = testClass.newInstance(); ...
localMavenArtifact("org.springframework.osgi", "spring-jmx", "2.1-SNAPSHOT"), localMavenArtifact("org.knopflerfish.bundles", "commons-logging_all", "2.0.0"),
localMavenArtifact("org.springframework.osgi", "spring-jmx", "2.1-SNAPSHOT"),
protected String[] getBundleLocations() { return new String[]{ localMavenArtifact("org.springframework.osgi", "aopalliance.osgi", "1.0-SNAPSHOT"), localMavenArtifact("org.springframework.osgi", "commons-collections.osgi", "3.2-SNAPSHOT"), localMavenArtifact("org.s...
if (!this.getType().equals(FileType.FOLDER))
if (!this.getType().hasChildren())
void addChild(RamFileData data) throws FileSystemException { if (!this.getType().equals(FileType.FOLDER)) { throw new FileSystemException( "A child can only be added in a folder"); } if (data == null) { throw new FileSystemException("No child can be null"); } if (this.children.contains(data)) { throw...
if (!this.getType().equals(FileType.FOLDER))
if (!this.getType().hasChildren())
void removeChild(RamFileData data) throws FileSystemException { if (!this.getType().equals(FileType.FOLDER)) { throw new FileSystemException( "A child can only be removed from a folder"); } if (!this.children.contains(data)) { throw new FileSystemException("Child not found. " + data); } this.children.re...
InputWordModel iwModel = setInputWord(word, project);
InputWordModel iwModel = makeInputWordModel(word, wordConceptSetMap);
public void initDataWithMem(Set<String> wordSet) { clearData(); Set<String> matchedWordSet = new HashSet<String>(); for (String word : wordSet) { InputWordModel iwModel = setInputWord(word, project); if (iwModel != null) { matchedWordSet.add(iwModel.getMatch...