rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
UI.printInfo("[SCN] * Infinite Primitives: %d", infiniteInstanceList.getNumPrimitives());
UI.printInfo("[SCN] * Infinite instances: %d", infiniteInstanceList.getNumPrimitives());
public void render(ImageSampler sampler, Display display) { if (display == null) display = new FrameDisplay(); if (camera == null) { UI.printError("[SCN] No camera found"); return; } // limit resolution to 16k imageWidth = MathUtils.clamp(imageWidt...
UI.printInfo("[SCN] * Primitives: %d", numPrimitives);
public void render(ImageSampler sampler, Display display) { if (display == null) display = new FrameDisplay(); if (camera == null) { UI.printError("[SCN] No camera found"); return; } // limit resolution to 16k imageWidth = MathUtils.clamp(imageWidt...
parent = (AbstractFileObject) fs.getFileFromCache(parentName);
parent = fs.getFileFromCache(parentName);
private void notifyParent(FileName childName, FileType newType) throws Exception { if (parent == null) { FileName parentName = name.getParent(); if (parentName != null) { // Locate the parent, if it is cached parent = (AbstractFileObjec...
public FileName resolveName(final FileName root, String name, NameScope scope) throws FileSystemException;
public FileName resolveName(final FileName root, final String name) throws FileSystemException;
public FileName resolveName(final FileName root, String name, NameScope scope) throws FileSystemException;
public BasicFileName( final FileName rootUri, final String path )
public BasicFileName( final String rootUri, final String path )
public BasicFileName( final FileName rootUri, final String path ) { this( rootUri.getScheme(), rootUri.getURI(), path ); }
this( rootUri.getScheme(), rootUri.getURI(), path );
this( UriParser.extractScheme( rootUri ), rootUri, path );
public BasicFileName( final FileName rootUri, final String path ) { this( rootUri.getScheme(), rootUri.getURI(), path ); }
writer.write("doc," + doc.getFile().getName() + "," + doc.getLang() + "\n");
writer.write("doc," + getTextFileName(doc.getFile().getName()) + "," + doc.getLang() + "\n");
public void saveDocumentInfo(File saveDir) { File docInfo = new File(saveDir, "docInfo.txt"); try { BufferedWriter writer = new BufferedWriter(new FileWriter(docInfo)); for (int i = 0; i < docList.getModel().getSize(); i++) { Document doc = (Document) docList.getMo...
writer.write("inputDoc," + doc.getFile().getName() + "," + doc.getLang() + "\n");
writer.write("inputDoc," + getTextFileName(doc.getFile().getName()) + "," + doc.getLang() + "\n");
public void saveDocumentInfo(File saveDir) { File docInfo = new File(saveDir, "docInfo.txt"); try { BufferedWriter writer = new BufferedWriter(new FileWriter(docInfo)); for (int i = 0; i < docList.getModel().getSize(); i++) { Document doc = (Document) docList.getMo...
File saveFile = new File(saveDir, doc.getFile().getName());
File saveFile = new File(saveDir, getTextFileName(doc.getFile().getName()));
private void saveFiles(JList list, File saveDir) { try { ListModel listModel = list.getModel(); for (int i = 0; i < listModel.getSize(); i++) { Document doc = (Document) listModel.getElementAt(i); File saveFile = new File(saveDir, doc.getFile().getName()); ...
public void putInputDoc(File doc) { isInputword = true; if (inputDocTermFreqMap.get(doc) != null) { Integer freq = (Integer) inputDocTermFreqMap.get(doc); inputDocTermFreqMap.put(doc, new Integer(freq.intValue() + 1)); } else { inputDocTermFreqMap.put(doc, new Integer(1)); }
public void putInputDoc(File doc, Integer num) { inputDocTermFreqMap.put(doc, num);
public void putInputDoc(File doc) { isInputword = true; if (inputDocTermFreqMap.get(doc) != null) { Integer freq = (Integer) inputDocTermFreqMap.get(doc); inputDocTermFreqMap.put(doc, new Integer(freq.intValue() + 1)); } else { inputDocTermFreqMap.put(doc, new I...
public void putDoc(File doc) { if (docTermFreqMap.get(doc) != null) { Integer freq = (Integer) docTermFreqMap.get(doc); docTermFreqMap.put(doc, new Integer(freq.intValue() + 1)); } else { docTermFreqMap.put(doc, new Integer(1)); }
public void putDoc(File doc, Integer num) { docTermFreqMap.put(doc, num);
public void putDoc(File doc) { if (docTermFreqMap.get(doc) != null) { Integer freq = (Integer) docTermFreqMap.get(doc); docTermFreqMap.put(doc, new Integer(freq.intValue() + 1)); } else { docTermFreqMap.put(doc, new Integer(1)); } }
final String fileName = name.getURI(); return new SmbFileObject( fileName, name, this );
return new SmbFileObject( name, this );
protected FileObject createFile( final FileName name ) throws FileSystemException { final String fileName = name.getURI(); return new SmbFileObject( fileName, name, this ); }
public void normalize() {
public final void normalize() {
public void normalize() { float XYZ = X + Y + Z; if (XYZ < 1e-6f) return; float s = 1 / XYZ; X *= s; Y *= s; Z *= s; }
multipleInheritanceUpperConceptJList.setModel(new DefaultListModel());
public void setMultipleInheritanceConceptSet(Set<Concept> multipleInheritanceConceptSet) { DefaultListModel listModel = new DefaultListModel(); for (Concept c : multipleInheritanceConceptSet) { listModel.addElement(c); } multipleInheritanceConceptJList....
trimmedNodeTree.setModel(new DefaultTreeModel(null));
public void setConceptDriftManagementResult() { mraList = new ArrayList<List<ConceptTreeNode>>(maker.getMRAresult()); traList = new ArrayList<ConceptTreeNode>(maker.getTRAresult()); rmMultipleInheritancePanel.setMultipleInheritanceConceptSet(maker.getMulipleInheritanceConceptSet()); setM...
private void calcEvalValueUsingSpreadActivatingAlgorithm(Map<Concept, EvalConcept> conceptEvalConceptMap) { Object[] allDisambiguationCandidate = conceptEvalConceptMap.keySet().toArray(); for (int i = 0; i < allDisambiguationCandidate.length; i++) { for (int j = i + 1; j < allDisambiguationCandidate.length; j++) { Conc...
private void calcEvalValueUsingSpreadActivatingAlgorithm(int i, Concept c1, EvalConcept ec1, Object[] allDisambiguationCandidate, Map<Concept, EvalConcept> conceptEvalConceptMap) { for (int j = i + 1; j < allDisambiguationCandidate.length; j++) { c1 = (Concept) allDisambiguationCandidate[i]; ec1 = conceptEvalConceptMap...
private void calcEvalValueUsingSpreadActivatingAlgorithm(Map<Concept, EvalConcept> conceptEvalConceptMap) { Object[] allDisambiguationCandidate = conceptEvalConceptMap.keySet().toArray(); for (int i = 0; i < allDisambiguationCandidate.length; i++) { for (int j = i + 1; j < a...
DODDLE.STATUS_BAR.addValue();
if (0 < ev) { ec1.setEvalValue(ec1.getEvalValue() + (1 / ev)); ec2.setEvalValue(ec2.getEvalValue() + (1 / ev)); }
private void calcEvalValueUsingSpreadActivatingAlgorithm(Map<Concept, EvalConcept> conceptEvalConceptMap) { Object[] allDisambiguationCandidate = conceptEvalConceptMap.keySet().toArray(); for (int i = 0; i < allDisambiguationCandidate.length; i++) { for (int j = i + 1; j < a...
private void calcEvalValueUsingSupSubSibConcepts(Map<Concept, EvalConcept> conceptEvalConceptMap) { for (Concept c : conceptEvalConceptMap.keySet()) { int evalValue = 0; if (OptionDialog.isCheckSupConcepts()) { evalValue += cntRelevantSupConcepts(c); } if (OptionDialog.isCheckSubConcepts()) { evalValue += cntRelevantSu...
private void calcEvalValueUsingSupSubSibConcepts(Concept c, EvalConcept ec) { int evalValue = 0; if (OptionDialog.isCheckSupConcepts()) { evalValue += cntRelevantSupConcepts(c);
private void calcEvalValueUsingSupSubSibConcepts(Map<Concept, EvalConcept> conceptEvalConceptMap) { for (Concept c : conceptEvalConceptMap.keySet()) { int evalValue = 0; if (OptionDialog.isCheckSupConcepts()) { evalValue += cntRelevantSupConcepts(c); ...
if (OptionDialog.isCheckSubConcepts()) { evalValue += cntRelevantSubConcepts(c); } if (OptionDialog.isCheckSiblingConcepts()) { evalValue += cntRelevantSiblingConcepts(c); } ec.setEvalValue(ec.getEvalValue() + evalValue);
private void calcEvalValueUsingSupSubSibConcepts(Map<Concept, EvalConcept> conceptEvalConceptMap) { for (Concept c : conceptEvalConceptMap.keySet()) { int evalValue = 0; if (OptionDialog.isCheckSupConcepts()) { evalValue += cntRelevantSupConcepts(c); ...
if (OptionDialog.isUsingSpreadActivatingAlgorithm()) { DODDLE.STATUS_BAR.initNormal(conceptEvalConceptMap.keySet().size() * 2); calcEvalValueUsingSpreadActivatingAlgorithm(conceptEvalConceptMap); } else { DODDLE.STATUS_BAR.initNormal(conceptEvalConceptMap.keySet().size());
DODDLE.STATUS_BAR.initNormal(conceptEvalConceptMap.keySet().size()); Object[] allDisambiguationCandidate = conceptEvalConceptMap.keySet().toArray(); for (int i = 0; i < allDisambiguationCandidate.length; i++) { Concept c = (Concept) allDisambiguationCandidate[i]; EvalConcept ec = conceptEvalConceptMap.get(c); if (Optio...
public void setWordEvalConceptSetMap(Set<InputWordModel> inputWordSet) { if (inputWordModelSet == null) { return; } wordSet = new HashSet<String>(); for (InputWordModel iwModel : perfectMatchedWordModelSet) { wordSet.add(iwModel.getWord()); } ...
calcEvalValueUsingSupSubSibConcepts(conceptEvalConceptMap);
public void setWordEvalConceptSetMap(Set<InputWordModel> inputWordSet) { if (inputWordModelSet == null) { return; } wordSet = new HashSet<String>(); for (InputWordModel iwModel : perfectMatchedWordModelSet) { wordSet.add(iwModel.getWord()); } ...
if (partialMatchedWordModelSet == null) { return 0; }
public int getPartialMatchedWordCnt() { return partialMatchedWordModelSet.size(); }
if (perfectMatchedWordModelSet == null) { return 0; }
public int getPerfectMatchedWordCnt() { return perfectMatchedWordModelSet.size(); }
return getFtpClient().completePendingCommand();
if (ftpClient != null) { return getFtpClient().completePendingCommand(); } return true;
public boolean completePendingCommand() throws IOException { return getFtpClient().completePendingCommand(); }
public PathTracingGIEngine(int samples) { this.samples = samples;
public PathTracingGIEngine(Options options) { samples = options.getInt("gi.path.samples", 16);
public PathTracingGIEngine(int samples) { this.samples = samples; }
final Logger l = Logger.getLogger(Logging.class.getPackage().getName());
final Logger l = Logger.getLogger("scriptella");
public static void configure() { final Logger l = Logger.getLogger(Logging.class.getPackage().getName()); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}");...
sb.append(err.getMessage());
public static void configure() { final Logger l = Logger.getLogger(Logging.class.getPackage().getName()); l.setLevel(Level.INFO); l.setUseParentHandlers(false); final ConsoleHandler h = new ConsoleHandler(); final MessageFormat f = new MessageFormat("{0,date} {0,time} <{1}> {2}");...
sb.append(err.getMessage());
public synchronized String format(final LogRecord record) { d.setTime(record.getMillis()); args[1] = record.getLevel().getLocalizedName(); args[2] = record.getMessage(); f.format(args, sb, null).toString(); final Throwable err = reco...
} else { ExceptionUtils.throwUnchecked(t); }
} ExceptionUtils.throwUnchecked(t);
private boolean onError(Throwable t, OnErrorHandler errorHandler, DynamicContext ctx) { OnErrorEl onErrorEl = errorHandler.onError(t); Connection con = ctx.getConnection(); DialectIdentifier dialectId = con.getDialectIdentifier(); if (onErrorEl != null) { //if error handler present for t...
return content.getContent(id);
ContentEl content = this.content.getContent(id); if (content==null) { return ContentEl.NULL_CONTENT; } else { return content; }
public Resource getContent(DialectIdentifier id) { return content.getContent(id); }
public StackNode[] getStack() {
public final StackNode[] getStack() {
public StackNode[] getStack() { return stack; }
public HashSequenceDB(String name) { this(IDMaker.byName, name);
public HashSequenceDB() { this(IDMaker.byName, null);
public HashSequenceDB(String name) { this(IDMaker.byName, name); }
if (deletedMethod == null) { return; } Method deleted; try { deleted = bean.getClass().getMethod(deletedMethod, new Class[]{String.class}); } catch (NoSuchMethodException e) { throw new IllegalStateException("Invalid or missing deleted method for bean " + reference + "; requires signature (java.lang.String)", e); }
if (deletedMethod == null) { return; } Method deleted; try { deleted = bean.getClass().getMethod(deletedMethod, new Class[]{String.class}); } catch (NoSuchMethodException e) { throw (IllegalStateException)new IllegalStateException("Invalid or missing deleted method for bean " + reference + "; requires signature (java.l...
void deleted(String instancePid) { if (deletedMethod == null) { return; } Method deleted; try { deleted = bean.getClass().getMethod(deletedMethod, new Class[]{String.class}); } catch (NoSuchMethodException e) { t...
try { deleted.invoke(bean, new Object[]{instancePid}); } catch (IllegalAccessException e) { throw new IllegalStateException("Insufficient permission to invoke deleted method", e); } catch (InvocationTargetException e) { throw new IllegalStateException("Error deleting", e.getTargetException()); } }
try { deleted.invoke(bean, new Object[]{instancePid}); } catch (IllegalAccessException e) { throw (IllegalStateException)new IllegalStateException("Insufficient permission to invoke deleted method").initCause(e); } catch (InvocationTargetException e) { throw (IllegalStateException)new IllegalStateException("Error delet...
void deleted(String instancePid) { if (deletedMethod == null) { return; } Method deleted; try { deleted = bean.getClass().getMethod(deletedMethod, new Class[]{String.class}); } catch (NoSuchMethodException e) { t...
bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { throw new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (java.lang.String, java.uti...
bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { throw (IllegalStateException)new IllegalArgumentException("Invalid or missing update method for bean " + reference + "; requires signature (jav...
void resolve(BeanFactory beanFactory, boolean isFactory) { bean = beanFactory.getBean(reference); if (isFactory) { try { bean.getClass().getMethod(updateMethod, new Class[]{String.class, Map.class}); } catch (NoSuchMethodException e) { ...
return params.getParameter(name);
Object res = cachedParams==null?null:cachedParams.get(name); if (res == null) { res = params.getParameter(name); if (res == null) { res = NULL; } if (isCacheable(res)) { if (cachedParams==null) { cachedParams=new HashMap<String, Object>(); } cachedParams.put(name, res); } } return res == NULL ? null : res;
public final Object getParameter(final String name) { if ("rownum".equals(name)) { //return current row number return rownum; } return params.getParameter(name); }
if (cachedParams != null) { cachedParams.clear(); }
void setParams(final ParametersCallback params) { this.params = params; }
LOG.fine("Query "+getLocation()+" process completed");
if (ctxDecorator.rownum == 0) { LOG.fine("Query " + getLocation() + " returned no results."); } else { LOG.fine("Query " + getLocation() + " processed."); }
public void execute(final DynamicContext ctx) { final Connection c = ctx.getConnection(); final Resource content = getContent(c.getDialectIdentifier()); if (content == ContentEl.NULL_CONTENT) { //skip queries without content return; } final QueryCtxDecorator ...
localMavenArtifact("org.knopflerfish.bundles", "commons-logging_all", "2.0.0"),
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...
while (testBundle.getState() == Bundle.STOPPING) { Thread.sleep(10); }
public void testLifecycle() throws Exception { assertNotSame("Guinea pig has already been shutdown", "true", System.getProperty("org.springframework.osgi.test.lifecycle.GuineaPig.close")); assertEquals("Guinea pig didn't startup", "true", System.getProperty("or...
public void addChangeListener(ChangeListener cl, ChangeType ct) { if (ct == null) { throw new NullPointerException("Since 1.2, listeners registered for the null changetype are not meaningful. Please register a listener for ChangeType.UNKNOWN instead"); } if(isUnchanging(ct)) { return; } synchronized(this) { growIfNe...
public void addChangeListener(ChangeListener cl) { addChangeListener(cl, ChangeType.UNKNOWN);
public void addChangeListener(ChangeListener cl, ChangeType ct) { if (ct == null) { throw new NullPointerException("Since 1.2, listeners registered for the null changetype are not meaningful. Please register a listener for ChangeType.UNKNOWN instead"); } if(isUnchanging(ct)) { return; } sync...
public void removeChangeListener(ChangeListener cl, ChangeType ct) { synchronized(this) { for(int i = 0; i < listenerCount; i++) { if( (listeners[i].get() == cl) && (types[i] == ct) ) { listenerCount--; System.arraycopy(listeners, i+1, listeners, i, (listenerCount - i)); System.arraycopy(types, i+1, types, i, (listener...
public void removeChangeListener(ChangeListener cl) { removeChangeListener(cl, ChangeType.UNKNOWN);
public void removeChangeListener(ChangeListener cl, ChangeType ct) { synchronized(this) { for(int i = 0; i < listenerCount; i++) { if( (listeners[i].get() == cl) && (types[i] == ct) ) { listenerCount--; System.arraycopy(listeners, i+1, listeners, i, (listenerCount - i)); Syst...
final File file )
final FileObject parentLayer )
public ZipFileSystem( final FileSystemProviderContext context, final DefaultFileName rootName, final File file ) throws FileSystemException { super( context, rootName ); this.file = file; // Open the Zip file if ( !file.exists()...
super( context, rootName );
super( context, rootName, parentLayer ); final File file = parentLayer.replicateFile( FileConstants.SELECT_SELF );
public ZipFileSystem( final FileSystemProviderContext context, final DefaultFileName rootName, final File file ) throws FileSystemException { super( context, rootName ); this.file = file; // Open the Zip file if ( !file.exists()...
} else if (p.peekNextToken("janino-tesselatable")) { p.checkNextToken("name"); String name = p.getNextToken(); UI.printInfo("[API] Reading procedural primitive: %s ... ", name); String code = p.getNextCodeBlock(); try { Tesselatable tess = (Tesselatable) ClassBodyEvaluator.createFastClassBodyEvaluator(new Scanner(null,...
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 ...
UI.printInfo("[API] Compiling: %s", code);
UI.printDetailed("[API] Compiling: %s", code);
private boolean parseShader(SunflowAPI api) throws ParserException, IOException { p.checkNextToken("{"); p.checkNextToken("name"); String name = p.getNextToken(); UI.printInfo("[API] Reading shader: %s ...", name); p.checkNextToken("type"); if (p.peekNextToken("diffuse")) {...
public IrradianceCacheGIEngine(int samples, float tolerance, float minSpacing, float maxSpacing, GlobalPhotonMapInterface globalPhotonMap) { this.globalPhotonMap = globalPhotonMap; this.samples = samples; this.tolerance = tolerance;
public IrradianceCacheGIEngine(Options options) { samples = options.getInt("gi.irr-cache.samples", 256); tolerance = options.getFloat("gi.irr-cache.tolerance", 0.05f);
public IrradianceCacheGIEngine(int samples, float tolerance, float minSpacing, float maxSpacing, GlobalPhotonMapInterface globalPhotonMap) { this.globalPhotonMap = globalPhotonMap; this.samples = samples; this.tolerance = tolerance; invTolerance = 1.0f / tolerance; this.minSpacing...
this.minSpacing = minSpacing; this.maxSpacing = maxSpacing;
minSpacing = options.getFloat("gi.irr-cache.min_spacing", 0.05f); maxSpacing = options.getFloat("gi.irr-cache.max_spacing", 5.00f);
public IrradianceCacheGIEngine(int samples, float tolerance, float minSpacing, float maxSpacing, GlobalPhotonMapInterface globalPhotonMap) { this.globalPhotonMap = globalPhotonMap; this.samples = samples; this.tolerance = tolerance; invTolerance = 1.0f / tolerance; this.minSpacing...
globalPhotonMap = null; String gmap = options.getString("gi.irr-cache.gmap", null); if (gmap == null || gmap.equals("none")) return; int numEmit = options.getInt("gi.irr-cache.gmap.emit", 100000); int gather = options.getInt("gi.irr-cache.gmap.gather", 50); float radius = options.getFloat("gi.irr-cache.gmap.radius", 0....
public IrradianceCacheGIEngine(int samples, float tolerance, float minSpacing, float maxSpacing, GlobalPhotonMapInterface globalPhotonMap) { this.globalPhotonMap = globalPhotonMap; this.samples = samples; this.tolerance = tolerance; invTolerance = 1.0f / tolerance; this.minSpacing...
public AmbientOcclusionGIEngine(Color bright, Color dark, int samples, float maxDist) { this.bright = bright; this.dark = dark; this.samples = samples; this.maxDist = (maxDist <= 0) ? Float.POSITIVE_INFINITY : maxDist;
public AmbientOcclusionGIEngine(Options options) { bright = options.getColor("gi.ambocc.bright", Color.WHITE); dark = options.getColor("gi.ambocc.dark", Color.BLACK); samples = options.getInt("gi.ambocc.samples", 32); maxDist = options.getFloat("gi.ambocc.maxdist", 0); maxDist = (maxDist <= 0) ? Float.POSITIVE_INFINITY...
public AmbientOcclusionGIEngine(Color bright, Color dark, int samples, float maxDist) { this.bright = bright; this.dark = dark; this.samples = samples; this.maxDist = (maxDist <= 0) ? Float.POSITIVE_INFINITY : maxDist; }
public Matrix4(float[] m, boolean rowMajor) { if (rowMajor) { m00 = m[0]; m01 = m[1]; m02 = m[2]; m03 = m[3]; m10 = m[4]; m11 = m[5]; m12 = m[6]; m13 = m[7]; m20 = m[8]; m21 = m[9]; m22 = m[10]; m23 = m[11]; m30 = m[12]; m31 = m[13]; m32 = m[14]; m33 = m[15]; } else { m00 = m[0]; m01 = m[4]; m02 = m[8]; m03 = m[12]; m1...
public Matrix4() {
public Matrix4(float[] m, boolean rowMajor) { if (rowMajor) { m00 = m[0]; m01 = m[1]; m02 = m[2]; m03 = m[3]; m10 = m[4]; m11 = m[5]; m12 = m[6]; m13 = m[7]; m20 = m[8]; m21 = m[9]; m22 = ...
return null;
return new PortfolioPageItem();
public PageItem getParent() { // TODO Auto-generated method stub return null; }
return getPartialMatchedWordCnt() + getPerfectMatchedWordCnt();
return getPartialMatchedWordCnt() + getPerfectMatchedWordCnt() + getUndefinedWordCnt();
public int getInputWordCnt() { return getPartialMatchedWordCnt() + getPerfectMatchedWordCnt(); }
this.fileName = UriParser.decode(name.getURI());
protected SmbFileObject(final FileName name, final SmbFileSystem fileSystem) throws FileSystemException { super(name, fileSystem); this.fileName = UriParser.decode(name.getURI()); }
private SmbFile createSmbFile(String path) throws MalformedURLException, SmbException
private SmbFile createSmbFile(FileName fileName) throws MalformedURLException, SmbException, FileSystemException
private SmbFile createSmbFile(String path) throws MalformedURLException, SmbException { SmbFile f = new SmbFile(path); return createSmbFile(f); }
SmbFile f = new SmbFile(path); return createSmbFile(f);
SmbFileName smbFileName = (SmbFileName) fileName; String path = smbFileName.getUriWithoutAuth(); NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication( smbFileName.getDomain(), smbFileName.getUserName(), smbFileName.getPassword()); SmbFile file = new SmbFile(path, auth); if (file.isDirectory() && !file.to...
private SmbFile createSmbFile(String path) throws MalformedURLException, SmbException { SmbFile f = new SmbFile(path); return createSmbFile(f); }
file = createSmbFile(fileName);
file = createSmbFile(getName());
protected void doAttach() throws Exception { // Defer creation of the SmbFile to here if (file == null) { file = createSmbFile(fileName); } }
file = createSmbFile(file);
file = createSmbFile(getName());
protected void doCreateFolder() throws Exception { file.mkdir(); file = createSmbFile(file); }
file.renameTo(createSmbFile(newfile.getName().getURI()));
file.renameTo(createSmbFile(newfile.getName()));
protected void doRename(FileObject newfile) throws Exception { file.renameTo(createSmbFile(newfile.getName().getURI())); }
rafis = new InputStream() { public int read() throws IOException { return raf.readByte(); } public long skip(long n) throws IOException { raf.seek(raf.getFilePointer() + n); return n; } public void close() throws IOException { raf.close(); } public int read(byte b[]) throws IOException { return raf.read(b); } publi...
SmbFileRandomAccessContent(final SmbFile smbFile, final RandomAccessMode mode) throws FileSystemException { super(mode); StringBuffer modes = new StringBuffer(2); if (mode.requestRead()) { modes.append('r'); } if (mode.requestWrite()) { modes...
public static boolean isFamily(final OsFamily family)
public static boolean isFamily(final String family)
public static boolean isFamily(final OsFamily family) { return isOs(family, null, null, null); }
protected FileObject findFile(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException
public FileObject findFile(final FileObject baseFile, final String uri, final FileSystemOptions fileSystemOptions) throws FileSystemException
protected FileObject findFile(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Check in the cache for the file system final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH); FileSystem fs; synchronized (this)...
final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH); FileSystem fs; synchronized (this) { fs = findFileSystem(rootName, fileSystemOptions); if (fs == null) { fs = doCreateFileSystem(rootName, fileSystemOptions); addFileSystem(rootName, fs); } }
final FileName name; try { name = parseUri(baseFile!=null?baseFile.getName():null, uri); } catch (FileSystemException exc) { throw new FileSystemException("vfs.provider/invalid-absolute-uri.error", uri, exc); }
protected FileObject findFile(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Check in the cache for the file system final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH); FileSystem fs; synchronized (this)...
return fs.resolveFile(name);
return findFile(name, fileSystemOptions);
protected FileObject findFile(final FileName name, final FileSystemOptions fileSystemOptions) throws FileSystemException { // Check in the cache for the file system final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH); FileSystem fs; synchronized (this)...
if (con==null) { throw new IllegalArgumentException("Connection cannot be null"); }
public JDBCConnection(Connection con) { this.con = con; try { con.setAutoCommit(false); } catch (SQLException e) { throw new JDBCException("Unable to set autocommit=false", e); } try { transactable = Connection.TRANSACTION_NONE != con.getTransactio...
con = null;
public void commit() { if (con == null) { throw new IllegalStateException("Attempt to commit a transaction on a closed connection"); } try { con.commit(); con = null; } catch (Exception e) { throw new JDBCException("Unable to commit transaction...
return "JDBCConnection{" + con.getClass() + '}';
return "JDBCConnection{" + (con == null ? "" : con.getClass()) + '}';
public String toString() { return "JDBCConnection{" + con.getClass() + '}'; }
hierarchyOptionPanel.setLayout(new GridLayout(2, 1));
hierarchyOptionPanel.setLayout(new GridLayout(3, 1)); hierarchyOptionPanel.add(constructComplexWordTreeBox);
public OptionDialog(Frame owner) { super(owner); ambiguitySupCheckBox = new JCheckBox("ルートまでのパスに含まれる概念"); ambiguitySupCheckBox.setSelected(true); ambiguitySubCheckBox = new JCheckBox("下位概念"); ambiguitySubCheckBox.setSelected(true); ambiguitySiblingCheckBox = new JCheckBox("...
setVisible(false);
if (e.getSource() == constructComplexWordTreeBox) { boolean isEnable = constructComplexWordTreeBox.isSelected(); trimInternalComplexWordConceptBox.setEnabled(isEnable); addAbstractInternalComplexWordConceptBox.setEnabled(isEnable); } else if (e.getSource() == cancelButton) { setVisible(false); }
public void actionPerformed(ActionEvent e) { setVisible(false); }
option = reader.readLine(); if (option != null) { constructComplexWordTreeBox.setSelected(option.equals("Construct Complex Word Tree")); }
public void loadOption(File file) { if (!file.exists()) { return; } try { InputStream is = new FileInputStream(file); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "SJIS")); String option = reader.readLine(); String[] ambiguityOptions ...
if (constructComplexWordTreeBox.isSelected()) { buf.append("Construct Complex Word Tree\n"); }
public void saveOption(File file) { try { OutputStream os = new FileOutputStream(file); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "SJIS")); StringBuffer buf = new StringBuffer(); buf.append(ambiguitySiblingCheckBox.isSelected() + ","); ...
public Feature createFeature(Feature projParent, Feature.Template projTempl)
public Feature createFeature(Feature.Template projTempl)
public Feature createFeature(Feature projParent, Feature.Template projTempl) throws BioException, ChangeVetoException;
public void removeFeature(Feature projParent, Feature dyingChild) throws ChangeVetoException, BioException;
public void removeFeature(Feature dyingChild) throws BioException, ChangeVetoException;
public void removeFeature(Feature projParent, Feature dyingChild) throws ChangeVetoException, BioException; // fixme: should we be throwing BioException?
setStopWordSet();
public DocumentSelectionPanel(InputWordSelectionPanel iwsPanel) { inputWordSelectionPanel = iwsPanel; System.setProperty("sen.home", DODDLE.SEN_HOME); wordInfoMap = new HashMap<String, WordInfo>(); docList = new JList(new DefaultListModel()); docList.addListSelectionListener(this)...
if (!oneWordCheckBox.isSelected() && basicStr.length() == 1) {
if (!oneWordCheckBox.isSelected() && isStopWord(basicStr)) {
private void analyzeEnMorpheme(String text, Document doc, boolean isInputDoc) { File file = doc.getFile(); String taggedText = runSSTagger(text); String[] token = taggedText.split("\\s"); if (token == null) { return; } for (int i = 0; i < token.length; i++) { String[] i...
buf.append(line);
buf.append(line + "\n");
private String runSSTagger(String text) { StringBuffer buf = new StringBuffer(""); try { BufferedWriter bw = new BufferedWriter(new FileWriter(SS_TAGGER_HOME + "tmp.txt")); bw.write(text); bw.close(); ProcessBuilder processBuilder = new ProcessBuilder(SS_TAG...
caps.add( Capability.LAST_MODIFIED );
caps.add( Capability.GET_LAST_MODIFIED ); caps.add( Capability.SET_LAST_MODIFIED );
protected void addCapabilities( final Collection caps ) { // TODO - this isn't really true caps.add( Capability.ATTRIBUTES ); caps.add( Capability.CREATE ); caps.add( Capability.DELETE ); caps.add( Capability.GET_TYPE ); caps.add( Capability.JUNCTIONS ); caps.add(...
Set complexWordSet = termExtract(text, doc.getLang());
Set complexWordSet = getComplexWordSet(text, doc.getLang());
private void analyzeEnMorpheme(String text, Document doc, boolean isInputDoc) { File file = doc.getFile(); String taggedText = runSSTagger(text); String[] token = taggedText.split("\\s"); if (token == null) { return; } for (int i = 0; i < token.length; i++) { String[] i...
Set complexWordSet = termExtract(text, doc.getLang()); for (Iterator i = complexWordSet.iterator(); i.hasNext();) { String complexWord = (String) i.next();
Set<String> complexWordSet = getComplexWordSet(text, doc.getLang()); for (String complexWord : complexWordSet) {
private void analyzeJaMorpheme(String text, Document doc, boolean isInputDoc) { File file = doc.getFile(); try { StringTagger tagger = StringTagger.getInstance(); Token[] token = tagger.analyze(text); if (token == null) { return; } for (int i = 0; i < token....
currentProject.getConstructConceptTreePanel().expandTree(); currentProject.getConstructPropertyTreePanel().expandTree();
public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(DODDLE.PROJECT_DIR); int retval = chooser.showOpenDialog(DODDLE.rootPane); if (retval == JFileChooser.APPROVE_OPTION) { DODDLEProject currentProject = DODDLE.getCurrentProject(); doddle.lo...
FeatureHolder parent,
BioSQLFeature(Sequence seq, FeatureHolder parent, Feature.Template templ) throws IllegalArgumentException, IllegalAlphabetException { this(seq, templ); if (parent instanceof BioSQLFeature) { parentID = ((BioSQLFeature) parent)._getInternalID(); } else { parentID = -1; } }
this(seq, templ); if (parent instanceof BioSQLFeature) { parentID = ((BioSQLFeature) parent)._getInternalID(); } else { parentID = -1; }
this.type = templ.type; this.source = templ.source; this.location = templ.location; this.sequence = (BioSQLSequenceI) seq; _annotation = templ.annotation;
BioSQLFeature(Sequence seq, FeatureHolder parent, Feature.Template templ) throws IllegalArgumentException, IllegalAlphabetException { this(seq, templ); if (parent instanceof BioSQLFeature) { parentID = ((BioSQLFeature) parent)._getInternalID(); } else { parentID = -1; } }
public PlainStyle(Paint outlinePaint, Paint fillPaint) { this.outlinePaint = outlinePaint; this.fillPaint = fillPaint;
public PlainStyle() { this(Color.black, Color.gray);
public PlainStyle(Paint outlinePaint, Paint fillPaint) { this.outlinePaint = outlinePaint; this.fillPaint = fillPaint; }
if (statementCache != null) { statementCache.close(); statementCache = null; }
public void close() { if (con != null) { try { con.close(); con = null; } catch (SQLException e) { throw new JDBCException("Unable to close a connection", e); } if (statementCache != null) { statementCache...
String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_SIZE_KEY);
String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_KEY);
protected void init(ConnectionParameters parameters) { String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_SIZE_KEY); int statementCacheSize = 100; if (cacheSizeStr != null && cacheSizeStr.trim().length() > 0) { try { statementCacheSize = Integer.valueOf(cache...
throw new JDBCException(STATEMENT_CACHE_SIZE_KEY + " property must be a non negative integer", e);
throw new JDBCException(STATEMENT_CACHE_KEY + " property must be a non negative integer", e);
protected void init(ConnectionParameters parameters) { String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_SIZE_KEY); int statementCacheSize = 100; if (cacheSizeStr != null && cacheSizeStr.trim().length() > 0) { try { statementCacheSize = Integer.valueOf(cache...
statementCache = new StatementCache(statementCacheSize);
statementCache = new StatementCache(con, statementCacheSize);
protected void init(ConnectionParameters parameters) { String cacheSizeStr = parameters.getProperty(STATEMENT_CACHE_SIZE_KEY); int statementCacheSize = 100; if (cacheSizeStr != null && cacheSizeStr.trim().length() > 0) { try { statementCacheSize = Integer.valueOf(cache...
return "JDBCConnection{" + (con == null ? "" : con.getClass().getName()) + "}, "+getDialectIdentifier();
return "JDBCConnection{" + (con == null ? "" : con.getClass().getName()) + '}';
public String toString() { return "JDBCConnection{" + (con == null ? "" : con.getClass().getName()) + "}, "+getDialectIdentifier(); }
return;
private void returnControl() { try { this.barrier.await(); } catch (BrokenBarrierException ex) { return; } catch (InterruptedException intEx) { return; } }
private String getCommonsLoggingLibUrl() {
protected String getCommonsLoggingLibUrl() {
private String getCommonsLoggingLibUrl() { return localMavenArtifact("org.springframework.osgi", "commons-logging.osgi", "1.1-SNAPSHOT"); }
private String getJUnitLibUrl() {
protected String getJUnitLibUrl() {
private String getJUnitLibUrl() { return localMavenArtifact("org.springframework.osgi", "junit.osgi", "3.8.1-SNAPSHOT"); }
private String getLog4jLibUrl() {
protected String getLog4jLibUrl() {
private String getLog4jLibUrl() { return localMavenArtifact("org.springframework.osgi", "log4j.osgi", "1.2.13-SNAPSHOT"); }
return new String[] { getJUnitLibUrl(), getLog4jLibUrl(), getCommonsLoggingLibUrl(), getSpringCoreBundleUrl(),
return new String[] { getCommonsLoggingLibUrl(), getJUnitLibUrl(), getSpringCoreBundleUrl(),
protected String[] getMandatoryBundles() { return new String[] { getJUnitLibUrl(), getLog4jLibUrl(), getCommonsLoggingLibUrl(), getSpringCoreBundleUrl(), getUtilConcurrentLibUrl(), getSpringOSGiIoBundleUrl(), getSpringOSGiTestBundleUrl() }; }
private String getSpringCoreBundleUrl() {
protected String getSpringCoreBundleUrl() {
private String getSpringCoreBundleUrl() { return localMavenArtifact("org.springframework.osgi", "spring-core", "2.1-SNAPSHOT"); }
private String getSpringOSGiIoBundleUrl() {
protected String getSpringOSGiIoBundleUrl() {
private String getSpringOSGiIoBundleUrl() { return localMavenArtifact("org.springframework.osgi", "spring-osgi-io", "1.0-SNAPSHOT"); }
private String getSpringOSGiTestBundleUrl() {
protected String getSpringOSGiTestBundleUrl() {
private String getSpringOSGiTestBundleUrl() { return localMavenArtifact("org.springframework.osgi", "org.springframework.osgi.test", "1.0-SNAPSHOT"); }
private String getUtilConcurrentLibUrl() {
protected String getUtilConcurrentLibUrl() {
private String getUtilConcurrentLibUrl() { return localMavenArtifact("org.springframework.osgi", "backport-util-concurrent", "3.0-SNAPSHOT"); }
bundles = new Bundle[bundleResources.length]; for (int i = 0; i < bundleResources.length; i++) {
initializeLog4J(); Bundle[] bundles = new Bundle[bundleResources.length]; for (int i = 0; i < bundleResources.length; i++) {
private void startup() throws Exception { if (osgiPlatform == null) { // make sure the platform is closed properly registerShutdownHook(); log.info("initializing OSGi platform..."); osgiPlatform = createPlatform(); // start platform osgiPlatform.start(); // platform context platformContext = osgiPlatf...
return findInDirectoryTree(artifactName,rootMavenProjectDir); }
File found = findInDirectoryTree(artifactName,rootMavenProjectDir); if (found == null) { throw new FileNotFoundException("Cannot find the artifact <" + artifactName + ">"); } return found; }
File findPackagedArtifact(File startingDirectory) throws IOException { if (!isMavenProjectDirectory(startingDirectory)) { throw new IllegalStateException( startingDirectory + " does not contain a pom.xml file"); } File rootMavenProjectDir = findRootMavenProjectDir(startingDirectory.getCanonicalFile()); return...
setFileNameParser(new UrlFileNameParser());
public UrlFileProvider() { super(); }