Skip to content

Instantly share code, notes, and snippets.

View samidalouche's full-sized avatar

Sami Dalouche samidalouche

View GitHub Profile
[info] == openplacesearch-scala / deliver-local ==
[warn] No dependency configuration found, using defaults.
[warn] [NOT FOUND ] com.sirika.openplacesearch#openplacesearch-core_2.8.1;0.1!openplacesearch-core_2.8.1.pom (0ms)
[warn] ==== local: tried
[warn] /home/sdalouche/.ivy2/local/com.sirika.openplacesearch/openplacesearch-core_2.8.1/0.1/poms/openplacesearch-core_2.8.1.pom
[warn] [NOT FOUND ] com.sirika.openplacesearch#openplacesearch-core_2.8.1;0.1!openplacesearch-core_2.8.1.jar (0ms)
[warn] ==== local: tried
[warn] /home/sdalouche/.ivy2/local/com.sirika.openplacesearch/openplacesearch-core_2.8.1/0.1/jars/openplacesearch-core_2.8.1.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
import java.io.File
import sbt._
import de.element34.sbteclipsify._
class Project(info: ProjectInfo) extends ParentProject(info) with IdeaProject with Eclipsify {
//lazy val mavenLocal = "Local Maven Repository" at "file://"+Path.userHome+"/.m2/repository"
lazy val geotoolsRepository = "Open Source Geospatial Foundation Repository" at "http://download.osgeo.org/webdav/geotools/"
lazy val javanetRepository = "Java.net Repository" at "http://download.java.net/maven/2"
lazy val sirikaRepository = "Sirika Releases Repository" at "http://developers.sirika.com/maven2/releases/"
package com.gisgraphy.client.impl.resultparser;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLEventReader;
import javax.xml.stream.XMLInputFactory;
@samidalouche
samidalouche / test
Created February 1, 2011 19:10
code
package com.sirika.openplacesearch.api.language.internal
import java.io.InputStreamReader
import java.net.URL
import scala.collection.immutable.{List,Map}
import com.google.common.base.Charsets
import com.google.common.io.{Resources,CharStreams,LineProcessor, InputSupplier}
import grizzled.slf4j.Logging
import com.sirika.openplacesearch.api.language.Language
import com.sirika.openplacesearch.api.language.LanguageRepository
@samidalouche
samidalouche / java
Created February 1, 2011 16:30
Scala
/**
* reverts to #name if no preferredName found
*/
def preferredName(language: Language) :String = localizedNames.find {n: LocalizedName => n.preferred && n.language == language}
.map{ _.name}
.getOrElse(defaultName)
/**
* reverts to #name if no short name found
*/
Conversion to scala from the java code :
@Override
public int hashCode() {
return new HashCodeBuilder()
.append(alpha3Code)
.toHashCode();
}
@Override