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   * This class models an internal <i>Sindice</i> Vocabulary to describe
24   * resource domains and Microformat nesting relationships.
25   *
26   * @author Davide Palmisano (dpalmisano@gmail.com)
27   * @author Michele Mostarda (michele.mostarda@gmail.com)
28   */
29  public class SINDICE extends Vocabulary {
30  
31      public static final String DOMAIN = "domain";
32  
33      public static final String NESTING = "nesting";
34  
35      public static final String NESTING_ORIGINAL = "nesting_original";
36  
37      public static final String NESTING_STRUCTURED = "nesting_structured";
38  
39      public static final String SIZE = "size";
40  
41      public static final String DATE = "date";
42  
43      /**
44       * The namespace of the vocabulary as a string.
45       */
46      public static final String NS = "http://vocab.sindice.net/any23#";
47  
48      private static SINDICE instance;
49  
50      public static SINDICE getInstance() {
51          if(instance == null) {
52              instance = new SINDICE();
53          }
54          return instance;
55      }
56  
57      /**
58       * The namespace of the vocabulary as a IRI.
59       */
60      public final IRI NAMESPACE = createIRI(NS);
61  
62      /**
63       * This property expresses the DNS domain of the resource on which
64       * it is applied. It is intended to be used to keep track of the domain provenance
65       * of each resource.
66       */
67      public final IRI domain = createProperty(DOMAIN);
68  
69      /**
70       * This property links a resource with a <i>blank node</i> that represents
71       * a nested <i>Microformat</i> node.
72       */
73      public final IRI nesting = createProperty(NESTING);
74  
75      /**
76       * This property is used to keep track of the original nested <i>RDF property</i>.
77       */
78      public final IRI nesting_original = createProperty(NESTING_ORIGINAL);
79  
80      /**
81       * This property links the resource with a <i>node</i> representing the nested <i>Microformat</i>
82       * 
83       */
84      public final IRI nesting_structured = createProperty(NESTING_STRUCTURED);
85  
86      /**
87       * Size meta property indicating the number of triples within the returned dataset.
88       */
89      public final IRI size = createProperty(SIZE);
90  
91      /**
92       * Date meta property indicating the data generation time.
93       */
94      public final IRI date = createProperty(DATE);
95  
96  
97      private IRI createClass(String localName) {
98          return createClass(NS, localName);
99      }
100 
101     private IRI createProperty(String localName) {
102         return createProperty(NS, localName);
103     }
104 
105     private SINDICE(){
106         super(NS);
107     }
108 
109 }