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/">Open Graph Protocol Article Type</a> 
24   * vocabulary.
25   */
26  public class OGPArticle extends Vocabulary {
27  
28      private OGPArticle() {
29          super(NS);
30      }
31  
32      public static final String NS = "http://ogp.me/ns/article#";
33  
34      /* BEGIN: http://ogp.me/#type_article */
35  
36      /** When the article was first published. */
37      public static final String ARTICLE__PUBLISHED_TIME = "article:published_time";
38  
39      /** When the article was last changed. */
40      public static final String ARTICLE__MODIFIED_TIME = "article:modified_time";
41  
42      /** When the article is out of date after. */
43      public static final String ARTICLE__EXPIRATION_TIME = "article:expiration_time";
44  
45      /** Writers of the article. */
46      public static final String ARTICLE__AUTHOR   = "article:author";
47  
48      /** A high-level section name. E.g. Technology */
49      public static final String ARTICLE__SECTION  = "article:section";
50  
51      /** Tag words associated with this article. */
52      public static final String ARTICLE__TAG      = "article:tag";
53  
54      /* END: http://ogp.me/#type_article */
55  
56      private static OGPArticle instance;
57  
58      public static OGPArticle getInstance() {
59          if(instance == null) {
60              instance = new OGPArticle();
61          }
62          return instance;
63      }
64  
65      public final IRI NAMESPACE = createIRI(NS);
66  
67      public final IRI articlePublishedTime = createProperty(ARTICLE__PUBLISHED_TIME);
68      public final IRI articleModifiedTime = createProperty(ARTICLE__MODIFIED_TIME);
69      public final IRI articleExpirationTime = createProperty(ARTICLE__EXPIRATION_TIME);
70      public final IRI articleAuthor  = createProperty(ARTICLE__AUTHOR);
71      public final IRI articleSection = createProperty(ARTICLE__SECTION);
72      public final IRI articleTag     = createProperty(ARTICLE__TAG);
73  
74      @SuppressWarnings("unused")
75      private IRI createClass(String localName) {
76          return createClass(NS, localName);
77      }
78  
79      private IRI createProperty(String localName) {
80          return createProperty(NS, localName);
81      }
82  
83  }