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_book">Open Graph Protocol Book Type</a> 
24   * vocabulary.
25   */
26  public class OGPBook extends Vocabulary {
27  
28      private OGPBook() {
29          super(NS);
30      }
31  
32      public static final String NS = "http://ogp.me/ns/book#";
33  
34      /* BEGIN: http://ogp.me/#type_book */
35  
36      /** Who wrote this book. */
37      public static final String BOOK__AUTHOR     = "book:author";
38  
39      /** The ISBN */
40      public static final String BOOK__ISBN       = "book:isbn";
41  
42      /** The date the book was released. */
43      public static final String BOOK__RELEASE_DATE = "book:release_date";
44  
45      /** Tag words associated with this book. */
46      public static final String BOOK__TAG       = "book:tag";
47  
48      /* END: http://ogp.me/#type_book */
49  
50      private static OGPBook instance;
51  
52      public static OGPBook getInstance() {
53          if(instance == null) {
54              instance = new OGPBook();
55          }
56          return instance;
57      }
58  
59      public final IRI NAMESPACE = createIRI(NS);
60  
61      public final IRI bookAuthor     = createProperty(BOOK__AUTHOR);
62      public final IRI bookIsbn       = createProperty(BOOK__ISBN);
63      public final IRI bookReleaseDate = createProperty(BOOK__RELEASE_DATE);
64      public final IRI bookTag        = createProperty(BOOK__TAG);
65  
66      @SuppressWarnings("unused")
67      private IRI createClass(String localName) {
68          return createClass(NS, localName);
69      }
70  
71      private IRI createProperty(String localName) {
72          return createProperty(NS, localName);
73      }
74  
75  }