public RelevantCommunityAnalyser(IIdentity linkedEntity, String linkType) { if (linkType.equals("CSS")) this.linkedCss = linkedEntity; // else // this.linkedDomain = linkedEntity; proximityHistory = new ArrayList<ProximityRecord>(); recordedMetadata = new HashMap<String, String>(); refusals = new ArrayList<ICisProposal>(); try { List<CtxIdentifier> ctxMetadata = userContextBroker.lookup(CtxModelType.ATTRIBUTE, "hasCLM").get(); for (int i = 0; i < ctxMetadata.size(); i++) { CtxAttribute thisMetadata = (CtxAttribute) userContextBroker.retrieve(ctxMetadata.get(i)).get(); String thisMetadataValue = thisMetadata.getStringValue(); recordedMetadata.put( thisMetadataValue.split("---")[0].split("CIS ID: ")[1], thisMetadataValue.split("---")[1]); } } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } catch (CtxException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } // new ProximityRecordingThread().start(); }