Last change
on this file since 30416 was 30416, checked in by davidb, 8 years ago |
Initial cut at code for scraping music excerpts from AMC site
|
-
Property svn:executable
set to
*
|
File size:
839 bytes
|
Line | |
---|
1 |
|
---|
2 | import java.io.*;
|
---|
3 | import java.net.*;
|
---|
4 | import java.nio.*;
|
---|
5 | import java.nio.channels.*;
|
---|
6 | import java.nio.file.*;
|
---|
7 | import java.util.*;
|
---|
8 |
|
---|
9 |
|
---|
10 | class MusicRecord {
|
---|
11 | private String track_url_;
|
---|
12 | private String title_;
|
---|
13 | private String artist_;
|
---|
14 | private String year_;
|
---|
15 | private String audio_url_;
|
---|
16 |
|
---|
17 | public MusicRecord(String track_url,String title, String artist, String year, String audio_url) {
|
---|
18 | track_url_ = track_url;
|
---|
19 | title_ = title;
|
---|
20 | artist_ = artist;
|
---|
21 | year_ = (year.matches("^\\s*$")) ? null : year;
|
---|
22 | audio_url_ = audio_url;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public String getAudioURL() {
|
---|
26 | return audio_url_;
|
---|
27 | }
|
---|
28 |
|
---|
29 | public String toString()
|
---|
30 | {
|
---|
31 |
|
---|
32 | return String.format("[title=%s, artist=%s, year=%s; track_url=%s, audio_url=%s]",
|
---|
33 | title_,artist_,year_, track_url_, audio_url_);
|
---|
34 | }
|
---|
35 |
|
---|
36 | }
|
---|
37 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.