rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
buffer.append( userName );
UriParser.appendEncoded( buffer, userName, USERNAME_RESERVED );
protected void appendRootUri( final StringBuffer buffer ) { buffer.append( getScheme() ); buffer.append( "://" ); if ( userName != null && userName.length() != 0 ) { // TODO - need to encode username and password buffer.append( userName ); if ( passwor...
buffer.append( password );
UriParser.appendEncoded( buffer, password, PASSWORD_RESERVED );
protected void appendRootUri( final StringBuffer buffer ) { buffer.append( getScheme() ); buffer.append( "://" ); if ( userName != null && userName.length() != 0 ) { // TODO - need to encode username and password buffer.append( userName ); if ( passwor...
auth.userName = userName; auth.password = password;
auth.userName = UriParser.decode( userName ); auth.password = UriParser.decode( password );
protected static Authority extractToPath( final String uri, final StringBuffer name ) throws FileSystemException { final Authority auth = new Authority(); // Extract the scheme auth.scheme = UriParser.extractScheme( uri, name ); // E...
public Geometry(AggregateTraceable primitives) {
public Geometry(PrimitiveList primitives) {
public Geometry(AggregateTraceable primitives) { this.primitives = primitives; // TODO: construct appropriate acceleration structure from parameters accel = null; int n = primitives.numPrimitives(); if (n == 1) accel = new SimpleAccelerator(); else if (n > 1) ...
int n = primitives.numPrimitives();
int n = primitives.getNumPrimitives();
public Geometry(AggregateTraceable primitives) { this.primitives = primitives; // TODO: construct appropriate acceleration structure from parameters accel = null; int n = primitives.numPrimitives(); if (n == 1) accel = new SimpleAccelerator(); else if (n > 1) ...
void intersect(Ray r, Instance parent, IntersectionState istate) { accel.intersect(r, parent, istate);
void intersect(Ray r, IntersectionState state) { accel.intersect(r, state);
void intersect(Ray r, Instance parent, IntersectionState istate) { accel.intersect(r, parent, istate); }
void prepareShadingState(Instance parent, ShadingState state) { primitives.prepareShadingState(parent, state.getIntersectionState().id, state);
void prepareShadingState(ShadingState state) { primitives.prepareShadingState(state);
void prepareShadingState(Instance parent, ShadingState state) { primitives.prepareShadingState(parent, state.getIntersectionState().id, state); }
setWordNetConceptSet(subIW, conceptSet);
setWordNetConceptSet(subIW.replaceAll(" ", "_"), conceptSet);
private Set<Concept> getConceptSet(String subIW) { Set<Concept> conceptSet = new HashSet<Concept>(); setEDRConceptSet(subIW, conceptSet); setEDRTConceptSet(subIW, conceptSet); setWordNetConceptSet(subIW, conceptSet); return conceptSet; }
Concept c = WordNetDic.getWNConcept(new Long(synset.getOffset()).toString()); conceptSet.add(c);
if (synset.containsWord(subIW)) { Concept c = WordNetDic.getWNConcept(new Long(synset.getOffset()).toString()); conceptSet.add(c); }
private void setWordNetConceptSet(String subIW, Set<Concept> conceptSet) { if (!project.getOntologySelectionPanel().isWordNetEnable()) { return; } if (!isEnglish(subIW)) { return; } try { // getAllIndexWordも使えそう IndexWord indexWord = WordNetDic.getInstance().getNounIndexWo...
public AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies) {
public AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies) {
public AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies) { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); BundleContext bc = Loc...
return new ServiceDependentBundleXmlApplicationContext(parent, aBundleContext, configLocations, cl, plugins);
return new ServiceDependentBundleXmlApplicationContext(aBundleContext, configLocations, cl, plugins);
public AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies) { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); BundleContext bc = Loc...
return new OsgiBundleXmlApplicationContext(parent, aBundleContext, configLocations, cl, plugins);
return new OsgiBundleXmlApplicationContext(aBundleContext, configLocations, cl, plugins);
public AbstractBundleXmlApplicationContext createApplicationContextWithBundleContext(ApplicationContext parent, BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins, boolean waitForDependencies) { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); BundleContext bc = Loc...
public OsgiBundleXmlApplicationContext(BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins) { this(aBundleContext, configLocations, new BundleDelegatingClassLoader(aBundleContext.getBundle()), plugins);
public OsgiBundleXmlApplicationContext(BundleContext context, String[] configLocations) { this(context, configLocations, null);
public OsgiBundleXmlApplicationContext(BundleContext aBundleContext, String[] configLocations, NamespacePlugins plugins) { this(aBundleContext, configLocations, new BundleDelegatingClassLoader(aBundleContext.getBundle()), plugins); }
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context,
public ServiceDependentBundleXmlApplicationContext(BundleContext context,
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context, String[] configLocations, ClassLoader classLoader, NamespacePlugins plugins) { super(parent, context, configL...
super(parent, context, configLocations, classLoader, plugins);
super(context, configLocations, classLoader, plugins);
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context, String[] configLocations, ClassLoader classLoader, NamespacePlugins plugins) { super(parent, context, configL...
dependencies = findServiceDependencies(); if (parent == null) { String parentContextServiceName = (String)context.getBundle().getHeaders().get(PARENT_CONTEXT_SERVICE_NAME_HEADER); if (parentContextServiceName != null) { dependencies.add(parentContextServiceName); } } if (!dependencies.isEmpty()) { StringBuffer filte...
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context, String[] configLocations, ClassLoader classLoader, NamespacePlugins plugins) { super(parent, context, configL...
if (!hasUnsatisifiedServiceDependencies()) {
findServiceDependencies(); if (!hasUnsatisifiedServiceDependencies()) {
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context, String[] configLocations, ClassLoader classLoader, NamespacePlugins plugins) { super(parent, context, configL...
savedCcl = Thread.currentThread().getContextClassLoader(); } }
savedCcl = Thread.currentThread().getContextClassLoader(); registerListener(); } }
public ServiceDependentBundleXmlApplicationContext(ApplicationContext parent, BundleContext context, String[] configLocations, ClassLoader classLoader, NamespacePlugins plugins) { super(parent, context, configL...
public SimpleDotState(String name) { super(name, name.charAt(0), Annotation.EMPTY_ANNOTATION);
public SimpleDotState(char token, String name, Annotation annotation) { super(name, annotation);
public SimpleDotState(String name) { super(name, name.charAt(0), Annotation.EMPTY_ANNOTATION); }
threads = options.getInt("threads", threads); lowPriority = options.getBoolean("threads.lowPriority", lowPriority); imageWidth = options.getInt("resolutionX", imageWidth); imageHeight = options.getInt("resolutionY", imageHeight);
threads = options.getInt("threads", 0); lowPriority = options.getBoolean("threads.lowPriority", true); imageWidth = options.getInt("resolutionX", 640); imageHeight = options.getInt("resolutionY", 480);
public void render(Options options, ImageSampler sampler, Display display) { if (display == null) display = new FrameDisplay(); if (bakingInstance != null) { UI.printDetailed(Module.SCENE, "Creating primitives for lightmapping ..."); bakingPrimitives = bakingInstance.g...
public Ray(float ox, float oy, float oz, float dx, float dy, float dz) { this.ox = ox; this.oy = oy; this.oz = oz; this.dx = dx; this.dy = dy; this.dz = dz; float in = 1.0f / (float) Math.sqrt(dx * dx + dy * dy + dz * dz); this.dx *= in; this.dy *= in; this.dz *= in; tMin = EPSILON; tMax = Float.POSITIVE_INFINITY;
private Ray() {
public Ray(float ox, float oy, float oz, float dx, float dy, float dz) { this.ox = ox; this.oy = oy; this.oz = oz; this.dx = dx; this.dy = dy; this.dz = dz; float in = 1.0f / (float) Math.sqrt(dx * dx + dy * dy + dz * dz); this.dx *= in; this.dy *= in; ...
return getType() == FileType.FOLDER ? "/" : "";
return getType().hasChildren() ? "/" : "";
protected String getUriTrailer() { return getType() == FileType.FOLDER ? "/" : ""; }
if (type != FileType.FOLDER && type != FileType.FILE)
if (type != FileType.FOLDER && type != FileType.FILE && type != FileType.FILE_OR_FOLDER)
void setType(FileType type) throws FileSystemException { if (type != FileType.FOLDER && type != FileType.FILE) { throw new FileSystemException("vfs.provider/filename-type.error"); } this.type = type; }
public boolean isWriteable()
public boolean isWriteable() throws FileSystemException
public boolean isWriteable() { return getFileSystem().hasCapability(Capability.WRITE_CONTENT); }
public void setProperties(final Map<?, ?> props) {
public void setProperties(final Map<String, String> props) {
public void setProperties(final Map<?, ?> props) { exec.setExternalProperties(props); }
rstack = new float[53 * 256];
public IntersectionState() { stack = new StackNode[MAX_STACK_SIZE * 2]; for (int i = 0; i < stack.length; i++) stack[i] = new StackNode(); }
oldCompareBy.hashCode();
public void exit() { sortVector[tabIndex*2] = compare.getSelection(); sortVector[tabIndex*2 + 1] = compare.getSelected(); String[] s = new String[sortVector[tabIndex*2 + 1].size()]; int[][] compareBy; try { compareBy = (int[][]) io.load("compareby"); } catch (Exception e) { try { int[] oldComp...
final String message = REZ.getString( "pkg-sealed-other-url", pkgName ); throw new SecurityException( message );
throw new FileSystemException( "vfs.impl/pkg-sealed-other-url", pkgName );
private Class defineClass( String name, Resource res ) throws IOException, FileSystemException { URL url = res.getCodeSourceURL(); int i = name.lastIndexOf( "." ); if ( i != -1 ) { String pkgName = name.substring( 0, i ); Package pkg = getPackage( pkgName ...
final String message = REZ.getString( "pkg-sealing-unsealed", pkgName ); throw new SecurityException( message );
throw new FileSystemException( "vfs.impl/pkg-sealing-unsealed", pkgName );
private Class defineClass( String name, Resource res ) throws IOException, FileSystemException { URL url = res.getCodeSourceURL(); int i = name.lastIndexOf( "." ); if ( i != -1 ) { String pkgName = name.substring( 0, i ); Package pkg = getPackage( pkgName ...
final String message = REZ.getString( "class-not-found.error", name ); throw new ClassNotFoundException( message );
throw new ClassNotFoundException(name);
protected Class findClass( String name ) throws ClassNotFoundException { try { String path = name.replace( '.', '/' ).concat( ".class" ); Resource res = loadResource( path ); if ( res == null ) { final String message = RE...
return null;
if (fs.getParentLayer() != null) { return fs.getParentLayer().getParent(); } else { return null; }
public FileObject getParent() throws FileSystemException { if ( this == fs.getRoot() ) { // Root file has no parent return null; } // Locate the parent of this file if ( parent == null ) { parent = (AbstractFileObject)fs.findFile( name.ge...
public FileObject findFile( final FileName name ) throws FileSystemException
public FileObject findFile( final String nameStr ) throws FileSystemException
public FileObject findFile( final FileName name ) throws FileSystemException { // TODO - assert that name is from this file system FileObject file = (FileObject)files.get( name ); if ( file == null ) { file = createFile( name ); files.put( name, file ); } ...
FileObject file = (FileObject)files.get( name ); if ( file == null ) { file = createFile( name ); files.put( name, file ); } return file;
final FileName name = rootName.resolveName( nameStr ); return findFile( name );
public FileObject findFile( final FileName name ) throws FileSystemException { // TODO - assert that name is from this file system FileObject file = (FileObject)files.get( name ); if ( file == null ) { file = createFile( name ); files.put( name, file ); } ...
protected void fill(Element root, String childName, String list)
protected void fill(Element root, String parentName, String childName, String list, Namespace ns)
protected void fill(Element root, String childName, String list) { if (list == null) return; StringTokenizer st = new StringTokenizer(list, ","); while (st.hasMoreTokens()) { Element child = new Element(childName, root.getNamespace()); child.setText(st.nextToken()); root.addContent(child); } }
Element child = new Element(childName, root.getNamespace());
Element child = new Element(childName, ns);
protected void fill(Element root, String childName, String list) { if (list == null) return; StringTokenizer st = new StringTokenizer(list, ","); while (st.hasMoreTokens()) { Element child = new Element(childName, root.getNamespace()); child.setText(st.nextToken()); root.addContent(child); } }
root.addContent(child);
parent.addContent(child);
protected void fill(Element root, String childName, String list) { if (list == null) return; StringTokenizer st = new StringTokenizer(list, ","); while (st.hasMoreTokens()) { Element child = new Element(childName, root.getNamespace()); child.setText(st.nextToken()); root.addContent(child); } }
caps.add( Capability.GET_LAST_MODIFIED );
protected void addCapabilities( final Collection caps ) { caps.add( Capability.READ_CONTENT ); caps.add( Capability.URI ); }
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...
try { ResourceLoader fileLoader = new DefaultResourceLoader(); Resource res = fileLoader.getResource(getClass().getName().replace('.', '/').concat(".class")); String fileLocation = "file: fileLocation = fileLocation.substring(0, fileLocation.indexOf("test-classes")) + "test-classes"; if (res.exists()) { return fileLoca...
protected String getRootPath() { return "file:./target/test-classes"; }
public AbstractOsgiTests(String name) { super(name);
public AbstractOsgiTests() { super();
public AbstractOsgiTests(String name) { super(name); }
localMavenArtifact("org.springframework.osgi.samples", "simple-service-bundle",
localMavenArtifact("org.springframework.osgi", "org.springframework.osgi.test.simple.service",
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...
Bundle simpleServiceBundle = findBundleBySymbolicName("org.springframework.osgi.samples.simpleservice");
Bundle simpleServiceBundle = findBundleBySymbolicName("org.springframework.osgi.test.simpleservice");
public void testReferenceProxyLifecycle() throws Exception { MyService reference = ServiceReferer.serviceReference; assertNotNull(reference.stringValue()); Bundle simpleServiceBundle = findBundleBySymbolicName("org.springframework.osgi.samples.simpleservice"); assertNotNull("Cannot find ...
String getBaseName();
public String getBaseName();
String getBaseName();
int getDepth();
public int getDepth();
int getDepth();
String getExtension();
public String getExtension();
String getExtension();
FileName getParent();
public FileName getParent();
FileName getParent();
String getPath();
public String getPath();
String getPath();
String getPathDecoded() throws FileSystemException;
public String getPathDecoded() throws FileSystemException;
String getPathDecoded() throws FileSystemException;
String getRelativeName(FileName name) throws FileSystemException;
public String getRelativeName(FileName name) throws FileSystemException;
String getRelativeName(FileName name) throws FileSystemException;
String getRootURI();
public String getRootURI();
String getRootURI();
String getScheme();
public String getScheme();
String getScheme();
String getURI();
public String getURI();
String getURI();
return null;
throw new NoSuchElementException();
public Object nextElement() { return null; }
return getClass().getResource(name);
return loader.getResource(name);
public URL getEntry(String name) { return getClass().getResource(name); }
return SYMBOLIC_NAME;
String name = (String) headers.get(Constants.BUNDLE_SYMBOLICNAME); return (name == null ? SYMBOLIC_NAME : name);
public String getSymbolicName() { return SYMBOLIC_NAME; }
return false;
return true;
public boolean hasPermission(Object permission) { return false; }
public MockBundleContext(Bundle bundle) { this(bundle, null);
public MockBundleContext() { this(null, null);
public MockBundleContext(Bundle bundle) { this(bundle, null); }
public JDBCConnection(Connection con) {
public JDBCConnection(Connection con, ConnectionParameters parameters) {
public JDBCConnection(Connection con) { if (con==null) { throw new IllegalArgumentException("Connection cannot be null"); } this.con = con; try { con.setAutoCommit(false); } catch (SQLException e) { throw new JDBCException("Unable to set autocommit...
init(parameters);
public JDBCConnection(Connection con) { if (con==null) { throw new IllegalArgumentException("Connection cannot be null"); } this.con = con; try { con.setAutoCommit(false); } catch (SQLException e) { throw new JDBCException("Unable to set autocommit...
public StatementCache(final int size) { this.maxSize = size; if (maxSize>=0) { this.map = new LinkedHashMap<String, PreparedStatement>(size, DEFAULT_LOAD_FACTOR, true) { protected boolean removeEldestEntry(Map.Entry<String, PreparedStatement> eldest) {
public StatementCache(Connection connection, final int size) { this.connection = connection; if (size > 0) { this.map = new LinkedHashMap<String, StatementWrapper.Prepared>(size, DEFAULT_LOAD_FACTOR, true) { protected boolean removeEldestEntry(Map.Entry<String, StatementWrapper.Prepared> eldest) {
public StatementCache(final int size) { this.maxSize = size; if (maxSize>=0) { //if cache is enabled this.map = new LinkedHashMap<String, PreparedStatement>(size, DEFAULT_LOAD_FACTOR, true) { protected boolean removeEldestEntry(Map.Entry<String, PreparedStatement> eldest) { ...
releasedStatements.add(eldest.getValue());
disposeQueue.add(eldest.getValue());
public StatementCache(final int size) { this.maxSize = size; if (maxSize>=0) { //if cache is enabled this.map = new LinkedHashMap<String, PreparedStatement>(size, DEFAULT_LOAD_FACTOR, true) { protected boolean removeEldestEntry(Map.Entry<String, PreparedStatement> eldest) { ...
public void close() { if (map!=null) { closeRemovedStatements(); close(map.values()); map=null;
protected void close(Collection<StatementWrapper.Prepared> list) { for (Iterator<StatementWrapper.Prepared> it = list.iterator(); it.hasNext();) { StatementWrapper.Prepared sw = it.next(); if (!sw.isLocked()) { sw.close(); it.remove(); }
public void close() { if (map!=null) { closeRemovedStatements(); close(map.values()); map=null; } }
return simpleName.length() == 0 ? "connection" : simpleName + ", " + dialectIdentifier;
return simpleName.length() == 0 ? "connection" : simpleName;
public String toString() { String simpleName = getClass().getSimpleName(); return simpleName.length() == 0 ? "connection" : simpleName + ", " + dialectIdentifier; }
public Instance(Shader[] shaders, Matrix4 o2w, Geometry geometry) { this.shaders = shaders; this.o2w = o2w; this.geometry = geometry; if (o2w != null) { w2o = o2w.inverse(); if (w2o == null) throw new RuntimeException("Unable to inverse scale/translate matrix!"); } else o2w = w2o = null; bounds = geometry.getWorldBound...
public Instance(Shader shader, Matrix4 o2w, Geometry geometry) { this(new Shader[] { shader }, o2w, geometry);
public Instance(Shader[] shaders, Matrix4 o2w, Geometry geometry) { this.shaders = shaders; this.o2w = o2w; this.geometry = geometry; if (o2w != null) { w2o = o2w.inverse(); if (w2o == null) throw new RuntimeException("Unable to inverse scale/translat...
allRelation.clear();
pairSet.clear(); allRelation.clear(); aprioriResult.clear();
public Map calcAprioriResult() { allRelation.clear(); List inputWordList = conceptDefinitionPanel.getInputWordList(); if (inputWordList == null) { return aprioriResult; } int conceptAppearence[] = new int[inputWordList.size()]; List itemList = new ArrayList(); int lineNum =...
DODDLE.STATUS_BAR.addProjectValue();
public Map calcAprioriResult() { allRelation.clear(); List inputWordList = conceptDefinitionPanel.getInputWordList(); if (inputWordList == null) { return aprioriResult; } int conceptAppearence[] = new int[inputWordList.size()]; List itemList = new ArrayList(); int lineNum =...
System.out.println(o);
LOG.info(String.valueOf(o));
protected void println(final Object o) { System.out.println(o); }
final File file = AbstractVfsTestCase.getTestDirectory();
final File file = AbstractVfsTestCase.getTestDirectoryFile();
private FileObject getBaseDir() throws FileSystemException { final File file = AbstractVfsTestCase.getTestDirectory(); assertTrue(file.exists()); return getManager().toFileObject(file); }
public FileObject createVirtualFileSystem(final String rootUri)
public FileObject createVirtualFileSystem(final FileObject rootFile)
public FileObject createVirtualFileSystem(final String rootUri) throws FileSystemException { return vfsProvider.createFileSystem(rootUri); }
return vfsProvider.createFileSystem(rootUri);
return vfsProvider.createFileSystem(rootFile);
public FileObject createVirtualFileSystem(final String rootUri) throws FileSystemException { return vfsProvider.createFileSystem(rootUri); }
assertEquals(new Double(25.0), weather.getHistoricalHigh(new Date()));
assertEquals(new Double(15.0), weather.getHistoricalHigh(new GregorianCalendar(2004, 0, 1).getTime()));
public void testWeatherServiceExported() { BundleContext context = getBundleContext(); ServiceReference ref = context.getServiceReference(WeatherService.class.getName()); assertNotNull("Service Reference is null", ref); try { WeatherService weather = (WeatherService) context.getService...
wordConceptSetMap = disambiguationPanel.getWordConceptSetMap(); complexWordConceptMap = doddleProject.getConstructClassPanel().getComplexWordConceptMap(); Set<InputWordModel> inputWordModelSet = disambiguationPanel.getInputWordModelSet(); for (InputWordModel iwModel : inputWordModelSet) { String word = iwModel.getWord(...
if (wordCorrespondConceptSetMap != null) { wordConceptSetMap = disambiguationPanel.getWordConceptSetMap(); complexWordConceptMap = doddleProject.getConstructClassPanel().getComplexWordConceptMap(); Set<InputWordModel> inputWordModelSet = disambiguationPanel.getInputWordModelSet(); for (InputWordModel iwModel : inputWor...
public List<String> getInputWordList() { List<String> inputWordList = new ArrayList<String>(); wordCorrespondConceptSetMap = disambiguationPanel.getWordCorrespondConceptSetMap(); wordConceptSetMap = disambiguationPanel.getWordConceptSetMap(); complexWordConceptMap = doddleProject.getCons...
Collections.sort(inputWordList);
public List<String> getInputWordList() { List<String> inputWordList = new ArrayList<String>(); wordCorrespondConceptSetMap = disambiguationPanel.getWordCorrespondConceptSetMap(); wordConceptSetMap = disambiguationPanel.getWordConceptSetMap(); complexWordConceptMap = doddleProject.getCons...
resultTabpane.addTab("WS & AR", scroll);
resultTabpane.addTab("WordSpace & Apriori", scroll);
public ConceptDefinitionResultPanel(JList icList, ConceptDefinitionAlgorithmPanel ap, DODDLEProject project) { algorithmPanel = ap; doddleProject = project; constructPropertyTreePanel = project.getConstructPropertyPanel(); inputConceptJList = icList; setInputConceptButton = new JB...
resultTabpane.setTabPlacement(JTabbedPane.RIGHT);
resultTabpane.setTabPlacement(JTabbedPane.TOP);
public ConceptDefinitionResultPanel(JList icList, ConceptDefinitionAlgorithmPanel ap, DODDLEProject project) { algorithmPanel = ap; doddleProject = project; constructPropertyTreePanel = project.getConstructPropertyPanel(); inputConceptJList = icList; setInputConceptButton = new JB...
JPanel resultTabpanePanel = new JPanel(); resultTabpanePanel.setLayout(new BorderLayout()); resultTabpanePanel.add(inputDocPanel, BorderLayout.NORTH); resultTabpanePanel.add(resultTabpane, BorderLayout.CENTER);
JSplitPane resultTabpanePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, inputDocPanel, resultTabpane); resultTabpanePanel.setDividerSize(DODDLE.DIVIDER_SIZE); resultTabpanePanel.setOneTouchExpandable(true);
public ConceptDefinitionResultPanel(JList icList, ConceptDefinitionAlgorithmPanel ap, DODDLEProject project) { algorithmPanel = ap; doddleProject = project; constructPropertyTreePanel = project.getConstructPropertyPanel(); inputConceptJList = icList; setInputConceptButton = new JB...
setInputWordSetButton = new JButton(Translator.getString("InputWordSelectionPanel.SetInputWords"));
setInputWordSetButton = new JButton(Translator.getString("InputWordSelectionPanel.SetInputWordSet"));
public InputWordSelectionPanel(DisambiguationPanel ui) { System.setProperty("sen.home", DODDLE.DODDLE_DIC + "sen-1.2.1"); disambiguationPanel = ui; wordInfoTable = new JTable(); JScrollPane wordInfoTableScroll = new JScrollPane(wordInfoTable); setWordInfoTableModel(null, 0); ...
inputWordsButtonPanel.add(addInputWordSetButton);
public InputWordSelectionPanel(DisambiguationPanel ui) { System.setProperty("sen.home", DODDLE.DODDLE_DIC + "sen-1.2.1"); disambiguationPanel = ui; wordInfoTable = new JTable(); JScrollPane wordInfoTableScroll = new JScrollPane(wordInfoTable); setWordInfoTableModel(null, 0); ...
public InputWordModel makeInputWordModel(String iw, Map<String, Set<Concept>> wcSetMap) { return inputModule.makeInputWordModel(iw, wcSetMap);
public InputWordModel makeInputWordModel(String iw) { return inputModule.makeInputWordModel(iw);
public InputWordModel makeInputWordModel(String iw, Map<String, Set<Concept>> wcSetMap) { return inputModule.makeInputWordModel(iw, wcSetMap); }
public CausticPhotonMap(int numEmit, int gatherNum, float gatherRadius, float filterValue) { this.numEmit = numEmit; this.gatherNum = gatherNum; this.gatherRadius = gatherRadius;
public CausticPhotonMap(Options options) { numEmit = options.getInt("caustics.emit", 10000); gatherNum = options.getInt("caustics.gather", 50); gatherRadius = options.getFloat("caustics.radius", 0.5f); filterValue = options.getFloat("caustics.filter", 1.1f);
public CausticPhotonMap(int numEmit, int gatherNum, float gatherRadius, float filterValue) { this.numEmit = numEmit; this.gatherNum = gatherNum; this.gatherRadius = gatherRadius; bounds = new BoundingBox(); this.filterValue = filterValue; maxPower = 0; maxRadius = 0;...
this.filterValue = filterValue;
public CausticPhotonMap(int numEmit, int gatherNum, float gatherRadius, float filterValue) { this.numEmit = numEmit; this.gatherNum = gatherNum; this.gatherRadius = gatherRadius; bounds = new BoundingBox(); this.filterValue = filterValue; maxPower = 0; maxRadius = 0;...
public final Color mul(float s) { r *= s; g *= s; b *= s;
public final Color mul(Color c) { r *= c.r; g *= c.g; b *= c.b;
public final Color mul(float s) { r *= s; g *= s; b *= s; return this; }
public String toString() { long millis = nanos() / (1000 * 1000); if (millis < 10000) return String.format("%dms", millis); long hours = millis / (60 * 60 * 1000); millis -= hours * 60 * 60 * 1000; long minutes = millis / (60 * 1000); millis -= minutes * 60 * 1000; long seconds = millis / 1000; millis -= seconds * 1000...
public static String toString(long nanos) { Timer t = new Timer(); t.endTime = nanos; return t.toString();
public String toString() { long millis = nanos() / (1000 * 1000); if (millis < 10000) return String.format("%dms", millis); long hours = millis / (60 * 60 * 1000); millis -= hours * 60 * 60 * 1000; long minutes = millis / (60 * 1000); millis -= minutes * 60 * 100...
corpusTokenList = Arrays.asList(text.split("\\s+"));
corpusTokenList = new ArrayList<String>(); text = text.replaceAll("\\.|.", ""); for (String token : text.split("\\s+")) { corpusTokenList.add(token.toLowerCase()); }
private void makeEnTokenList(String text) { if (text == null) { return; } corpusTokenList = Arrays.asList(text.split("\\s+")); // 以下,複合語の追加 Set<String> complexWordSet = conceptDefinitionPanel.getComplexWordSet(); Utils.addEnComplexWord(corpusTokenList, complexWordSet); }
List lineWordList = Arrays.asList(line.split("\\s+"));
line = line.replaceAll("\\.|.", ""); List<String> lineWordList = new ArrayList<String>(); for (String lineWord : line.split("\\s+")) { lineWordList.add(lineWord.toLowerCase()); }
private List getEnLineWordList(String line) { List lineWordList = Arrays.asList(line.split("\\s+")); // 複合語の追加 Set complexWordSet = conceptDefinitionPanel.getComplexWordSet(); Utils.addEnComplexWord(lineWordList, complexWordSet); return lineWordList; }
Set complexWordSet = conceptDefinitionPanel.getComplexWordSet();
Set<String> complexWordSet = conceptDefinitionPanel.getComplexWordSet();
private List getEnLineWordList(String line) { List lineWordList = Arrays.asList(line.split("\\s+")); // 複合語の追加 Set complexWordSet = conceptDefinitionPanel.getComplexWordSet(); Utils.addEnComplexWord(lineWordList, complexWordSet); return lineWordList; }
public void setProperties(Dictionary properties) { reference.setProperties(properties);
public void setProperties(Dictionary props) { if (reference instanceof MockServiceReference) ((MockServiceReference) reference).setProperties(props); else throw new IllegalArgumentException("cannot update properties - service reference is not a " + MockServiceReference.class.getName());
public void setProperties(Dictionary properties) { reference.setProperties(properties); }
public MockServiceReference(Bundle bundle) { this(bundle, new Hashtable());
public MockServiceReference() { this(null, null, null);
public MockServiceReference(Bundle bundle) { this(bundle, new Hashtable()); }
this.properties.clear();
public void setProperties(Dictionary properties) { this.properties.clear(); Enumeration enm = properties.keys(); while (enm.hasMoreElements()) { Object key = enm.nextElement(); this.properties.put(key, properties.get(key)); } }
Enumeration enm = properties.keys(); while (enm.hasMoreElements()) { Object key = enm.nextElement(); this.properties.put(key, properties.get(key)); }
if (properties != null) this.properties = properties;
public void setProperties(Dictionary properties) { this.properties.clear(); Enumeration enm = properties.keys(); while (enm.hasMoreElements()) { Object key = enm.nextElement(); this.properties.put(key, properties.get(key)); } }
private void configure(final String configUri) throws FileSystemException
private void configure(final URL configUri) throws FileSystemException
private void configure(final String configUri) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configUri).getDocumentElement(); ...
final Element config = builder.parse(configUri).getDocumentElement();
configStream = configUri.openStream(); final Element config = builder.parse(configStream).getDocumentElement();
private void configure(final String configUri) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configUri).getDocumentElement(); ...
throw new FileSystemException("vfs.impl/load-config.error", configUri, e);
throw new FileSystemException("vfs.impl/load-config.error", configUri.toString(), e); } finally { if (configStream != null) { try { configStream.close(); } catch (IOException e) { log.warn(e.getLocalizedMessage(), e); } }
private void configure(final String configUri) throws FileSystemException { try { // Load up the config // TODO - validate final DocumentBuilder builder = createDocumentBuilder(); final Element config = builder.parse(configUri).getDocumentElement(); ...
configure(config.getAbsolutePath());
try { configure(config.toURL()); } catch (MalformedURLException e) { log.warn(e.getLocalizedMessage(), e); }
protected void configurePlugins() throws FileSystemException { String classpath = System.getProperty("java.class.path"); if (classpath == null) { // huh? why should that be? return; } StringTokenizer st = new StringTokenizer(classpath, File.pathSep...
configUri = url.toExternalForm();
configUri = url;
public void init() throws FileSystemException { // Set the replicator and temporary file store (use the same component) final DefaultFileReplicator replicator = createDefaultFileReplicator(); setReplicator(new PrivilegedFileReplicator(replicator)); setTemporaryFileStore(replicator); ...
this.configUri = configUri;
try { setConfiguration(new URL(configUri)); } catch (MalformedURLException e) { log.warn(e.getLocalizedMessage(), e); }
public void setConfiguration(final String configUri) { this.configUri = configUri; }
for (int i = 0; i < row.length; i++) { if (row[i]==null) { continue; } try { if (row[i] instanceof Blob) { Blob b = (Blob) row[i]; row[i]= IOUtils.toByteArray(b.getBinaryStream()); } else if (row[i] instanceof Clob) { Clob c = (Clob) row[i]; row[i]= IOUtils.toString(c.getCharacterStream()); } } catch (Exception e) { t...
public static void addRow(Object[] row) { rows.add(row); }
assertEquals(true, flag);
assertNotNull(flag); if (flag instanceof Boolean) { assertTrue((Boolean)flag); } else { assertEquals("1", String.valueOf(flag)); }
private void checkFlag(Object flag) { assertEquals(true, flag); }
assertEquals(1, id);
assertEquals("1", String.valueOf(id));
private void checkId(Object id) { assertEquals(1, id); }
assertEquals(3.14, num);
assertEquals("3.14", String.valueOf(num));
private void checkNum(Object num) { assertEquals(3.14, num); }