Class ServiceForSearches
java.lang.Object
it.uniroma2.art.semanticturkey.search.ServiceForSearches
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checksPreQuery
(String searchString, String[] rolesArray, SearchMode searchMode, boolean searchStringCanBeNull) static String
executeGenericSearchQueryForStringList
(String query, org.eclipse.rdf4j.model.Resource[] namedGraphs, org.eclipse.rdf4j.repository.RepositoryConnection repositoryConnection) Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>>
executeInstancesSearchQuery
(String query, org.eclipse.rdf4j.model.Resource[] namedGraphs, org.eclipse.rdf4j.repository.RepositoryConnection repositoryConnection) filterResourceTypeAndSchemeAndLexicons
(String varResource, String varType, List<org.eclipse.rdf4j.model.IRI> schemes, String schemeFilter, org.eclipse.rdf4j.model.IRI cls, List<org.eclipse.rdf4j.model.IRI> lexicons) static String
filterWithOrOfAndPairValues
(List<Pair<org.eclipse.rdf4j.model.IRI, List<org.eclipse.rdf4j.model.Value>>> valueListPairList, String variable, String suffix, boolean reverse) static <T extends org.eclipse.rdf4j.model.Value>
StringfilterWithOrOfAndValues
(String variable, String predInNTForm, List<List<T>> valueListList) static <T extends org.eclipse.rdf4j.model.Value>
StringfilterWithOrOfAndValues
(String variable, org.eclipse.rdf4j.model.IRI pred, List<List<T>> iriListList) static String
filterWithOrValues
(List<org.eclipse.rdf4j.model.IRI> iriList, String variable) static String
getFirstLetterForLiteral
(String varInput, String varOutput) static String
static String
getResourceshavingTypes
(List<List<org.eclipse.rdf4j.model.IRI>> typesListOfList, String varToUse, boolean searchInSubTypes, boolean includeNonDirect) static String
getUriStartFromQname
(String qnameToCheck, Map<String, String> prefixToNamespaceMap) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
static boolean
isSpecialCaseXLabel
(List<List<org.eclipse.rdf4j.model.IRI>> clsListList) static String
listToStringForQuery
(List<String> wordsList, String startSymbol, String endSymbol) static String
normalizeStringForLuceneIndex
(String inputString, SearchMode searchMode) static String
prepareLangFilter
(List<String> langs, String variable, boolean includeLocales) static String
prepareQueryWithStatusOutgoingIngoing
(SearchStrategy.StatusFilter statusFilter, List<Pair<org.eclipse.rdf4j.model.IRI, List<org.eclipse.rdf4j.model.Value>>> outgoingLinks, List<TripleForSearch<org.eclipse.rdf4j.model.IRI, String, SearchMode>> outgoingSearch, List<Pair<org.eclipse.rdf4j.model.IRI, List<org.eclipse.rdf4j.model.Value>>> ingoingLinks, SearchStrategy searchStrategy, String baseURI, boolean includeLocales) wordsForFuzzySearch
(String text, String replaceChar, boolean escapeForRegex, boolean escapeForLucene, SearchMode searchMode)
-
Constructor Details
-
ServiceForSearches
public ServiceForSearches()
-
-
Method Details
-
isClassWanted
public boolean isClassWanted() -
isConceptWanted
public boolean isConceptWanted() -
isConceptSchemeWanted
public boolean isConceptSchemeWanted() -
isInstanceWanted
public boolean isInstanceWanted() -
isPropertyWanted
public boolean isPropertyWanted() -
isCollectionWanted
public boolean isCollectionWanted() -
isDataRagenWanted
public boolean isDataRagenWanted() -
isLexiconWanted
public boolean isLexiconWanted() -
isLexicalEntryWanted
public boolean isLexicalEntryWanted() -
filterResourceTypeAndSchemeAndLexicons
-
getFirstLetterForLiteral
-
filterWithOrValues
-
filterWithOrOfAndValues
-
filterWithOrOfAndValues
-
filterWithOrOfAndPairValues
-
isSpecialCaseXLabel
-
getResourceshavingTypes
-
getPrefixes
-
checksPreQuery
public void checksPreQuery(String searchString, String[] rolesArray, SearchMode searchMode, boolean searchStringCanBeNull) throws IllegalStateException - Throws:
IllegalStateException
-
prepareQueryWithStatusOutgoingIngoing
public static String prepareQueryWithStatusOutgoingIngoing(SearchStrategy.StatusFilter statusFilter, List<Pair<org.eclipse.rdf4j.model.IRI, List<org.eclipse.rdf4j.model.Value>>> outgoingLinks, List<TripleForSearch<org.eclipse.rdf4j.model.IRI, String, SearchMode>> outgoingSearch, List<Pair<org.eclipse.rdf4j.model.IRI, List<org.eclipse.rdf4j.model.Value>>> ingoingLinks, SearchStrategy searchStrategy, String baseURI, boolean includeLocales) -
wordsForFuzzySearch
public static List<String> wordsForFuzzySearch(String text, String replaceChar, boolean escapeForRegex, boolean escapeForLucene, SearchMode searchMode) -
normalizeStringForLuceneIndex
-
listToStringForQuery
-
escapeStringForRegexInSPARQL
-
executeGenericSearchQueryForStringList
public Collection<String> executeGenericSearchQueryForStringList(String query, org.eclipse.rdf4j.model.Resource[] namedGraphs, org.eclipse.rdf4j.repository.RepositoryConnection repositoryConnection) -
executeInstancesSearchQuery
public Collection<AnnotatedValue<org.eclipse.rdf4j.model.Resource>> executeInstancesSearchQuery(String query, org.eclipse.rdf4j.model.Resource[] namedGraphs, org.eclipse.rdf4j.repository.RepositoryConnection repositoryConnection) -
getUriStartFromQname
-
prepareLangFilter
-