id
stringlengths
7
14
text
stringlengths
1
106k
343996_53
@Override public int hashCode() { urn gisFeatureProvider.gisFeatureHashCode(); }
343996_54
public Iso639Language findByAlpha3Code(String code) { return ISO639ALPHA3MAP.get(code); }
343996_55
public Iso639Language findByAlpha2Code(String code) { return ISO639ALPHA2MAP.get(code); }
343996_56
public Iso639Language findByAlpha3Code(String code) { return ISO639ALPHA3MAP.get(code); }
343996_57
public Iso639Language findByAlpha3Code(String code) { return ISO639ALPHA3MAP.get(code); }
343996_58
public Iso639Language findByAlpha2Code(String code) { return ISO639ALPHA2MAP.get(code); }
343996_59
public Iso639Language findByAlpha3Code(String code) { return ISO639ALPHA3MAP.get(code); }
343996_60
public Iterable<Continent> findAll() { urn CONTINENTS.values(); }
343996_61
public Iterable<Continent> findAll() { urn CONTINENTS.values(); }
343996_62
public Continent findByCode(String code) { urn CONTINENTS.get(code); }
343996_63
public int compareTo(AlternateGisFeatureName o) { urn name.compareTo(o.getName()); }
343996_64
public static AlternateGisFeatureName alternateName(String name) { urn new AlternateGisFeatureName(name); }
343996_65
public static AlternateGisFeatureName alternateName(String name) { urn new AlternateGisFeatureName(name); }
343996_66
public static GisFeatureGeography gisFeatureGeography(final Double longitude, final Double latitude) { return new GisFeatureGeographyBuilder(longitude, latitude).build(); }
343996_67
public static GisFeatureGeography gisFeatureGeography(final Double longitude, final Double latitude) { return new GisFeatureGeographyBuilder(longitude, latitude).build(); }
343996_68
public static GisFeatureGeography gisFeatureGeography(final Double longitude, final Double latitude) { return new GisFeatureGeographyBuilder(longitude, latitude).build(); }
343996_69
public static GisFeatureGeography gisFeatureGeography(final Double longitude, final Double latitude) { return new GisFeatureGeographyBuilder(longitude, latitude).build(); }
343996_70
public static GisFeatureGeography gisFeatureGeography(final Double longitude, final Double latitude) { return new GisFeatureGeographyBuilder(longitude, latitude).build(); }
343996_71
public double getLatitude() { urn location.getY(); }
343996_72
public double getLongitude() { urn location.getX(); }
343996_73
public double distance(GisFeatureGeography o, Unit<Length> unit) { t<Length> targetUnit = (unit != null) ? unit : SI.METER; .vividsolutions.jts.geom.Geometry me = location; .vividsolutions.jts.geom.Geometry other = o.getLocation(); { return SI.METER.getConverterTo(targetUnit).convert(JTS.orthodromicDistance(me.getCoo...
343996_74
public double distance(GisFeatureGeography o, Unit<Length> unit) { t<Length> targetUnit = (unit != null) ? unit : SI.METER; .vividsolutions.jts.geom.Geometry me = location; .vividsolutions.jts.geom.Geometry other = o.getLocation(); { return SI.METER.getConverterTo(targetUnit).convert(JTS.orthodromicDistance(me.getCoo...
343996_75
public double distance(GisFeatureGeography o, Unit<Length> unit) { t<Length> targetUnit = (unit != null) ? unit : SI.METER; .vividsolutions.jts.geom.Geometry me = location; .vividsolutions.jts.geom.Geometry other = o.getLocation(); { return SI.METER.getConverterTo(targetUnit).convert(JTS.orthodromicDistance(me.getCoo...
343996_76
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_77
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_78
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_79
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_80
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_81
public static GisFeatureBuilder gisFeature() { return new GisFeatureBuilder(); }
343996_82
@Override public int hashCode() { urn new HashCodeBuilder() ppend(geonamesId) oHashCode(); }
343996_83
@Override public int hashCode() { urn new HashCodeBuilder() ppend(geonamesId) oHashCode(); }
343996_84
public static GisFeatureTypeBuilder geonamesFeatureClass(String featureClass) { urn new GisFeatureTypeBuilder(featureClass); }
343996_85
public static GisFeatureTypeBuilder geonamesFeatureClass(String featureClass) { urn new GisFeatureTypeBuilder(featureClass); }
343996_86
public static GisFeatureTypeBuilder geonamesFeatureClass(String featureClass) { urn new GisFeatureTypeBuilder(featureClass); }
343996_87
public static GisFeatureTypeBuilder geonamesFeatureClass(String featureClass) { urn new GisFeatureTypeBuilder(featureClass); }
343996_88
public ImmutableSet<AlternateGisFeatureName> getAlternateNames() { return this.alternateNamesProvider.getAlternateNames(); }
343996_89
public static GisFeatureNames gisFeatureName(String name) { return new GisFeatureNames(name); }
343996_90
public static GisFeatureNames gisFeatureName(String name) { return new GisFeatureNames(name); }
3440013_0
public EpsilonNetwork buildNetwork() { InputStream inStream; EpsilonNetwork epsilonNetwork = new EpsilonNetwork(); try { if (file.exists()) { inStream = new FileInputStream(file); OntModel ontModelNoInf = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM); ontModelNoInf.read(inStream, null,...
3440013_1
public EpsilonNetwork(){ nodeSelector = new NodeSelector(); network = new Network(); / processedTriples = Collections.synchronizedList(new ArrayList<Triple>()); processedTriples = new ArrayList<Triple>(); gcTokens = new Hashtable <Triple, List<Token>> (); }
3443799_1
public Connection create() { try { return DriverManager.getConnection(properties.getProperty("databaseurl") + "?user=" + properties.getProperty("user") + "&password=" + properties.getProperty("password")); } catch (SQLException e) { logger.severe(e.getMessage()); } return null; }
3443799_2
public Connection create() { try { return DriverManager.getConnection(properties.getProperty("databaseurl") + "?user=" + properties.getProperty("user") + "&password=" + properties.getProperty("password")); } catch (SQLException e) { logger.severe(e.getMessage()); } return null; }
3443799_3
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Item> items = itemService.findAll(); request.setAttribute("all", items); request.getRequestDispatcher("viewItems.jsp").forward(request, response); }
3443799_4
public List<Integer> generate(int length) { List<Integer> generatedList = new ArrayList<Integer>(); for(int i=0;i<length;i++) { generatedList.add((int)Math.round(Math.random()*length)); } return generatedList; }
3443799_5
public List<Integer> generate(int length) { List<Integer> generatedList = new ArrayList<Integer>(); for(int i=0;i<length;i++) { generatedList.add((int)Math.round(Math.random()*length)); } return generatedList; }
3443799_6
public List<Integer> generate(int length) { List<Integer> generatedList = new ArrayList<Integer>(); for(int i=0;i<length;i++) { generatedList.add((int)Math.round(Math.random()*length)); } return generatedList; }
3443799_7
@Override public Comparable[] sort(Comparable[] list) throws RemoteException { Arrays.sort(list); return list; }
3443799_8
@Override public Comparable[] sort(Comparable[] list) throws RemoteException { Arrays.sort(list); return list; }
3443799_9
@Override public Comparable[] sort(Comparable[] list) throws RemoteException { Arrays.sort(list); return list; }
3444675_0
@Override public boolean equals(Object obj) { String pk = getLanguageId(); if (pk == null || obj == null || !(obj instanceof Language)) { return false; } return pk.equals(((Language) obj).getLanguageId()); }
3444675_1
public void merge(Submission submission) { if (submission.getUrl() != null && !this.getUrl().equals(submission.getUrl())) { throw new IllegalArgumentException("Thing URL '" + getUrl() + "' cannot be changed to '" + submission.getUrl() + "'"); } this.setCategory(submission.get...
3444675_2
@Override public boolean equals(Object obj) { String pk = getThingId(); if (pk == null || obj == null || !(obj instanceof Thing)) { return false; } return pk.equals(((Thing) obj).getThingId()); }
3444675_3
@Override public boolean equals(Object obj) { String pk = getUserId(); if (pk == null || obj == null || !(obj instanceof User)) { return false; } return pk.equals(((User) obj).getUserId()); }
3444675_4
public FlattrObject toFlattrObject() throws FlattrException { FlattrObject result = new FlattrObject(); result.put("url", url); if (hidden != null) { result.put("hidden", hidden); } if (title != null) { result.put("title", title); } if (description != null) { result.p...
3444675_5
@Override public boolean equals(Object obj) { String pk = getCategoryId(); if (pk == null || obj == null || !(obj instanceof Category)) { return false; } return pk.equals(((Category) obj).getCategoryId()); }
3444675_6
protected String base64(String str) { // There is no common Base64 encoder in Java and Android. Sometimes I hate Java. try { byte[] data = str.getBytes(ENCODING); StringBuilder sb = new StringBuilder(); for (int ix = 0; ix < data.length; ix += 3) { int triplet = (data[ix] & 0...
3444675_7
protected Charset getCharset(String contentType) { Charset charset = Charset.forName(ENCODING); if (contentType != null) { Matcher m = CHARSET.matcher(contentType); if (m.matches()) { try { charset = Charset.forName(m.group(1)); } catch (UnsupportedCharset...
3444675_8
public String authenticate() throws FlattrException { try { StringBuilder url = new StringBuilder(); url.append(requestTokenUrl); url.append("?response_type=").append(URLEncoder.encode(responseType, ENCODING)); url.append("&client_id=").append(URLEncoder.encode(consumerKey.getKey(), ...
3444675_9
protected String buildScopeString() { StringBuilder sb = new StringBuilder(); if (scope.contains(Scope.FLATTR )) sb.append(" flattr"); if (scope.contains(Scope.THING )) sb.append(" thing"); if (scope.contains(Scope.EMAIL )) sb.append(" email"); if (scope.contains(Scope.EXTENDEDREAD)...
3447638_0
@Override ublic String execute() throws Exception { ActionContext context = ActionContext.getContext(); ActionInvocation invocation = context.getActionInvocation(); ActionProxy proxy = invocation.getProxy(); String name = proxy.getActionName().toLowerCase(); String namespace = proxy.getNamespace().toLowe...
3447638_1
@Override ublic String execute() throws Exception { ActionContext context = ActionContext.getContext(); ActionInvocation invocation = context.getActionInvocation(); ActionProxy proxy = invocation.getProxy(); String name = proxy.getActionName().toLowerCase(); String namespace = proxy.getNamespace().toLowe...
3447638_2
public void noResultsResponse() { addToResponse("No stops found\n"); }
3447638_3
public void twoStopResponse() { // when limiting the sms response for two responses, we need to limit the responses in pairs StopSearchResult stopSearchResult1 = (StopSearchResult) searchResults.get(0); StopSearchResult stopSearchResult2 = (StopSearchResult) searchResults.get(1); StringBuilder stopResponse1 = g...
3447638_4
public void manyStopResponse() { addToResponse("Send:\n"); for (SearchResult searchResult : searchResults) { StopSearchResult stopSearchResult = (StopSearchResult) searchResult; String stopIdNoAgency = stopSearchResult.getStopIdNoAgency(); String stopDirection = stopSearchResult.getStopDirection(); ...
3447638_5
public GeocoderResults geocode(String location) { StringBuilder b = new StringBuilder(); b.append(BASE_URL); b.append("?"); b.append("sensor=").append(sensor); String encodedLocation; try { encodedLocation = URLEncoder.encode(location, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printSt...
3447638_6
public StifRecord read() throws IOException { int recordStart; int end = -1; StifRecordFactory<?> factory; while (true) { end = -1; while (end == -1) { for (int i = start; i < bufferEnd; ++i) { if (buffer[i] == '\r') { end = i; break; } } if (end != -1) { break; } // we need...
3447638_7
@Override public FieldMapping createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) { return new DateTimeFieldMapping(entityType, csvFieldName, objFieldName, required); }
3449807_0
public List<MavenModule> getMavenModules() { return mavenModules; }
3449807_1
public MavenModule getRootModule() { return rootModule; }
3449807_2
public File findArtifact(Artifact artifact) { MavenModule mavenModule = findModule(artifact); if (mavenModule != null) return mavenModule.getPomFile(); else return null; }
3449807_3
public File findArtifact(Artifact artifact) { MavenModule mavenModule = findModule(artifact); if (mavenModule != null) return mavenModule.getPomFile(); else return null; }
3449807_4
public List<String> findVersions(Artifact artifact) { MavenModule mavenModule = findModule(artifact); if (mavenModule != null) return Lists.newArrayList(mavenModule.getVersion()); else return Lists.newArrayList(); }
3449807_5
public List<String> findVersions(Artifact artifact) { MavenModule mavenModule = findModule(artifact); if (mavenModule != null) return Lists.newArrayList(mavenModule.getVersion()); else return Lists.newArrayList(); }
3449807_6
public WorkspaceRepository getRepository() { return workspaceRepository; }
3449807_7
public MModule getModuleDependencies(MavenModule mavenModule, RepositorySystemSession session, DependenciesAnalyzerListener listener) throws ArtifactDescriptorException, IOException, DependencyCollectionException, ModelBuildingException { ModuleDependencies moduleDependencies = doGetModuleDependencies(mavenModule, ...
3449807_8
public MModule getModuleDependencies(MavenModule mavenModule, RepositorySystemSession session, DependenciesAnalyzerListener listener) throws ArtifactDescriptorException, IOException, DependencyCollectionException, ModelBuildingException { ModuleDependencies moduleDependencies = doGetModuleDependencies(mavenModule, ...
3449807_9
public MModule getModuleDependencies(MavenModule mavenModule, RepositorySystemSession session, DependenciesAnalyzerListener listener) throws ArtifactDescriptorException, IOException, DependencyCollectionException, ModelBuildingException { ModuleDependencies moduleDependencies = doGetModuleDependencies(mavenModule, ...
3452904_0
public AdhocQueryResponse respondingGatewayCrossGatewayQuery(AdhocQueryRequest request, AssertionType assertion) { LOG.debug("Enter AdapterDocQueryOrchImpl.respondingGatewayCrossGatewayQuery()"); AdhocQueryResponse response = null; try { if (request != null) { AdapterComponentDocRegistry...
3452904_1
protected AdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl getAdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl() { return new AdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl(); }
3452904_2
public PatientDiscoveryDeferredReqQueueProcessResponseType processPatientDiscoveryDeferredReqQueue( PatientDiscoveryDeferredReqQueueProcessRequestType request, WebServiceContext context) { PatientDiscoveryDeferredReqQueueProcessResponseType response = new PatientDiscoveryDeferredReqQueueProcessResponseType(); ...
3452904_3
protected AdapterPatientDiscoveryDeferredReqQueueProcessImpl getAdapterPatientDiscoveryDeferredReqQueueProcessImpl() { return new AdapterPatientDiscoveryDeferredReqQueueProcessImpl(); }
3452904_4
@Override public PatientDiscoveryDeferredReqQueueProcessResponseType processPatientDiscoveryDeferredReqQueue( PatientDiscoveryDeferredReqQueueProcessRequestType request) { return getAdapterPatientDiscoveryDeferredReqQueueProcessImpl().processPatientDiscoveryDeferredReqQueue(request, context); }
3452904_5
public HashMap<String, OrganizationType> getRemoteHcidFromUUID() { HashMap<String, OrganizationType> organizationMap = new HashMap<>(); List<OrganizationType> organizations = getAllOrganizations(); if (NullChecker.isNotNullish(organizations)) { for (OrganizationType organization : organizations) { ...
3452904_6
public HashMap<String, OrganizationType> getRemoteHcidFromUUID() { HashMap<String, OrganizationType> organizationMap = new HashMap<>(); List<OrganizationType> organizations = getAllOrganizations(); if (NullChecker.isNotNullish(organizations)) { for (OrganizationType organization : organizations) { ...
3452904_7
public HashMap<String, OrganizationType> getExternalOrganizationsMap() { HashMap<String, OrganizationType> organizationMap = getRemoteHcidFromUUID(); if (organizationMap != null && !organizationMap.isEmpty()) { Iterator<Map.Entry<String, OrganizationType>> it = organizationMap.entrySet().iterator(); ...
3452904_8
public HashMap<String, OrganizationType> getExternalOrganizationsMap() { HashMap<String, OrganizationType> organizationMap = getRemoteHcidFromUUID(); if (organizationMap != null && !organizationMap.isEmpty()) { Iterator<Map.Entry<String, OrganizationType>> it = organizationMap.entrySet().iterator(); ...
3452904_9
@Override public UserLogin addUser(Login user, long role, String firstName, String middleName, String lastName, String transRoleDesc) throws UserLoginException { boolean isCreateUser; String passwordHash; byte[] saltValue; try { saltValue = credentialService.generateRandomSalt(); ...
3454599_0
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_1
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_2
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_3
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_4
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_5
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_6
public static List<String> split(String str, String separator) { if (str == null) { throw new IllegalArgumentException("cannot split null string"); } if (separator == null) { throw new IllegalArgumentException("separator cannot be null"); } if (separator.isEmpty()) { throw new IllegalArgumentExcep...
3454599_7
public static String join(String separator, List<String> components) { if (components == null) { throw new IllegalArgumentException("list cannot be null"); } if (separator == null) { separator = ""; } StringBuilder sb = new StringBuilder(); for (String comp : components) { // skip null component...
3454599_8
public static String join(String separator, List<String> components) { if (components == null) { throw new IllegalArgumentException("list cannot be null"); } if (separator == null) { separator = ""; } StringBuilder sb = new StringBuilder(); for (String comp : components) { // skip null component...
3454599_9
@Override public String toString() { ArrayList<String> l = new ArrayList<String>(this.size()); for (K k : this) { l.add(k.toString()); } return Strings.join("/", l); }
3456296_0
@Override public ValueResult resolve(MethodParameter methodParameter, List<String> wordsBuffer) { String prefix = prefixForMethod(methodParameter.getMethod()); List<String> words = wordsBuffer.stream().filter(w -> !w.isEmpty()).collect(Collectors.toList()); CacheKey cacheKey = new CacheKey(methodParameter.getMethod(...
3456296_1
@Override public ValueResult resolve(MethodParameter methodParameter, List<String> wordsBuffer) { String prefix = prefixForMethod(methodParameter.getMethod()); List<String> words = wordsBuffer.stream().filter(w -> !w.isEmpty()).collect(Collectors.toList()); CacheKey cacheKey = new CacheKey(methodParameter.getMethod(...
3456296_2
@Override public ValueResult resolve(MethodParameter methodParameter, List<String> wordsBuffer) { String prefix = prefixForMethod(methodParameter.getMethod()); List<String> words = wordsBuffer.stream().filter(w -> !w.isEmpty()).collect(Collectors.toList()); CacheKey cacheKey = new CacheKey(methodParameter.getMethod(...