All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.integratedmodelling.soil.wrb.vocabulary.QueryBuilder Maven / Gradle / Ivy

The newest version!
package org.integratedmodelling.soil.wrb.vocabulary;

/**
 * Contains all queries and endpoint info to fill the vocabulary at initialization.
 * 
 * @author Ferd
 *
 */
public class QueryBuilder {
	
	/**
	 * AllegroGraph endpoint to submit the queries below. Use POST, send Accept = application/json header and
	 * put query in 'query' field. Will return something like 
	 * 
	 * 
	 * 
	 * {
			"names": [
						"uri",
						"literalForm"
					],
			"values": [
						[
							"",
							"\"Bathi\"@en"
						],
						[
							"",
							"\"Cumuli\"@en"
						]
						...
					]
		}
	 * 
*/ public final static String sparqlEndpoint = "http://202.45.139.84:10035/catalogs/fao/repositories/agINFRA"; /** * SPARQL to get all RSG terms (first-level taxonomy) */ public static final String QUERY_RSG = "SELECT ?uri ?literalForm\n" + "WHERE { ?uri .\n" + " ?uri ?xlabel .\n" + " ?xlabel ?literalForm .\n" + " }" + ""; /** * SPARQL to get all second-level qualifiers */ public static final String QUERY_QUALIFIERS = "SELECT ?uri ?literalForm\n" + "WHERE { ?uri .\n" + " ?uri ?xlabel .\n" + " ?xlabel ?literalForm . \n" + " FILTER (lang(?literalForm ) =\"en\") .\n" + " }"; /** * SPARQL to get all specifiers */ public static final String QUERY_SPECIFIERS = "SELECT ?uri ?literalForm\n" + "WHERE { ?uri .\n" + " ?uri ?xlabel .\n" + " ?xlabel ?literalForm . \n" + " FILTER (lang(?literalForm ) =\"en\") .\n" + " }"; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy