diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ecad785 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ + +/target +/project/target +/project/project +/.classpath +/.project +/.settings/org.scala-ide.sdt.core.prefs +/.idea +/.idea_modules +/bin +/.cache \ No newline at end of file diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..bec6b62 --- /dev/null +++ b/build.sbt @@ -0,0 +1,39 @@ +name := "gdata-scala-client" + +version := "1.0.0" + +scalaVersion := "2.10.1" + +scalacOptions ++= Seq("-deprecation") + +//scalaSource in Compile <<= baseDirectory(_ / "src") +//javaSource in Compile <<= scalaSource in Compile//baseDirectory(_ / "src") + +//scalaSource in Test <<= baseDirectory(_ / "samples") +//sourceDirectories in Test += baseDirectory(_ / "samples") +//javaSource in Test <<= scalaSource in Test//baseDirectory(_ / "tests") + +EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource + +EclipseKeys.withSource := true + +//resourceDirectory in Test <<= baseDirectory(_ / "test-data") +//resourceDirectory <<= baseDirectory(_ / "test-data") + +//libraryDependencies += "org.scalatest" %% "scalatest" % "1.8" % "test" +//libraryDependencies += "org.scalatest" % "scalatest_2.10.0" % "1.8" //% "test" + +libraryDependencies += "junit" % "junit" % "4.10" % "test" + +libraryDependencies += "com.novocode" % "junit-interface" % "0.8" % "test->default" + +//resolvers += Classpaths.typesafeResolver + +//resolvers += "typesafe2" at "http://repo.typesafe.com/typesafe/simple/ivy-releases/" +//resolvers += "namin.github.com/maven-repository" at "http://namin.github.com/maven-repository/" + +//resolvers += "Spray Repository" at "http://repo.spray.cc/" + +//resolvers += "typesave" at "http://repo.typesafe.com/typesafe/releases" + +//addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.2") diff --git a/lib/junit-4.4.jar b/lib/junit-4.4.jar deleted file mode 100644 index 649b0b3..0000000 Binary files a/lib/junit-4.4.jar and /dev/null differ diff --git a/lib/xmldiff-0.2.jar b/lib/xmldiff-0.2.jar deleted file mode 100644 index 60cfd0e..0000000 Binary files a/lib/xmldiff-0.2.jar and /dev/null differ diff --git a/project/build.sbt b/project/build.sbt new file mode 100644 index 0000000..0dba6cc --- /dev/null +++ b/project/build.sbt @@ -0,0 +1,5 @@ +resolvers += Classpaths.typesafeResolver + +addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.0.0") + +addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.2.0") \ No newline at end of file diff --git a/src/com/google/gdata/CategoryQuery.scala b/src/main/scala/com/google/gdata/CategoryQuery.scala similarity index 100% rename from src/com/google/gdata/CategoryQuery.scala rename to src/main/scala/com/google/gdata/CategoryQuery.scala diff --git a/src/com/google/gdata/Query.scala b/src/main/scala/com/google/gdata/Query.scala similarity index 100% rename from src/com/google/gdata/Query.scala rename to src/main/scala/com/google/gdata/Query.scala diff --git a/src/com/google/gdata/SearchQuery.scala b/src/main/scala/com/google/gdata/SearchQuery.scala similarity index 100% rename from src/com/google/gdata/SearchQuery.scala rename to src/main/scala/com/google/gdata/SearchQuery.scala diff --git a/src/com/google/gdata/Service.scala b/src/main/scala/com/google/gdata/Service.scala similarity index 100% rename from src/com/google/gdata/Service.scala rename to src/main/scala/com/google/gdata/Service.scala diff --git a/src/com/google/gdata/ServiceException.scala b/src/main/scala/com/google/gdata/ServiceException.scala similarity index 100% rename from src/com/google/gdata/ServiceException.scala rename to src/main/scala/com/google/gdata/ServiceException.scala diff --git a/src/com/google/gdata/calendar/AclEntries.scala b/src/main/scala/com/google/gdata/calendar/AclEntries.scala similarity index 100% rename from src/com/google/gdata/calendar/AclEntries.scala rename to src/main/scala/com/google/gdata/calendar/AclEntries.scala diff --git a/src/com/google/gdata/calendar/AclScope.scala b/src/main/scala/com/google/gdata/calendar/AclScope.scala similarity index 100% rename from src/com/google/gdata/calendar/AclScope.scala rename to src/main/scala/com/google/gdata/calendar/AclScope.scala diff --git a/src/com/google/gdata/calendar/CalendarEntries.scala b/src/main/scala/com/google/gdata/calendar/CalendarEntries.scala similarity index 100% rename from src/com/google/gdata/calendar/CalendarEntries.scala rename to src/main/scala/com/google/gdata/calendar/CalendarEntries.scala diff --git a/src/com/google/gdata/calendar/CalendarQuery.scala b/src/main/scala/com/google/gdata/calendar/CalendarQuery.scala similarity index 100% rename from src/com/google/gdata/calendar/CalendarQuery.scala rename to src/main/scala/com/google/gdata/calendar/CalendarQuery.scala diff --git a/src/com/google/gdata/calendar/CalendarService.scala b/src/main/scala/com/google/gdata/calendar/CalendarService.scala similarity index 100% rename from src/com/google/gdata/calendar/CalendarService.scala rename to src/main/scala/com/google/gdata/calendar/CalendarService.scala diff --git a/src/com/google/gdata/calendar/StdAclFeed.scala b/src/main/scala/com/google/gdata/calendar/StdAclFeed.scala similarity index 100% rename from src/com/google/gdata/calendar/StdAclFeed.scala rename to src/main/scala/com/google/gdata/calendar/StdAclFeed.scala diff --git a/src/com/google/gdata/calendar/StdCalendarsFeed.scala b/src/main/scala/com/google/gdata/calendar/StdCalendarsFeed.scala similarity index 100% rename from src/com/google/gdata/calendar/StdCalendarsFeed.scala rename to src/main/scala/com/google/gdata/calendar/StdCalendarsFeed.scala diff --git a/src/com/google/gdata/calendar/StdEventsFeed.scala b/src/main/scala/com/google/gdata/calendar/StdEventsFeed.scala similarity index 100% rename from src/com/google/gdata/calendar/StdEventsFeed.scala rename to src/main/scala/com/google/gdata/calendar/StdEventsFeed.scala diff --git a/src/com/google/gdata/client/AuthToken.scala b/src/main/scala/com/google/gdata/client/AuthToken.scala similarity index 100% rename from src/com/google/gdata/client/AuthToken.scala rename to src/main/scala/com/google/gdata/client/AuthToken.scala diff --git a/src/com/google/gdata/client/AuthTokenFactory.scala b/src/main/scala/com/google/gdata/client/AuthTokenFactory.scala similarity index 100% rename from src/com/google/gdata/client/AuthTokenFactory.scala rename to src/main/scala/com/google/gdata/client/AuthTokenFactory.scala diff --git a/src/com/google/gdata/client/AuthenticationException.scala b/src/main/scala/com/google/gdata/client/AuthenticationException.scala similarity index 100% rename from src/com/google/gdata/client/AuthenticationException.scala rename to src/main/scala/com/google/gdata/client/AuthenticationException.scala diff --git a/src/com/google/gdata/client/ClientLoginFactory.scala b/src/main/scala/com/google/gdata/client/ClientLoginFactory.scala similarity index 100% rename from src/com/google/gdata/client/ClientLoginFactory.scala rename to src/main/scala/com/google/gdata/client/ClientLoginFactory.scala diff --git a/src/com/google/gdata/client/GDataRequest.scala b/src/main/scala/com/google/gdata/client/GDataRequest.scala similarity index 100% rename from src/com/google/gdata/client/GDataRequest.scala rename to src/main/scala/com/google/gdata/client/GDataRequest.scala diff --git a/src/com/google/gdata/client/GDataRequestException.scala b/src/main/scala/com/google/gdata/client/GDataRequestException.scala similarity index 100% rename from src/com/google/gdata/client/GDataRequestException.scala rename to src/main/scala/com/google/gdata/client/GDataRequestException.scala diff --git a/src/com/google/gdata/client/HttpConnection.scala b/src/main/scala/com/google/gdata/client/HttpConnection.scala similarity index 98% rename from src/com/google/gdata/client/HttpConnection.scala rename to src/main/scala/com/google/gdata/client/HttpConnection.scala index 42d27bc..4a356b8 100644 --- a/src/com/google/gdata/client/HttpConnection.scala +++ b/src/main/scala/com/google/gdata/client/HttpConnection.scala @@ -209,12 +209,10 @@ class HttpConnection(val underlying: HttpURLConnection) { ab.toList } - import collection.JavaConversions.asMap + import collection.JavaConversions._ val res: mutable.Map[String, List[String]] = new mutable.HashMap - - for ((key, headers) <- underlying.getHeaderFields if key ne null) - res(key) = toScalaList(headers) - + for ((key, headers) <- underlying.getHeaderFields.iterator if key ne null) + res(key) = toScalaList(headers) res } diff --git a/src/com/google/gdata/client/RequestFactory.scala b/src/main/scala/com/google/gdata/client/RequestFactory.scala similarity index 100% rename from src/com/google/gdata/client/RequestFactory.scala rename to src/main/scala/com/google/gdata/client/RequestFactory.scala diff --git a/src/com/google/gdata/contacts/ContactsQuery.scala b/src/main/scala/com/google/gdata/contacts/ContactsQuery.scala similarity index 100% rename from src/com/google/gdata/contacts/ContactsQuery.scala rename to src/main/scala/com/google/gdata/contacts/ContactsQuery.scala diff --git a/src/com/google/gdata/contacts/ContactsService.scala b/src/main/scala/com/google/gdata/contacts/ContactsService.scala similarity index 100% rename from src/com/google/gdata/contacts/ContactsService.scala rename to src/main/scala/com/google/gdata/contacts/ContactsService.scala diff --git a/src/com/google/gdata/contacts/StdContactsFeed.scala b/src/main/scala/com/google/gdata/contacts/StdContactsFeed.scala similarity index 100% rename from src/com/google/gdata/contacts/StdContactsFeed.scala rename to src/main/scala/com/google/gdata/contacts/StdContactsFeed.scala diff --git a/src/com/google/gdata/data/Atom.scala b/src/main/scala/com/google/gdata/data/Atom.scala similarity index 79% rename from src/com/google/gdata/data/Atom.scala rename to src/main/scala/com/google/gdata/data/Atom.scala index 506e476..9dcb9e2 100644 --- a/src/com/google/gdata/data/Atom.scala +++ b/src/main/scala/com/google/gdata/data/Atom.scala @@ -22,8 +22,8 @@ import com.google.gdata.data.util.DateTime /** A text construct, according to the Atom specification. The content is uninterpreted. */ case class Text(tpe: Option[String], - content: String) extends Tuple2(tpe, content) { - + content: String) //extends Tuple2(tpe, content) + { /** A convenience constructor for plain text. */ def this(content: String) = { this(None, content) @@ -36,7 +36,7 @@ object NoText extends Text(None, "") /** A person construct, according to the Atom specification. */ case class Person(name: String, uri: Option[String], - email: Option[String]) extends Tuple3(name, uri, email) with HasStore + email: Option[String]) extends /*Tuple3(name, uri, email) with*/ HasStore /** * This object defines common Atom constructs. @@ -50,16 +50,23 @@ object Atom { /** * Return a pickler for an element that is a text construct. */ + import com.google.xml.combinators._ def atomText(elemName: String): Pickler[Text] = (wrap (elem(elemName, opt(attr("type", text)) ~ text)) - (Text) (tuple2Pair)) + (Text) (tuple2Pair2)) + + //def tuple2Pair2(p: (Option[String], String)) = new ~(p._1, p._2) + def tuple2Pair2(p: Text) = new ~(p.tpe,p.content) /** Return a pickler for an element that is a person construct. */ def atomPerson(elemName: String): Pickler[Person] = elem(elemName, makeExtensible(wrap (interleaved(elem("name", text) ~ opt(elem("uri", text)) - ~ opt(elem("email", text)))) (Person) (tuple3Pair))) + ~ opt(elem("email", text)))) (Person) (tuple3Pair2))) + /*Tuple3(name, uri, email) with*/ + def tuple3Pair2(p: Person) = new ~(p.name, p.uri) ~ p.email + /** * Return a pickler for a date time in Atom format (RFC 3339). Atom common * attributes (xml:base and xml:lang) are ignored. diff --git a/src/com/google/gdata/data/AtomEntries.scala b/src/main/scala/com/google/gdata/data/AtomEntries.scala similarity index 100% rename from src/com/google/gdata/data/AtomEntries.scala rename to src/main/scala/com/google/gdata/data/AtomEntries.scala diff --git a/src/com/google/gdata/data/AtomFeeds.scala b/src/main/scala/com/google/gdata/data/AtomFeeds.scala similarity index 100% rename from src/com/google/gdata/data/AtomFeeds.scala rename to src/main/scala/com/google/gdata/data/AtomFeeds.scala diff --git a/src/com/google/gdata/data/Category.scala b/src/main/scala/com/google/gdata/data/Category.scala similarity index 100% rename from src/com/google/gdata/data/Category.scala rename to src/main/scala/com/google/gdata/data/Category.scala diff --git a/src/com/google/gdata/data/Content.scala b/src/main/scala/com/google/gdata/data/Content.scala similarity index 100% rename from src/com/google/gdata/data/Content.scala rename to src/main/scala/com/google/gdata/data/Content.scala diff --git a/src/com/google/gdata/data/Entries.scala b/src/main/scala/com/google/gdata/data/Entries.scala similarity index 100% rename from src/com/google/gdata/data/Entries.scala rename to src/main/scala/com/google/gdata/data/Entries.scala diff --git a/src/com/google/gdata/data/Feeds.scala b/src/main/scala/com/google/gdata/data/Feeds.scala similarity index 100% rename from src/com/google/gdata/data/Feeds.scala rename to src/main/scala/com/google/gdata/data/Feeds.scala diff --git a/src/com/google/gdata/data/Generator.scala b/src/main/scala/com/google/gdata/data/Generator.scala similarity index 100% rename from src/com/google/gdata/data/Generator.scala rename to src/main/scala/com/google/gdata/data/Generator.scala diff --git a/src/com/google/gdata/data/Link.scala b/src/main/scala/com/google/gdata/data/Link.scala similarity index 100% rename from src/com/google/gdata/data/Link.scala rename to src/main/scala/com/google/gdata/data/Link.scala diff --git a/src/com/google/gdata/data/LinkNavigation.scala b/src/main/scala/com/google/gdata/data/LinkNavigation.scala similarity index 100% rename from src/com/google/gdata/data/LinkNavigation.scala rename to src/main/scala/com/google/gdata/data/LinkNavigation.scala diff --git a/src/com/google/gdata/data/Source.scala b/src/main/scala/com/google/gdata/data/Source.scala similarity index 100% rename from src/com/google/gdata/data/Source.scala rename to src/main/scala/com/google/gdata/data/Source.scala diff --git a/src/com/google/gdata/data/StdAtomFeed.scala b/src/main/scala/com/google/gdata/data/StdAtomFeed.scala similarity index 100% rename from src/com/google/gdata/data/StdAtomFeed.scala rename to src/main/scala/com/google/gdata/data/StdAtomFeed.scala diff --git a/src/com/google/gdata/data/Uris.scala b/src/main/scala/com/google/gdata/data/Uris.scala similarity index 100% rename from src/com/google/gdata/data/Uris.scala rename to src/main/scala/com/google/gdata/data/Uris.scala diff --git a/src/com/google/gdata/data/kinds/Comments.scala b/src/main/scala/com/google/gdata/data/kinds/Comments.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Comments.scala rename to src/main/scala/com/google/gdata/data/kinds/Comments.scala diff --git a/src/com/google/gdata/data/kinds/ContactEntries.scala b/src/main/scala/com/google/gdata/data/kinds/ContactEntries.scala similarity index 100% rename from src/com/google/gdata/data/kinds/ContactEntries.scala rename to src/main/scala/com/google/gdata/data/kinds/ContactEntries.scala diff --git a/src/com/google/gdata/data/kinds/Email.scala b/src/main/scala/com/google/gdata/data/kinds/Email.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Email.scala rename to src/main/scala/com/google/gdata/data/kinds/Email.scala diff --git a/src/com/google/gdata/data/kinds/EntryLink.scala b/src/main/scala/com/google/gdata/data/kinds/EntryLink.scala similarity index 100% rename from src/com/google/gdata/data/kinds/EntryLink.scala rename to src/main/scala/com/google/gdata/data/kinds/EntryLink.scala diff --git a/src/com/google/gdata/data/kinds/Enum.scala b/src/main/scala/com/google/gdata/data/kinds/Enum.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Enum.scala rename to src/main/scala/com/google/gdata/data/kinds/Enum.scala diff --git a/src/com/google/gdata/data/kinds/EventEntries.scala b/src/main/scala/com/google/gdata/data/kinds/EventEntries.scala similarity index 100% rename from src/com/google/gdata/data/kinds/EventEntries.scala rename to src/main/scala/com/google/gdata/data/kinds/EventEntries.scala diff --git a/src/com/google/gdata/data/kinds/ExtendedProperty.scala b/src/main/scala/com/google/gdata/data/kinds/ExtendedProperty.scala similarity index 100% rename from src/com/google/gdata/data/kinds/ExtendedProperty.scala rename to src/main/scala/com/google/gdata/data/kinds/ExtendedProperty.scala diff --git a/src/com/google/gdata/data/kinds/FeedLink.scala b/src/main/scala/com/google/gdata/data/kinds/FeedLink.scala similarity index 100% rename from src/com/google/gdata/data/kinds/FeedLink.scala rename to src/main/scala/com/google/gdata/data/kinds/FeedLink.scala diff --git a/src/com/google/gdata/data/kinds/Im.scala b/src/main/scala/com/google/gdata/data/kinds/Im.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Im.scala rename to src/main/scala/com/google/gdata/data/kinds/Im.scala diff --git a/src/com/google/gdata/data/kinds/Organization.scala b/src/main/scala/com/google/gdata/data/kinds/Organization.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Organization.scala rename to src/main/scala/com/google/gdata/data/kinds/Organization.scala diff --git a/src/com/google/gdata/data/kinds/OriginalEvent.scala b/src/main/scala/com/google/gdata/data/kinds/OriginalEvent.scala similarity index 100% rename from src/com/google/gdata/data/kinds/OriginalEvent.scala rename to src/main/scala/com/google/gdata/data/kinds/OriginalEvent.scala diff --git a/src/com/google/gdata/data/kinds/PhoneNumber.scala b/src/main/scala/com/google/gdata/data/kinds/PhoneNumber.scala similarity index 100% rename from src/com/google/gdata/data/kinds/PhoneNumber.scala rename to src/main/scala/com/google/gdata/data/kinds/PhoneNumber.scala diff --git a/src/com/google/gdata/data/kinds/PostalAddress.scala b/src/main/scala/com/google/gdata/data/kinds/PostalAddress.scala similarity index 100% rename from src/com/google/gdata/data/kinds/PostalAddress.scala rename to src/main/scala/com/google/gdata/data/kinds/PostalAddress.scala diff --git a/src/com/google/gdata/data/kinds/Rating.scala b/src/main/scala/com/google/gdata/data/kinds/Rating.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Rating.scala rename to src/main/scala/com/google/gdata/data/kinds/Rating.scala diff --git a/src/com/google/gdata/data/kinds/RecurrenceException.scala b/src/main/scala/com/google/gdata/data/kinds/RecurrenceException.scala similarity index 100% rename from src/com/google/gdata/data/kinds/RecurrenceException.scala rename to src/main/scala/com/google/gdata/data/kinds/RecurrenceException.scala diff --git a/src/com/google/gdata/data/kinds/Reminder.scala b/src/main/scala/com/google/gdata/data/kinds/Reminder.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Reminder.scala rename to src/main/scala/com/google/gdata/data/kinds/Reminder.scala diff --git a/src/com/google/gdata/data/kinds/Schemas.scala b/src/main/scala/com/google/gdata/data/kinds/Schemas.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Schemas.scala rename to src/main/scala/com/google/gdata/data/kinds/Schemas.scala diff --git a/src/com/google/gdata/data/kinds/StdContactEntries.scala b/src/main/scala/com/google/gdata/data/kinds/StdContactEntries.scala similarity index 100% rename from src/com/google/gdata/data/kinds/StdContactEntries.scala rename to src/main/scala/com/google/gdata/data/kinds/StdContactEntries.scala diff --git a/src/com/google/gdata/data/kinds/When.scala b/src/main/scala/com/google/gdata/data/kinds/When.scala similarity index 100% rename from src/com/google/gdata/data/kinds/When.scala rename to src/main/scala/com/google/gdata/data/kinds/When.scala diff --git a/src/com/google/gdata/data/kinds/Where.scala b/src/main/scala/com/google/gdata/data/kinds/Where.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Where.scala rename to src/main/scala/com/google/gdata/data/kinds/Where.scala diff --git a/src/com/google/gdata/data/kinds/Who.scala b/src/main/scala/com/google/gdata/data/kinds/Who.scala similarity index 100% rename from src/com/google/gdata/data/kinds/Who.scala rename to src/main/scala/com/google/gdata/data/kinds/Who.scala diff --git a/src/com/google/gdata/data/media/Category.scala b/src/main/scala/com/google/gdata/data/media/Category.scala similarity index 100% rename from src/com/google/gdata/data/media/Category.scala rename to src/main/scala/com/google/gdata/data/media/Category.scala diff --git a/src/com/google/gdata/data/media/Copyright.scala b/src/main/scala/com/google/gdata/data/media/Copyright.scala similarity index 100% rename from src/com/google/gdata/data/media/Copyright.scala rename to src/main/scala/com/google/gdata/data/media/Copyright.scala diff --git a/src/com/google/gdata/data/media/Credit.scala b/src/main/scala/com/google/gdata/data/media/Credit.scala similarity index 100% rename from src/com/google/gdata/data/media/Credit.scala rename to src/main/scala/com/google/gdata/data/media/Credit.scala diff --git a/src/com/google/gdata/data/media/Hash.scala b/src/main/scala/com/google/gdata/data/media/Hash.scala similarity index 100% rename from src/com/google/gdata/data/media/Hash.scala rename to src/main/scala/com/google/gdata/data/media/Hash.scala diff --git a/src/com/google/gdata/data/media/Keywords.scala b/src/main/scala/com/google/gdata/data/media/Keywords.scala similarity index 100% rename from src/com/google/gdata/data/media/Keywords.scala rename to src/main/scala/com/google/gdata/data/media/Keywords.scala diff --git a/src/com/google/gdata/data/media/MediaRss.scala b/src/main/scala/com/google/gdata/data/media/MediaRss.scala similarity index 100% rename from src/com/google/gdata/data/media/MediaRss.scala rename to src/main/scala/com/google/gdata/data/media/MediaRss.scala diff --git a/src/com/google/gdata/data/media/Player.scala b/src/main/scala/com/google/gdata/data/media/Player.scala similarity index 100% rename from src/com/google/gdata/data/media/Player.scala rename to src/main/scala/com/google/gdata/data/media/Player.scala diff --git a/src/com/google/gdata/data/media/Rating.scala b/src/main/scala/com/google/gdata/data/media/Rating.scala similarity index 100% rename from src/com/google/gdata/data/media/Rating.scala rename to src/main/scala/com/google/gdata/data/media/Rating.scala diff --git a/src/com/google/gdata/data/media/Restriction.scala b/src/main/scala/com/google/gdata/data/media/Restriction.scala similarity index 100% rename from src/com/google/gdata/data/media/Restriction.scala rename to src/main/scala/com/google/gdata/data/media/Restriction.scala diff --git a/src/com/google/gdata/data/media/SimpleText.scala b/src/main/scala/com/google/gdata/data/media/SimpleText.scala similarity index 100% rename from src/com/google/gdata/data/media/SimpleText.scala rename to src/main/scala/com/google/gdata/data/media/SimpleText.scala diff --git a/src/com/google/gdata/data/media/Text.scala b/src/main/scala/com/google/gdata/data/media/Text.scala similarity index 100% rename from src/com/google/gdata/data/media/Text.scala rename to src/main/scala/com/google/gdata/data/media/Text.scala diff --git a/src/com/google/gdata/data/media/Thumbnail.scala b/src/main/scala/com/google/gdata/data/media/Thumbnail.scala similarity index 100% rename from src/com/google/gdata/data/media/Thumbnail.scala rename to src/main/scala/com/google/gdata/data/media/Thumbnail.scala diff --git a/src/com/google/gdata/data/util/DateParser.scala b/src/main/scala/com/google/gdata/data/util/DateParser.scala similarity index 100% rename from src/com/google/gdata/data/util/DateParser.scala rename to src/main/scala/com/google/gdata/data/util/DateParser.scala diff --git a/src/com/google/gdata/data/util/DateTime.scala b/src/main/scala/com/google/gdata/data/util/DateTime.scala similarity index 100% rename from src/com/google/gdata/data/util/DateTime.scala rename to src/main/scala/com/google/gdata/data/util/DateTime.scala diff --git a/src/com/google/gdata/data/util/NormalPlayTime.scala b/src/main/scala/com/google/gdata/data/util/NormalPlayTime.scala similarity index 98% rename from src/com/google/gdata/data/util/NormalPlayTime.scala rename to src/main/scala/com/google/gdata/data/util/NormalPlayTime.scala index 87583cc..13132bb 100644 --- a/src/com/google/gdata/data/util/NormalPlayTime.scala +++ b/src/main/scala/com/google/gdata/data/util/NormalPlayTime.scala @@ -74,7 +74,7 @@ case class SpecificTime(hour: Int, minute: Int, seconds: Int, millis: Int) exten /** The specially designated time instant 'now'. @see http://www.ietf.org/rfc/rfc2326.txt */ case object Now extends NormalPlayTime { - def value: Long = error("No 'value' in milliseconds for Now") + def value: Long = sys.error("No 'value' in milliseconds for Now") def isNow = true diff --git a/src/com/google/gdata/youtube/ContactsEntries.scala b/src/main/scala/com/google/gdata/youtube/ContactsEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/ContactsEntries.scala rename to src/main/scala/com/google/gdata/youtube/ContactsEntries.scala diff --git a/src/com/google/gdata/youtube/PlaylistEntries.scala b/src/main/scala/com/google/gdata/youtube/PlaylistEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/PlaylistEntries.scala rename to src/main/scala/com/google/gdata/youtube/PlaylistEntries.scala diff --git a/src/com/google/gdata/youtube/PlaylistVideoEntries.scala b/src/main/scala/com/google/gdata/youtube/PlaylistVideoEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/PlaylistVideoEntries.scala rename to src/main/scala/com/google/gdata/youtube/PlaylistVideoEntries.scala diff --git a/src/com/google/gdata/youtube/Schemas.scala b/src/main/scala/com/google/gdata/youtube/Schemas.scala similarity index 100% rename from src/com/google/gdata/youtube/Schemas.scala rename to src/main/scala/com/google/gdata/youtube/Schemas.scala diff --git a/src/com/google/gdata/youtube/Statistics.scala b/src/main/scala/com/google/gdata/youtube/Statistics.scala similarity index 100% rename from src/com/google/gdata/youtube/Statistics.scala rename to src/main/scala/com/google/gdata/youtube/Statistics.scala diff --git a/src/com/google/gdata/youtube/StdCommentsFeed.scala b/src/main/scala/com/google/gdata/youtube/StdCommentsFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdCommentsFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdCommentsFeed.scala diff --git a/src/com/google/gdata/youtube/StdContactsFeed.scala b/src/main/scala/com/google/gdata/youtube/StdContactsFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdContactsFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdContactsFeed.scala diff --git a/src/com/google/gdata/youtube/StdPlaylistFeed.scala b/src/main/scala/com/google/gdata/youtube/StdPlaylistFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdPlaylistFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdPlaylistFeed.scala diff --git a/src/com/google/gdata/youtube/StdSubscriptionFeed.scala b/src/main/scala/com/google/gdata/youtube/StdSubscriptionFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdSubscriptionFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdSubscriptionFeed.scala diff --git a/src/com/google/gdata/youtube/StdUserPlaylistsFeed.scala b/src/main/scala/com/google/gdata/youtube/StdUserPlaylistsFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdUserPlaylistsFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdUserPlaylistsFeed.scala diff --git a/src/com/google/gdata/youtube/StdUserProfileEntry.scala b/src/main/scala/com/google/gdata/youtube/StdUserProfileEntry.scala similarity index 100% rename from src/com/google/gdata/youtube/StdUserProfileEntry.scala rename to src/main/scala/com/google/gdata/youtube/StdUserProfileEntry.scala diff --git a/src/com/google/gdata/youtube/StdVideoFeed.scala b/src/main/scala/com/google/gdata/youtube/StdVideoFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/StdVideoFeed.scala rename to src/main/scala/com/google/gdata/youtube/StdVideoFeed.scala diff --git a/src/com/google/gdata/youtube/SubscriptionEntries.scala b/src/main/scala/com/google/gdata/youtube/SubscriptionEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/SubscriptionEntries.scala rename to src/main/scala/com/google/gdata/youtube/SubscriptionEntries.scala diff --git a/src/com/google/gdata/youtube/UserPlaylistsFeed.scala b/src/main/scala/com/google/gdata/youtube/UserPlaylistsFeed.scala similarity index 100% rename from src/com/google/gdata/youtube/UserPlaylistsFeed.scala rename to src/main/scala/com/google/gdata/youtube/UserPlaylistsFeed.scala diff --git a/src/com/google/gdata/youtube/UserProfileEntries.scala b/src/main/scala/com/google/gdata/youtube/UserProfileEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/UserProfileEntries.scala rename to src/main/scala/com/google/gdata/youtube/UserProfileEntries.scala diff --git a/src/com/google/gdata/youtube/VideoEntries.scala b/src/main/scala/com/google/gdata/youtube/VideoEntries.scala similarity index 100% rename from src/com/google/gdata/youtube/VideoEntries.scala rename to src/main/scala/com/google/gdata/youtube/VideoEntries.scala diff --git a/src/com/google/gdata/youtube/VideoFeeds.scala b/src/main/scala/com/google/gdata/youtube/VideoFeeds.scala similarity index 100% rename from src/com/google/gdata/youtube/VideoFeeds.scala rename to src/main/scala/com/google/gdata/youtube/VideoFeeds.scala diff --git a/src/com/google/gdata/youtube/YouTubeQuery.scala b/src/main/scala/com/google/gdata/youtube/YouTubeQuery.scala similarity index 100% rename from src/com/google/gdata/youtube/YouTubeQuery.scala rename to src/main/scala/com/google/gdata/youtube/YouTubeQuery.scala diff --git a/src/com/google/gdata/youtube/YouTubeService.scala b/src/main/scala/com/google/gdata/youtube/YouTubeService.scala similarity index 100% rename from src/com/google/gdata/youtube/YouTubeService.scala rename to src/main/scala/com/google/gdata/youtube/YouTubeService.scala diff --git a/src/com/google/util/ListSet.scala b/src/main/scala/com/google/util/ListSet.scala similarity index 100% rename from src/com/google/util/ListSet.scala rename to src/main/scala/com/google/util/ListSet.scala diff --git a/src/com/google/util/MultiMap.scala b/src/main/scala/com/google/util/MultiMap.scala similarity index 100% rename from src/com/google/util/MultiMap.scala rename to src/main/scala/com/google/util/MultiMap.scala diff --git a/src/com/google/util/Utility.scala b/src/main/scala/com/google/util/Utility.scala similarity index 100% rename from src/com/google/util/Utility.scala rename to src/main/scala/com/google/util/Utility.scala diff --git a/src/com/google/xml/combinators/HasStore.scala b/src/main/scala/com/google/xml/combinators/HasStore.scala similarity index 100% rename from src/com/google/xml/combinators/HasStore.scala rename to src/main/scala/com/google/xml/combinators/HasStore.scala diff --git a/src/com/google/xml/combinators/LinearStore.scala b/src/main/scala/com/google/xml/combinators/LinearStore.scala similarity index 100% rename from src/com/google/xml/combinators/LinearStore.scala rename to src/main/scala/com/google/xml/combinators/LinearStore.scala diff --git a/src/com/google/xml/combinators/Picklers.scala b/src/main/scala/com/google/xml/combinators/Picklers.scala similarity index 100% rename from src/com/google/xml/combinators/Picklers.scala rename to src/main/scala/com/google/xml/combinators/Picklers.scala diff --git a/src/com/google/xml/combinators/RandomAccessStore.scala b/src/main/scala/com/google/xml/combinators/RandomAccessStore.scala similarity index 99% rename from src/com/google/xml/combinators/RandomAccessStore.scala rename to src/main/scala/com/google/xml/combinators/RandomAccessStore.scala index e26c103..13ad3c6 100644 --- a/src/com/google/xml/combinators/RandomAccessStore.scala +++ b/src/main/scala/com/google/xml/combinators/RandomAccessStore.scala @@ -59,7 +59,7 @@ class RandomAccessStore(myAttrs: MetaData, myNodes: Seq[Node], */ override def acceptElem(label: String, uri: String): (Option[Node], RandomAccessStore) = { for (elems <- nodeMap.get(label); - val entry <- elems) + entry <- elems) entry.n match { case e: Elem if (e.namespace == uri) => nodeMap.removeBinding(label, entry) diff --git a/src/com/google/xml/combinators/TupleToPairFunctions.scala b/src/main/scala/com/google/xml/combinators/TupleToPairFunctions.scala similarity index 100% rename from src/com/google/xml/combinators/TupleToPairFunctions.scala rename to src/main/scala/com/google/xml/combinators/TupleToPairFunctions.scala diff --git a/src/com/google/xml/combinators/XmlInputStore.scala b/src/main/scala/com/google/xml/combinators/XmlInputStore.scala similarity index 100% rename from src/com/google/xml/combinators/XmlInputStore.scala rename to src/main/scala/com/google/xml/combinators/XmlInputStore.scala diff --git a/src/com/google/xml/combinators/XmlOutputStore.scala b/src/main/scala/com/google/xml/combinators/XmlOutputStore.scala similarity index 100% rename from src/com/google/xml/combinators/XmlOutputStore.scala rename to src/main/scala/com/google/xml/combinators/XmlOutputStore.scala diff --git a/src/com/google/xml/combinators/XmlStore.scala b/src/main/scala/com/google/xml/combinators/XmlStore.scala similarity index 100% rename from src/com/google/xml/combinators/XmlStore.scala rename to src/main/scala/com/google/xml/combinators/XmlStore.scala diff --git a/test-data/feeds/acl-feed-in.xml b/src/test/resources/feeds/acl-feed-in.xml similarity index 100% rename from test-data/feeds/acl-feed-in.xml rename to src/test/resources/feeds/acl-feed-in.xml diff --git a/test-data/feeds/calendars-feed-in-2.xml b/src/test/resources/feeds/calendars-feed-in-2.xml similarity index 100% rename from test-data/feeds/calendars-feed-in-2.xml rename to src/test/resources/feeds/calendars-feed-in-2.xml diff --git a/test-data/feeds/calendars-feed-in.xml b/src/test/resources/feeds/calendars-feed-in.xml similarity index 100% rename from test-data/feeds/calendars-feed-in.xml rename to src/test/resources/feeds/calendars-feed-in.xml diff --git a/test-data/feeds/comments-feed-in.xml b/src/test/resources/feeds/comments-feed-in.xml similarity index 100% rename from test-data/feeds/comments-feed-in.xml rename to src/test/resources/feeds/comments-feed-in.xml diff --git a/test-data/feeds/contacts-feed-in.xml b/src/test/resources/feeds/contacts-feed-in.xml similarity index 100% rename from test-data/feeds/contacts-feed-in.xml rename to src/test/resources/feeds/contacts-feed-in.xml diff --git a/test-data/feeds/events-feed-in.xml b/src/test/resources/feeds/events-feed-in.xml similarity index 100% rename from test-data/feeds/events-feed-in.xml rename to src/test/resources/feeds/events-feed-in.xml diff --git a/test-data/feeds/playlist-feed-in.xml b/src/test/resources/feeds/playlist-feed-in.xml similarity index 100% rename from test-data/feeds/playlist-feed-in.xml rename to src/test/resources/feeds/playlist-feed-in.xml diff --git a/test-data/feeds/subscriptions-feed-in.xml b/src/test/resources/feeds/subscriptions-feed-in.xml similarity index 100% rename from test-data/feeds/subscriptions-feed-in.xml rename to src/test/resources/feeds/subscriptions-feed-in.xml diff --git a/test-data/feeds/userplaylists-feed-in.xml b/src/test/resources/feeds/userplaylists-feed-in.xml similarity index 100% rename from test-data/feeds/userplaylists-feed-in.xml rename to src/test/resources/feeds/userplaylists-feed-in.xml diff --git a/test-data/feeds/userprofile-entry-in.xml b/src/test/resources/feeds/userprofile-entry-in.xml similarity index 100% rename from test-data/feeds/userprofile-entry-in.xml rename to src/test/resources/feeds/userprofile-entry-in.xml diff --git a/test-data/feeds/video-feed-in.xml b/src/test/resources/feeds/video-feed-in.xml similarity index 100% rename from test-data/feeds/video-feed-in.xml rename to src/test/resources/feeds/video-feed-in.xml diff --git a/samples/calendar.scala b/src/test/scala/calendar.scala similarity index 100% rename from samples/calendar.scala rename to src/test/scala/calendar.scala diff --git a/tests/com/google/gdata/FeedFileTest.scala b/src/test/scala/com/google/gdata/FeedFileTest.scala similarity index 100% rename from tests/com/google/gdata/FeedFileTest.scala rename to src/test/scala/com/google/gdata/FeedFileTest.scala diff --git a/tests/com/google/gdata/QueryTest.scala b/src/test/scala/com/google/gdata/QueryTest.scala similarity index 100% rename from tests/com/google/gdata/QueryTest.scala rename to src/test/scala/com/google/gdata/QueryTest.scala diff --git a/tests/com/google/gdata/calendar/CalendarFeedsTest.scala b/src/test/scala/com/google/gdata/calendar/CalendarFeedsTest.scala similarity index 100% rename from tests/com/google/gdata/calendar/CalendarFeedsTest.scala rename to src/test/scala/com/google/gdata/calendar/CalendarFeedsTest.scala diff --git a/tests/com/google/gdata/calendar/CalendarFunctionalTest.scala b/src/test/scala/com/google/gdata/calendar/CalendarFunctionalTest.scala similarity index 100% rename from tests/com/google/gdata/calendar/CalendarFunctionalTest.scala rename to src/test/scala/com/google/gdata/calendar/CalendarFunctionalTest.scala diff --git a/tests/com/google/gdata/data/media/ContentTest.scala b/src/test/scala/com/google/gdata/data/media/ContentTest.scala similarity index 99% rename from tests/com/google/gdata/data/media/ContentTest.scala rename to src/test/scala/com/google/gdata/data/media/ContentTest.scala index 62433fc..3ad8c95 100644 --- a/tests/com/google/gdata/data/media/ContentTest.scala +++ b/src/test/scala/com/google/gdata/data/media/ContentTest.scala @@ -192,6 +192,6 @@ class ContentTest extends PicklerAsserts { } } -object ContentTestApp extends ContentTest with Application { +object ContentTestApp extends ContentTest with App { testGroup } diff --git a/tests/com/google/gdata/data/util/DateTimeTest.scala b/src/test/scala/com/google/gdata/data/util/DateTimeTest.scala similarity index 100% rename from tests/com/google/gdata/data/util/DateTimeTest.scala rename to src/test/scala/com/google/gdata/data/util/DateTimeTest.scala diff --git a/tests/com/google/gdata/data/util/NormalPlayTimeTest.scala b/src/test/scala/com/google/gdata/data/util/NormalPlayTimeTest.scala similarity index 96% rename from tests/com/google/gdata/data/util/NormalPlayTimeTest.scala rename to src/test/scala/com/google/gdata/data/util/NormalPlayTimeTest.scala index ef56ded..9033efd 100644 --- a/tests/com/google/gdata/data/util/NormalPlayTimeTest.scala +++ b/src/test/scala/com/google/gdata/data/util/NormalPlayTimeTest.scala @@ -56,6 +56,6 @@ class NormalPlayTimeTest { } } -object TimeTest extends NormalPlayTimeTest with Application { +object TimeTest extends NormalPlayTimeTest with App { testHour2 } \ No newline at end of file diff --git a/tests/com/google/gdata/youtube/YouTubeFeedsTest.scala b/src/test/scala/com/google/gdata/youtube/YouTubeFeedsTest.scala similarity index 100% rename from tests/com/google/gdata/youtube/YouTubeFeedsTest.scala rename to src/test/scala/com/google/gdata/youtube/YouTubeFeedsTest.scala diff --git a/tests/com/google/xml/combinators/GDataCoreTest.scala b/src/test/scala/com/google/xml/combinators/GDataCoreTest.scala similarity index 100% rename from tests/com/google/xml/combinators/GDataCoreTest.scala rename to src/test/scala/com/google/xml/combinators/GDataCoreTest.scala diff --git a/tests/com/google/xml/combinators/PicklerAsserts.scala b/src/test/scala/com/google/xml/combinators/PicklerAsserts.scala similarity index 100% rename from tests/com/google/xml/combinators/PicklerAsserts.scala rename to src/test/scala/com/google/xml/combinators/PicklerAsserts.scala diff --git a/tests/com/google/xml/combinators/PicklerPermuteTest.scala b/src/test/scala/com/google/xml/combinators/PicklerPermuteTest.scala similarity index 100% rename from tests/com/google/xml/combinators/PicklerPermuteTest.scala rename to src/test/scala/com/google/xml/combinators/PicklerPermuteTest.scala diff --git a/tests/com/google/xml/combinators/PicklerTest.scala b/src/test/scala/com/google/xml/combinators/PicklerTest.scala similarity index 100% rename from tests/com/google/xml/combinators/PicklerTest.scala rename to src/test/scala/com/google/xml/combinators/PicklerTest.scala diff --git a/samples/combinators/PersonParser.scala b/src/test/scala/combinators/PersonParser.scala similarity index 100% rename from samples/combinators/PersonParser.scala rename to src/test/scala/combinators/PersonParser.scala diff --git a/samples/feeds/TestFeed.scala b/src/test/scala/feeds/TestFeed.scala similarity index 100% rename from samples/feeds/TestFeed.scala rename to src/test/scala/feeds/TestFeed.scala