List of usage examples for java.util Hashtable Hashtable
public Hashtable()
From source file:graphics.MainWindow.java
/** Creates new form MainWindow */ public MainWindow() { this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.AddSpecieWindow = new AddSpecieFrame(); this.AddCellWindow = new AddCellFrame(this); this.cells = new Hashtable<Integer, Cell>(); initComponents();//w w w .j a va2 s .c om this.createLabels(); this.globalParameters = new GlobalParametersStruct(); this.setGlobalWindows = new GlobalConfiguration(this.globalParameters); this.World = new world(this.globalParameters); this.buttonDifusion = new JButton[16]; }
From source file:org.code_house.openhab.cxf.internal.EndpointPublisher.java
private void start(List<Object> resources) { if (bus != null) { logger.error("Unable to start new cxf endpoint cause previous one still exists: {}", bus); return;//from www. j ava 2 s. c o m } ExtensionManagerBus bus = new ExtensionManagerBus(); JAXRSServerFactoryBean factoryBean = new JAXRSServerFactoryBean(); factoryBean.setBus(bus); factoryBean.setAddress("/openhab"); factoryBean.setServiceBeans(resources); JAASAuthenticationFilter filter = new JAASAuthenticationFilter(); filter.setContextName("karaf"); factoryBean.setProviders(Arrays.asList(new JacksonJsonProvider(), filter)); factoryBean.setFeatures(Arrays.asList(new LoggingFeature())); factoryBean.create(); bus.initialize(); Hashtable<String, Object> properties = new Hashtable<>(); properties.put(OSGIBusListener.CONTEXT_SYMBOLIC_NAME_PROPERTY, "org.code-house.openhab.cxf"); properties.put(OSGIBusListener.CONTEXT_VERSION_PROPERTY, "0.0.0"); properties.put(OSGIBusListener.CONTEXT_NAME_PROPERTY, "openhab"); this.bus = bus; serviceRegistration = context.registerService(Bus.class, bus, properties); }
From source file:eu.crisis_economics.configuration.FromFileConfigurationContext.java
public FromFileConfigurationContext(String configurationFilename) { if (configurationFilename == null) throw new NullArgumentException(); String fileContents = null;/*w w w . j a v a 2s . co m*/ try { fileContents = new Scanner(new File(configurationFilename)).useDelimiter("\\Z").next(); } catch (IOException e) { System.out.println("FromFileConfigurationContext: file not found: '" + configurationFilename + "'"); } this.configFileParseIsComplete = false; this.knownNameDeclarations = new Hashtable<String, NameDeclarationExpression>(); this.knownDefinitions = new Hashtable<String, DefinitionExpression>(); this.knownIntegerPrimitiveDefinitions = new Hashtable<String, IntegerPrimitiveExpression>(); this.knownDoublePrimitiveDefinitions = new Hashtable<String, DoublePrimitiveExpression>(); this.userObjectCreationPending = new LinkedList<UserObjectCreationTask>(); this.definitionExpressionRegistrationOrder = new ArrayList<DefinitionExpression>(); this.arrayCreationCounters = new Hashtable<String, IntegerIndexOfMaximum>(); this.compoundConfigurationExpressions = ConfParser.parse(fileContents, this); // Populates the above hashtables this.awaitingUserCreationRequest = false; this.configFileParseIsComplete = true; }
From source file:com.fluidinfo.fom.Object.java
@Override public void getItem() throws FluidException, IOException, FOMException, JSONException { Hashtable<String, String> args = new Hashtable<String, String>(); args.put("showAbout", "True"); FluidResponse response = this.Call(Method.GET, 200, "", args); JSONObject jsonResult = this.getJsonObject(response); this.about = jsonResult.getString("about"); if (jsonResult.has("tagPaths")) { this.tagPaths = StringUtil.getStringArrayFromJSONArray(jsonResult.getJSONArray("tagPaths")); } else {//from w w w . j ava 2 s . co m this.tagPaths = new String[0]; } }
From source file:com.honnix.cheater.bundle.CheaterActivator.java
public void start(BundleContext context) throws Exception // NOPMD by ehonlia on 6/24/08 4:38 PM { context.registerService(Cheater.class.getName(), cheater, new Hashtable<Object, Object>()); setTrustStore(context);/*from w w w . ja v a2s .c o m*/ cheater.start(); }
From source file:com.cyclopsgroup.waterview.jelly.JellyPageRenderer.java
/** * Override method configure() in super class * //from ww w . ja va 2s .co m * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration) */ public void configure(Configuration conf) throws ConfigurationException { int cacheSize = conf.getChild("cache-size").getValueAsInteger(-1); reloadable = conf.getChild("reloadable").getValueAsBoolean(false); if (cacheSize >= 1) { cache = new LRUMap(cacheSize); } else if (cacheSize == 0) { cache = null; } else { cache = new Hashtable(); } }
From source file:com.textuality.lifesaver2.Columns.java
public static Map<String, Boolean> loadKeys(Context context, Uri provider, Columns columns) { Cursor cursor = context.getContentResolver().query(provider, null, null, null, null); Boolean exists = new Boolean(true); Map<String, Boolean> map = new Hashtable<String, Boolean>(); while (cursor.moveToNext()) { map.put(columns.cursorToKey(cursor), exists); }/*w ww . j a v a 2 s . c o m*/ cursor.close(); return map; }
From source file:com.alfaariss.oa.OAServlet.java
/** * Starts the OA Servlet.//www . j a v a 2s . c om */ public OAServlet() { _logger = LogFactory.getLog(OAServlet.class); _engine = Engine.getInstance(); _profiles = new Hashtable<String, IRequestorProfile>(); _helpers = new Hashtable<String, IHelper>(); }
From source file:com.legstar.coxb.CobolElementVisitor.java
/** * Constructor for a given host buffer and converters set. * //from w ww . j a v a 2 s . c o m * @param hostBytes host buffer used by visitor * @param offset offset in host buffer * @param cobolConverters set of converters to use for cobol elements */ public CobolElementVisitor(final byte[] hostBytes, final int offset, final ICobolConverters cobolConverters) { mHostBytes = hostBytes; mOffset = offset; mCobolConverters = cobolConverters; mVariablesMap = new Hashtable<String, Object>(); }
From source file:de.ingrid.iplug.ckan.record.mapper.ScriptedIdfMapper.java
@Override public synchronized void map(SourceRecord record, Document doc) throws Exception { if (mappingScripts == null) { log.error("Mapping script(s) not set!"); throw new IllegalArgumentException("Mapping script(s) not set!"); }// w ww . j a v a 2 s. c o m try { // create utils for script XPathUtils xpathUtils = new XPathUtils(new IDFNamespaceContext()); DOMUtils domUtils = new DOMUtils(doc, xpathUtils); domUtils.addNS("idf", "http://www.portalu.de/IDF/1.0"); Map<String, Object> parameters = new Hashtable<String, Object>(); parameters.put("sourceRecord", record); parameters.put("idfDoc", doc); parameters.put("log", log); parameters.put("XPATH", xpathUtils); parameters.put("DOM", domUtils); parameters.put("CAPABILITIES", new CapabilitiesUtils()); parameters.put("javaVersion", System.getProperty("java.version")); ScriptEngine.execute(this.mappingScripts, parameters, compile); } catch (Exception e) { log.error("Error mapping source record to idf document.", e); throw e; } }