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 resource domains and Microformat nesting
24   * 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 it is applied. It is intended to be used to keep
64       * track of the domain provenance of each resource.
65       */
66      public final IRI domain = createProperty(DOMAIN);
67  
68      /**
69       * This property links a resource with a <i>blank node</i> that represents a nested <i>Microformat</i> node.
70       */
71      public final IRI nesting = createProperty(NESTING);
72  
73      /**
74       * This property is used to keep track of the original nested <i>RDF property</i>.
75       */
76      public final IRI nesting_original = createProperty(NESTING_ORIGINAL);
77  
78      /**
79       * This property links the resource with a <i>node</i> representing the nested <i>Microformat</i>
80       * 
81       */
82      public final IRI nesting_structured = createProperty(NESTING_STRUCTURED);
83  
84      /**
85       * Size meta property indicating the number of triples within the returned dataset.
86       */
87      public final IRI size = createProperty(SIZE);
88  
89      /**
90       * Date meta property indicating the data generation time.
91       */
92      public final IRI date = createProperty(DATE);
93  
94      private IRI createClass(String localName) {
95          return createClass(NS, localName);
96      }
97  
98      private IRI createProperty(String localName) {
99          return createProperty(NS, localName);
100     }
101 
102     private SINDICE() {
103         super(NS);
104     }
105 
106 }