1   /*
2    * RDFpro - An extensible tool for building stream-oriented RDF processing libraries.
3    * 
4    * Written in 2014 by Francesco Corcoglioniti with support by Marco Amadori, Michele Mostarda,
5    * Alessio Palmero Aprosio and Marco Rospocher. Contact info on http://rdfpro.fbk.eu/
6    * 
7    * To the extent possible under law, the authors have dedicated all copyright and related and
8    * neighboring rights to this software to the public domain worldwide. This software is
9    * distributed without any warranty.
10   * 
11   * You should have received a copy of the CC0 Public Domain Dedication along with this software.
12   * If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
13   */
14  package eu.fbk.rdfpro.vocab;
15  
16  import java.util.Arrays;
17  import java.util.Collections;
18  import java.util.HashSet;
19  import java.util.Set;
20  
21  import org.openrdf.model.Namespace;
22  import org.openrdf.model.URI;
23  import org.openrdf.model.impl.NamespaceImpl;
24  import org.openrdf.model.impl.ValueFactoryImpl;
25  
26  /**
27   * Constants for the VOID vocabulary.
28   */
29  public final class VOID {
30  
31      /** Recommended prefix for the vocabulary namespace: "void". */
32      public static final String PREFIX = "void";
33  
34      /** Vocabulary namespace: "http://rdfs.org/ns/void#". */
35      public static final String NAMESPACE = "http://rdfs.org/ns/void#";
36  
37      /** Immutable {@link Namespace} constant for the vocabulary namespace. */
38      public static final Namespace NS = new NamespaceImpl(PREFIX, NAMESPACE);
39  
40      // CLASSES
41  
42      /** Class void:Dataset. */
43      public static final URI DATASET = createURI("Dataset");
44  
45      /** Class void:DatasetDescription. */
46      public static final URI DATASET_DESCRIPTION = createURI("DatasetDescription");
47  
48      /** Class void:Linkset. */
49      public static final URI LINKSET = createURI("Linkset");
50  
51      /** Class void:TechnicalFeature. */
52      public static final URI TECHNICAL_FEATURE = createURI("TechnicalFeature");
53  
54      // PROPERTIES
55  
56      /** Property void:class. */
57      public static final URI CLASS = createURI("class");
58  
59      /** Property void:classes. */
60      public static final URI CLASSES = createURI("classes");
61  
62      /** Property void:classPartition. */
63      public static final URI CLASS_PARTITION = createURI("classPartition");
64  
65      /** Property void:dataDump. */
66      public static final URI DATA_DUMP = createURI("dataDump");
67  
68      /** Property void:distinctObjects. */
69      public static final URI DISTINCT_OBJECTS = createURI("distinctObjects");
70  
71      /** Property void:distinctSubjects. */
72      public static final URI DISTINCT_SUBJECTS = createURI("distinctSubjects");
73  
74      /** Property void:documents. */
75      public static final URI DOCUMENTS = createURI("documents");
76  
77      /** Property void:entities. */
78      public static final URI ENTITIES = createURI("entities");
79  
80      /** Property void:exampleResource. */
81      public static final URI EXAMPLE_RESOURCE = createURI("exampleResource");
82  
83      /** Property void:feature. */
84      public static final URI FEATURE = createURI("feature");
85  
86      /** Property void:inDataset. */
87      public static final URI IN_DATASET = createURI("inDataset");
88  
89      /** Property void:linkPredicate. */
90      public static final URI LINK_PREDICATE = createURI("linkPredicate");
91  
92      /** Property void:objectsTarget. */
93      public static final URI OBJECTS_TARGET = createURI("objectsTarget");
94  
95      /** Property void:openSearchDescription. */
96      public static final URI OPEN_SEARCH_DESCRIPTION = createURI("openSearchDescription");
97  
98      /** Property void:properties. */
99      public static final URI PROPERTIES = createURI("properties");
100 
101     /** Property void:property. */
102     public static final URI PROPERTY = createURI("property");
103 
104     /** Property void:propertyPartition. */
105     public static final URI PROPERTY_PARTITION = createURI("propertyPartition");
106 
107     /** Property void:rootResource. */
108     public static final URI ROOT_RESOURCE = createURI("rootResource");
109 
110     /** Property void:sparqlEndpoint. */
111     public static final URI SPARQL_ENDPOINT = createURI("sparqlEndpoint");
112 
113     /** Property void:subjectsTarget. */
114     public static final URI SUBJECTS_TARGET = createURI("subjectsTarget");
115 
116     /** Property void:subset. */
117     public static final URI SUBSET = createURI("subset");
118 
119     /** Property void:target. */
120     public static final URI TARGET = createURI("target");
121 
122     /** Property void:triples. */
123     public static final URI TRIPLES = createURI("triples");
124 
125     /** Property void:uriLookupEndpoint. */
126     public static final URI URI_LOOKUP_ENDPOINT = createURI("uriLookupEndpoint");
127 
128     /** Property void:uriRegexPattern. */
129     public static final URI URI_REGEX_PATTERN = createURI("uriRegexPattern");
130 
131     /** Property void:uriSpace. */
132     public static final URI URI_SPACE = createURI("uriSpace");
133 
134     /** Property void:vocabulary. */
135     public static final URI VOCABULARY = createURI("vocabulary");
136 
137     // ALL TERMS
138 
139     public static Set<URI> TERMS = Collections.unmodifiableSet(new HashSet<URI>(Arrays.asList(
140             DATASET, DATASET_DESCRIPTION, LINKSET, TECHNICAL_FEATURE, CLASS, CLASSES,
141             CLASS_PARTITION, DATA_DUMP, DISTINCT_OBJECTS, DISTINCT_SUBJECTS, DOCUMENTS, ENTITIES,
142             EXAMPLE_RESOURCE, FEATURE, IN_DATASET, LINK_PREDICATE, OBJECTS_TARGET,
143             OPEN_SEARCH_DESCRIPTION, PROPERTIES, PROPERTY, PROPERTY_PARTITION, ROOT_RESOURCE,
144             SPARQL_ENDPOINT, SUBJECTS_TARGET, SUBSET, TARGET, TRIPLES, URI_LOOKUP_ENDPOINT,
145             URI_REGEX_PATTERN, URI_SPACE, VOCABULARY)));
146 
147     // HELPER METHODS
148 
149     private static URI createURI(final String localName) {
150         return ValueFactoryImpl.getInstance().createURI(NAMESPACE, localName);
151     }
152 
153     private VOID() {
154     }
155 
156 }