Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63781475
ArcRecord.scala
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 22, 10:54
Size
838 B
Mime Type
text/x-c++
Expires
Fri, May 24, 10:54 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17818455
Attached To
R1473 warcbase
ArcRecord.scala
View Options
package org.warcbase.spark.archive.io
import org.apache.spark.SerializableWritable
import org.warcbase.data.ArcRecordUtils
import org.warcbase.io.ArcRecordWritable
import org.warcbase.spark.matchbox.ExtractDate.DateComponent
import org.warcbase.spark.matchbox.{ExtractDate, ExtractTopLevelDomain}
class ArcRecord(r: SerializableWritable[ArcRecordWritable]) extends ArchiveRecord {
val getCrawldate: String = ExtractDate(r.t.getRecord.getMetaData.getDate, DateComponent.YYYYMMDD)
val getMimeType: String = r.t.getRecord.getMetaData.getMimetype
val getUrl: String = r.t.getRecord.getMetaData.getUrl
val getDomain: String = ExtractTopLevelDomain(r.t.getRecord.getMetaData.getUrl)
val getContentBytes: Array[Byte] = ArcRecordUtils.getBodyContent(r.t.getRecord)
val getContentString: String = new String(getContentBytes)
}
Event Timeline
Log In to Comment