-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFetchFrames.scala
More file actions
34 lines (24 loc) · 846 Bytes
/
FetchFrames.scala
File metadata and controls
34 lines (24 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package example.large
import example.Settings
import org.apache.hadoop.conf.Configuration
import com.readr.model.annotation.Annotations
import com.readr.model.Project
import com.readr.model.frame.Frame
import com.readr.client.Client
import com.readr.client.meaning.frames
import com.readr.client.util.AnnotationSequenceFileWriter
object FetchFrames extends Settings {
def main(args:Array[String]) = {
implicit val p = Project(ns, proj)
Client.open(host, user, password)
val fs:Seq[(Int,Frame)] = frames.listDetails
Client.close
val conf = new Configuration()
val sf = new AnnotationSequenceFileWriter(conf, tmpDir + "/data.colX.Frame")
for (clazz <- Annotations.annWithDependentClazzes)
sf.register(clazz)
for ((i,f) <- fs)
sf.write(i, f)
sf.close
}
}