Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122199297
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, Jul 16, 13:36
Size
838 B
Mime Type
text/x-c++
Expires
Fri, Jul 18, 13:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27448580
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