rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
deleteExperiment(node);
deleteExperiment();
private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof Experiment) deleteExperiment(node); else if...
deleteRecipe(node);
deleteRecipe();
private void deleteComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent component = (ModifiableConfigurableComponent)node.getUserObject(); if (component instanceof SocietyComponent) deleteSociety(node); else if (component instanceof Experiment) deleteExperiment(node); else if...
private void deleteExperiment(DefaultMutableTreeNode node) {
public void deleteExperiment() { DefaultMutableTreeNode node = getSelectedNode();
private void deleteExperiment(DefaultMutableTreeNode node) { if (node == null) return; Experiment experiment = (Experiment)node.getUserObject(); if (!experiment.isEditable()) { String reason = "has been run"; if (experiment.isRunning()) reason = "is in use"; int result = JOptionPane.showConfir...
cmtDialog.processResults(); final String trialId = cmtDialog.getTrialId(); if (trialId != null) createCMTExperiment(treeNode, originalExperimentName, cmtDialog.getExperimentName(), cmtDialog.getExperimentId(), trialId); GUIUtils.timeConsumingTaskEnd(organizer); }
ExperimentDB.deleteExperiment(id, name); GUIUtils.timeConsumingTaskEnd(organizer); }
public void run() { cmtDialog.processResults(); // a potentially long process final String trialId = cmtDialog.getTrialId(); if (trialId != null) createCMTExperiment(treeNode, originalExperimentName, cmtDialog.getExperimentName(), ...
private void deleteExperimentFromDatabase() {
public void deleteExperimentFromDatabase() {
private void deleteExperimentFromDatabase() { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel.add(new JLabel("Delete Expe...
private void deleteFolder(DefaultMutableTreeNode node) {
private void deleteFolder() { DefaultMutableTreeNode node = getSelectedNode();
private void deleteFolder(DefaultMutableTreeNode node) { if (node == root) return; if (node == null) return; int reply = JOptionPane.showConfirmDialog(this, "Delete folder and all its contents?", "Delete Folder", ...
private void deleteRecipe(DefaultMutableTreeNode node) {
private void deleteRecipe() { DefaultMutableTreeNode node = getSelectedNode();
private void deleteRecipe(DefaultMutableTreeNode node) { if (node == null) return; model.removeNodeFromParent(node); RecipeComponent rc = (RecipeComponent) node.getUserObject(); try { PDbBase pdb = new PDbBase(); try { int status = pdb.recipeExists(rc); if (status == PDbBase.RECIPE...
private void deleteSociety(DefaultMutableTreeNode node) {
private void deleteSociety() { DefaultMutableTreeNode node = getSelectedNode();
private void deleteSociety(DefaultMutableTreeNode node) { SocietyComponent society = (SocietyComponent)node.getUserObject(); if (!society.isEditable()) { int result = JOptionPane.showConfirmDialog(this, "Society has been or is being used; delete anyway?", "Society Not Editable", JOptionPa...
popupNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(); Object o = popupNode.getUserObject(); if (popupNode.isRoot()) {
DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(); Object o = selectedNode.getUserObject(); if (selectedNode.isRoot()) {
private void doPopup(MouseEvent e) { TreePath selPath = workspace.getPathForLocation(e.getX(), e.getY()); if (selPath == null) return; // set the selected node to be the node the mouse is pointing at workspace.setSelectionPath(selPath); popupNode = (DefaultMutableTreeNode) selPath.getLastPathComponent(...
private DefaultMutableTreeNode getSelectedNode() {
public DefaultMutableTreeNode getSelectedNode() {
private DefaultMutableTreeNode getSelectedNode() { TreePath selPath = workspace.getSelectionPath(); if (selPath == null) return null; return (DefaultMutableTreeNode) selPath.getLastPathComponent(); }
private DefaultMutableTreeNode newExperiment(DefaultMutableTreeNode node) {
public DefaultMutableTreeNode newExperiment() {
private DefaultMutableTreeNode newExperiment(DefaultMutableTreeNode node) { String name = getUniqueExperimentName(experimentNames.generateName(), false); if (name == null) return null; try { Experiment experiment = new Experiment(name); DefaultMutableTreeNod...
addExperimentToWorkspace(experiment, node);
addExperimentToWorkspace(experiment, getSelectedNode());
private DefaultMutableTreeNode newExperiment(DefaultMutableTreeNode node) { String name = getUniqueExperimentName(experimentNames.generateName(), false); if (name == null) return null; try { Experiment experiment = new Experiment(name); DefaultMutableTreeNod...
private void newFolder(DefaultMutableTreeNode node) {
public void newFolder() {
private void newFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); } }
addNode(node, newNode);
addNode(getSelectedNode(), newNode);
private void newFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); if (name != null) { DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(name, true); addNode(node, newNode); workspace.setSelection(newNode); } }
private void newRecipe(DefaultMutableTreeNode node) {
public void newRecipe() {
private void newRecipe(DefaultMutableTreeNode node) { Object[] values = metComboItems; Object answer = JOptionPane.showInputDialog(this, "Select Recipe Type", "Select Recipe", JOptionPane.QUESTION_MESSAGE, null, values, "Empty Recipe"); //"Mo Recipe"); if (answer instanceof...
addRecipeToWorkspace(recipe, node);
addRecipeToWorkspace(recipe, getSelectedNode());
private void newRecipe(DefaultMutableTreeNode node) { Object[] values = metComboItems; Object answer = JOptionPane.showInputDialog(this, "Select Recipe Type", "Select Recipe", JOptionPane.QUESTION_MESSAGE, null, values, "Empty Recipe"); //"Mo Recipe"); if (answer instanceof...
private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) {
public DefaultMutableTreeNode newSociety() {
private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { Object answer = JOptionPane.showInputDialog(this, "Select Society Type", "Select Society", JOptionPane.QUESTION_MESSAGE, null, socComboItems, "ScalabilityX"); if (answer == null) return null; SocietyCo...
DefaultMutableTreeNode newNode = addSocietyToWorkspace(sc, node);
DefaultMutableTreeNode newNode = addSocietyToWorkspace(sc, getSelectedNode());
private DefaultMutableTreeNode newSociety(DefaultMutableTreeNode node) { Object answer = JOptionPane.showInputDialog(this, "Select Society Type", "Select Society", JOptionPane.QUESTION_MESSAGE, null, socComboItems, "ScalabilityX"); if (answer == null) return null; SocietyCo...
private void renameComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent societyComponent = (ModifiableConfigurableComponent) node.getUserObject(); if (societyComponent instanceof SocietyComponent) { renameSociety(node); } else if (societyComponent instanceof Experiment) { renameExperiment(node); } e...
private void renameComponent() {
private void renameComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent societyComponent = (ModifiableConfigurableComponent) node.getUserObject(); if (societyComponent instanceof SocietyComponent) { renameSociety(node); } else if (societyComponent instanceof Experiment) { r...
renameComponent(node, name);
renameComponent(getSelectedNode(), name);
private void renameComponent(DefaultMutableTreeNode node) { ModifiableConfigurableComponent societyComponent = (ModifiableConfigurableComponent) node.getUserObject(); if (societyComponent instanceof SocietyComponent) { renameSociety(node); } else if (societyComponent instanceof Experiment) { r...
private void renameExperiment(DefaultMutableTreeNode node) {
private void renameExperiment() {
private void renameExperiment(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New experiment name"); renameExperiment(node, name); }
renameExperiment(node, name);
renameExperiment(getSelectedNode(), name);
private void renameExperiment(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New experiment name"); renameExperiment(node, name); }
private void renameFolder(DefaultMutableTreeNode node) {
private void renameFolder() {
private void renameFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); // FIXME Unique? renameFolder(node, name); }
renameFolder(node, name);
renameFolder(getSelectedNode(), name);
private void renameFolder(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New folder name"); // FIXME Unique? renameFolder(node, name); }
private void renameRecipe(DefaultMutableTreeNode node) {
private void renameRecipe() {
private void renameRecipe(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New recipe name"); renameRecipe(node, name); }
renameRecipe(node, name);
renameRecipe(getSelectedNode(), name);
private void renameRecipe(DefaultMutableTreeNode node) { String name = JOptionPane.showInputDialog("New recipe name"); renameRecipe(node, name); }
private void renameSociety(DefaultMutableTreeNode node) {
private void renameSociety() { DefaultMutableTreeNode node = getSelectedNode();
private void renameSociety(DefaultMutableTreeNode node) { SocietyComponent societyComponent = (SocietyComponent) node.getUserObject(); String name = JOptionPane.showInputDialog("New society name"); renameSociety(node, name); }
private void saveRecipe(DefaultMutableTreeNode node) {
public void saveRecipe() { DefaultMutableTreeNode node = getSelectedNode();
private void saveRecipe(DefaultMutableTreeNode node) { if (node == null) return; RecipeComponent rc = (RecipeComponent) node.getUserObject(); saveRecipe(rc); }
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) {
public void selectExperimentFromDatabase() {
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel....
final DefaultMutableTreeNode treeNode = node;
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel....
createCMTExperiment(treeNode, originalExperimentName,
createCMTExperiment(getSelectedNode(), originalExperimentName,
private void selectExperimentFromDatabase(DefaultMutableTreeNode node) { Map experimentNamesMap = ExperimentDB.getExperimentNames(); Set keys = experimentNamesMap.keySet(); JComboBox cb = new JComboBox(keys.toArray(new String[keys.size()])); cb.setEditable(false); JPanel panel = new JPanel(); panel....
private void selectRecipeFromDatabase(DefaultMutableTreeNode node) {
public void selectRecipeFromDatabase() {
private void selectRecipeFromDatabase(DefaultMutableTreeNode node) { Map recipeNamesHT = getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database",...
addRecipeToWorkspace(mc, node);
addRecipeToWorkspace(mc, getSelectedNode());
private void selectRecipeFromDatabase(DefaultMutableTreeNode node) { Map recipeNamesHT = getRecipeNamesFromDatabase(); Set dbRecipeNames = recipeNamesHT.keySet(); if (dbRecipeNames.isEmpty()) { JOptionPane.showMessageDialog(this, "There are no recipes in the database",...
private void startBuilder(DefaultMutableTreeNode node, boolean openForEditing) { csmart.runBuilder((ModifiableConfigurableComponent) node.getUserObject(), false, openForEditing);
private void startBuilder() { csmart.runBuilder((ModifiableConfigurableComponent) getSelectedNode().getUserObject(), false);
private void startBuilder(DefaultMutableTreeNode node, boolean openForEditing) { csmart.runBuilder((ModifiableConfigurableComponent) node.getUserObject(), false, openForEditing); }
private void startConsole(DefaultMutableTreeNode node) {
public void startConsole() { DefaultMutableTreeNode node = getSelectedNode();
private void startConsole(DefaultMutableTreeNode node) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimentNames.generateName(name...
csmart.runExperimentBuilder(experiment, false, true);
csmart.runExperimentBuilder(experiment, false);
private void startConsole(DefaultMutableTreeNode node) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Temp Experiment for " + sc.getSocietyName(); name = experimentNames.generateName(name...
private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) {
public void startExperimentBuilder() { DefaultMutableTreeNode node = getSelectedNode();
private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getSocietyName(); ex...
csmart.runExperimentBuilder(experiment, false, openForEditing);
csmart.runExperimentBuilder(experiment, false);
private void startExperimentBuilder(DefaultMutableTreeNode node, boolean openForEditing) { Object o = node.getUserObject(); Experiment experiment; if (o instanceof SocietyComponent) { SocietyComponent sc = (SocietyComponent) o; String name = "Experiment for " + sc.getSocietyName(); ex...
e.invoke_virtual(Constants.TYPE_STRING_BUFFER, APPEND_DOUBLE);
e.invoke_virtual(Constants.TYPE_STRING_BUFFER, APPEND_FLOAT);
private static void append_string_helper(CodeEmitter e, Type type, ArrayDelimiters delims, Customizer customizer, ProcessArrayCallback callb...
private static void hash_array(final CodeEmitter e, Type type, final Customizer customizer) { Label isNull = e.make_label();
private static void hash_array(final CodeEmitter e, Type type, final int multiplier, final Customizer customizer) { Label skip = e.make_label();
private static void hash_array(final CodeEmitter e, Type type, final Customizer customizer) { Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); ComplexOps.process_array(e, type, new ProcessArrayCallback() { public void processElement(...
e.ifnull(isNull);
e.ifnull(skip);
private static void hash_array(final CodeEmitter e, Type type, final Customizer customizer) { Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); ComplexOps.process_array(e, type, new ProcessArrayCallback() { public void processElement(...
hash_code(e, type, customizer);
hash_code(e, type, multiplier, customizer);
private static void hash_array(final CodeEmitter e, Type type, final Customizer customizer) { Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); ComplexOps.process_array(e, type, new ProcessArrayCallback() { public void processElement(...
e.mark(isNull);
e.mark(skip);
private static void hash_array(final CodeEmitter e, Type type, final Customizer customizer) { Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); ComplexOps.process_array(e, type, new ProcessArrayCallback() { public void processElement(...
hash_code(e, type, customizer);
hash_code(e, type, multiplier, customizer);
public void processElement(Type type) { hash_code(e, type, customizer); }
e.dup2();
private static void hash_long(CodeEmitter e) { // (int)(f ^ (f >>> 32)) e.push(32); e.math(e.USHR, Type.LONG_TYPE); e.math(e.XOR, Type.LONG_TYPE); e.cast_numeric(Type.LONG_TYPE, Type.INT_TYPE); }
Label isNull = e.make_label();
Label skip = e.make_label();
private static void hash_object(CodeEmitter e, Type type, Customizer customizer) { // (f == null) ? 0 : f.hashCode(); Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); if (customizer != null) { customizer.customize(e, type); ...
e.ifnull(isNull);
e.ifnull(skip);
private static void hash_object(CodeEmitter e, Type type, Customizer customizer) { // (f == null) ? 0 : f.hashCode(); Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); if (customizer != null) { customizer.customize(e, type); ...
e.mark(isNull);
e.mark(skip);
private static void hash_object(CodeEmitter e, Type type, Customizer customizer) { // (f == null) ? 0 : f.hashCode(); Label isNull = e.make_label(); Label end = e.make_label(); e.dup(); e.ifnull(isNull); if (customizer != null) { customizer.customize(e, type); ...
hash_long(e); case Type.FLOAT: e.invoke_static(Constants.TYPE_FLOAT, FLOAT_TO_INT_BITS);
private static void hash_primitive(CodeEmitter e, Type type) { switch (type.getSort()) { case Type.BOOLEAN: // f ? 0 : 1 e.push(1); e.math(e.XOR, Type.INT_TYPE); break; case Type.DOUBLE: // Double.doubleToLongBits(f), hash_code(Long.TYPE) ...
default:
private static void hash_primitive(CodeEmitter e, Type type) { switch (type.getSort()) { case Type.BOOLEAN: // f ? 0 : 1 e.push(1); e.math(e.XOR, Type.INT_TYPE); break; case Type.DOUBLE: // Double.doubleToLongBits(f), hash_code(Long.TYPE) ...
assert(tasks.hasMoreElements());
assertTrue(tasks.hasMoreElements());
public void testParse() { tasks = tfp.elements(); assert(tasks.hasMoreElements()); }
if (context != null && context.request() != null) { if (ERXApplication.requestHandlingLog.isInfoEnabled()) { ERXApplication.requestHandlingLog.info(context.request()); } }
public void appendToResponse(WOResponse response, WOContext context) { super.appendToResponse(response, context); if(useComponentActionRedirection()) { ERXComponentActionRedirector redirector = ERXComponentActionRedirector.currentRedirector(); if(redirector != null) { ...
if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
public ComponentPrinter(JComponent component, String jobName) { log = CSMART.createLogger(this.getClass().getName()); this.component = component; job = PrinterJob.getPrinterJob(); if (job == null) { if(log.isDebugEnabled()) { log.error("Couldn't find a printer!"); } } else { java.awt....
if(log.isDebugEnabled()) { log.error("Print job failed: " + e);
if(log.isErrorEnabled()) { log.error("Print job failed: ", e);
public void printPages() { if (job == null) return; try { job.print(); } catch (PrinterException e) { if(log.isDebugEnabled()) { log.error("Print job failed: " + e); } } }
plugin.setParent(this);
plugin.setParent(data);
public ComponentData addComponentData(ComponentData data) {// data.setType(ComponentData.AGENT);// data.setName(getFullName().toString());// data.setClassName(agentClassName);// data.setOwner(this);// data.setParent(getParent()); // Add Asset Data PlugIn GenericComponentData plugin = new Gener...
plugin.setParent(this);
plugin.setParent(data); plugin.setOwner(this);
public ComponentData addComponentData(ComponentData data) {// data.setType(ComponentData.AGENT);// data.setName(getFullName().toString());// data.setClassName(agentClassName);// data.setOwner(this);// data.setParent(getParent()); // Add Asset Data PlugIn GenericComponentData plugin = new Gener...
data.addChild(init.addComponentData(new GenericComponentData()));
plugin = new GenericComponentData(); plugin.setOwner(this); plugin.setParent(data); data.addChild(init.addComponentData(plugin));
public ComponentData addComponentData(ComponentData data) {// data.setType(ComponentData.AGENT);// data.setName(getFullName().toString());// data.setClassName(agentClassName);// data.setOwner(this);// data.setParent(getParent()); // Add Asset Data PlugIn GenericComponentData plugin = new Gener...
data.addChild(pg.addComponentData(new GenericComponentData()));
plugin = new GenericComponentData(); plugin.setOwner(this); plugin.setParent(data); data.addChild(pg.addComponentData(plugin));
public ComponentData addComponentData(ComponentData data) {// data.setType(ComponentData.AGENT);// data.setName(getFullName().toString());// data.setClassName(agentClassName);// data.setOwner(this);// data.setParent(getParent()); // Add Asset Data PlugIn GenericComponentData plugin = new Gener...
debug("Searching for forrest.properties.xml in" + source.getURI()); source = m_resolver.resolveURI(propertiesStringURI);
debug("Searching for forrest.properties.xml in " + source.getURI());
private AntProperties loadXMLPropertiesFromURI(AntProperties precedingProperties, String propertiesStringURI) throws MalformedURLException, IOException, ParserConfigurationException, SAXException { Source source = null; InputStream in = null; try { if (debugging...
System.out.println("Sent cluster urls");
System.out.println("Sent agent urls");
public void execute( HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.out = response.getOutputStream(); // create a URL parameter visitor ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public ...
GLCanvas canvas1 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
GLCanvas canvas1 = new GLCanvas();
public void run(String[] args) { GLCanvas canvas1 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas1.addGLEventListener(new Listener()); canvas1.setSize(256, 256); Frame frame1 = new Frame("Canvas 1"); frame1.setLayout(new BorderLayout()); frame1.add(canvas1, BorderLayout...
GLCanvas canvas2 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities(), null, canvas1.getContext(), null);
GLCanvas canvas2 = new GLCanvas(null, null, canvas1.getContext(), null);
public void run(String[] args) { GLCanvas canvas1 = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas1.addGLEventListener(new Listener()); canvas1.setSize(256, 256); Frame frame1 = new Frame("Canvas 1"); frame1.setLayout(new BorderLayout()); frame1.add(canvas1, BorderLayout...
if (log.isErrorEnabled()) { log.error("Null property " + name.toString() + " copying from " + this.getFullName().toString(), new Throwable()); } continue;
myProp = getInvisibleProperty(name); if (myProp == null) { if (log.isErrorEnabled()) { log.error("Null property " + name.toString() + " copying from " + this.getFullName().toString(), new Throwable()); } continue; }
public BaseComponent copy(BaseComponent result) { // Make sure we're copying apples into apples // The result can be a sub-class, but we want it // to at least have the same set of properties if (! (this.getClass().isAssignableFrom(result.getClass()))) return null; Iterator iter = getSortedLocalPr...
if (hisProp == null) { if (log.isErrorEnabled()) { log.error("Report bug 1377: Using " + CSMART.writeDebug() + " couldn't find " + hisPropName.toString() + " in " + result.getFullName().toString() + " copying from " + name.toString() + " in " + this.getFullName().toString(), new Throwable()); }
if (hisProp == null && ((hisProp = result.getInvisibleProperty(hisPropName)) == null )) { if (log.isErrorEnabled()) { log.error("Report bug 1377: Using " + CSMART.writeDebug() + " couldn't find " + hisPropName.toString() + " in " + result.getFullName().toString() + " copying from " + name.toString() + " in " + this.get...
public BaseComponent copy(BaseComponent result) { // Make sure we're copying apples into apples // The result can be a sub-class, but we want it // to at least have the same set of properties if (! (this.getClass().isAssignableFrom(result.getClass()))) return null; Iterator iter = getSortedLocalPr...
Object nprop = currentIterator.next(); if (nprop == nullProperty) {
Property nprop = (Property)currentIterator.next(); if (!nprop.isVisible()) {
public Iterator getProperties() { return new Iterator() { Iterator currentIterator = getMyProperties().values().iterator(); int nextChildIndex = 0; Property pendingProp = null; public boolean hasNext() { while (pendingProp == null) { while (!currentIterator.hasNext()...
pendingProp = (Property)nprop;
pendingProp = nprop;
public Iterator getProperties() { return new Iterator() { Iterator currentIterator = getMyProperties().values().iterator(); int nextChildIndex = 0; Property pendingProp = null; public boolean hasNext() { while (pendingProp == null) { while (!currentIterator.hasNext()...
Object nprop = currentIterator.next(); if (nprop == nullProperty) {
Property nprop = (Property)currentIterator.next(); if (!nprop.isVisible()) {
public boolean hasNext() { while (pendingProp == null) { while (!currentIterator.hasNext()) { if (nextChildIndex >= getChildCount()) { return false; } currentIterator = ((ConfigurableComponent)getChild(nextChildIndex++)).g...
pendingProp = (Property)nprop;
pendingProp = nprop;
public boolean hasNext() { while (pendingProp == null) { while (!currentIterator.hasNext()) { if (nextChildIndex >= getChildCount()) { return false; } currentIterator = ((ConfigurableComponent)getChild(nextChildIndex++)).g...
if (pendingName != null && getProperty(pendingName) == nullProperty) {
if (pendingName != null && !((Property)getProperty(pendingName)).isVisible()) {
public Iterator getPropertyNames() { return new Iterator() { Iterator currentIterator = getMyProperties().keySet().iterator(); int nextChildIndex = 0; CompositeName pendingName = null; public boolean hasNext() { while (pendingName == null) { while (!currentIterator.hasNext()) { ...
if (pendingName != null && getProperty(pendingName) == nullProperty) {
if (pendingName != null && !((Property)getProperty(pendingName)).isVisible()) {
public boolean hasNext() { while (pendingName == null) { while (!currentIterator.hasNext()) { if (nextChildIndex >= getChildCount()) { return false; } currentIterator = ((ConfigurableComponent)getChild(nextChildIndex++)).getPropertyNames(...
Object np = getMyProperties().get(prop.getName()); return !nullProperty.equals(np);
Property p = (Property)getMyProperties().get(prop.getName()); return p.isVisible();
public boolean isPropertyVisible(Property prop) { Object np = getMyProperties().get(prop.getName()); return !nullProperty.equals(np); }
Object np = getMyProperties().get(name); if (nullProperty.equals(np)) { getMyProperties().remove(name); firePropertyAdded(prop); }
p = (Property) getMyProperties().get(name); if (!p.isVisible()) firePropertyAdded(prop);
public void setPropertyVisible(Property prop, boolean newVisible) { CompositeName name = prop.getName(); if (newVisible) { Object np = getMyProperties().get(name); if (nullProperty.equals(np)) { getMyProperties().remove(name); firePropertyAdded(prop); } } else { Object np = ...
Object np = getMyProperties().put(name, nullProperty); if (!nullProperty.equals(np)) firePropertyRemoved(prop);
p = (Property)getMyProperties().get(name); if (p.isVisible()) firePropertyRemoved(prop);
public void setPropertyVisible(Property prop, boolean newVisible) { CompositeName name = prop.getName(); if (newVisible) { Object np = getMyProperties().get(name); if (nullProperty.equals(np)) { getMyProperties().remove(name); firePropertyAdded(prop); } } else { Object np = ...
p.setVisible(newVisible); getMyProperties().put(name, p);
public void setPropertyVisible(Property prop, boolean newVisible) { CompositeName name = prop.getName(); if (newVisible) { Object np = getMyProperties().get(name); if (nullProperty.equals(np)) { getMyProperties().remove(name); firePropertyAdded(prop); } } else { Object np = ...
throw new ConfigurationException("Unable to get attribute value for " + name);
String error = "Unable to get attribute value for " + name + "\n" + "Please make sure you defined " + name + " in forrest.properties.xml either in $PROJECT_HOME " + "or in the default.forrest.properties.xml of the plugin " + "that is requesting this property." + "\n" + "If you see this message, most of the time you spo...
public Object getAttribute(String name, Configuration modeConf, Map objectModel) throws ConfigurationException { String original; String attributeValue; try { original = super.getAttributeValues(name, modeConf, objectModel)[0].toString(); attributeValue = this.g...
StringBuffer sb=new StringBuffer(); sb.append(e.sqlStringForAttributeNamed(inqualifier.key())); sb.append(" IN ");
String result = null;
public String sqlStringForSQLExpression(EOQualifier eoqualifier, EOSQLExpression e) { ERXInQualifier inqualifier = (ERXInQualifier)eoqualifier; StringBuffer sb=new StringBuffer(); sb.append(e.sqlStringForAttributeNamed(inqualifier.key())); sb.append(" IN "); ...
NSArray valueArray = (NSArray)inqualifier.value(); sb.append("("); for (int i = 0; i < valueArray.count(); i++ ) { if ( i > 0 ) sb.append(", "); sb.append(e.sqlStringForValue(valueArray.objectAtIndex(i), inqualifier.key())); } sb.append(")");
result = ERXEOAccessUtilities.sqlWhereClauseStringForKey(e, inqualifier.key(), (NSArray)inqualifier.value());
public String sqlStringForSQLExpression(EOQualifier eoqualifier, EOSQLExpression e) { ERXInQualifier inqualifier = (ERXInQualifier)eoqualifier; StringBuffer sb=new StringBuffer(); sb.append(e.sqlStringForAttributeNamed(inqualifier.key())); sb.append(" IN "); ...
return sb.toString();
return result;
public String sqlStringForSQLExpression(EOQualifier eoqualifier, EOSQLExpression e) { ERXInQualifier inqualifier = (ERXInQualifier)eoqualifier; StringBuffer sb=new StringBuffer(); sb.append(e.sqlStringForAttributeNamed(inqualifier.key())); sb.append(" IN "); ...
if (log.isDebugEnabled()) { for (int i = 0; i < relContainer.getChildCount(); i++) { RelationshipBase relt = (RelationshipBase) relContainer.getChild(i); if (relt == null) { if (log.isErrorEnabled()) { log.error("Please report seeing Bug 1304: Using CSMART " + CSMART.writeDebug() + " had Null RelationshipBase at child ...
private void addRelationships(RelationshipData[] rel) { ContainerBase relContainer = new ContainerBase("Relationships"); relContainer.initProperties(); addChild(relContainer); for(int i=0; i < rel.length; i++) { RelationshipBase newR = new RelationshipBase(rel[i]); newR.initProperties(); re...
if (log.isDebugEnabled()) { log.debug(this + " doing query " + query + " and created Relationship: " + rd); } if (rd.getType() == null && log.isErrorEnabled()) { log.error("Please report bug 1304: using CSMART " + CSMART.writeDebug() + " just created a RelationshipData from the DB and type is now null: " + rd, new Thro...
private RelationshipData[] getRelationshipData() { // creates relationships by creating RelationshipData // from the database and passing that as an argument // to RelationshipBase ArrayList relationshipData = new ArrayList(); try { Connection conn = DBUtils.getConnection(); try { Stat...
public int getSize()
public long getSize()
public int getSize() { if ("oracle".equals(ConfigurationManager.getProperty("db.name"))) { return bRow.getIntColumn("size_bytes"); } // default is column "size" for postgres return bRow.getIntColumn("size"); }
if ("oracle".equals(ConfigurationManager.getProperty("db.name"))) { return bRow.getIntColumn("size_bytes"); } return bRow.getIntColumn("size");
return bRow.getLongColumn("size_bytes");
public int getSize() { if ("oracle".equals(ConfigurationManager.getProperty("db.name"))) { return bRow.getIntColumn("size_bytes"); } // default is column "size" for postgres return bRow.getIntColumn("size"); }
return new TableRowIterator(statement.executeQuery(query),
TableRowIterator retTRI = new TableRowIterator(statement.executeQuery(query),
public static TableRowIterator query(Context context, String table, String query) throws SQLException { if (log.isDebugEnabled()) { log.debug("Running query \"" + query + "\""); } Statement statement = context.getDBConnection().createStatement(); return ne...
retTRI.setStatement(statement); return retTRI;
public static TableRowIterator query(Context context, String table, String query) throws SQLException { if (log.isDebugEnabled()) { log.debug("Running query \"" + query + "\""); } Statement statement = context.getDBConnection().createStatement(); return ne...
results = null;
if (results != null) results.close(); } catch (SQLException sqle) { } try { if (statemt != null) statemt.close(); statemt = null;
public void close() { try { results.close(); results = null; } catch (SQLException sqle) { } }
int userid = c.getCurrentUser().getID(); AuthorizeException j = new AuthorizeException("test");
int userid; EPerson e = c.getCurrentUser(); if( e == null ) { userid = 0; } else { userid = e.getID(); } AuthorizeException j = new AuthorizeException("Denied");
public static void authorizeAction(Context c, DSpaceObject o, int action) throws AuthorizeException, SQLException { int otype = o.getType(); int oid = o.getID(); if( !authorize(c, otype, oid, action, c.getCurrentUser()) ) { int userid = c.getCurrentUser().getID...
public void setColumn(String column, String s)
public void setColumn(String column, boolean b)
public void setColumn(String column, String s) { if (!hasColumn(column)) { throw new IllegalArgumentException("No such column " + column); } data.put(canonicalize(column), (s == null) ? NULL_OBJECT : s); }
data.put(canonicalize(column), (s == null) ? NULL_OBJECT : s);
if ("oracle".equals(ConfigurationManager.getProperty("db.name"))) { data.put(canonicalize(column), b ? new Integer(1) : new Integer(0)); } else { data.put(canonicalize(column), b ? Boolean.TRUE : Boolean.FALSE); }
public void setColumn(String column, String s) { if (!hasColumn(column)) { throw new IllegalArgumentException("No such column " + column); } data.put(canonicalize(column), (s == null) ? NULL_OBJECT : s); }
setWasNullColumnIndex(columnIndex);
public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_INT64) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex...
setWasNullColumnIndex(columnIndex);
public Blob getBlob(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_BLOB) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == null) { ...
setWasNullColumnIndex(columnIndex);
public boolean getBoolean(int columnIndex) throws SQLException { throw new SQLException("Not yet implemented"); }
setWasNullColumnIndex(columnIndex);
public byte getByte(int columnIndex) throws SQLException { throw new SQLException("Not yet implemented"); }
setWasNullColumnIndex(columnIndex);
public byte[] getBytes(int columnIndex) throws SQLException { if (((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_TEXT) &&((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_VARYING)) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(col...
setWasNullColumnIndex(columnIndex);
public java.sql.Date getDate(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_TYPE_DATE) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == n...
setWasNullColumnIndex(columnIndex);
public double getDouble(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_DOUBLE) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == null) { ...
setWasNullColumnIndex(columnIndex);
public float getFloat(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_FLOAT) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == null) { ...
setWasNullColumnIndex(columnIndex);
public int getInt(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_LONG) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == null) { ...
setWasNullColumnIndex(columnIndex);
public long getLong(int columnIndex) throws SQLException { if ((getXsqlvar(columnIndex).sqltype & ~1) != GDS.SQL_INT64) { throw new SQLException("Wrong type for column " + columnIndex + "type should be" + getXsqlvar(columnIndex).sqltype); } if (row[columnIndex - 1] == null) { ...
setWasNullColumnIndex(columnIndex);
public Object getObject(int columnIndex) throws SQLException { if (row == null) { throw new SQLException("No row fetched"); } return row[columnIndex - 1]; }
throw new SQLException("Not yet implemented");
return rowNum;
public int getRow() throws SQLException { throw new SQLException("Not yet implemented"); }