View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *  http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.any23.vocab;
19  
20  import org.eclipse.rdf4j.model.IRI;
21  
22  /**
23   * The <a href="http://ogp.me/#type_music">Open Graph Protocol Music Type</a> 
24   * vocabulary.
25   *
26   */
27  public class OGPMusic extends Vocabulary {
28  
29      private OGPMusic() {
30          super(NS);
31      }
32  
33      public static final String NS = "http://ogp.me/ns/music#";
34  
35      /* BEGIN: http://ogp.me/#type_music.song */
36  
37      /** The song's length in seconds. */
38      public static final String MUSIC__DURATION   = "music:duration";
39  
40      /** The album this song is from. */
41      public static final String MUSIC__ALBUM      = "music:album";
42  
43      /** Which disc of the album this song is on. */
44      public static final String MUSIC__ALBUM_DISC = "music:album:disc";
45  
46      /** Which disc of the album this song is on. */
47      public static final String MUSIC__ALBUM_TRACK = "music:album:track";
48  
49      /** Which disc of the album this song is on. */
50      public static final String MUSIC__MUSICIAN    = "music:musician";
51  
52      /* END: http://ogp.me/#type_music.song */
53  
54      /* BEGIN: http://ogp.me/#type_music.album */
55  
56      /** The song on this album. */
57      public static final String MUSIC__SONG       = "music:song";
58  
59      /** The same as music:album:disc but in reverse. */
60      public static final String MUSIC__SONG_DISC  = "music:song:disc";
61  
62      /** The same as music:album:track but in reverse. */
63      public static final String MUSIC__SONG_TRACK = "music:song:track";
64  
65      /** The date the album was released. */
66      public static final String MUSIC__RELEASE_DATE = "music:release_date";
67  
68      /* END: http://ogp.me/#type_music.album */
69  
70      /* BEGIN: http://ogp.me/#type_music.playlist */
71  
72      /** The creator of this playlist if 'music.playlist' or the 
73       * creator of this station if 'music.radio_station' */
74      public static final String MUSIC__CREATOR    = "music:creator";
75  
76      /* END: http://ogp.me/#type_music.playlist */
77  
78      private static OGPMusic instance;
79  
80      public static OGPMusic getInstance() {
81          if(instance == null) {
82              instance = new OGPMusic();
83          }
84          return instance;
85      }
86  
87      public final IRI NAMESPACE = createIRI(NS);
88  
89      public final IRI musicDuration  = createProperty(MUSIC__DURATION);
90      public final IRI musicAlbum     = createProperty(MUSIC__ALBUM);
91      public final IRI musicAlbumDisc = createProperty(MUSIC__ALBUM_DISC);
92      public final IRI musicAlbumTrack = createProperty(MUSIC__ALBUM_TRACK);
93      public final IRI musicMusician  = createProperty(MUSIC__MUSICIAN);
94      
95      public final IRI musicSong      = createProperty(MUSIC__SONG);
96      public final IRI musicSongDisc  = createProperty(MUSIC__SONG_DISC);
97      public final IRI musicSongTrack = createProperty(MUSIC__SONG_TRACK);
98      public final IRI musicReleaseDate = createProperty(MUSIC__RELEASE_DATE);
99      
100     public final IRI musicCreator   = createProperty(MUSIC__CREATOR);
101 
102     @SuppressWarnings("unused")
103     private IRI createClass(String localName) {
104         return createClass(NS, localName);
105     }
106 
107     private IRI createProperty(String localName) {
108         return createProperty(NS, localName);
109     }
110 }