Advertisement
Guest User

songXtype

a guest
Nov 12th, 2013
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 8.01 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class SongType {
  4.     public Song song;
  5.    
  6.     public class Song {
  7.         public FileInfo   fileInfo;
  8.         public Properties properties;
  9.         public Lyrics     lyrics;
  10.        
  11.         public FileInfo getFileInfo()     {return fileInfo;}
  12.         public Properties getProperties() {return properties;}
  13.         public Lyrics getLyrics()         {return lyrics;}
  14.        
  15.         public void setFileInfo(FileInfo fileInfo)       {this.fileInfo   = fileInfo;}
  16.         public void setProperties(Properties properties) {this.properties = properties;}
  17.         public void setLyrics(Lyrics lyrics)             {this.lyrics     = lyrics;}
  18.     }
  19.     public static class FileInfo {
  20.         private String version;
  21.         private String createdIn;
  22.         private String modifiedIn;
  23.         private String modified;
  24.        
  25.         public String getVersion()    {return version;}
  26.         public String getCreatedIn()  {return createdIn;}
  27.         public String getModifiedIn() {return modifiedIn;}
  28.         public String getModified()   {return modified;}
  29.        
  30.         public void setVersion(String version)       {this.version    = version;}  
  31.         public void setCreatedIn(String createdIn)   {this.createdIn  = createdIn;}
  32.         public void setModifiedIn(String modifiedIn) {this.modifiedIn = modifiedIn;}   
  33.         public void setModified(String modified)     {this.modified   = modified;}
  34.     }
  35.     public static class Properties {
  36.         private String copywright;
  37.         private String released;
  38.         private String transposition;
  39.         private String key;
  40.         private String version;
  41.         private String publisher;
  42.         private String verseOrder;
  43.         private Tempo  tempo;
  44.         private List<String> keywords;
  45.         private List<Author> authors;
  46.         private List<Title> titles;
  47.         private List<Theme> themes;
  48.        
  49.         public String getCopywright()    {return copywright;}  
  50.         public String getReleased()      {return released;}
  51.         public String getTransposition() {return transposition;}
  52.         public String getKey()           {return key;} 
  53.         public String getVersion()       {return version;}
  54.         public String getPublisher()     {return publisher;}
  55.         public String getVerseOrder()    {return verseOrder;}
  56.         public Tempo  getTempo()         {return tempo;}
  57.         public List<String> getKeywords(){return keywords;}
  58.         public List<Author> getAuthors() {return authors;}
  59.         public List<Title>  getTitles()  {return titles;}
  60.         public List<Theme>  getThemes()  {return themes;}
  61.                
  62.         public void setCopywright(String copywright)       {this.copywright    = copywright;}
  63.         public void setReleased(String released)           {this.released      = released;}
  64.         public void setTransposition(String transposition) {this.transposition = transposition;}
  65.         public void setKey(String key)                     {this.key           = key;}     
  66.         public void setVersion(String version)             {this.version       = version;} 
  67.         public void setPublisher(String publisher)         {this.publisher     = publisher;}   
  68.         public void setVerseOrder(String verseOrder)       {this.verseOrder    = verseOrder;}
  69.         public void setTempo(Tempo tempo)                  {this.tempo         = tempo;}
  70.         public void setKeywords(List<String> keywords)     {this.keywords      = keywords;}    
  71.         public void setAuthors(List<Author> authors)       {this.authors       = authors;}
  72.         public void setTitles(List<Title> titles)          {this.titles        = titles;}
  73.         public void setThemes(List<Theme> themes)          {this.themes        = themes;}
  74.     }
  75.     public static class Lyrics {
  76.         private String section;
  77.         private List<Line> lines;
  78.        
  79.         public String getSection() {return section;}
  80.         public List<Line> getLines() {return lines;}
  81.        
  82.         public void setSection(String section) {this.section = section;}
  83.         public void setLines(List<Line> lines) {this.lines = lines;}           
  84.     }
  85.    
  86.     public static class Line {
  87.         private String lang;
  88.         private String part;
  89.         private String text;
  90.         private String comment;
  91.        
  92.         public String getLang()    {return lang;}
  93.         public String getPart()    {return part;}
  94.         public String getText()    {return text;}
  95.         public String getComment() {return comment;}
  96.        
  97.         public void setLang(String lang)       {this.lang = lang;}
  98.         public void setPart(String part)       {this.part = part;}
  99.         public void setText(String text)       {this.text = text;}
  100.         public void setComment(String comment) {this.comment = comment;}
  101.     }
  102.     public static class Author {
  103.         private String name;
  104.         private String type;
  105.         private String lang;
  106.        
  107.         public String getName() {return name;}
  108.         public String getType() {return type;}
  109.         public String getLang() {return lang;}
  110.        
  111.         public void setName(String name) {this.name = name;}
  112.         public void setType(String type) {this.type = type;}
  113.         public void setLang(String lang) {this.lang = lang;}
  114.     }
  115.     public static class Title {
  116.         private String  title;
  117.         private String  lang;
  118.         private Boolean original;
  119.        
  120.         public String  getTitle()    {return title;}
  121.         public String  getLang()     {return lang;}
  122.         public Boolean getOriginal() {return original;}
  123.        
  124.         public void setTitle(String title)        {this.title = title;}
  125.         public void setLang(String lang)          {this.lang = lang;}
  126.         public void setOriginal(Boolean original) {this.original = original;}
  127.     }
  128.     public static class Tempo {
  129.         private String type;
  130.         private String value;
  131.        
  132.         public String getType()  {return type;}
  133.         public String getValue() {return value;}
  134.        
  135.         public void setType(String type)   {this.type  = type;}
  136.         public void setValue(String value) {this.value = value;}
  137.     }
  138.     public static class Theme {
  139.         private String theme;
  140.         private String lang;
  141.        
  142.         public String getTheme() {return theme;}
  143.         public String getLang()  {return lang;}
  144.        
  145.         public void setTheme(String theme) {this.theme = theme;}
  146.         public void setLang(String lang)   {this.lang  = lang;}
  147.     }
  148. }
  149.  
  150. /*
  151.  
  152. {
  153. \"song\": {
  154.     \"fileInfo\": {
  155.         \"version\": \"0.1\",
  156.         \"createdIn\": \"PickWorks Studio\",
  157.         \"modifiedIn\": \"PickWorks Studio\",
  158.         \"modified\": \"2010-01-28T13:15:30+01:00\"
  159.     },
  160.     \"properties\": {
  161.         \"authors\": [
  162.             {
  163.                 \"name\": \"Johny Deerp\"
  164.             },
  165.             {
  166.                 \"name\": \"Juri Traktori\",
  167.                 \"type\": \"music\",
  168.                 \"lang\": \"en\"
  169.             }
  170.         ],
  171.         \"titles\": [
  172.             {
  173.                 \"title\": \"Rainy day\",
  174.                 \"lang\": \"en\",
  175.                 \"original\": true
  176.             },
  177.             {
  178.                 \"title\": \"Descowe dni\",
  179.                 \"lang\": \"pl\"
  180.             }
  181.         ],
  182.         \"copywright\": \"Michal Tomanek\",
  183.         \"released\": \"19-03-1993\",
  184.         \"transposition\": -3,
  185.         \"tempo\": {
  186.             \"type\": \"text/bpm\",
  187.             \"value\": \"moderate/90\"
  188.         },
  189.         \"key\": \"A\",
  190.         \"version\": 0.99,
  191.         \"publisher\": \"myself\",
  192.         \"keywords\": [
  193.             \"grace\",
  194.             \"words\",
  195.             \"amazing\"
  196.         ],
  197.         \"verseOrder\": \"v1 v2 v1 v1 v2\",
  198.         \"themes\": [
  199.             {
  200.                 \"theme\": \"adoration\"
  201.             },
  202.             {
  203.                 \"theme\": \"Salvation\",
  204.                 \"lang\": \"en-GB\"
  205.             }
  206.         ]
  207.     },
  208.     \"lyrics\": [
  209.         {
  210.             \"section\": \"v1\",
  211.             \"lines\": [
  212.                 {
  213.                     \"lang\": \"en\",
  214.                     \"part\": \"man\",
  215.                     \"text\": \"How <chord name=\\\"A\\\"/>great is <br/>your love\",
  216.                     \"comment\": \"Sing softly\"
  217.                 },
  218.                 {
  219.                     \"part\": \"woman\",
  220.                     \"text\": \"How great is your love to us\"
  221.                 }
  222.             ]
  223.         },
  224.         {
  225.             \"section\": \"v2\",
  226.             \"lines\": [
  227.                 {
  228.                     \"part\": \"man\",
  229.                     \"text\": \"How great is your love\",
  230.                     \"comment\": \"Sing softly\",
  231.                     \"lang\": \"cz\"
  232.                 },
  233.                 {
  234.                     \"part\": \"woman\",
  235.                     \"text\": \"How great is your love to us\"
  236.                 }
  237.             ]
  238.         }
  239.     ]
  240. }
  241. }
  242.  
  243. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement