rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
now,
public void testUnknownDasChannelCreation() { DASChannelCreator creator = new DASChannelCreator(NCReaderTest.net, new SamplingFinder() { public int find(String file, ...
new TimeRange());
new MicroSecondTimeRange(now, now));
public void testUnknownDasChannelCreation() { DASChannelCreator creator = new DASChannelCreator(NCReaderTest.net, new SamplingFinder() { public int find(String file, ...
now.subtract(new TimeInterval(1, UnitImpl.MINUTE)),
public void testUnknownDasChannelCreation() { DASChannelCreator creator = new DASChannelCreator(NCReaderTest.net, new SamplingFinder() { public int find(String file, ...
new TimeRange());
new MicroSecondTimeRange(now.subtract(new TimeInterval(1, UnitImpl.MINUTE)), now));
public void testUnknownDasChannelCreation() { DASChannelCreator creator = new DASChannelCreator(NCReaderTest.net, new SamplingFinder() { public int find(String file, ...
TimeRange fileTimeWindow)
MicroSecondTimeRange fileTimeWindow)
public int find(String file, TimeRange fileTimeWindow) throws RT130FormatException, ...
return new Orientation[] {new Orientation(0, -90), new Orientation(0, 0), new Orientation(90, 0)};
return new Orientation[] {UP, NORTH, EAST};
public static Orientation[] parseOrientations(String orientationString) { Matcher m = orientation.matcher(orientationString); if(!m.matches()) { throw new IllegalArgumentException("The orientation string must be either 'default' or a channel orientation specification"); } if(m...
public DASChannelCreator(NetworkAttr net, List sites) { this.net = net; Iterator it = sites.iterator(); while(it.hasNext()) { add((Site)it.next()); }
public DASChannelCreator(Properties props) throws IOException { this(PopulationProperties.getNetworkAttr(props), new NCReader(props).getSites());
public DASChannelCreator(NetworkAttr net, List sites) { this.net = net; Iterator it = sites.iterator(); while(it.hasNext()) { add((Site)it.next()); } }
public int find(String file, TimeRange fileTimeWindow)
public int find(String file, MicroSecondTimeRange fileTimeWindow)
public int find(String file, TimeRange fileTimeWindow) throws RT130FormatException, IOException;
System.out.println("The name of the property is "+prop.name); System.out.println("The value of the property is "+prop.value);
public static Element createElement(Document doc, Property prop, String tagName) { //System.out.println("The name of the property is "+prop.name); //System.out.println("The value of the property is "+prop.value); Element element = doc.createElement(tagName); Text textNode = doc.createTextNode(prop.name); ...
System.out.println("While getting property name= "+name+" value= "+value);
public static Property getProperty(Element base) { String name = XMLUtil.getText(XMLUtil.getElement(base,"name")); String value = XMLUtil.getText(XMLUtil.getElement(base, "value")); return new Property(name, value); }
String name = XMLUtil.getText(XMLUtil.getElement(base,"name")); String value = XMLUtil.getText(XMLUtil.getElement(base, "value"));
String name = XMLUtil.getText(XMLUtil.getElement(element,"name")); String value = XMLUtil.getText(XMLUtil.getElement(element, "value"));
public static Property parse(Element element) { try { String name = XMLUtil.getText(XMLUtil.getElement(base,"name")); String value = XMLUtil.getText(XMLUtil.getElement(base, "value")); return new Property(name, value); } catch (Exception e) { return null; } // end of try-catch }
if(seisEnd <= seis.getNumPoints() && seisStart >= 0){
if(seisEnd <= seis.getNumPoints() && seisStart >= 0 && (startPixel != 0 && endPixel != 0)){
private void plotAll(Dimension size) throws CodecException{ if(seisEnd <= seis.getNumPoints() && seisStart >= 0){ if(seisStart != 0){ startPixel = 0; } if(seisEnd < seis.getNumPoints()){ endPixel = size.width; seisEnd++; } points = new int[seisEnd - seisStart][2]; samplesPerPixel = (seisEnd...
public Statistics(LocalSeismogramImpl seismo) throws FissuresException { if(seismo.can_convert_to_short()){ sSeries = seismo.get_as_shorts(); endIndex = sSeries.length; }else if(seismo.can_convert_to_long()){ iSeries = seismo.get_as_longs();
public Statistics(int[] iSeries) { this.iSeries = iSeries; beginIndex = 0;
public Statistics(LocalSeismogramImpl seismo) throws FissuresException { if(seismo.can_convert_to_short()){ sSeries = seismo.get_as_shorts(); endIndex = sSeries.length; }else if(seismo.can_convert_to_long()){ iSeries = seismo.get_as_longs(); endIndex = iSeries.length; }else if(s...
}else if(seismo.can_convert_to_float()){ fSeries = seismo.get_as_floats(); endIndex = fSeries.length; }else{ dSeries = seismo.get_as_doubles(); endIndex = dSeries.length;
public Statistics(LocalSeismogramImpl seismo) throws FissuresException { if(seismo.can_convert_to_short()){ sSeries = seismo.get_as_shorts(); endIndex = sSeries.length; }else if(seismo.can_convert_to_long()){ iSeries = seismo.get_as_longs(); endIndex = iSeries.length; }else if(s...
beginIndex = 0; }
public Statistics(LocalSeismogramImpl seismo) throws FissuresException { if(seismo.can_convert_to_short()){ sSeries = seismo.get_as_shorts(); endIndex = sSeries.length; }else if(seismo.can_convert_to_long()){ iSeries = seismo.get_as_longs(); endIndex = iSeries.length; }else if(s...
unbindDead(unbindFrom.getAllEventDC()); unbindDead(unbindFrom.getAllSeismogramDC()); unbindDead(unbindFrom.getAllNetworkDC()); unbindDead(unbindFrom.getAllPlottableDC());
unbindDead(unbindFrom.getAllEventDC(), FissuresNamingService.EVENTDC); unbindDead(unbindFrom.getAllSeismogramDC(), FissuresNamingService.SEISDC); unbindDead(unbindFrom.getAllNetworkDC(), FissuresNamingService.NETWORKDC); unbindDead(unbindFrom.getAllPlottableDC(), FissuresNamingService.PLOTTABLEDC);
public static void main(String[] args) throws Exception { BasicConfigurator.configure(); Initializer.init(args); unbindFrom = Initializer.getNS(); unbindDead(unbindFrom.getAllEventDC()); unbindDead(unbindFrom.getAllSeismogramDC()); unbindDead(unbindFrom.getAllNetworkDC()); ...
private static void unbindDead(ServerNameDNS[] servers) throws NotFound, CannotProceed, InvalidName {
private static void unbindDead(ServerNameDNS[] servers, String interfaceName) throws NotFound, CannotProceed, InvalidName {
private static void unbindDead(ServerNameDNS[] servers) throws NotFound, CannotProceed, InvalidName { for(int i = 0; i < servers.length; i++) { CorbaChecker checker = new CorbaChecker(servers[i].getCorbaObject(), servers[i].toString());...
CorbaChecker checker = new CorbaChecker(servers[i].getCorbaObject(),
org.omg.CORBA.Object object; try { object = servers[i].getCorbaObject(); } catch(SystemException e) { logger.info(servers[i] + " threw " + e + " Unbinding"); unbindFrom.unbind(servers[i].getServerDNS(), interfaceName, servers[i].getServerName()); continue; } CorbaChecker checker = new CorbaChecker(object,
private static void unbindDead(ServerNameDNS[] servers) throws NotFound, CannotProceed, InvalidName { for(int i = 0; i < servers.length; i++) { CorbaChecker checker = new CorbaChecker(servers[i].getCorbaObject(), servers[i].toString());...
servers[i].getServerName(), servers[i].getCorbaObject());
interfaceName, servers[i].getServerName());
private static void unbindDead(ServerNameDNS[] servers) throws NotFound, CannotProceed, InvalidName { for(int i = 0; i < servers.length; i++) { CorbaChecker checker = new CorbaChecker(servers[i].getCorbaObject(), servers[i].toString());...
private LinkToolEntry(String title, String description, java.util.List relationshipTypes) {
private LinkToolEntry(String title, String description, List relationshipTypes) {
private LinkToolEntry(String title, String description, java.util.List relationshipTypes) { super(title, description, null, null); this.relationshipTypes = relationshipTypes; }
public org.eclipse.gef.Tool createTool() { org.eclipse.gef.Tool tool = new org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool(relationshipTypes);
public Tool createTool() { Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
public org.eclipse.gef.Tool createTool() { org.eclipse.gef.Tool tool = new org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool(relationshipTypes); tool.setProperties(getToolProperties()); return tool; }
private NodeToolEntry(String title, String description, java.util.List elementTypes) {
private NodeToolEntry(String title, String description, List elementTypes) {
private NodeToolEntry(String title, String description, java.util.List elementTypes) { super(title, description, null, null); this.elementTypes = elementTypes; }
public org.eclipse.gef.Tool createTool() { org.eclipse.gef.Tool tool = new org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool(elementTypes);
public Tool createTool() { Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
public org.eclipse.gef.Tool createTool() { org.eclipse.gef.Tool tool = new org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool(elementTypes); tool.setProperties(getToolProperties()); return tool; }
private org.eclipse.gef.palette.ToolEntry createConstraint4CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Constraint_3008); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getSt...
private ToolEntry createConstraint4CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Constraint_3008); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Constraint4CreationTool.title"), UMLDiagramEditorPlugin.getString("Constraint4CreationTool.desc"), types); entry.setSmal...
private org.eclipse.gef.palette.ToolEntry createConstraint4CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Constraint_3008); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagra...
private org.eclipse.gef.palette.ToolEntry createEnumeration1CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Enumeration_2003); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.get...
private ToolEntry createEnumeration1CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Enumeration_2003); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Enumeration1CreationTool.title"), UMLDiagramEditorPlugin.getString("Enumeration1CreationTool.desc"), types); entry.set...
private org.eclipse.gef.palette.ToolEntry createEnumeration1CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Enumeration_2003); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diag...
private org.eclipse.gef.palette.ToolEntry createExtension4CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Extension_4002); LinkToolEntry entry = new LinkToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getStri...
private ToolEntry createExtension4CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Extension_4002); LinkToolEntry entry = new LinkToolEntry(UMLDiagramEditorPlugin.getString("Extension4CreationTool.title"), UMLDiagramEditorPlugin.getString("Extension4CreationTool.desc"), types); entry.setSmallIco...
private org.eclipse.gef.palette.ToolEntry createExtension4CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Extension_4002); LinkToolEntry entry = new LinkToolEntry( org.eclipse.uml2.diagram....
private org.eclipse.gef.palette.ToolEntry createGeneralization2CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Generalization_4001); LinkToolEntry entry = new LinkToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlug...
private ToolEntry createGeneralization2CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Generalization_4001); LinkToolEntry entry = new LinkToolEntry(UMLDiagramEditorPlugin.getString("Generalization2CreationTool.title"), UMLDiagramEditorPlugin.getString("Generalization2CreationTool.desc"), types...
private org.eclipse.gef.palette.ToolEntry createGeneralization2CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Generalization_4001); LinkToolEntry entry = new LinkToolEntry( org.eclipse.uml...
private org.eclipse.gef.palette.ToolEntry createLiteral5CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.EnumerationLiteral_3005); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin....
private ToolEntry createLiteral5CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.EnumerationLiteral_3005); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Literal5CreationTool.title"), UMLDiagramEditorPlugin.getString("Literal5CreationTool.desc"), types); entry.setSmall...
private org.eclipse.gef.palette.ToolEntry createLiteral5CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.EnumerationLiteral_3005); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.d...
private org.eclipse.gef.palette.ToolEntry createMetaclass3CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.ElementImport_2006); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.get...
private ToolEntry createMetaclass3CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.ElementImport_2006); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Metaclass3CreationTool.title"), UMLDiagramEditorPlugin.getString("Metaclass3CreationTool.desc"), types); entry.setSmal...
private org.eclipse.gef.palette.ToolEntry createMetaclass3CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.ElementImport_2006); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diag...
private org.eclipse.gef.palette.ToolEntry createProfile1CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Profile_2002); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString("...
private ToolEntry createProfile1CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Profile_2002); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Profile1CreationTool.title"), UMLDiagramEditorPlugin.getString("Profile1CreationTool.desc"), types); entry.setSmallIcon(UMLEle...
private org.eclipse.gef.palette.ToolEntry createProfile1CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Profile_2002); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.prof...
private org.eclipse.gef.palette.PaletteContainer createProfiles1Group() { org.eclipse.gef.palette.PaletteGroup paletteContainer = new org.eclipse.gef.palette.PaletteGroup(org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString("Profiles1Group.title"));
private PaletteContainer createProfiles1Group() { PaletteGroup paletteContainer = new PaletteGroup(UMLDiagramEditorPlugin.getString("Profiles1Group.title"));
private org.eclipse.gef.palette.PaletteContainer createProfiles1Group() { org.eclipse.gef.palette.PaletteGroup paletteContainer = new org.eclipse.gef.palette.PaletteGroup(org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString("Profiles1Group.title")); //$NON-NLS-1$ paletteContainer.add(createProfile1...
private org.eclipse.gef.palette.ToolEntry createProperty3CreationTool() { java.util.Listtypes = new java.util.ArrayList(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Property_3001); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString...
private ToolEntry createProperty3CreationTool() { Listtypes = new ArrayList(1); types.add(UMLElementTypes.Property_3001); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Property3CreationTool.title"), UMLDiagramEditorPlugin.getString("Property3CreationTool.desc"), types); entry.setSmallIcon(UM...
private org.eclipse.gef.palette.ToolEntry createProperty3CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(1); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Property_3001); NodeToolEntry entry = new NodeToolEntry( org.eclipse.uml2.diagram.pr...
private org.eclipse.gef.palette.ToolEntry createStereotype2CreationTool() { java.util.Listtypes = new java.util.ArrayList(2); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Stereotype_2001); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Stereotype_3003); NodeToolEntry entry ...
private ToolEntry createStereotype2CreationTool() { Listtypes = new ArrayList(2); types.add(UMLElementTypes.Stereotype_2001); types.add(UMLElementTypes.Stereotype_3003); NodeToolEntry entry = new NodeToolEntry(UMLDiagramEditorPlugin.getString("Stereotype2CreationTool.title"), UMLDiagramEditorPlugin.getString("Stereotyp...
private org.eclipse.gef.palette.ToolEntry createStereotype2CreationTool() { java.util.List/*<IElementType>*/types = new java.util.ArrayList/*<IElementType>*/(2); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementTypes.Stereotype_2001); types.add(org.eclipse.uml2.diagram.profile.providers.UMLElementType...
private org.eclipse.gef.palette.PaletteContainer createUML2Group() { org.eclipse.gef.palette.PaletteGroup paletteContainer = new org.eclipse.gef.palette.PaletteGroup(org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString("UML2Group.title"));
private PaletteContainer createUML2Group() { PaletteGroup paletteContainer = new PaletteGroup(UMLDiagramEditorPlugin.getString("UML2Group.title"));
private org.eclipse.gef.palette.PaletteContainer createUML2Group() { org.eclipse.gef.palette.PaletteGroup paletteContainer = new org.eclipse.gef.palette.PaletteGroup(org.eclipse.uml2.diagram.profile.part.UMLDiagramEditorPlugin.getString("UML2Group.title")); //$NON-NLS-1$ paletteContainer.add(createEnumeration1Creati...
public void fillPalette(org.eclipse.gef.palette.PaletteRoot paletteRoot) {
public void fillPalette(PaletteRoot paletteRoot) {
public void fillPalette(org.eclipse.gef.palette.PaletteRoot paletteRoot) { paletteRoot.add(createProfiles1Group()); paletteRoot.add(createUML2Group()); }
setupSharableEntity(val);
public boolean addLocation(BwLocation val) throws CalFacadeException { updateOK(val); setupSharableEntity(val); if (findLocation(val) != null) { return false; } if (debug) { trace("Add location " + val); } getCal().addLocation(val); return true; }
setupSharableEntity(val);
public boolean addSponsor(BwSponsor val) throws CalFacadeException { updateOK(val); setupSharableEntity(val); if (findSponsor(val) != null) { return false; } if (debug) { trace("Add sponsor " + val); } getCal().addSponsor(val); return true; }
if (isPublicAdmin() && !isSuper()) { throw new CalFacadeAccessException(); }
public void clearPublicTimezones() throws CalFacadeException { timezones.clearPublicTimezones(); }
pars.isSuperUser(),
Calintf getCal() throws CalFacadeException { if (cali != null) { return cali; } try { cali = (Calintf)CalEnv.getGlobalObject("calintfclass", Calintf.class); } catch (Throwable t) { throw new CalFacadeException(t); } try { cali.open(); // Just for the user interactions cali.b...
return pars.getPublicAdmin() && pars.isSuperUser();
return pars.getPublicAdmin() && superUser;
private boolean isSuper() throws CalFacadeException { return pars.getPublicAdmin() && pars.isSuperUser(); }
if (isPublicAdmin() && !isSuper()) { throw new CalFacadeAccessException(); }
public void saveTimeZone(String tzid, VTimeZone vtz) throws CalFacadeException { timezones.saveTimeZone(tzid, vtz); }
public VTimeZone findTimeZone(final String id, BwUser owner) throws CalFacadeException;
public abstract VTimeZone findTimeZone(final String id, BwUser owner) throws CalFacadeException;
public VTimeZone findTimeZone(final String id, BwUser owner) throws CalFacadeException;
throws CalFacadeException;
throws CalFacadeException { if (debug) { trace("register timezone with id " + id); } TimezoneInfo tzinfo = (TimezoneInfo)timezones.get(id); if (tzinfo == null) { tzinfo = new TimezoneInfo(timezone, null); timezones.put(id, tzinfo); } else { tzinfo.tz = timezone; } }
public void registerTimeZone(String id, TimeZone timezone) throws CalFacadeException;
public void saveTimeZone(String tzid, VTimeZone vtz)
public abstract void saveTimeZone(String tzid, VTimeZone vtz)
public void saveTimeZone(String tzid, VTimeZone vtz) throws CalFacadeException;
throw new CalFacadeException(CalFacadeException.duplicateSubscription);
throw new CalFacadeException(CalFacadeException.duplicateSubscription, val.toString());
public void addSubscription(BwSubscription val) throws CalFacadeException { Collection c = getSubscriptions(); if (c.contains(val)) { throw new CalFacadeException(CalFacadeException.duplicateSubscription); } c.add(val); }
public void clearPublicTimezones() throws CalFacadeException;
public abstract void clearPublicTimezones() throws CalFacadeException;
public void clearPublicTimezones() throws CalFacadeException;
public BwPreferences fetchPreferences(BwUser owner) throws CalFacadeException { HibSession sess = getSess(); sess.namedQuery("getOwnerPreferences"); sess.setEntity("owner", owner); sess.cacheableQuery(); return (BwPreferences)sess.getUnique();
public BwPreferences fetchPreferences() throws CalFacadeException { return fetchPreferences(user);
public BwPreferences fetchPreferences(BwUser owner) throws CalFacadeException { HibSession sess = getSess(); sess.namedQuery("getOwnerPreferences"); sess.setEntity("owner", owner); sess.cacheableQuery(); return (BwPreferences)sess.getUnique(); }
Object val) throws CalFacadeException;
Object val, boolean debug) throws CalFacadeException;
public void initialise(String userid, CallBack cb, Object val) throws CalFacadeException;
getRights(),
public Object clone() { CalSvcIPars pars = new CalSvcIPars(getAuthUser(), getRights(), getUser(), getEnvPrefix(), getPublicAdmin(), ...
public void refreshTimezones() throws CalFacadeException;
public abstract void refreshTimezones() throws CalFacadeException;
public void refreshTimezones() throws CalFacadeException;
sub.setUnremoveable(getUnremoveable());
public void copyTo(BwSubscription sub) { super.copyTo(sub); sub.setName(getName()); sub.setUri(getUri()); sub.setInternalSubscription(getInternalSubscription()); sub.setDisplay(getDisplay()); sub.setAffectsFreeBusy(getAffectsFreeBusy()); sub.setEmailNotifications(getEmailNotifications()); }
short size = 40;
short size = 400;
protected void setUp() throws Exception { super.setUp(); short size = 40; intTestData = new int[size]; shortTestData = new short[size]; floatTestData = new float[size]; doubleTestData = new double[size]; for (short i=0; i<size; i++) { shortTestData[i] = ...
bumpSlope = 4.2367647f; bimpIntercept = 9.4117647f; bumps = new short[16]; bumps[0] = 7; bumps[1] = -12; bumps[2] = 46; bumps[3] = 30; bumps[4] = 17; bumps[5] = 33; bumps[6] = 27; bumps[7] = 39; bumps[8] = 51; bumps[9] = 48; bumps[10] = 51; bumps[11] = 60; bumps[12] = 59; bumps[13] = 70; bumps[14] = 78; bumps[15] = 55;
protected void setUp() throws Exception { super.setUp(); short size = 40; intTestData = new int[size]; shortTestData = new short[size]; floatTestData = new float[size]; doubleTestData = new double[size]; for (short i=0; i<size; i++) { shortTestData[i] = ...
assertEquals("double", 0, dOut[0], 0.000001);
for (int i = 0; i < dOut.length; i++) { assertEquals("double", 0, dOut[i], 0.000001); }
public void testApplyDouble() throws Exception { double[] dOut = rtrend.apply(doubleTestData); assertEquals("double", 0, dOut[0], 0.000001); }
assertEquals("float", 0, fOut[0], 0.0000001);
for (int i = 0; i < fOut.length; i++) { assertEquals("float", 0, fOut[i], 0.0000001); }
public void testApplyFloat() throws Exception { float[] fOut = rtrend.apply(floatTestData); assertEquals("float", 0, fOut[0], 0.0000001); }
assertEquals("int", 0, iOut[0]);
for (int i = 0; i < iOut.length; i++) { assertEquals("int", 0, iOut[i]); }
public void testApplyInt() throws Exception { int[] iOut = rtrend.apply(intTestData); assertEquals("int", 0, iOut[0]); }
assertEquals("short", 0, sOut[0]);
for (int i = 0; i < sOut.length; i++) { assertEquals("short", 0, sOut[i]); }
public void testApplyShort() throws Exception { short[] sOut = rtrend.apply(shortTestData); assertEquals("short", 0, sOut[0]); }
public short[] apply(short[] data) { short[] out = new short[data.length]; System.arraycopy(data, 0, out, 0, data.length); applyInPlace(out); return out;
public LocalSeismogramImpl apply(LocalSeismogramImpl seis) throws FissuresException { if (seis.can_convert_to_short()) { short[] sSeries = seis.get_as_shorts(); return new LocalSeismogramImpl(seis, apply(sSeries)); } else if (seis.can_convert_to_long()) { int[] iSeries = seis.get_as_longs(); return new LocalSeismogramI...
public short[] apply(short[] data) { short[] out = new short[data.length]; System.arraycopy(data, 0, out, 0, data.length); applyInPlace(out); return out; }
x[i] = firstPixelForRequest + i / 2;
x[i] = firstPixelForRequest + offsetIntoRequestPixels + i/2;
public PlottableChunk[] get(MicroSecondTimeRange requestRange, ChannelId id, int pixelsPerDay) throws SQLException, IOException { int chanDbId; try { chanDbId = chanTable.getDBId(id); } catch(NotFound e) { ...
logger.debug("x[0]: " + x[0]);
public PlottableChunk[] get(MicroSecondTimeRange requestRange, ChannelId id, int pixelsPerDay) throws SQLException, IOException { int chanDbId; try { chanDbId = chanTable.getDBId(id); } catch(NotFound e) { ...
logger.debug("got " + dbChunks.length + " chunks from stuff that was already in the database");
public void put(PlottableChunk[] chunks) throws SQLException, IOException { MicroSecondTimeRange stuffInDB = RangeTool.getFullTime(chunks); MicroSecondDate startTime = PlottableChunk.stripToDay(stuffInDB.getBeginTime()); MicroSecondDate strippedEnd = PlottableChunk.stripToDay(stuffInDB.getEndTi...
public JDBCChannel(Connection conn) throws SQLException { this(conn, new JDBCQuantity(conn), new JDBCSite(conn), new JDBCTime(conn));
public JDBCChannel() throws SQLException { this(ConnMgr.createConnection());
public JDBCChannel(Connection conn) throws SQLException { this(conn, new JDBCQuantity(conn), new JDBCSite(conn), new JDBCTime(conn)); }
PlottableChunk[] dayChunks = new PlottableChunk[numDays];
if(getData().y_coor.length % getSamplesPerDay() == 0 && beginSample != 0) { numDays++; } List dayChunks = new ArrayList();
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
for(int i = 0; i < dayChunks.length; i++) {
for(int i = 0; i < numDays; i++) {
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
copyStartPoint = getBeginSample();
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
int endOfDaySample = (i + 1) * getSamplesPerDay();
if(i != 0){ copyStartPoint -= getBeginSample(); } int endOfDaySample = (i + 1) * getSamplesPerDay() - getBeginSample();
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
if(endOfDaySample > getEndSample()) { copyEndPoint = getEndSample();
if(endOfDaySample > getEndSample() - getBeginSample()) { copyEndPoint = getEndSample() - getBeginSample();
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
dayChunks[i] = new PlottableChunk(p, newChunkStartPoint, getJDay(time), getYear(time), getSamplesPerDay(), getChannel());
dayChunks.add(new PlottableChunk(p, newChunkStartPoint, getJDay(time), getYear(time), getSamplesPerDay(), getChannel()));
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
return dayChunks;
return (PlottableChunk[])dayChunks.toArray(new PlottableChunk[0]);
public PlottableChunk[] breakIntoDays() { int numDays = (int)Math.ceil(getData().y_coor.length / getSamplesPerDay()); PlottableChunk[] dayChunks = new PlottableChunk[numDays]; MicroSecondDate time = getBeginTime(); for(int i = 0; i < dayChunks.length; i++) { int...
+ beginId + " and chan_code = '" + id.channel_code
+ beginId + " and chan_code = '" + id.channel_code + "'"
public int getDBId(ChannelId id) throws SQLException, NotFound { int netDbId = netTable.getDBId(id.network_id); int[] possibleStaDbIds = stationTable.getDBIds(netDbId, id.station_code); int[] possibleSiteIds = siteTable.getDBIds(possibleStaDbIds, ...
public PlottableChunk(Plottable data, int startSample, int jday, int year, int samplesPerDay, ChannelId channel) { this.data = data; this.beginSample = startSample; this.samplesPerDay = samplesPerDay; this.jday = jday; this.year = year; this.channel = channel;
public PlottableChunk(Plottable data, int startSample, PlottableChunk otherStuff) { this(data, startSample, otherStuff.getJDay(), otherStuff.getYear(), otherStuff.getSamplesPerDay(), otherStuff.getChannel());
public PlottableChunk(Plottable data, int startSample, int jday, int year, int samplesPerDay, ChannelId channel) { this.data = data; this.beginSample = startSample; this.samplesPerDay = samplesPerDay; this.jday = jday; this.year = year; this.channel = channel; ...
public static PlottableChunk[] merge(PlottableChunk[] chunks) { return new PlottableChunkMerger().merge(chunks);
public static LocalSeismogramImpl[] merge(LocalSeismogramImpl[] seis) { return new LSMerger().merge(seis);
public static PlottableChunk[] merge(PlottableChunk[] chunks) { return new PlottableChunkMerger().merge(chunks); }
public int put(ChannelId id) throws SQLException {
public int put(Channel chan) throws SQLException {
public int put(ChannelId id) throws SQLException { int dbid; try { dbid = getDBId(id); } catch(NotFound notFound) { // no id found so ok to add the whole thing dbid = seq.next(); putId.setInt(1, dbid); insertId(id, putId, 2, siteTable, time...
dbid = getDBId(id);
dbid = getDBId(chan.get_id());
public int put(ChannelId id) throws SQLException { int dbid; try { dbid = getDBId(id); } catch(NotFound notFound) { // no id found so ok to add the whole thing dbid = seq.next(); putId.setInt(1, dbid); insertId(id, putId, 2, siteTable, time...
putId.setInt(1, dbid); insertId(id, putId, 2, siteTable, time); putId.executeUpdate();
putAll.setInt(1, dbid); insertAll(chan, putAll, 2, siteTable, quantityTable, time); putAll.executeUpdate();
public int put(ChannelId id) throws SQLException { int dbid; try { dbid = getDBId(id); } catch(NotFound notFound) { // no id found so ok to add the whole thing dbid = seq.next(); putId.setInt(1, dbid); insertId(id, putId, 2, siteTable, time...
this.getRootElement().setAttribute(ATTRIBUTE_IS_TITLE_NEW_PAGE,Boolean.toString(value));
this.getRootElement().setAttribute(ATTRIBUTE_IS_TITLE_NEW_PAGE,String.valueOf(value));
public void setIsTitleNewPage(boolean value){ this.getRootElement().setAttribute(ATTRIBUTE_IS_TITLE_NEW_PAGE,Boolean.toString(value)); }
setAttribute(ATTRIBUTE_IS_FOR_PROMPTING,Boolean.toString(value));
setAttribute(ATTRIBUTE_IS_FOR_PROMPTING,String.valueOf(value));
public void setIsForPrompting(boolean value){ setAttribute(ATTRIBUTE_IS_FOR_PROMPTING,Boolean.toString(value)); }
out.write(tmpBytes[1]); out.write(tmpBytes[2]); out.write(tmpBytes[3]);
protected static void writeLittleEndian(DataOutput out, int value) throws IOException { byte[] tmpBytes; tmpBytes = Utility.intToByteArray(value); out.write(tmpBytes[0]); out.write(tmpBytes[1]); out.write(tmpBytes[2]); out.write(tmpBytes[3]); }
int samp = (int)freq.getValue(); samp *= speedUp;
int samp = (int)(freq.getValue() * speedUp);
public static void writeWAV(LocalSeismogramImpl seis, int speedUp, DataOutput out) throws IOException { out.writeBytes("RIFF"); int size = 36 + 2*seis.getNumPoints(); writeLittleEndian(out, size); out.writeBytes("WAVE"); // write fmt subchunk out.writeBytes("fmt "); writeLittleEndian(out, 16); writeLittleEnd...
snapshot.update(seismos, timeConfig.getTimeRange());
public void returnSnapshot(){ taken = false; snapshot.update(seismos, timeConfig.getTimeRange()); }
Iterator e = seismos.keySet().iterator();
public void setTimeConfig(TimeRangeConfig newTimeConfig){ timeConfig.removeTimeSyncListener(this); Iterator e = seismos.keySet().iterator(); timeFinder = newTimeConfig.getTimeFinder(); newTimeConfig.addTimeSyncListener(this); while(e.hasNext()){ DataSetSeismogram current = (DataSetSeismogram)e.next(); time...
newTimeConfig.addTimeSyncListener(this);
/*Iterator e = seismos.keySet().iterator();
public void setTimeConfig(TimeRangeConfig newTimeConfig){ timeConfig.removeTimeSyncListener(this); Iterator e = seismos.keySet().iterator(); timeFinder = newTimeConfig.getTimeFinder(); newTimeConfig.addTimeSyncListener(this); while(e.hasNext()){ DataSetSeismogram current = (DataSetSeismogram)e.next(); time...
this.addSeismogram(current); newTimeConfig.addSeismogram(current, ((MicroSecondTimeRange)seismos.get(current)).getBeginTime());
public void setTimeConfig(TimeRangeConfig newTimeConfig){ timeConfig.removeTimeSyncListener(this); Iterator e = seismos.keySet().iterator(); timeFinder = newTimeConfig.getTimeFinder(); newTimeConfig.addTimeSyncListener(this); while(e.hasNext()){ DataSetSeismogram current = (DataSetSeismogram)e.next(); time...
}
}*/ newTimeConfig.setData(seismos); newTimeConfig.addTimeSyncListener(this);
public void setTimeConfig(TimeRangeConfig newTimeConfig){ timeConfig.removeTimeSyncListener(this); Iterator e = seismos.keySet().iterator(); timeFinder = newTimeConfig.getTimeFinder(); newTimeConfig.addTimeSyncListener(this); while(e.hasNext()){ DataSetSeismogram current = (DataSetSeismogram)e.next(); time...
public AmpConfigRegistrar(AmpRangeConfig ar){ this(ar, null);
public AmpConfigRegistrar(){ this(new RMeanAmpConfig());
public AmpConfigRegistrar(AmpRangeConfig ar){ this(ar, null); }
if(seismos.contains(name))
if(names.contains(name))
public boolean contains(String name){ if(seismos.contains(name)) return true; return false; }
public BasicSeismogramDisplay(LocalSeismogram seis, TimeRangeConfig tr, AmpRangeConfig ar, boolean timeBorder){ super(); this.setLayout(new OverlayLayout(this)); this.addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { resize(); } public void componentShown(ComponentEvent e) {...
public BasicSeismogramDisplay(LocalSeismogram seis, boolean timeBorder){ this(seis, new BoundedTimeConfig(), new RMeanAmpConfig(), timeBorder);
public BasicSeismogramDisplay(LocalSeismogram seis, TimeRangeConfig tr, AmpRangeConfig ar, boolean timeBorder){ super(); this.setLayout(new OverlayLayout(this)); this.addComponentListener(new ComponentAdapter() { public void componentResized(ComponentEvent e) { resize(); } public void componentShown(Compone...
seismos.add(name);
names.add(name);
public int sort(DataSetSeismogram seismo, String name){ seismos.add(name); return seismos.size(); }
public OffsetMeanAmpConfig(){ ampRange = new UnitRangeImpl(-500, 500, UnitImpl.COUNT);
public OffsetMeanAmpConfig(LocalSeismogram aSeis, MicroSecondTimeRange range){ LocalSeismogramImpl seis = (LocalSeismogramImpl)aSeis; int beginIndex = SeisPlotUtil.getPixel(seis.getNumPoints(), seis.getBeginTime(), seis.getEndTime(), range.getBeginTime()); if (beginIndex < 0) beginIndex = 0; if (beginIndex > seis.getNu...
public OffsetMeanAmpConfig(){ ampRange = new UnitRangeImpl(-500, 500, UnitImpl.COUNT); }
public ParticleMotionDisplay (DataSetSeismogram hSeis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, boolean advancedOption){ this(hSeis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, null, advancedOption);
public ParticleMotionDisplay(DataSetSeismogram hseis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, Color color, boolean advancedOption) { JFrame displayFrame = new JFrame(); JPanel informationPanel = new JPanel(); String message = " Please W...
public ParticleMotionDisplay (DataSetSeismogram hSeis, TimeConfigRegistrar timeConfigRegistrar, AmpConfigRegistrar hAmpConfigRegistrar, AmpConfigRegistrar vAmpConfigRegistrar, boolean advancedOption){ this(hSeis, timeConfigRegistrar, hAmpConfigRegistrar, vAmpConfigRegistrar, null,...
}
} else { logger.debug("no found match parameter channelId "+paramNames[i]); }
public static ChannelId[] retrieveGrouping(DataSet dataset, ChannelId channelID) { String[] paramNames = dataset.getParameterNames(); LinkedList list = new LinkedList(); String origChannelIdStr = ChannelIdUtil.toString(channelID); origChannel...
SoftReference softReference = (SoftReference)seismogramCache.get(name); LocalSeismogramImpl seis = (LocalSeismogramImpl)softReference.get(); if(seis != null) return seis; else seismogramCache.remove(name);
Object obj = seismogramCache.get(name); if(obj instanceof SoftReference) { SoftReference softReference = (SoftReference)obj; LocalSeismogramImpl seis = (LocalSeismogramImpl)softReference.get(); if(seis != null) { logger.debug("**********NO NULL WHILE GETTING FROM RHT CACHE"); return seis; } else { logger.debug("*******...
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { logger.debug("getting the seismogram fromt the cache"); SoftReference softReference = (SoftReference)seismogramCache.get(name); LocalSeismogramImpl seis = (LocalSeismogramImpl)softReference.get...
else logger.debug("****************************************THE SEISMOGRAM RETURNED IS NULL");
public LocalSeismogramImpl getSeismogram(String name) { if (seismogramCache.containsKey(name)) { logger.debug("getting the seismogram fromt the cache"); SoftReference softReference = (SoftReference)seismogramCache.get(name); LocalSeismogramImpl seis = (LocalSeismogramImpl)softReference.get...
overSizedImage = null;
redo = true;
public void redraw(){ overSizedImage = null; repaint(); }
return seismos.remove(name);
seismos.remove(name); return names.remove(name);
public boolean remove(String name){ return seismos.remove(name); }
public CaldavCalNode(CaldavURI cdURI, CalSvcI svci, IcalTranslator trans, boolean debug) { super(cdURI, svci, trans, debug); this.name = cdURI.getCalName(); collection = true; allowsGet = false; if (!uri.endsWith("/")) { uri += "/"; } contentLang = "en"; contentLen = 0;
public CaldavCalNode(int status, boolean debug) { super(null, null, null, debug); setStatus(status);
public CaldavCalNode(CaldavURI cdURI, CalSvcI svci, IcalTranslator trans, boolean debug) { super(cdURI, svci, trans, debug); this.name = cdURI.getCalName(); collection = true; allowsGet = false; if (!uri.endsWith("/")) { uri += "/"; } contentLang = "en"; contentLen =...
return new CaldavCalNode(getCDURI(), svci, trans, debug);
return new CaldavCalNode(getCDURI(), getSvci(), trans, debug);
public Object clone() { return new CaldavCalNode(getCDURI(), svci, trans, debug); }
Collection events = svci.getEvents(sub, CalFacadeDefs.retrieveRecurExpanded);
Collection events = getSvci().getEvents(sub, CalFacadeDefs.retrieveRecurExpanded);
public Collection getChildren() throws WebdavIntfException { /* For the moment we're going to do this the inefficient way. We really need to have calendar defs that can be expressed as a search allowing us to retrieve all the ids of objects within a calendar. */ try { BwCalendar cal = cdU...
form.getMsg().emit("org.bedework.client.message.location.referenced");
form.getErr().emit("org.bedework.client.error.location.referenced");
public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } BwLocation loc = form.getLocation(); int delResult = form.getCalSvc...
public abstract String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable;
public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase frm) throws Throwable { PEActionForm form = (PEActionForm)frm; return doAction(request, sess, form); }
public abstract String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable;