rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
} else if (_module == null && context.endsWith("artifactId")) {
} else if (_module == null && context.endsWith("artifactId") && !context.equals("project/parent/artifactId")) {
public void characters(char[] ch, int start, int length) throws SAXException { String txt = IvyPatternHelper.substituteVariables(new String(ch, start, length).trim(), _properties); String context = getContext(); if (_md.getModuleRevisionId() == null || context.startsWith("projec...
ERXArrayUtilities.sortedArraySortedWithKey(aSortedArray, _localDestinationDisplayKey());
ERXArrayUtilities.sortArrayWithKey(aSortedArray, _localDestinationDisplayKey());
public NSArray theList() { NSMutableArray aSortedArray; NSArray anUnsortedArray; if (_privateList()==null) { EODataSource aDataSource = _localDataSource(); anUnsortedArray = aDataSource.fetchObjects(); // 81398 sort contents aSortedArray = new NSMutab...
if(false) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name")); for (Enumeration e = entities.objectEnumerator(); e.hasMo...
NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " + class1.getName() + " found entities: " + entities.valueForKey("name")); for (Enumeration e = entities.objectEnumerator(); e.hasMoreElements()...
public static void registerDescriptionForClass(Class class1) { if(false) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " +...
EOEntity entity = (EOEntity)_entitiesForClass.objectForKey(class1.getName()); if (entity != null) { if (cat.isDebugEnabled()) cat.debug("Registering description for class: " + class1.getName() + " found entity: " + entity.name()); EOClassDescription.registerClassDescription(new ERXEntityClassDescription(entity), class1...
cat.error("Unable to register descriptions for class: " + class1.getName());
public static void registerDescriptionForClass(Class class1) { if(false) { NSArray entities = (NSArray)_entitiesForClass.objectForKey(class1.getName()); if (entities != null) { if (cat.isDebugEnabled()) cat.debug("Registering descriptions for class: " +...
_entitiesForClass.setObjectForKey(eoentity, eoentity.className());
NSMutableArray array = (NSMutableArray)_entitiesForClass.objectForKey(eoentity.className()); if(array == null) { array = new NSMutableArray(); } array.addObject(eoentity); _entitiesForClass.setObjectForKey(array, eoentity.className());
public static void registerDescriptionForEntitiesInModel(EOModel model) { if (!_registeredModelNames.containsObject(model.name())) { for (Enumeration e = model.entities().objectEnumerator(); e.hasMoreElements();) { EOEntity eoentity = (EOEntity)e.nextElement(); if(cat...
if (location.startsWith("http:")) { location = URLEncoder.encode(location, "UTF-8"); }
public String locate(String hint, Map om) throws Exception { String location = null; final InvokeContext context = new InvokeContext(); final Logger contextLogger = getLogger().getChildLogger("ctx"); ContainerUtil.enableLogging(context, contextLogger); ContainerUtil.compose(contex...
aboutPanel.add(new JLabel("Command Line Arguments:"), new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 5, 5), 0, 0)); Vector data = new Vector(); Properties properties = node.getArguments(); Enumeration propertyNames = properties.propertyNames(); while (...
public void displayAbout() { ArrayList agentNames = (ArrayList)getPropertyValue((ConfigurableComponent)node, "AgentNames"); JPanel aboutPanel = new JPanel(); aboutPanel.setLayout(new GridBagLayout()); int x = 0; int y = 0; // insets are top, left, bottom, right aboutPanel.add(new JLabel("St...
if ((userData instanceof ModifiableConfigurableComponent) && !((ModifiableConfigurableComponent)userData).isEditable()) return DnDConstants.ACTION_NONE;
public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before) { DataFlavor[] flavors = t.getTransferDataFlavors(); int action = isDroppable(flavors, target); if (action != DnDConstants.ACTION_NONE) { ...
System.out.println(cflavor.getSourceClassName());
private int testFlavors(DataFlavor[] possibleFlavors, CSMARTDataFlavor testFlavor) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor instanceof CSMARTDataFlavor) { CSMARTDataFlavor cflavor = (CSMARTDataFlavor) flavor; ...
if (selectedNode.getUserObject() != null && selectedNode.getUserObject().equals(cc)) { DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)selectedNode.getParent(); if (parentNode.getUserObject() != null && parentNode.getUserObject() instanceof Experiment) { experiment = (Experiment)parentNode.getUserObject(); ...
DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)selectedNode.getParent(); if (parentNode.getUserObject() != null && parentNode.getUserObject() instanceof Experiment) { experiment = (Experiment)parentNode.getUserObject(); if (cc instanceof SocietyComponent) { SocietyComponent society = (SocietyComponent)cc...
protected void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called if (cc instanceof Experiment) { runBuilderOnExperiment((Experiment)cc); return; } ModifiableComponent originalComponent = null; Experim...
cc.setEditable(false); if (originalComponent != null) originalComponent.setEditable(false);
protected void runBuilder(ModifiableComponent cc, boolean alwaysNew) { // note that cc is guaranteed non-null when this is called if (cc instanceof Experiment) { runBuilderOnExperiment((Experiment)cc); return; } ModifiableComponent originalComponent = null; Experim...
societyCopy.setEditable(false); originalSociety.setEditable(false);
private void runBuilderOnExperiment(Experiment experiment) { Thread configureThread = null; experimentToEdit = null; configureThread = new ConfigureThread("ConfigureExperiment", experiment); GUIUtils.timeConsumingTaskStart(csmart); try { configureThread.start(); } catch (RuntimeException ...
finalString.append(tempString);
finalString.append(tempString.toString());
public static String displayNameForKey(String key) { StringBuffer finalString = new StringBuffer(); if (key != null) { NSArray keys=NSArray.componentsSeparatedByString(key,"."); String lastHop=(String)keys.objectAtIndex(keys.count()-1); StringBuffer tempString = new St...
ac.addParameter(agents[j].getShortName());
private void saveNodeToDb(NodeComponent node, ComponentData parent) { ComponentData nc = new GenericComponentData(); nc.setType(ComponentData.NODE); nc.setName(node.getShortName()); nc.setClassName(Node.class.getName()); // leave this out?? FIXME nc.setOwner(this); // the experiment? FIXME nc.setPar...
for (int i = 0; i < components.size(); i++) {
for (int i = 0, n = components.size(); i < n; i++) {
public void saveToDb() { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExperimentName()); // this should ...
pdb.setPreexistingItems(theSoc);
if (pdb.populateHNA(theSoc, 1)) setCloned(true);
public void saveToDb() { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExperimentName()); // this should ...
for (int i = components.size() - 1; i >= 0; i--) {
for (int i = 0, n = components.size(); i < n; i++) {
public void saveToDb() { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExperimentName()); // this should ...
} if (pdb.populate(theSoc, 1)) { setCloned(true);
if (pdb.populateCSMI(theSoc, 1)) setCloned(true);
public void saveToDb() { try { Set writtenNodes = new HashSet(); List components = getComponents(); NodeComponent[] nodesToWrite = getNodes(); ComponentData theSoc = new GenericComponentData(); theSoc.setType(ComponentData.SOCIETY); theSoc.setName(getExperimentName()); // this should ...
String[] a = new String[1]; a[0] = prog; return exec (a, null);
return exec (prog, null);
public Process exec (String prog) throws IOException { String[] a = new String[1]; a[0] = prog; return exec (a, null); }
public ConcreteProcess (String[] progarray, String[] envp) throws IOException
public ConcreteProcess (String[] progarray, String[] envp, File dir) throws IOException
public ConcreteProcess (String[] progarray, String[] envp) throws IOException { throw new IOException ("eCos processes unimplemented"); }
Message.verbose("\t"+getName()+": revision in cache: "+mrid); return toSystem(rmr);
if (rmr.getDescriptor().isDefault() && rmr.getResolver() != this) { Message.verbose("\t"+getName()+": found revision in cache: "+mrid+": but it's a default one, maybe we can find a better one"); } else { Message.verbose("\t"+getName()+": revision in cache: "+mrid); return toSystem(rmr); }
public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data) throws ParseException { dd = fromSystem(dd); clearIvyAttempts(); boolean downloaded = false; boolean searched = false; Date cachedPublicationDate = null; ModuleRevisionId mrid = d...
localizedString = localizer.localizedTemplateStringForKeyWithObjectOtherObject((String)valueForBinding("keyPath"), object(),valueForBinding("otherObject"));
localizedString = localizer.localizedTemplateStringForKeyWithObjectOtherObject((String)valueForBinding("templateString"), object(),valueForBinding("otherObject"));
public String value() { ERXLocalizer localizer = ERXLocalizer.localizerForSession(session()); String stringToLocalize = null, localizedString = null; if(!hasBinding("templateString")) { if(hasBinding("object") || hasBinding("keyPath")) { Object value = null; ...
alldata.add(cdata);
if (cdata != null) alldata.add(cdata);
public void initProperties() { // create society properties from cdata // create agents from cdata ArrayList agentData = new ArrayList(); ArrayList alldata = new ArrayList(); alldata.add(cdata); // FIXME: It'd be nice to deal with binders of Agents in here!!! // Find all the agents for (in...
public LatLonPoint getLocation();
LatLonPoint getLocation();
public LatLonPoint getLocation();
for (int i = 0; i < thatSize; i++) { if (that.get(thatSize - 1 - i).equals(get(thisSize - 1 - i))) continue; return false;
CompositeName thisp = this; CompositeName thatp = that; for (int i = thatSize; i>0; i--) { CompositeName thisel = thisp.last(); CompositeName thatel = thisp.last(); if (! thisel.equals(thatel)) { return false; } thisp = thisp.getPrefix(); thatp = thatp.getPrefix();
public boolean endsWith(CompositeName that) { int thatSize = that.size(); int thisSize = size(); if (thatSize > thisSize) return false; // test name has too many components for (int i = 0; i < thatSize; i++) { if (that.get(thatSize - 1 - i).equals(get(thisSize - 1 - i))) continue; return false; ...
if (o == this) return true;
public boolean equals(Object o) { if (o instanceof CompositeName) { int diff = compareTo(o); return diff == 0; } return false; }
if (n == size - 1) return sname; return getParentName().get(n);
CompositeName thisp = this; for (int i=(size-1); i>n; i--) { thisp = thisp.getPrefix(); } return thisp.last();
public CompositeName get(int n) { int size = size(); if (n >= size) throw new IllegalArgumentException("Index out of range: " + n + ">=" + size); if (n < 0) throw new IllegalArgumentException("Negative index: " + n); if (n == size - 1) return sname; return getParentName().get(n); }
int size = size(); if (size == 0 || size == 1) return null;
public CompositeName getPrefix() { int size = size(); if (size == 0 || size == 1) return null; return getParentName(); }
int result = sname.hashCode(); CompositeName pname = getParentName(); if (pname != null) result += pname.hashCode() * 7; return result;
if (_hc == 0) { int result = sname.hashCode(); CompositeName pname = getParentName(); if (pname != null) result += pname.hashCode() * 7; if (result == 0) result = 1; _hc = result; } return _hc;
public int hashCode() { int result = sname.hashCode(); CompositeName pname = getParentName(); if (pname != null) result += pname.hashCode() * 7; return result; }
CompositeName parent = getParentName(); if (parent == null) return sname.size(); return sname.size() + parent.size();
if (_size==0) { CompositeName parent = getPrefix(); if (parent == null){ _size = sname.size(); } else { _size = sname.size() + parent.size(); } } return _size;
public int size() { CompositeName parent = getParentName(); if (parent == null) return sname.size(); return sname.size() + parent.size(); }
for (int i = 0; i < thatSize; i++) { if (that.get(i).equals(get(i))) continue; return false;
CompositeName thisp = this; for (int i=(thisSize-thatSize); i>0; i--) { thisp = thisp.getPrefix(); } CompositeName thatp = that; for (int i = thatSize; i>0; i--) { CompositeName thisel = thisp.last(); CompositeName thatel = thisp.last(); if (! thisel.equals(thatel)) { return false; } thisp = thisp.getPrefix(); thatp =...
public boolean startsWith(CompositeName that) { int thatSize = that.size(); int thisSize = size(); if (thatSize > thisSize) return false; // test name has too many components for (int i = 0; i < thatSize; i++) { if (that.get(i).equals(get(i))) continue; return false; } return true; }
return toStringBuffer(new StringBuffer()).toString();
if (_tostring == null) { _tostring = toStringBuffer(new StringBuffer()).toString(); } return _tostring;
public String toString() { return toStringBuffer(new StringBuffer()).toString(); }
public abstract void put (String name, int value)
public abstract void put (String name, boolean value)
public abstract void put (String name, int value) throws IOException, IllegalArgumentException;
throw new IOException ("Only one of putFields and defalutWriteObject may be called, and it may only be called once");
throw new IOException ("Only one of putFields and defaultWriteObject may be called, and it may only be called once");
private void markFieldsWritten () throws IOException { if (currentObject == null || currentObjectStreamClass == null) throw new NotActiveException ("defaultWriteObject called by non-active class and/or object"); if (fieldsAlreadyWritten) throw new IOException ("Only one of putFields and defalutWriteO...
log = CSMART.createLogger("org.cougaar.tools.csmart.ui.util");
createLogger();
private NamedFrame() { log = CSMART.createLogger("org.cougaar.tools.csmart.ui.util"); }
int m = experiment.getRecipeCount();
int m = experiment.getRecipeComponentCount();
public boolean accept(File f) { if (f.isDirectory()) return true; // allow user to go up/down through directory tree SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent != null) { java.io.FileFilter fileFilter = societyComponent.getResultFileFilter(); if (fileFi...
RecipeComponent recipeComponent = experiment.getRecipe(i);
RecipeComponent recipeComponent = experiment.getRecipeComponent(i);
public boolean accept(File f) { if (f.isDirectory()) return true; // allow user to go up/down through directory tree SocietyComponent societyComponent = experiment.getSocietyComponent(); if (societyComponent != null) { java.io.FileFilter fileFilter = societyComponent.getResultFileFilter(); if (fileFi...
Enumeration enum = attrs.elements(); while (enum.hasMoreElements()) { VizAttr a = (VizAttr) enum.nextElement();
Enumeration enumList = attrs.elements(); while (enumList.hasMoreElements()) { VizAttr a = (VizAttr) enumList.nextElement();
public void addAttribute(VizAttr attr) { Enumeration enum = attrs.elements(); while (enum.hasMoreElements()) { VizAttr a = (VizAttr) enum.nextElement(); if (a.getName().equals(attr.getName())) { a.setValue(attr.getValue()); return; } ...
attrs.addElement(attr); }
public void addAttribute(VizAttr attr) { Enumeration enum = attrs.elements(); while (enum.hasMoreElements()) { VizAttr a = (VizAttr) enum.nextElement(); if (a.getName().equals(attr.getName())) { a.setValue(attr.getValue()); return; } ...
e.load_this(); e.load_arg(1);
private void emitSetCallback(ClassEmitter ce, int[] keys) { final CodeEmitter e = ce.begin_method(Constants.ACC_PUBLIC, SET_CALLBACK, null); e.load_this(); e.load_arg(1); e.load_arg(0); e.process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key...
e.pop2();
private void emitSetCallback(ClassEmitter ce, int[] keys) { final CodeEmitter e = ce.begin_method(Constants.ACC_PUBLIC, SET_CALLBACK, null); e.load_this(); e.load_arg(1); e.load_arg(0); e.process_switch(keys, new ProcessSwitchCallback() { public void processCase(int key...
e.load_this(); e.load_arg(1);
public void processCase(int key, Label end) { e.checkcast(callbackTypes[key]); e.putfield(getCallbackField(key)); e.goTo(end); }
e.pop2();
public void processDefault() { // TODO: error? e.pop2(); // stack height }
System.out.println("Saving component to database: " + configComponent.getShortName());
private void exit() { propertyEditor.stopEditing(); // accept any edit in progress propertyEditor.exit(); if (isModified()) { if (experiment != null) { if (configComponent instanceof SocietyComponent) { SocietyComponent society = (SocietyComponent)configComponent; experiment.rem...
if (rQFileLastMod != 0l) { if (log.isDebugEnabled()) { log.debug("Doing forced reread of query files."); } dbp = DBProperties.reReadQueryFile(QUERY_FILE); }
public PDbBase() throws SQLException, IOException { createLogger(); if (logQueries) pwlog = new PrintWriter(new FileWriter(getLogName())); dbp = DBProperties.readQueryFile(QUERY_FILE); // When was the RQ file last modified? File rqfile = ConfigFinder.getInstance().locateFile(RecipeComponent.RE...
log.debug("Experiment Id: " + experimentId);
log.debug("selectExperimentFromDB: Experiment Id: " + experimentId + " name: " + originalExperimentName + " will now get name " + experimentName);
protected void selectExperimentFromDatabase() { boolean haveCMTAssembly = false; 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()...
if (log.isDebugEnabled()) { log.debug("selectExptFromDB got nonCMT expt to load. About to call helper to do load with origName: " + originalExperimentName + ", new name: " + expName + ", new ID: " + expId + ", and trialID: " + trialId); }
protected void selectExperimentFromDatabase() { boolean haveCMTAssembly = false; 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()...
if (log.isDebugEnabled()) { log.debug("selectExptFromDB after cmtDialog.processResults with new name/id: " + cmtDialog.getExperimentName() + "/" + cmtDialog.getExperimentId() + " trialID: " + trialId + " and orig name: " + originalExperimentName); }
public void run() { // a potentially long process if (cmtDialog.processResults()) { final String trialId = cmtDialog.getTrialId(); if (trialId != null) { Experiment experiment = helper.createExperiment(originalExperimentName, ...
return super.toString();
return "[addr=" + address.toString() + ",port=" + Integer.toString(port) + ",localport=" + Integer.toString(localport) + "]";
public String toString () { return super.toString(); // FIXME }
texture.bind();
public void display(GLAutoDrawable drawable) { GL gl = drawable.getGL(); gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); if (flushTexture) { flushTexture = false; if (texture != null) { texture.dispose(); texture = null; } } if (newTexture) { newTexture = ...
drawable.setGL(new DebugGL(drawable.getGL()));
public void init(GLAutoDrawable drawable) { GL gl = drawable.getGL(); gl.glClearColor(0, 0, 0, 0); gl.glEnable(GL.GL_DEPTH_TEST); }
&& me.getClickCount() > 1)
&& me.getClickCount() == 2)
public void handleEvent (AWTEvent e) { if (e.getID () == MouseEvent.MOUSE_CLICKED && isEnabled ()) { MouseEvent me = (MouseEvent) e; if (!me.isConsumed () && (me.getModifiers () & MouseEvent.BUTTON1_MASK) != 0 && me.getClickCount() > 1) postActionEvent (((List)awtComponent).getSelectedItem (), ...
postActionEvent (((List)awtComponent).getSelectedItem (), ke.getModifiers ());
{ String selectedItem = ((List)awtComponent).getSelectedItem (); if (selectedItem != null) postActionEvent (selectedItem, ke.getModifiers ()); }
public void handleEvent (AWTEvent e) { if (e.getID () == MouseEvent.MOUSE_CLICKED && isEnabled ()) { MouseEvent me = (MouseEvent) e; if (!me.isConsumed () && (me.getModifiers () & MouseEvent.BUTTON1_MASK) != 0 && me.getClickCount() > 1) postActionEvent (((List)awtComponent).getSelectedItem (), ...
System.out.println( databaseProductName() );
public SAPDBPlugIn( JDBCAdaptor theAdaptor) { super( theAdaptor ); //TODO Remove this debug System.out.println( databaseProductName() ); }
final GLJPanel canvas = GLDrawableFactory.getFactory().createGLJPanel(new GLCapabilities());
GLCapabilities caps = new GLCapabilities(); if (!bunny) { caps.setAlphaBits(8); } final GLJPanel canvas = GLDrawableFactory.getFactory().createGLJPanel(caps);
private JInternalFrame addWindow(boolean bunny) { String str = bunny ? "Refraction Using Vertex Programs" : "Gears Demo"; final JInternalFrame inner = new JInternalFrame(str); inner.setResizable(true); inner.setClosable(true); inner.setVisible(true); final GLJPanel canvas = GLDrawableFacto...
canvas.setSize(512, 512);
private JInternalFrame addWindow(boolean bunny) { String str = bunny ? "Refraction Using Vertex Programs" : "Gears Demo"; final JInternalFrame inner = new JInternalFrame(str); inner.setResizable(true); inner.setClosable(true); inner.setVisible(true); final GLJPanel canvas = GLDrawableFacto...
inner.getContentPane().add(canvas, BorderLayout.CENTER); inner.getContentPane().add(new JButton("West"), BorderLayout.WEST); inner.getContentPane().add(new JButton("East"), BorderLayout.EAST); inner.getContentPane().add(new JButton("North"), BorderLayout.NORTH); inner.getContentPane().add(new JButton("South"), BorderLa...
if (bunny) { inner.getContentPane().add(canvas, BorderLayout.CENTER); inner.getContentPane().add(new JButton("West"), BorderLayout.WEST); inner.getContentPane().add(new JButton("East"), BorderLayout.EAST); inner.getContentPane().add(new JButton("North"), BorderLayout.NORTH); inner.getContentPane().add(new JButton("Sout...
private JInternalFrame addWindow(boolean bunny) { String str = bunny ? "Refraction Using Vertex Programs" : "Gears Demo"; final JInternalFrame inner = new JInternalFrame(str); inner.setResizable(true); inner.setClosable(true); inner.setVisible(true); final GLJPanel canvas = GLDrawableFacto...
addWindow(false); }
canvas.setOpaque(!checkBox.isSelected()); }
public void actionPerformed(ActionEvent e) { addWindow(false); }
startAutoMode();
addWindow(true);
public void actionPerformed(ActionEvent e) { startAutoMode(); }
runExit();
addWindow(false);
public void actionPerformed(ActionEvent e) { runExit(); }
while (true) { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { curFrame = addWindow(false); } }); } catch (Exception e) { e.printStackTrace();
JOptionPane.showMessageDialog(null, message, "Unavailable extension", JOptionPane.ERROR_MESSAGE); runExit();
public void run() { while (true) { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { curFrame = addWindow(false); } }); } catch (Exception e) { e.printStackTrace(); ...
try { Thread.sleep(2000); } catch (InterruptedException e) { } try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { curFrame.doDefaultCloseAction(); } }); } catch (Exception e) { e.printStackTrace(); } try { Thread.sleep(2000); } catch (InterruptedException e) { } } }
public void run() { while (true) { try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { curFrame = addWindow(false); } }); } catch (Exception e) { e.printStackTrace(); ...
curFrame = addWindow(false); }
quit = true; while (!animatorStopped) { try { Thread.sleep(1); } catch (InterruptedException e) { } } System.exit(0); }
public void run() { curFrame = addWindow(false); }
}); } catch (Exception e) { e.printStackTrace(); } try { Thread.sleep(2000); } catch (InterruptedException e) { } } }
public void run() { curFrame.doDefaultCloseAction(); }
return null;
return null; }
public byte[] getEncoded() { if (encodedKey != null) return (byte[]) encodedKey.clone(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); ArrayList pki = new ArrayList(3); pki.add(new DERValue(DER.INTEGER, BigInteger.ZERO)); ArrayList algId = new ArrayList(2)...
}
public byte[] getEncoded() { if (encodedKey != null) return (byte[]) encodedKey.clone(); try { ByteArrayOutputStream out = new ByteArrayOutputStream(); ArrayList pki = new ArrayList(3); pki.add(new DERValue(DER.INTEGER, BigInteger.ZERO)); ArrayList algId = new ArrayList(2)...
super.addNotify ();
public void addNotify () { if (peer != null) { // This choice of toolkit seems unsatisfying, but I'm not sure // what else to do. peer = Toolkit.getDefaultToolkit ().createCheckboxMenuItem (this); } }
_totalsOnly = "true"; }else { _totalsOnly = "false"; } if (!_totalsOnly.equals("true")) { totalsOnly = false;
_totalsOnly = Boolean.TRUE;
public boolean totalsOnly() { if (_totalsOnly == null) { Object v = (Object)this.valueForBinding("totalsOnly"); if (ERXValueUtilities.booleanValue(v)) { _totalsOnly = "true"; }else { _totalsOnly = "false"; } if (!_totalsOnly...
totalsOnly = true;
_totalsOnly = Boolean.FALSE;
public boolean totalsOnly() { if (_totalsOnly == null) { Object v = (Object)this.valueForBinding("totalsOnly"); if (ERXValueUtilities.booleanValue(v)) { _totalsOnly = "true"; }else { _totalsOnly = "false"; } if (!_totalsOnly...
return totalsOnly;
return _totalsOnly.booleanValue();
public boolean totalsOnly() { if (_totalsOnly == null) { Object v = (Object)this.valueForBinding("totalsOnly"); if (ERXValueUtilities.booleanValue(v)) { _totalsOnly = "true"; }else { _totalsOnly = "false"; } if (!_totalsOnly...
if (uo != null) { UID uid = uo.getUID(); if (m.put(uid, uo) == null) { l.add(uo); if (VERBOSE) { System.out.println( "++++pushed UID: "+uid+" for "+uo.getClass().getName()); } return true; } else { if (VERBOSE) { System.out.println( " ignore UID: "+uid+" for "+uo.getClass().getName()); } } } else { if (VERBOSE) { S...
if (uo != null) { UID uid = uo.getUID(); if (m.put(uid, uo) == null) { l.add(uo); if (VERBOSE) { System.out.println( "++++pushed UID: "+uid+" for "+uo.getClass().getName()); } return true; } else { if (VERBOSE) { System.out.println( " ignore UID: "+uid+" for "+uo.getClass().getName()); } } } else { if (VERBOSE) { S...
public boolean push(UniqueObject uo) { if (uo != null) { UID uid = uo.getUID(); if (m.put(uid, uo) == null) { // add if new l.add(uo); if (VERBOSE) { System.out.println( "++++pushed UID: "+uid+" for "+uo.getClass().getName()); } ret...
return false; }
public boolean push(UniqueObject uo) { if (uo != null) { UID uid = uo.getUID(); if (m.put(uid, uo) == null) { // add if new l.add(uo); if (VERBOSE) { System.out.println( "++++pushed UID: "+uid+" for "+uo.getClass().getName()); } ret...
int t = 0; int n = ((fromCol != null) ? fromCol.size() : 0); if (n > 0) { Iterator iter = fromCol.iterator(); do { if (this.push(iter.next())) { t++; } } while (--n > 0);
int t = 0; int n = ((fromCol != null) ? fromCol.size() : 0); if (n > 0) { Iterator iter = fromCol.iterator(); do { if (this.push(iter.next())) { t++; } } while (--n > 0); } return t;
public int pushAll(Collection fromCol) { int t = 0; int n = ((fromCol != null) ? fromCol.size() : 0); if (n > 0) { Iterator iter = fromCol.iterator(); do { if (this.push(iter.next())) { t++; } } while (--n > 0); } return t; }
return t; }
public int pushAll(Collection fromCol) { int t = 0; int n = ((fromCol != null) ? fromCol.size() : 0); if (n > 0) { Iterator iter = fromCol.iterator(); do { if (this.push(iter.next())) { t++; } } while (--n > 0); } return t; }
UniqueObject uo = (UniqueObject)l.remove(l.size()-1); if (VERBOSE) { System.out.println( "----take["+l.size()+"]: "+ ((uo != null) ? uo.getClass().getName() : "null"));
UniqueObject uo = (UniqueObject)l.remove(l.size()-1); if (VERBOSE) { System.out.println( "----take["+l.size()+"]: "+ ((uo != null) ? uo.getClass().getName() : "null")); } return uo;
public UniqueObject take() { UniqueObject uo = (UniqueObject)l.remove(l.size()-1); if (VERBOSE) { System.out.println( "----take["+l.size()+"]: "+ ((uo != null) ? uo.getClass().getName() : "null")); } return uo; }
return uo; }
public UniqueObject take() { UniqueObject uo = (UniqueObject)l.remove(l.size()-1); if (VERBOSE) { System.out.println( "----take["+l.size()+"]: "+ ((uo != null) ? uo.getClass().getName() : "null")); } return uo; }
HttpServletResponse response) throws IOException, ServletException
HttpServletResponse response) throws IOException
public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.htmlout = response.getWriter(); // create a URL parameter visitor // set the parameters, store the map of (name, value) pairs for getting the uids //...
this.htmlout = response.getWriter();
public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.htmlout = response.getWriter(); // create a URL parameter visitor // set the parameters, store the map of (name, value) pairs for getting the uids //...
try { Object data; try{ ObjectInputStream obStream = new ObjectInputStream(in); data = obStream.readObject(); } catch (IOException e) { System.out.println("Expecting a POSTED Serialized \"Object\": " + e.getMessage()); data = null; } startUIDs = getSearchUIDs(data); } catch (RuntimeException e) { System.out.println("ze...
public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.htmlout = response.getWriter(); // create a URL parameter visitor // set the parameters, store the map of (name, value) pairs for getting the uids //...
response,
dataOut,
public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.htmlout = response.getWriter(); // create a URL parameter visitor // set the parameters, store the map of (name, value) pairs for getting the uids //...
htmlout,
htmlOut,
public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { this.htmlout = response.getWriter(); // create a URL parameter visitor // set the parameters, store the map of (name, value) pairs for getting the uids //...
int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) { resultCol = new ArrayList(0); } else if (nuids == 1) { final UID uid = (UID)uids.iterator().next(); UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uid.equals(((UniqueObject)o).ge...
int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) { resultCol = new ArrayList(0); } else if (nuids == 1) { final UID uid = (UID)uids.iterator().next(); UnaryPredicate pred = new UnaryPredicate() { public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uid.equals(((UniqueObject)o).ge...
private static Collection findUniqueObjects( SimpleServletSupport support, final Set uids) { Collection resultCol; int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) { // find nothing? resultCol = new ArrayList(0); } else if (nuids == 1) { // get the...
return resultCol; }
private static Collection findUniqueObjects( SimpleServletSupport support, final Set uids) { Collection resultCol; int nuids = ((uids != null) ? uids.size() : 0); if (nuids <= 0) { // find nothing? resultCol = new ArrayList(0); } else if (nuids == 1) { // get the...
return ((o instanceof UniqueObject) && (uids.contains(((UniqueObject)o).getUID()))); }
return ((o instanceof UniqueObject) && (uid.equals(((UniqueObject)o).getUID()))); }
public boolean execute(Object o) { return ((o instanceof UniqueObject) && (uids.contains(((UniqueObject)o).getUID()))); }
if (obj instanceof PlanElement) { if (obj instanceof Allocation) { return ITEM_TYPE_ALLOCATION; } else if (obj instanceof Expansion) { return ITEM_TYPE_EXPANSION; } else if (obj instanceof Aggregation) { return ITEM_TYPE_AGGREGATION; } else if (obj instanceof Disposition) { return ITEM_TYPE_DISPOSITION; } else if (obj ...
if (obj instanceof PlanElement) { if (obj instanceof Allocation) { return ITEM_TYPE_ALLOCATION; } else if (obj instanceof Expansion) { return ITEM_TYPE_EXPANSION; } else if (obj instanceof Aggregation) { return ITEM_TYPE_AGGREGATION; } else if (obj instanceof Disposition) { return ITEM_TYPE_DISPOSITION; } else if (obj ...
private static int getItemType(Object obj) { if (obj instanceof PlanElement) { if (obj instanceof Allocation) { return ITEM_TYPE_ALLOCATION; } else if (obj instanceof Expansion) { return ITEM_TYPE_EXPANSION; } else if (obj instanceof Aggregation) { return ITEM_TYPE_AGGREGATION; ...
} else if (obj instanceof Task) { return ITEM_TYPE_TASK; } else if (obj instanceof Asset) { return ITEM_TYPE_ASSET; } else if (obj instanceof Workflow) { return ITEM_TYPE_WORKFLOW; } else { return ITEM_TYPE_OTHER;
private static int getItemType(Object obj) { if (obj instanceof PlanElement) { if (obj instanceof Allocation) { return ITEM_TYPE_ALLOCATION; } else if (obj instanceof Expansion) { return ITEM_TYPE_EXPANSION; } else if (obj instanceof Aggregation) { return ITEM_TYPE_AGGREGATION; ...
}
private static int getItemType(Object obj) { if (obj instanceof PlanElement) { if (obj instanceof Allocation) { return ITEM_TYPE_ALLOCATION; } else if (obj instanceof Expansion) { return ITEM_TYPE_EXPANSION; } else if (obj instanceof Aggregation) { return ITEM_TYPE_AGGREGATION; ...
if (!(postObj instanceof List)) { throw new IllegalArgumentException( "POSTED Object is not a \"java.util.List\": "+ ((postObj != null) ? postObj.getClass().getName() : "null"));
if (!(postObj instanceof List)) { throw new IllegalArgumentException( "POSTED Object is not a \"java.util.List\": "+ ((postObj != null) ? postObj.getClass().getName() : "null")); } List postUIDs = (List)postObj; int nPostUIDs = postUIDs.size(); Set toSet = new HashSet(nPostUIDs); for (int i = 0; i < nPostUIDs; i++)...
private static Set getSearchUIDs(Object postObj) { // make sure that a List was posted if (!(postObj instanceof List)) { throw new IllegalArgumentException( "POSTED Object is not a \"java.util.List\": "+ ((postObj != null) ? postObj.getClass().getName() : "null")); } // parse vector...
List postUIDs = (List)postObj; int nPostUIDs = postUIDs.size(); Set toSet = new HashSet(nPostUIDs); for (int i = 0; i < nPostUIDs; i++) { Object oi = postUIDs.get(i); if (!(oi instanceof String)) { throw new IllegalArgumentException( "POSTED List["+i+"] contains a non-String:"+ ((oi != null) ? oi.getClass().getName()...
private static Set getSearchUIDs(Object postObj) { // make sure that a List was posted if (!(postObj instanceof List)) { throw new IllegalArgumentException( "POSTED Object is not a \"java.util.List\": "+ ((postObj != null) ? postObj.getClass().getName() : "null")); } // parse vector...
public static void parseParams( HttpServletRequest req) throws IOException { String meth = req.getMethod(); if (meth.equals("GET")) { if (req.getQueryString() != null) { Map m = HttpUtils.parseQueryString(req.getQueryString()); parseParams(m);
public void parseParams( HttpServletRequest req) throws IOException, ClassNotFoundException { String reqQueryString = req.getQueryString(); if (reqQueryString != null) { Map m = HttpUtils.parseQueryString(reqQueryString); ServletUtil.ParamVisitor vis = new ServletUtil.ParamVisitor() { public void setParam(String name,...
public static void parseParams( HttpServletRequest req) throws IOException { String meth = req.getMethod(); if (meth.equals("GET")) { // check for no query params if (req.getQueryString() != null) { Map m = HttpUtils.parseQueryString(req.getQueryString()); parseParams(m); }...
} else if (meth.equals("POST")) {
public static void parseParams( HttpServletRequest req) throws IOException { String meth = req.getMethod(); if (meth.equals("GET")) { // check for no query params if (req.getQueryString() != null) { Map m = HttpUtils.parseQueryString(req.getQueryString()); parseParams(m); }...
in = req.getInputStream(); Map m = HttpUtils.parsePostData(len, in); parseParams(m);
if (len > 0) { InputStream in = req.getInputStream(); try { Object data; try{ ObjectInputStream obStream = new ObjectInputStream(in); data = obStream.readObject(); } catch (IOException e) { System.out.println("Expecting a POSTED Serialized \"Object\": " + e.getMessage()); data = null; } if (data != null) { startUIDs =...
public static void parseParams( HttpServletRequest req) throws IOException { String meth = req.getMethod(); if (meth.equals("GET")) { // check for no query params if (req.getQueryString() != null) { Map m = HttpUtils.parseQueryString(req.getQueryString()); parseParams(m); }...
}
public static void parseParams( HttpServletRequest req) throws IOException { String meth = req.getMethod(); if (meth.equals("GET")) { // check for no query params if (req.getQueryString() != null) { Map m = HttpUtils.parseQueryString(req.getQueryString()); parseParams(m); }...
HttpServletResponse response,
OutputStream out,
private static void replyWithData( HttpServletResponse response, ClusterIdentifier cid, List l) throws IOException { // convert to PropertyTrees, all tagged with this agent's name List retL = TranslateUtils.toPropertyTrees(l, cid.toString()); try { if (retL !=...
ObjectOutputStream p = new ObjectOutputStream(response.getOutputStream());
ObjectOutputStream p = new ObjectOutputStream(out);
private static void replyWithData( HttpServletResponse response, ClusterIdentifier cid, List l) throws IOException { // convert to PropertyTrees, all tagged with this agent's name List retL = TranslateUtils.toPropertyTrees(l, cid.toString()); try { if (retL !=...
while (ws.hasWork()) { UniqueObject uo = ws.take(); int type = getItemType(uo); switch (type) { case ITEM_TYPE_ALLOCATION: { Allocation alloc = (Allocation)uo; ws.push(alloc.getAsset()); ws.push(alloc.getTask()); } break; case ITEM_TYPE_EXPANSION: { Expansion ex = (Expansion)uo; ws.push(ex.getWorkflow()); } break; ...
while (ws.hasWork()) { UniqueObject uo = ws.take(); int type = getItemType(uo); switch (type) { case ITEM_TYPE_ALLOCATION: { Allocation alloc = (Allocation)uo; ws.push(alloc.getAsset()); ws.push(alloc.getTask());
private static List searchDown( SimpleServletSupport support, Set startUIDSet, int limit) { if (VERBOSE) { System.out.println( "\n****************************************************"+ "\nSEARCH DOWN"+ "\nStart with ["+ ((startUIDSet != null) ? startUIDSet.size() : 0)+ "]: "+sta...
} break; case ITEM_TYPE_ASSET_TRANSFER: { AssetTransfer atrans = (AssetTransfer)uo; ws.push(atrans.getAsset()); ws.push(atrans.getAssignee()); ws.push(atrans.getTask()); } break; case ITEM_TYPE_TASK: { Task t = (Task)uo; ws.push(t.getDirectObject()); ws.push(t.getPlanElement()); } break; case ITEM_TYPE_ASSET: { As...
break; case ITEM_TYPE_EXPANSION: { Expansion ex = (Expansion)uo; ws.push(ex.getWorkflow());
private static List searchDown( SimpleServletSupport support, Set startUIDSet, int limit) { if (VERBOSE) { System.out.println( "\n****************************************************"+ "\nSEARCH DOWN"+ "\nStart with ["+ ((startUIDSet != null) ? startUIDSet.size() : 0)+ "]: "+sta...
} break; case ITEM_TYPE_WORKFLOW: { Workflow wf = (Workflow)uo; ws.pushAll(wf.getTasks()); } break; case ITEM_TYPE_DISPOSITION: { PlanElement pe = (PlanElement)uo; ws.push(pe.getTask());
break; case ITEM_TYPE_AGGREGATION: { Aggregation agg = (Aggregation)uo; Composition comp = agg.getComposition(); if (comp != null) { ws.push(comp.getCombinedTask()); } } break; case ITEM_TYPE_ASSET_TRANSFER: { AssetTransfer atrans = (AssetTransfer)uo; ws.push(atrans.getAsset()); ws.push(atrans.getAssignee()); ws.p...
private static List searchDown( SimpleServletSupport support, Set startUIDSet, int limit) { if (VERBOSE) { System.out.println( "\n****************************************************"+ "\nSEARCH DOWN"+ "\nStart with ["+ ((startUIDSet != null) ? startUIDSet.size() : 0)+ "]: "+sta...
case ITEM_TYPE_OTHER: { if (uo instanceof org.cougaar.tools.csmart.runtime.ldm.event.HappinessChangeEvent) { ws.push(((org.cougaar.tools.csmart.runtime.ldm.event.HappinessChangeEvent)uo).getRegarding()); }
if (ws.sizePushed() > limit) {
private static List searchDown( SimpleServletSupport support, Set startUIDSet, int limit) { if (VERBOSE) { System.out.println( "\n****************************************************"+ "\nSEARCH DOWN"+ "\nStart with ["+ ((startUIDSet != null) ? startUIDSet.size() : 0)+ "]: "+sta...
default: break;
private static List searchDown( SimpleServletSupport support, Set startUIDSet, int limit) { if (VERBOSE) { System.out.println( "\n****************************************************"+ "\nSEARCH DOWN"+ "\nStart with ["+ ((startUIDSet != null) ? startUIDSet.size() : 0)+ "]: "+sta...