id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
120,400
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/transform/impl/QueryRenamerImpl.java
QueryRenamerImpl.transformProjectionAtom
private DistinctVariableOnlyDataAtom transformProjectionAtom(DistinctVariableOnlyDataAtom atom) { ImmutableList<Variable> newArguments = atom.getArguments().stream() .map(renamingSubstitution::applyToVariable) .collect(ImmutableCollectors.toList()); return atomFactory.ge...
java
private DistinctVariableOnlyDataAtom transformProjectionAtom(DistinctVariableOnlyDataAtom atom) { ImmutableList<Variable> newArguments = atom.getArguments().stream() .map(renamingSubstitution::applyToVariable) .collect(ImmutableCollectors.toList()); return atomFactory.ge...
[ "private", "DistinctVariableOnlyDataAtom", "transformProjectionAtom", "(", "DistinctVariableOnlyDataAtom", "atom", ")", "{", "ImmutableList", "<", "Variable", ">", "newArguments", "=", "atom", ".", "getArguments", "(", ")", ".", "stream", "(", ")", ".", "map", "(", ...
Renames the projected variables
[ "Renames", "the", "projected", "variables" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/transform/impl/QueryRenamerImpl.java#L35-L41
120,401
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java
R2RMLManager.getMappings
public ImmutableList<SQLPPTriplesMap> getMappings(Graph myModel) throws InvalidR2RMLMappingException { List<SQLPPTriplesMap> mappings = new ArrayList<SQLPPTriplesMap>(); // retrieve the TriplesMap nodes Collection<TriplesMap> tripleMaps = r2rmlParser.getMappingNodes(myModel); for (TriplesMap tm : tripleMaps)...
java
public ImmutableList<SQLPPTriplesMap> getMappings(Graph myModel) throws InvalidR2RMLMappingException { List<SQLPPTriplesMap> mappings = new ArrayList<SQLPPTriplesMap>(); // retrieve the TriplesMap nodes Collection<TriplesMap> tripleMaps = r2rmlParser.getMappingNodes(myModel); for (TriplesMap tm : tripleMaps)...
[ "public", "ImmutableList", "<", "SQLPPTriplesMap", ">", "getMappings", "(", "Graph", "myModel", ")", "throws", "InvalidR2RMLMappingException", "{", "List", "<", "SQLPPTriplesMap", ">", "mappings", "=", "new", "ArrayList", "<", "SQLPPTriplesMap", ">", "(", ")", ";"...
This method return the list of mappings from the Model main method to be called, assembles everything @param myModel - the Model structure containing mappings @return ArrayList<OBDAMappingAxiom> - list of mapping axioms read from the Model
[ "This", "method", "return", "the", "list", "of", "mappings", "from", "the", "Model", "main", "method", "to", "be", "called", "assembles", "everything" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java#L145-L176
120,402
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java
R2RMLManager.getMapping
private SQLPPTriplesMap getMapping(TriplesMap tm) throws Exception { String sourceQuery = r2rmlParser.getSQLQuery(tm).trim(); ImmutableList<TargetAtom> body = getMappingTripleAtoms(tm); //Function head = getHeadAtom(body); //CQIE targetQuery = DATALOG_FACTORY.getCQIE(head, body); // TODO: consider a R2RML-spe...
java
private SQLPPTriplesMap getMapping(TriplesMap tm) throws Exception { String sourceQuery = r2rmlParser.getSQLQuery(tm).trim(); ImmutableList<TargetAtom> body = getMappingTripleAtoms(tm); //Function head = getHeadAtom(body); //CQIE targetQuery = DATALOG_FACTORY.getCQIE(head, body); // TODO: consider a R2RML-spe...
[ "private", "SQLPPTriplesMap", "getMapping", "(", "TriplesMap", "tm", ")", "throws", "Exception", "{", "String", "sourceQuery", "=", "r2rmlParser", ".", "getSQLQuery", "(", "tm", ")", ".", "trim", "(", ")", ";", "ImmutableList", "<", "TargetAtom", ">", "body", ...
Get OBDA mapping axiom from R2RML TriplesMap @param tm @return @throws Exception
[ "Get", "OBDA", "mapping", "axiom", "from", "R2RML", "TriplesMap" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java#L183-L197
120,403
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java
R2RMLManager.getJoinMappings
private List<SQLPPTriplesMap> getJoinMappings(Collection<TriplesMap> tripleMaps, TriplesMap tm) throws Exception { String sourceQuery = ""; List<SQLPPTriplesMap> joinMappings = new ArrayList<SQLPPTriplesMap>(); for (PredicateObjectMap pobm: tm.getPredicateObjectMaps()) { for(RefObjectMap robm : pobm.getRef...
java
private List<SQLPPTriplesMap> getJoinMappings(Collection<TriplesMap> tripleMaps, TriplesMap tm) throws Exception { String sourceQuery = ""; List<SQLPPTriplesMap> joinMappings = new ArrayList<SQLPPTriplesMap>(); for (PredicateObjectMap pobm: tm.getPredicateObjectMaps()) { for(RefObjectMap robm : pobm.getRef...
[ "private", "List", "<", "SQLPPTriplesMap", ">", "getJoinMappings", "(", "Collection", "<", "TriplesMap", ">", "tripleMaps", ",", "TriplesMap", "tm", ")", "throws", "Exception", "{", "String", "sourceQuery", "=", "\"\"", ";", "List", "<", "SQLPPTriplesMap", ">", ...
Get join OBDA mapping axiom from R2RML TriplesMap @param tripleMaps @param tm @return @throws Exception
[ "Get", "join", "OBDA", "mapping", "axiom", "from", "R2RML", "TriplesMap" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java#L206-L254
120,404
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java
R2RMLManager.getMappingTripleAtoms
private ImmutableList<TargetAtom> getMappingTripleAtoms(TriplesMap tm) throws Exception { //the body to return ImmutableList.Builder<TargetAtom> bodyBuilder = ImmutableList.builder(); //get subject ImmutableTerm subjectAtom = r2rmlParser.getSubjectAtom(tm); //get any class predicates, construct atom Cla...
java
private ImmutableList<TargetAtom> getMappingTripleAtoms(TriplesMap tm) throws Exception { //the body to return ImmutableList.Builder<TargetAtom> bodyBuilder = ImmutableList.builder(); //get subject ImmutableTerm subjectAtom = r2rmlParser.getSubjectAtom(tm); //get any class predicates, construct atom Cla...
[ "private", "ImmutableList", "<", "TargetAtom", ">", "getMappingTripleAtoms", "(", "TriplesMap", "tm", ")", "throws", "Exception", "{", "//the body to return", "ImmutableList", ".", "Builder", "<", "TargetAtom", ">", "bodyBuilder", "=", "ImmutableList", ".", "builder",...
Get OBDA mapping body terms from R2RML TriplesMap @param tm @return @throws Exception
[ "Get", "OBDA", "mapping", "body", "terms", "from", "R2RML", "TriplesMap" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLManager.java#L263-L299
120,405
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/JDBCConnectionManager.java
JDBCConnectionManager.createConnection
public Connection createConnection(String url, String username, String password) throws SQLException { if (connection != null && !connection.isClosed()) return connection; connection = DriverManager.getConnection(url, username, password); return connection; }
java
public Connection createConnection(String url, String username, String password) throws SQLException { if (connection != null && !connection.isClosed()) return connection; connection = DriverManager.getConnection(url, username, password); return connection; }
[ "public", "Connection", "createConnection", "(", "String", "url", ",", "String", "username", ",", "String", "password", ")", "throws", "SQLException", "{", "if", "(", "connection", "!=", "null", "&&", "!", "connection", ".", "isClosed", "(", ")", ")", "retur...
Constructs a new database connection object and retrieves it. @return The connection object. @throws SQLException
[ "Constructs", "a", "new", "database", "connection", "object", "and", "retrieves", "it", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/JDBCConnectionManager.java#L79-L86
120,406
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/JDBCConnectionManager.java
JDBCConnectionManager.getConnection
public Connection getConnection(String url, String username, String password) throws SQLException { boolean alive = isConnectionAlive(); if (!alive) { createConnection(url, username, password); } return connection; }
java
public Connection getConnection(String url, String username, String password) throws SQLException { boolean alive = isConnectionAlive(); if (!alive) { createConnection(url, username, password); } return connection; }
[ "public", "Connection", "getConnection", "(", "String", "url", ",", "String", "username", ",", "String", "password", ")", "throws", "SQLException", "{", "boolean", "alive", "=", "isConnectionAlive", "(", ")", ";", "if", "(", "!", "alive", ")", "{", "createCo...
Retrieves the connection object. If the connection doesnt exist or is dead, it will attempt to create a new connection.
[ "Retrieves", "the", "connection", "object", ".", "If", "the", "connection", "doesnt", "exist", "or", "is", "dead", "it", "will", "attempt", "to", "create", "a", "new", "connection", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/JDBCConnectionManager.java#L94-L100
120,407
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java
ClassifiedTBoxImpl.classify
static ClassifiedTBox classify(OntologyImpl.UnclassifiedOntologyTBox onto) { DefaultDirectedGraph<ObjectPropertyExpression, DefaultEdge> objectPropertyGraph = getObjectPropertyGraph(onto); EquivalencesDAGImpl<ObjectPropertyExpression> objectPropertyDAG = EquivalencesDAGImpl.getEquivalencesDAG(objectPropert...
java
static ClassifiedTBox classify(OntologyImpl.UnclassifiedOntologyTBox onto) { DefaultDirectedGraph<ObjectPropertyExpression, DefaultEdge> objectPropertyGraph = getObjectPropertyGraph(onto); EquivalencesDAGImpl<ObjectPropertyExpression> objectPropertyDAG = EquivalencesDAGImpl.getEquivalencesDAG(objectPropert...
[ "static", "ClassifiedTBox", "classify", "(", "OntologyImpl", ".", "UnclassifiedOntologyTBox", "onto", ")", "{", "DefaultDirectedGraph", "<", "ObjectPropertyExpression", ",", "DefaultEdge", ">", "objectPropertyGraph", "=", "getObjectPropertyGraph", "(", "onto", ")", ";", ...
constructs a TBox reasoner from an ontology @param onto: ontology
[ "constructs", "a", "TBox", "reasoner", "from", "an", "ontology" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java#L75-L118
120,408
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java
ClassifiedTBoxImpl.getObjectPropertyGraph
private static DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> getObjectPropertyGraph(OntologyImpl.UnclassifiedOntologyTBox ontology) { DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> graph = new DefaultDirectedGraph<>(DefaultEdge.class); for (ObjectPropertyExpression role : ontology.objectP...
java
private static DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> getObjectPropertyGraph(OntologyImpl.UnclassifiedOntologyTBox ontology) { DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> graph = new DefaultDirectedGraph<>(DefaultEdge.class); for (ObjectPropertyExpression role : ontology.objectP...
[ "private", "static", "DefaultDirectedGraph", "<", "ObjectPropertyExpression", ",", "DefaultEdge", ">", "getObjectPropertyGraph", "(", "OntologyImpl", ".", "UnclassifiedOntologyTBox", "ontology", ")", "{", "DefaultDirectedGraph", "<", "ObjectPropertyExpression", ",", "DefaultE...
graph representation of object property inclusions in the ontology adds inclusions between the inverses of R and S if R is declared a sub-property of S in the ontology @param ontology @return the graph of the property inclusions
[ "graph", "representation", "of", "object", "property", "inclusions", "in", "the", "ontology" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java#L544-L584
120,409
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java
ClassifiedTBoxImpl.getDataPropertyGraph
private static DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> getDataPropertyGraph(OntologyImpl.UnclassifiedOntologyTBox ontology) { DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> graph = new DefaultDirectedGraph<>(DefaultEdge.class); for (DataPropertyExpression role : ontology.dataProperties(...
java
private static DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> getDataPropertyGraph(OntologyImpl.UnclassifiedOntologyTBox ontology) { DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> graph = new DefaultDirectedGraph<>(DefaultEdge.class); for (DataPropertyExpression role : ontology.dataProperties(...
[ "private", "static", "DefaultDirectedGraph", "<", "DataPropertyExpression", ",", "DefaultEdge", ">", "getDataPropertyGraph", "(", "OntologyImpl", ".", "UnclassifiedOntologyTBox", "ontology", ")", "{", "DefaultDirectedGraph", "<", "DataPropertyExpression", ",", "DefaultEdge", ...
graph representation of data property inclusions in the ontology adds inclusions between the inverses of R and S if R is declared a sub-property of S in the ontology @param ontology @return the graph of the property inclusions
[ "graph", "representation", "of", "data", "property", "inclusions", "in", "the", "ontology" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java#L596-L624
120,410
ontop/ontop
core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java
ClassifiedTBoxImpl.getClassGraph
private static DefaultDirectedGraph<ClassExpression,DefaultEdge> getClassGraph (OntologyImpl.UnclassifiedOntologyTBox ontology, DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> objectPropertyGraph, DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> dataPropertyG...
java
private static DefaultDirectedGraph<ClassExpression,DefaultEdge> getClassGraph (OntologyImpl.UnclassifiedOntologyTBox ontology, DefaultDirectedGraph<ObjectPropertyExpression,DefaultEdge> objectPropertyGraph, DefaultDirectedGraph<DataPropertyExpression,DefaultEdge> dataPropertyG...
[ "private", "static", "DefaultDirectedGraph", "<", "ClassExpression", ",", "DefaultEdge", ">", "getClassGraph", "(", "OntologyImpl", ".", "UnclassifiedOntologyTBox", "ontology", ",", "DefaultDirectedGraph", "<", "ObjectPropertyExpression", ",", "DefaultEdge", ">", "objectPro...
graph representation of the class inclusions in the ontology adds inclusions of the domain of R in the domain of S if the provided property graph has an edge from R to S (given the getPropertyGraph algorithm, this also implies inclusions of the range of R in the range of S @param ontology @param objectPropertyGraph o...
[ "graph", "representation", "of", "the", "class", "inclusions", "in", "the", "ontology" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/obda/src/main/java/it/unibz/inf/ontop/spec/ontology/impl/ClassifiedTBoxImpl.java#L640-L694
120,411
ontop/ontop
engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/SQLDistinctTupleResultSet.java
SQLDistinctTupleResultSet.moveCursor
@Override protected boolean moveCursor() throws SQLException, OntopConnectionException { boolean foundFreshRow; List<Object> currentKey; do{ foundFreshRow = rs.next(); // Cannot use this in the while condition: limit case where the last row was a duplicate if...
java
@Override protected boolean moveCursor() throws SQLException, OntopConnectionException { boolean foundFreshRow; List<Object> currentKey; do{ foundFreshRow = rs.next(); // Cannot use this in the while condition: limit case where the last row was a duplicate if...
[ "@", "Override", "protected", "boolean", "moveCursor", "(", ")", "throws", "SQLException", ",", "OntopConnectionException", "{", "boolean", "foundFreshRow", ";", "List", "<", "Object", ">", "currentKey", ";", "do", "{", "foundFreshRow", "=", "rs", ".", "next", ...
Moves cursor until we get a fresh row
[ "Moves", "cursor", "until", "we", "get", "a", "fresh", "row" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/SQLDistinctTupleResultSet.java#L57-L71
120,412
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java
R2RMLParser.getClassPredicates
public List<ImmutableFunctionalTerm> getClassPredicates() { List<ImmutableFunctionalTerm> classes = new ArrayList<>(); for (ImmutableFunctionalTerm p : classPredicates) classes.add(p); classPredicates.clear(); return classes; }
java
public List<ImmutableFunctionalTerm> getClassPredicates() { List<ImmutableFunctionalTerm> classes = new ArrayList<>(); for (ImmutableFunctionalTerm p : classPredicates) classes.add(p); classPredicates.clear(); return classes; }
[ "public", "List", "<", "ImmutableFunctionalTerm", ">", "getClassPredicates", "(", ")", "{", "List", "<", "ImmutableFunctionalTerm", ">", "classes", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "ImmutableFunctionalTerm", "p", ":", "classPredicates", ...
Get classes They can be retrieved only once, after retrieving everything is cleared. @return
[ "Get", "classes", "They", "can", "be", "retrieved", "only", "once", "after", "retrieving", "everything", "is", "cleared", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java#L90-L96
120,413
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java
R2RMLParser.getBodyURIPredicates
public List<ImmutableFunctionalTerm> getBodyURIPredicates(PredicateObjectMap pom) { List<ImmutableFunctionalTerm> predicateAtoms = new ArrayList<>(); // process PREDICATEMAP for (PredicateMap pm : pom.getPredicateMaps()) { String pmConstant = pm.getConstant().toString(); if (pmConstant != null) { Immu...
java
public List<ImmutableFunctionalTerm> getBodyURIPredicates(PredicateObjectMap pom) { List<ImmutableFunctionalTerm> predicateAtoms = new ArrayList<>(); // process PREDICATEMAP for (PredicateMap pm : pom.getPredicateMaps()) { String pmConstant = pm.getConstant().toString(); if (pmConstant != null) { Immu...
[ "public", "List", "<", "ImmutableFunctionalTerm", ">", "getBodyURIPredicates", "(", "PredicateObjectMap", "pom", ")", "{", "List", "<", "ImmutableFunctionalTerm", ">", "predicateAtoms", "=", "new", "ArrayList", "<>", "(", ")", ";", "// process PREDICATEMAP", "for", ...
Get body predicates with templates @param pom @return @throws Exception
[ "Get", "body", "predicates", "with", "templates" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java#L197-L225
120,414
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java
R2RMLParser.getTermTypeAtom
private ImmutableFunctionalTerm getTermTypeAtom(String string, Object type, String joinCond) { if (type.equals(R2RMLVocabulary.iri)) { return getURIFunction(string, joinCond); } else if (type.equals(R2RMLVocabulary.blankNode)) { return getTypedFunction(string, 2, joinCond); } else if (type.equals(R2RML...
java
private ImmutableFunctionalTerm getTermTypeAtom(String string, Object type, String joinCond) { if (type.equals(R2RMLVocabulary.iri)) { return getURIFunction(string, joinCond); } else if (type.equals(R2RMLVocabulary.blankNode)) { return getTypedFunction(string, 2, joinCond); } else if (type.equals(R2RML...
[ "private", "ImmutableFunctionalTerm", "getTermTypeAtom", "(", "String", "string", ",", "Object", "type", ",", "String", "joinCond", ")", "{", "if", "(", "type", ".", "equals", "(", "R2RMLVocabulary", ".", "iri", ")", ")", "{", "return", "getURIFunction", "(", ...
get a typed atom of a specific type @param type - iri, blanknode or literal @param string - the atom as string @return the contructed Function atom
[ "get", "a", "typed", "atom", "of", "a", "specific", "type" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java#L409-L424
120,415
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java
R2RMLParser.trim
private String trim(String string) { while (string.startsWith("\"") && string.endsWith("\"")) { string = string.substring(1, string.length() - 1); } return string; }
java
private String trim(String string) { while (string.startsWith("\"") && string.endsWith("\"")) { string = string.substring(1, string.length() - 1); } return string; }
[ "private", "String", "trim", "(", "String", "string", ")", "{", "while", "(", "string", ".", "startsWith", "(", "\"\\\"\"", ")", "&&", "string", ".", "endsWith", "(", "\"\\\"\"", ")", ")", "{", "string", "=", "string", ".", "substring", "(", "1", ",", ...
method that trims a string of all its double apostrophes from beginning and end @param string - to be trimmed @return the string without any quotes
[ "method", "that", "trims", "a", "string", "of", "all", "its", "double", "apostrophes", "from", "beginning", "and", "end" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java#L571-L578
120,416
ontop/ontop
mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java
R2RMLParser.trimTo1
private String trimTo1(String string) { while (string.startsWith("\"\"") && string.endsWith("\"\"")) { string = string.substring(1, string.length() - 1); } return string; }
java
private String trimTo1(String string) { while (string.startsWith("\"\"") && string.endsWith("\"\"")) { string = string.substring(1, string.length() - 1); } return string; }
[ "private", "String", "trimTo1", "(", "String", "string", ")", "{", "while", "(", "string", ".", "startsWith", "(", "\"\\\"\\\"\"", ")", "&&", "string", ".", "endsWith", "(", "\"\\\"\\\"\"", ")", ")", "{", "string", "=", "string", ".", "substring", "(", "...
method to trim a string of its leading or trailing quotes but one @param string - to be trimmed @return the string left with one leading and trailing quote
[ "method", "to", "trim", "a", "string", "of", "its", "leading", "or", "trailing", "quotes", "but", "one" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/r2rml/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/R2RMLParser.java#L587-L594
120,417
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java
PushDownBooleanExpressionOptimizerImpl.pushDownExpressions
private IntermediateQuery pushDownExpressions(final IntermediateQuery initialQuery) { // Non-final Optional<QueryNode> optionalCurrentNode = initialQuery.getFirstChild(initialQuery.getRootNode()); // Non-final IntermediateQuery currentQuery = initialQuery; while (optionalCurren...
java
private IntermediateQuery pushDownExpressions(final IntermediateQuery initialQuery) { // Non-final Optional<QueryNode> optionalCurrentNode = initialQuery.getFirstChild(initialQuery.getRootNode()); // Non-final IntermediateQuery currentQuery = initialQuery; while (optionalCurren...
[ "private", "IntermediateQuery", "pushDownExpressions", "(", "final", "IntermediateQuery", "initialQuery", ")", "{", "// Non-final", "Optional", "<", "QueryNode", ">", "optionalCurrentNode", "=", "initialQuery", ".", "getFirstChild", "(", "initialQuery", ".", "getRootNode"...
Tries to optimize all the JoinOrFilterNodes, ONE BY ONE. Navigates in a top-down fashion.
[ "Tries", "to", "optimize", "all", "the", "JoinOrFilterNodes", "ONE", "BY", "ONE", ".", "Navigates", "in", "a", "top", "-", "down", "fashion", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java#L129-L151
120,418
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java
PushDownBooleanExpressionOptimizerImpl.optimizeJoinOrFilter
private NextNodeAndQuery optimizeJoinOrFilter(IntermediateQuery currentQuery, JoinOrFilterNode currentNode) { /** * Tries to build a PushDownBooleanExpressionProposal for the current node */ Optional<PushDownBooleanExpressionProposal> optionalProposal = makeProposal( c...
java
private NextNodeAndQuery optimizeJoinOrFilter(IntermediateQuery currentQuery, JoinOrFilterNode currentNode) { /** * Tries to build a PushDownBooleanExpressionProposal for the current node */ Optional<PushDownBooleanExpressionProposal> optionalProposal = makeProposal( c...
[ "private", "NextNodeAndQuery", "optimizeJoinOrFilter", "(", "IntermediateQuery", "currentQuery", ",", "JoinOrFilterNode", "currentNode", ")", "{", "/**\n * Tries to build a PushDownBooleanExpressionProposal for the current node\n */", "Optional", "<", "PushDownBooleanExpr...
Tries to optimize one JoinOrFilterNode. Returns information for the continuing the navigation in the possibly new IntermediateQuery.
[ "Tries", "to", "optimize", "one", "JoinOrFilterNode", ".", "Returns", "information", "for", "the", "continuing", "the", "navigation", "in", "the", "possibly", "new", "IntermediateQuery", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java#L158-L185
120,419
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java
PushDownBooleanExpressionOptimizerImpl.buildProposal
private Optional<PushDownBooleanExpressionProposal> buildProposal( JoinOrFilterNode providerNode, ImmutableMultimap<Recipient, ImmutableExpression> recipientMap) { ImmutableCollection<Map.Entry<Recipient, ImmutableExpression>> recipientEntries = recipientMap.entries(); /* * Collect...
java
private Optional<PushDownBooleanExpressionProposal> buildProposal( JoinOrFilterNode providerNode, ImmutableMultimap<Recipient, ImmutableExpression> recipientMap) { ImmutableCollection<Map.Entry<Recipient, ImmutableExpression>> recipientEntries = recipientMap.entries(); /* * Collect...
[ "private", "Optional", "<", "PushDownBooleanExpressionProposal", ">", "buildProposal", "(", "JoinOrFilterNode", "providerNode", ",", "ImmutableMultimap", "<", "Recipient", ",", "ImmutableExpression", ">", "recipientMap", ")", "{", "ImmutableCollection", "<", "Map", ".", ...
Builds the PushDownBooleanExpressionProposal.
[ "Builds", "the", "PushDownBooleanExpressionProposal", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushDownBooleanExpressionOptimizerImpl.java#L389-L423
120,420
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java
QueryInterfacePanel.updateStatus
public void updateStatus(long result) { if(result != - 1) { Double time = execTime / 1000; String s = String.format("Execution time: %s sec - Number of rows retrieved: %,d ", time, result); Runnable time_setter = new ExecTimeSetter(s); SwingUtilities.invokeLater(time_setter); } }
java
public void updateStatus(long result) { if(result != - 1) { Double time = execTime / 1000; String s = String.format("Execution time: %s sec - Number of rows retrieved: %,d ", time, result); Runnable time_setter = new ExecTimeSetter(s); SwingUtilities.invokeLater(time_setter); } }
[ "public", "void", "updateStatus", "(", "long", "result", ")", "{", "if", "(", "result", "!=", "-", "1", ")", "{", "Double", "time", "=", "execTime", "/", "1000", ";", "String", "s", "=", "String", ".", "format", "(", "\"Execution time: %s sec - Number of r...
get and update the info box with the actual time in seconds of the execution of the query
[ "get", "and", "update", "the", "info", "box", "with", "the", "actual", "time", "in", "seconds", "of", "the", "execution", "of", "the", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java#L469-L476
120,421
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java
QueryInterfacePanel.showBooleanActionResultInTextInfo
public void showBooleanActionResultInTextInfo(String title, BooleanOWLResultSet result) throws OWLException { AskQueryInfoSetter alter_result_panel = new AskQueryInfoSetter(title, result); SwingUtilities.invokeLater(alter_result_panel); }
java
public void showBooleanActionResultInTextInfo(String title, BooleanOWLResultSet result) throws OWLException { AskQueryInfoSetter alter_result_panel = new AskQueryInfoSetter(title, result); SwingUtilities.invokeLater(alter_result_panel); }
[ "public", "void", "showBooleanActionResultInTextInfo", "(", "String", "title", ",", "BooleanOWLResultSet", "result", ")", "throws", "OWLException", "{", "AskQueryInfoSetter", "alter_result_panel", "=", "new", "AskQueryInfoSetter", "(", "title", ",", "result", ")", ";", ...
show the result for ask query
[ "show", "the", "result", "for", "ask", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java#L522-L526
120,422
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java
QueryInterfacePanel.tableChanged
@Override public void tableChanged(TableModelEvent e) { int rows = ((TableModel) e.getSource()).getRowCount(); updateStatus(rows); }
java
@Override public void tableChanged(TableModelEvent e) { int rows = ((TableModel) e.getSource()).getRowCount(); updateStatus(rows); }
[ "@", "Override", "public", "void", "tableChanged", "(", "TableModelEvent", "e", ")", "{", "int", "rows", "=", "(", "(", "TableModel", ")", "e", ".", "getSource", "(", ")", ")", ".", "getRowCount", "(", ")", ";", "updateStatus", "(", "rows", ")", ";", ...
update the number of rows when the table change
[ "update", "the", "number", "of", "rows", "when", "the", "table", "change" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/QueryInterfacePanel.java#L549-L553
120,423
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/model/term/impl/AbstractFunctionalTermImpl.java
AbstractFunctionalTermImpl.containsTerm
@Override public boolean containsTerm(Term t) { List<Term> terms = getTerms(); for (int i = 0; i < terms.size(); i++) { Term t2 = terms.get(i); if (t2.equals(t)) return true; } return false; }
java
@Override public boolean containsTerm(Term t) { List<Term> terms = getTerms(); for (int i = 0; i < terms.size(); i++) { Term t2 = terms.get(i); if (t2.equals(t)) return true; } return false; }
[ "@", "Override", "public", "boolean", "containsTerm", "(", "Term", "t", ")", "{", "List", "<", "Term", ">", "terms", "=", "getTerms", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "terms", ".", "size", "(", ")", ";", "i", "++"...
Check whether the function contains a particular term argument or not. @param t the term in question. @return true if the function contains the term, or false otherwise.
[ "Check", "whether", "the", "function", "contains", "a", "particular", "term", "argument", "or", "not", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/model/term/impl/AbstractFunctionalTermImpl.java#L83-L92
120,424
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/ImmutableQueryModifiersImpl.java
ImmutableQueryModifiersImpl.extractModifierNodes
private ImmutableList<UnaryOperatorNode> extractModifierNodes(IntermediateQueryFactory iqFactory) { long correctedOffset = offset > 0 ? offset : 0; Optional<SliceNode> sliceNode = Optional.of(limit) .filter(l -> l >= 0) .map(l -> Optional.of(iqFactory.createSliceNode(cor...
java
private ImmutableList<UnaryOperatorNode> extractModifierNodes(IntermediateQueryFactory iqFactory) { long correctedOffset = offset > 0 ? offset : 0; Optional<SliceNode> sliceNode = Optional.of(limit) .filter(l -> l >= 0) .map(l -> Optional.of(iqFactory.createSliceNode(cor...
[ "private", "ImmutableList", "<", "UnaryOperatorNode", ">", "extractModifierNodes", "(", "IntermediateQueryFactory", "iqFactory", ")", "{", "long", "correctedOffset", "=", "offset", ">", "0", "?", "offset", ":", "0", ";", "Optional", "<", "SliceNode", ">", "sliceNo...
Top-down order
[ "Top", "-", "down", "order" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/ImmutableQueryModifiersImpl.java#L121-L148
120,425
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/InnerJoinNodeImpl.java
InnerJoinNodeImpl.liftChildBinding
private LiftingStepResults liftChildBinding(ImmutableList<IQTree> initialChildren, Optional<ImmutableExpression> initialJoiningCondition, VariableGenerator variableGenerator) throws EmptyIQException { ImmutableList<I...
java
private LiftingStepResults liftChildBinding(ImmutableList<IQTree> initialChildren, Optional<ImmutableExpression> initialJoiningCondition, VariableGenerator variableGenerator) throws EmptyIQException { ImmutableList<I...
[ "private", "LiftingStepResults", "liftChildBinding", "(", "ImmutableList", "<", "IQTree", ">", "initialChildren", ",", "Optional", "<", "ImmutableExpression", ">", "initialJoiningCondition", ",", "VariableGenerator", "variableGenerator", ")", "throws", "EmptyIQException", "...
Lifts the binding OF AT MOST ONE child
[ "Lifts", "the", "binding", "OF", "AT", "MOST", "ONE", "child" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/InnerJoinNodeImpl.java#L468-L507
120,426
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.synchronize
public void synchronize(List<QueryControllerEntity> queryEntities) { if (queryEntities.size() > 0) { for (QueryControllerEntity queryEntity : queryEntities) { if (queryEntity instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) queryEntity; QueryGroupTreeElement que...
java
public void synchronize(List<QueryControllerEntity> queryEntities) { if (queryEntities.size() > 0) { for (QueryControllerEntity queryEntity : queryEntities) { if (queryEntity instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) queryEntity; QueryGroupTreeElement que...
[ "public", "void", "synchronize", "(", "List", "<", "QueryControllerEntity", ">", "queryEntities", ")", "{", "if", "(", "queryEntities", ".", "size", "(", ")", ">", "0", ")", "{", "for", "(", "QueryControllerEntity", "queryEntity", ":", "queryEntities", ")", ...
Takes all the existing nodes and constructs the tree.
[ "Takes", "all", "the", "existing", "nodes", "and", "constructs", "the", "tree", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L48-L67
120,427
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.reset
public void reset() { Enumeration<TreeNode> children = root.children(); while (children.hasMoreElements()) { removeNodeFromParent((MutableTreeNode) children.nextElement()); children = root.children(); } }
java
public void reset() { Enumeration<TreeNode> children = root.children(); while (children.hasMoreElements()) { removeNodeFromParent((MutableTreeNode) children.nextElement()); children = root.children(); } }
[ "public", "void", "reset", "(", ")", "{", "Enumeration", "<", "TreeNode", ">", "children", "=", "root", ".", "children", "(", ")", ";", "while", "(", "children", ".", "hasMoreElements", "(", ")", ")", "{", "removeNodeFromParent", "(", "(", "MutableTreeNode...
Remove all the nodes from the Tree
[ "Remove", "all", "the", "nodes", "from", "the", "Tree" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L72-L78
120,428
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.elementAdded
public void elementAdded(QueryControllerEntity element) { if (element instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) element; QueryGroupTreeElement ele = new QueryGroupTreeElement(group.getID()); insertNodeInto(ele, (DefaultMutableTreeNode) root, root.getChildCount());...
java
public void elementAdded(QueryControllerEntity element) { if (element instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) element; QueryGroupTreeElement ele = new QueryGroupTreeElement(group.getID()); insertNodeInto(ele, (DefaultMutableTreeNode) root, root.getChildCount());...
[ "public", "void", "elementAdded", "(", "QueryControllerEntity", "element", ")", "{", "if", "(", "element", "instanceof", "QueryControllerGroup", ")", "{", "QueryControllerGroup", "group", "=", "(", "QueryControllerGroup", ")", "element", ";", "QueryGroupTreeElement", ...
Inserts a new node group or query into the Tree
[ "Inserts", "a", "new", "node", "group", "or", "query", "into", "the", "Tree" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L83-L95
120,429
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.elementRemoved
public void elementRemoved(QueryControllerEntity element) { if (element instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) element; QueryGroupTreeElement ele = new QueryGroupTreeElement(group.getID()); Enumeration<TreeNode> groups = root.children(); while (groups.hasMor...
java
public void elementRemoved(QueryControllerEntity element) { if (element instanceof QueryControllerGroup) { QueryControllerGroup group = (QueryControllerGroup) element; QueryGroupTreeElement ele = new QueryGroupTreeElement(group.getID()); Enumeration<TreeNode> groups = root.children(); while (groups.hasMor...
[ "public", "void", "elementRemoved", "(", "QueryControllerEntity", "element", ")", "{", "if", "(", "element", "instanceof", "QueryControllerGroup", ")", "{", "QueryControllerGroup", "group", "=", "(", "QueryControllerGroup", ")", "element", ";", "QueryGroupTreeElement", ...
Removes a TreeNode group or query from the Tree
[ "Removes", "a", "TreeNode", "group", "or", "query", "from", "the", "Tree" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L100-L136
120,430
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.getNode
public TreeElement getNode(String element) { TreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeElement) elements.nextElement(); if (currentNode instanceof QueryGroupTreeElement) { QueryGroupTreeElement groupTEle...
java
public TreeElement getNode(String element) { TreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeElement) elements.nextElement(); if (currentNode instanceof QueryGroupTreeElement) { QueryGroupTreeElement groupTEle...
[ "public", "TreeElement", "getNode", "(", "String", "element", ")", "{", "TreeElement", "node", "=", "null", ";", "Enumeration", "<", "TreeNode", ">", "elements", "=", "root", ".", "children", "(", ")", ";", "while", "(", "elements", ".", "hasMoreElements", ...
Search a TreeElement node group or query and returns the object else returns null.
[ "Search", "a", "TreeElement", "node", "group", "or", "query", "and", "returns", "the", "object", "else", "returns", "null", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L236-L257
120,431
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java
QueryControllerTreeModel.getElementQuery
public QueryTreeElement getElementQuery(String element, String group) { QueryTreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeElement) elements.nextElement(); if (currentNode instanceof QueryGroupTreeElement && cur...
java
public QueryTreeElement getElementQuery(String element, String group) { QueryTreeElement node = null; Enumeration<TreeNode> elements = root.children(); while (elements.hasMoreElements()) { TreeElement currentNode = (TreeElement) elements.nextElement(); if (currentNode instanceof QueryGroupTreeElement && cur...
[ "public", "QueryTreeElement", "getElementQuery", "(", "String", "element", ",", "String", "group", ")", "{", "QueryTreeElement", "node", "=", "null", ";", "Enumeration", "<", "TreeNode", ">", "elements", "=", "root", ".", "children", "(", ")", ";", "while", ...
Search a query node in a group and returns the object else returns null.
[ "Search", "a", "query", "node", "in", "a", "group", "and", "returns", "the", "object", "else", "returns", "null", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/gui/treemodels/QueryControllerTreeModel.java#L262-L282
120,432
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/QueryNodeNavigationTools.java
QueryNodeNavigationTools.getDepthFirstNextNode
public static Optional<QueryNode> getDepthFirstNextNode(IntermediateQuery query, QueryNode currentNode) { return getDepthFirstNextNode(query, currentNode, false); }
java
public static Optional<QueryNode> getDepthFirstNextNode(IntermediateQuery query, QueryNode currentNode) { return getDepthFirstNextNode(query, currentNode, false); }
[ "public", "static", "Optional", "<", "QueryNode", ">", "getDepthFirstNextNode", "(", "IntermediateQuery", "query", ",", "QueryNode", "currentNode", ")", "{", "return", "getDepthFirstNextNode", "(", "query", ",", "currentNode", ",", "false", ")", ";", "}" ]
Depth-first exploration
[ "Depth", "-", "first", "exploration" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/QueryNodeNavigationTools.java#L37-L39
120,433
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/QueryNodeNavigationTools.java
QueryNodeNavigationTools.getNextNodeAndQuery
public static NextNodeAndQuery getNextNodeAndQuery(IntermediateQuery query, NodeCentricOptimizationResults<? extends QueryNode> results) { /** * If there is still a node at center: gets the next one of it */ Optional<? extends Que...
java
public static NextNodeAndQuery getNextNodeAndQuery(IntermediateQuery query, NodeCentricOptimizationResults<? extends QueryNode> results) { /** * If there is still a node at center: gets the next one of it */ Optional<? extends Que...
[ "public", "static", "NextNodeAndQuery", "getNextNodeAndQuery", "(", "IntermediateQuery", "query", ",", "NodeCentricOptimizationResults", "<", "?", "extends", "QueryNode", ">", "results", ")", "{", "/**\n * If there is still a node at center: gets the next one of it\n ...
Finds the next node to visit in a new intermediate query
[ "Finds", "the", "next", "node", "to", "visit", "in", "a", "new", "intermediate", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/QueryNodeNavigationTools.java#L44-L87
120,434
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/impl/BasicQueryTreePrinter.java
BasicQueryTreePrinter.stringifySubTree
private String stringifySubTree(IntermediateQuery query, QueryNode subTreeRoot, String rootOffsetString) { StringBuilder strBuilder = new StringBuilder(); strBuilder.append(rootOffsetString + subTreeRoot + "\n"); for (QueryNode child : query.getChildren(subTreeRoot)) { strBuilder.ap...
java
private String stringifySubTree(IntermediateQuery query, QueryNode subTreeRoot, String rootOffsetString) { StringBuilder strBuilder = new StringBuilder(); strBuilder.append(rootOffsetString + subTreeRoot + "\n"); for (QueryNode child : query.getChildren(subTreeRoot)) { strBuilder.ap...
[ "private", "String", "stringifySubTree", "(", "IntermediateQuery", "query", ",", "QueryNode", "subTreeRoot", ",", "String", "rootOffsetString", ")", "{", "StringBuilder", "strBuilder", "=", "new", "StringBuilder", "(", ")", ";", "strBuilder", ".", "append", "(", "...
Recursive method.
[ "Recursive", "method", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/impl/BasicQueryTreePrinter.java#L25-L33
120,435
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/ImmutableSubstitutionTools.java
ImmutableSubstitutionTools.prioritizeRenaming
public <T extends ImmutableTerm> ImmutableSubstitution<T> prioritizeRenaming( ImmutableSubstitution<T> substitution, ImmutableSet<Variable> priorityVariables) { ImmutableMultimap<Variable, Variable> renamingMultimap = substitution.getImmutableMap().entrySet().stream() .filter(e -> p...
java
public <T extends ImmutableTerm> ImmutableSubstitution<T> prioritizeRenaming( ImmutableSubstitution<T> substitution, ImmutableSet<Variable> priorityVariables) { ImmutableMultimap<Variable, Variable> renamingMultimap = substitution.getImmutableMap().entrySet().stream() .filter(e -> p...
[ "public", "<", "T", "extends", "ImmutableTerm", ">", "ImmutableSubstitution", "<", "T", ">", "prioritizeRenaming", "(", "ImmutableSubstitution", "<", "T", ">", "substitution", ",", "ImmutableSet", "<", "Variable", ">", "priorityVariables", ")", "{", "ImmutableMultim...
Prevents priority variables to be renamed into non-priority variables. When applied to a MGU, it is expected to return another "equivalent" MGU.
[ "Prevents", "priority", "variables", "to", "be", "renamed", "into", "non", "-", "priority", "variables", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/ImmutableSubstitutionTools.java#L176-L198
120,436
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/ImmutableUnificationTools.java
ImmutableUnificationTools.computeDirectedMGU
public Optional<ImmutableSubstitution<ImmutableTerm>> computeDirectedMGU(ImmutableTerm sourceTerm, ImmutableTerm targetTerm) { /* * Variable */ if (sourceTerm instanceof Variable) { Variable...
java
public Optional<ImmutableSubstitution<ImmutableTerm>> computeDirectedMGU(ImmutableTerm sourceTerm, ImmutableTerm targetTerm) { /* * Variable */ if (sourceTerm instanceof Variable) { Variable...
[ "public", "Optional", "<", "ImmutableSubstitution", "<", "ImmutableTerm", ">", ">", "computeDirectedMGU", "(", "ImmutableTerm", "sourceTerm", ",", "ImmutableTerm", "targetTerm", ")", "{", "/*\n * Variable\n */", "if", "(", "sourceTerm", "instanceof", "Vari...
Computes a MGU that reuses as much as possible the variables from the target part.
[ "Computes", "a", "MGU", "that", "reuses", "as", "much", "as", "possible", "the", "variables", "from", "the", "target", "part", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/substitution/impl/ImmutableUnificationTools.java#L248-L316
120,437
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/spec/mapping/converter/OldSyntaxMappingConverter.java
OldSyntaxMappingConverter.readSourceDeclaration
private void readSourceDeclaration(LineNumberReader reader) throws IOException { String line; dataSourceProperties = new Properties(); while (!(line = reader.readLine()).isEmpty()) { int lineNumber = reader.getLineNumber(); String[] tokens = line.split("[\t| ]+", 2); ...
java
private void readSourceDeclaration(LineNumberReader reader) throws IOException { String line; dataSourceProperties = new Properties(); while (!(line = reader.readLine()).isEmpty()) { int lineNumber = reader.getLineNumber(); String[] tokens = line.split("[\t| ]+", 2); ...
[ "private", "void", "readSourceDeclaration", "(", "LineNumberReader", "reader", ")", "throws", "IOException", "{", "String", "line", ";", "dataSourceProperties", "=", "new", "Properties", "(", ")", ";", "while", "(", "!", "(", "line", "=", "reader", ".", "readL...
read and store datasource information
[ "read", "and", "store", "datasource", "information" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/spec/mapping/converter/OldSyntaxMappingConverter.java#L123-L151
120,438
ontop/ontop
binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java
SWRLVisitor.createDatalog
public DatalogProgram createDatalog(OWLOntology onto) { for (OWLAxiom axiom: onto.getAxioms()){ if(axiom.getAxiomType().equals(AxiomType.SWRL_RULE)){ SWRLRule rule =(SWRLRule) axiom; rule.accept(this); if (notSupported){ log.warn("Not Supported Translation of: "+ errors); errors.cl...
java
public DatalogProgram createDatalog(OWLOntology onto) { for (OWLAxiom axiom: onto.getAxioms()){ if(axiom.getAxiomType().equals(AxiomType.SWRL_RULE)){ SWRLRule rule =(SWRLRule) axiom; rule.accept(this); if (notSupported){ log.warn("Not Supported Translation of: "+ errors); errors.cl...
[ "public", "DatalogProgram", "createDatalog", "(", "OWLOntology", "onto", ")", "{", "for", "(", "OWLAxiom", "axiom", ":", "onto", ".", "getAxioms", "(", ")", ")", "{", "if", "(", "axiom", ".", "getAxiomType", "(", ")", ".", "equals", "(", "AxiomType", "."...
Translate the swrl_rules contained in the ontology Return a datalog program containing the supported datalog facts @param onto an OWLOntology @return DatalogProgram
[ "Translate", "the", "swrl_rules", "contained", "in", "the", "ontology", "Return", "a", "datalog", "program", "containing", "the", "supported", "datalog", "facts" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java#L70-L92
120,439
ontop/ontop
binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java
SWRLVisitor.createDatalog
public DatalogProgram createDatalog(SWRLRule rule){ rule.accept(this); if (notSupported){ log.warn("Not Supported Translation of: "+ errors); errors.clear(); } DatalogProgram dp = datalogFactory.getDatalogProgram(); dp.appendRule(facts); return dp; }
java
public DatalogProgram createDatalog(SWRLRule rule){ rule.accept(this); if (notSupported){ log.warn("Not Supported Translation of: "+ errors); errors.clear(); } DatalogProgram dp = datalogFactory.getDatalogProgram(); dp.appendRule(facts); return dp; }
[ "public", "DatalogProgram", "createDatalog", "(", "SWRLRule", "rule", ")", "{", "rule", ".", "accept", "(", "this", ")", ";", "if", "(", "notSupported", ")", "{", "log", ".", "warn", "(", "\"Not Supported Translation of: \"", "+", "errors", ")", ";", "errors...
Translate the swrl_rule Return a datalog program containing the supported datalog facts @param rule an SWRLRule @return DatalogProgram
[ "Translate", "the", "swrl_rule", "Return", "a", "datalog", "program", "containing", "the", "supported", "datalog", "facts" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java#L100-L113
120,440
ontop/ontop
binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java
SWRLVisitor.visit
@Override public void visit(SWRLDataRangeAtom node) { notSupported=true; errors.add(node.toString()); }
java
@Override public void visit(SWRLDataRangeAtom node) { notSupported=true; errors.add(node.toString()); }
[ "@", "Override", "public", "void", "visit", "(", "SWRLDataRangeAtom", "node", ")", "{", "notSupported", "=", "true", ";", "errors", ".", "add", "(", "node", ".", "toString", "(", ")", ")", ";", "}" ]
Data range is not supported
[ "Data", "range", "is", "not", "supported" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/binding/owlapi/src/main/java/it/unibz/inf/ontop/owlapi/swrl/SWRLVisitor.java#L189-L195
120,441
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/join/LooseFDRedundantSelfJoinExecutor.java
LooseFDRedundantSelfJoinExecutor.selectNodesToRemove
private ImmutableSet<ExtensionalDataNode> selectNodesToRemove( ImmutableSet<Variable> requiredAndCooccuringVariables, ImmutableMap<FunctionalDependency, ImmutableCollection<Collection<ExtensionalDataNode>>> constraintNodeMap, AtomPredicate predicate) { if (settings.getCardinalityPreser...
java
private ImmutableSet<ExtensionalDataNode> selectNodesToRemove( ImmutableSet<Variable> requiredAndCooccuringVariables, ImmutableMap<FunctionalDependency, ImmutableCollection<Collection<ExtensionalDataNode>>> constraintNodeMap, AtomPredicate predicate) { if (settings.getCardinalityPreser...
[ "private", "ImmutableSet", "<", "ExtensionalDataNode", ">", "selectNodesToRemove", "(", "ImmutableSet", "<", "Variable", ">", "requiredAndCooccuringVariables", ",", "ImmutableMap", "<", "FunctionalDependency", ",", "ImmutableCollection", "<", "Collection", "<", "Extensional...
Does not look for redundant joins if not in the LOOSE preservation mode TODO: consider the case of predicates with multiple non-unique functional dependencies
[ "Does", "not", "look", "for", "redundant", "joins", "if", "not", "in", "the", "LOOSE", "preservation", "mode" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/join/LooseFDRedundantSelfJoinExecutor.java#L248-L266
120,442
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/leftjoin/LeftToInnerJoinExecutor.java
LeftToInnerJoinExecutor.extractEqualities
private Stream<ImmutableExpression> extractEqualities(ImmutableSubstitution<ImmutableTerm> substitution, ImmutableSet<Variable> leftVariables) { return substitution.getImmutableMap().entrySet().stream() .filter(e -> leftVariables.contains...
java
private Stream<ImmutableExpression> extractEqualities(ImmutableSubstitution<ImmutableTerm> substitution, ImmutableSet<Variable> leftVariables) { return substitution.getImmutableMap().entrySet().stream() .filter(e -> leftVariables.contains...
[ "private", "Stream", "<", "ImmutableExpression", ">", "extractEqualities", "(", "ImmutableSubstitution", "<", "ImmutableTerm", ">", "substitution", ",", "ImmutableSet", "<", "Variable", ">", "leftVariables", ")", "{", "return", "substitution", ".", "getImmutableMap", ...
Extracts equalities involving a left variable from the substitution
[ "Extracts", "equalities", "involving", "a", "left", "variable", "from", "the", "substitution" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/leftjoin/LeftToInnerJoinExecutor.java#L212-L217
120,443
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/leftjoin/LeftToInnerJoinExecutor.java
LeftToInnerJoinExecutor.liftSubstitution
private LeftJoinNode liftSubstitution(LeftJoinNode normalizedLeftJoin, ImmutableSubstitution<ImmutableTerm> remainingRightSubstitution, IntermediateQuery query) { SubstitutionPropagationProposal<LeftJoinNode> proposal = new Subs...
java
private LeftJoinNode liftSubstitution(LeftJoinNode normalizedLeftJoin, ImmutableSubstitution<ImmutableTerm> remainingRightSubstitution, IntermediateQuery query) { SubstitutionPropagationProposal<LeftJoinNode> proposal = new Subs...
[ "private", "LeftJoinNode", "liftSubstitution", "(", "LeftJoinNode", "normalizedLeftJoin", ",", "ImmutableSubstitution", "<", "ImmutableTerm", ">", "remainingRightSubstitution", ",", "IntermediateQuery", "query", ")", "{", "SubstitutionPropagationProposal", "<", "LeftJoinNode", ...
Lifts the substitution in the absence of a LJ condition
[ "Lifts", "the", "substitution", "in", "the", "absence", "of", "a", "LJ", "condition" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/leftjoin/LeftToInnerJoinExecutor.java#L323-L343
120,444
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/SQLQueryPainter.java
SQLQueryPainter.recolorQuery
public void recolorQuery() { String input = parent.getText(); resetStyles(); doc.setCharacterAttributes(0, doc.getLength(), plainStyle, true); // Locating all SELECTS input = input.replaceAll("[Ss][Ee][Ll][Ee][Cc][Tt]", "SELECT"); int offset = 0; for (int index = input.indexOf("SELECT", offset); index !...
java
public void recolorQuery() { String input = parent.getText(); resetStyles(); doc.setCharacterAttributes(0, doc.getLength(), plainStyle, true); // Locating all SELECTS input = input.replaceAll("[Ss][Ee][Ll][Ee][Cc][Tt]", "SELECT"); int offset = 0; for (int index = input.indexOf("SELECT", offset); index !...
[ "public", "void", "recolorQuery", "(", ")", "{", "String", "input", "=", "parent", ".", "getText", "(", ")", ";", "resetStyles", "(", ")", ";", "doc", ".", "setCharacterAttributes", "(", "0", ",", "doc", ".", "getLength", "(", ")", ",", "plainStyle", "...
Performs coloring of the text pane. This method needs to be rewritten.
[ "Performs", "coloring", "of", "the", "text", "pane", ".", "This", "method", "needs", "to", "be", "rewritten", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/utils/SQLQueryPainter.java#L139-L170
120,445
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/JoinLikeNodeImpl.java
JoinLikeNodeImpl.liftRegularChildBinding
protected <R> R liftRegularChildBinding(ConstructionNode selectedChildConstructionNode, int selectedChildPosition, IQTree selectedGrandChild, ImmutableList<IQTree> children, ...
java
protected <R> R liftRegularChildBinding(ConstructionNode selectedChildConstructionNode, int selectedChildPosition, IQTree selectedGrandChild, ImmutableList<IQTree> children, ...
[ "protected", "<", "R", ">", "R", "liftRegularChildBinding", "(", "ConstructionNode", "selectedChildConstructionNode", ",", "int", "selectedChildPosition", ",", "IQTree", "selectedGrandChild", ",", "ImmutableList", "<", "IQTree", ">", "children", ",", "ImmutableSet", "<"...
For children of a commutative join or for the left child of a LJ
[ "For", "children", "of", "a", "commutative", "join", "or", "for", "the", "left", "child", "of", "a", "LJ" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/JoinLikeNodeImpl.java#L95-L135
120,446
ontop/ontop
engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/impl/QuestQueryProcessor.java
QuestQueryProcessor.getRewritingRendering
@Override public String getRewritingRendering(InputQuery query) throws OntopReformulationException { InternalSparqlQuery translation = query.translate(inputQueryTranslator); try { IQ converetedIQ = preProcess(translation); IQ rewrittenIQ = rewriter.rewrite(converetedIQ); return rewrittenIQ.toStri...
java
@Override public String getRewritingRendering(InputQuery query) throws OntopReformulationException { InternalSparqlQuery translation = query.translate(inputQueryTranslator); try { IQ converetedIQ = preProcess(translation); IQ rewrittenIQ = rewriter.rewrite(converetedIQ); return rewrittenIQ.toStri...
[ "@", "Override", "public", "String", "getRewritingRendering", "(", "InputQuery", "query", ")", "throws", "OntopReformulationException", "{", "InternalSparqlQuery", "translation", "=", "query", ".", "translate", "(", "inputQueryTranslator", ")", ";", "try", "{", "IQ", ...
Returns the final rewriting of the given query
[ "Returns", "the", "final", "rewriting", "of", "the", "given", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/impl/QuestQueryProcessor.java#L237-L249
120,447
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.createGroup
public void createGroup(String groupId) throws Exception { if (getElementPosition(groupId) == -1) { QueryControllerGroup group = new QueryControllerGroup(groupId); entities.add(group); fireElementAdded(group); } else { throw new Exception("The name is already taken, either by a query group or a query ...
java
public void createGroup(String groupId) throws Exception { if (getElementPosition(groupId) == -1) { QueryControllerGroup group = new QueryControllerGroup(groupId); entities.add(group); fireElementAdded(group); } else { throw new Exception("The name is already taken, either by a query group or a query ...
[ "public", "void", "createGroup", "(", "String", "groupId", ")", "throws", "Exception", "{", "if", "(", "getElementPosition", "(", "groupId", ")", "==", "-", "1", ")", "{", "QueryControllerGroup", "group", "=", "new", "QueryControllerGroup", "(", "groupId", ")"...
Creates a new group and adds it to the vector QueryControllerEntity
[ "Creates", "a", "new", "group", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L64-L73
120,448
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.getGroup
public QueryControllerGroup getGroup(String groupId) { int index = getElementPosition(groupId); if (index == -1) { return null; } QueryControllerGroup group = (QueryControllerGroup) entities.get(index); return group; }
java
public QueryControllerGroup getGroup(String groupId) { int index = getElementPosition(groupId); if (index == -1) { return null; } QueryControllerGroup group = (QueryControllerGroup) entities.get(index); return group; }
[ "public", "QueryControllerGroup", "getGroup", "(", "String", "groupId", ")", "{", "int", "index", "=", "getElementPosition", "(", "groupId", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "return", "null", ";", "}", "QueryControllerGroup", "group", ...
Searches a group and returns the object else returns null
[ "Searches", "a", "group", "and", "returns", "the", "object", "else", "returns", "null" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L78-L85
120,449
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.getGroups
public List<QueryControllerGroup> getGroups() { List<QueryControllerGroup> groups = new ArrayList<QueryControllerGroup>(); for (QueryControllerEntity element : entities) { if (element instanceof QueryControllerGroup) { groups.add((QueryControllerGroup) element); } } return groups; }
java
public List<QueryControllerGroup> getGroups() { List<QueryControllerGroup> groups = new ArrayList<QueryControllerGroup>(); for (QueryControllerEntity element : entities) { if (element instanceof QueryControllerGroup) { groups.add((QueryControllerGroup) element); } } return groups; }
[ "public", "List", "<", "QueryControllerGroup", ">", "getGroups", "(", ")", "{", "List", "<", "QueryControllerGroup", ">", "groups", "=", "new", "ArrayList", "<", "QueryControllerGroup", ">", "(", ")", ";", "for", "(", "QueryControllerEntity", "element", ":", "...
Returns all the groups added
[ "Returns", "all", "the", "groups", "added" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L90-L98
120,450
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.removeGroup
public void removeGroup(String groupId) { for (Iterator<QueryControllerEntity> iterator = entities.iterator(); iterator.hasNext();) { Object temporal = iterator.next(); if (!(temporal instanceof QueryControllerGroup)) { continue; } QueryControllerGroup element = (QueryControllerGroup) temporal; if ...
java
public void removeGroup(String groupId) { for (Iterator<QueryControllerEntity> iterator = entities.iterator(); iterator.hasNext();) { Object temporal = iterator.next(); if (!(temporal instanceof QueryControllerGroup)) { continue; } QueryControllerGroup element = (QueryControllerGroup) temporal; if ...
[ "public", "void", "removeGroup", "(", "String", "groupId", ")", "{", "for", "(", "Iterator", "<", "QueryControllerEntity", ">", "iterator", "=", "entities", ".", "iterator", "(", ")", ";", "iterator", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "t...
Removes a group from the vector QueryControllerEntity
[ "Removes", "a", "group", "from", "the", "vector", "QueryControllerEntity" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L103-L119
120,451
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.addQuery
public QueryControllerQuery addQuery(String queryStr, String queryId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); if (position == -1) { // add to the collection for a new query. entities.add(query); fireElementAd...
java
public QueryControllerQuery addQuery(String queryStr, String queryId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); if (position == -1) { // add to the collection for a new query. entities.add(query); fireElementAd...
[ "public", "QueryControllerQuery", "addQuery", "(", "String", "queryStr", ",", "String", "queryId", ")", "{", "int", "position", "=", "getElementPosition", "(", "queryId", ")", ";", "QueryControllerQuery", "query", "=", "new", "QueryControllerQuery", "(", "queryId", ...
Creates a new query and adds it to the vector QueryControllerEntity. @param queryStr The new query string, replacing any existing string. @param queryId The query id associated to the string. @return The query object.
[ "Creates", "a", "new", "query", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L130-L144
120,452
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.addQuery
public QueryControllerQuery addQuery(String queryStr, String queryId, String groupId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); QueryControllerGroup group = getGroup(groupId); if (group == null) { group = new ...
java
public QueryControllerQuery addQuery(String queryStr, String queryId, String groupId) { int position = getElementPosition(queryId); QueryControllerQuery query = new QueryControllerQuery(queryId); query.setQuery(queryStr); QueryControllerGroup group = getGroup(groupId); if (group == null) { group = new ...
[ "public", "QueryControllerQuery", "addQuery", "(", "String", "queryStr", ",", "String", "queryId", ",", "String", "groupId", ")", "{", "int", "position", "=", "getElementPosition", "(", "queryId", ")", ";", "QueryControllerQuery", "query", "=", "new", "QueryContro...
Creates a new query into a group and adds it to the vector QueryControllerEntity
[ "Creates", "a", "new", "query", "into", "a", "group", "and", "adds", "it", "to", "the", "vector", "QueryControllerEntity" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L150-L169
120,453
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.removeAllQueriesAndGroups
public void removeAllQueriesAndGroups() { List<QueryControllerEntity> elements = getElements(); for (QueryControllerEntity treeElement : elements) { fireElementRemoved(treeElement); } entities.clear(); }
java
public void removeAllQueriesAndGroups() { List<QueryControllerEntity> elements = getElements(); for (QueryControllerEntity treeElement : elements) { fireElementRemoved(treeElement); } entities.clear(); }
[ "public", "void", "removeAllQueriesAndGroups", "(", ")", "{", "List", "<", "QueryControllerEntity", ">", "elements", "=", "getElements", "(", ")", ";", "for", "(", "QueryControllerEntity", "treeElement", ":", "elements", ")", "{", "fireElementRemoved", "(", "treeE...
Removes all the elements from the vector QueryControllerEntity
[ "Removes", "all", "the", "elements", "from", "the", "vector", "QueryControllerEntity" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L174-L180
120,454
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.removeQuery
public void removeQuery(String id) { int index = getElementPosition(id); QueryControllerEntity element = entities.get(index); if (element instanceof QueryControllerQuery) { entities.remove(index); fireElementRemoved(element); return; } else { QueryControllerGroup group = (QueryControllerGroup) elem...
java
public void removeQuery(String id) { int index = getElementPosition(id); QueryControllerEntity element = entities.get(index); if (element instanceof QueryControllerQuery) { entities.remove(index); fireElementRemoved(element); return; } else { QueryControllerGroup group = (QueryControllerGroup) elem...
[ "public", "void", "removeQuery", "(", "String", "id", ")", "{", "int", "index", "=", "getElementPosition", "(", "id", ")", ";", "QueryControllerEntity", "element", "=", "entities", ".", "get", "(", "index", ")", ";", "if", "(", "element", "instanceof", "Qu...
Removes a query from the vector QueryControllerEntity
[ "Removes", "a", "query", "from", "the", "vector", "QueryControllerEntity" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L185-L203
120,455
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java
QueryController.getElementPosition
public int getElementPosition(String element_id) { int index = -1; for (int i = 0; i < entities.size(); i++) { QueryControllerEntity element = entities.get(i); if (element instanceof QueryControllerQuery) { QueryControllerQuery query = (QueryControllerQuery) element; if (query.getID().equals(element_...
java
public int getElementPosition(String element_id) { int index = -1; for (int i = 0; i < entities.size(); i++) { QueryControllerEntity element = entities.get(i); if (element instanceof QueryControllerQuery) { QueryControllerQuery query = (QueryControllerQuery) element; if (query.getID().equals(element_...
[ "public", "int", "getElementPosition", "(", "String", "element_id", ")", "{", "int", "index", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "entities", ".", "size", "(", ")", ";", "i", "++", ")", "{", "QueryControllerEntity", ...
Returns the index of the element in the vector. If its is a query and the query is found inside a query group. The position of the group is returned instead.
[ "Returns", "the", "index", "of", "the", "element", "in", "the", "vector", ".", "If", "its", "is", "a", "query", "and", "the", "query", "is", "found", "inside", "a", "query", "group", ".", "The", "position", "of", "the", "group", "is", "returned", "inst...
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryController.java#L210-L242
120,456
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryControllerGroup.java
QueryControllerGroup.updateQuery
public void updateQuery(QueryControllerQuery query) { int position = getElementPosition(query.getID()); queries.set(position, query); }
java
public void updateQuery(QueryControllerQuery query) { int position = getElementPosition(query.getID()); queries.set(position, query); }
[ "public", "void", "updateQuery", "(", "QueryControllerQuery", "query", ")", "{", "int", "position", "=", "getElementPosition", "(", "query", ".", "getID", "(", ")", ")", ";", "queries", ".", "set", "(", "position", ",", "query", ")", ";", "}" ]
Updates the existing query.
[ "Updates", "the", "existing", "query", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/utils/querymanager/QueryControllerGroup.java#L98-L101
120,457
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/DataSource2PropertiesConvertor.java
DataSource2PropertiesConvertor.convert
public static Properties convert(OBDADataSource source) { String id = source.getSourceID().toString(); String url = source.getParameter(RDBMSourceParameterConstants.DATABASE_URL); String username = source.getParameter(RDBMSourceParameterConstants.DATABASE_USERNAME); String password = so...
java
public static Properties convert(OBDADataSource source) { String id = source.getSourceID().toString(); String url = source.getParameter(RDBMSourceParameterConstants.DATABASE_URL); String username = source.getParameter(RDBMSourceParameterConstants.DATABASE_USERNAME); String password = so...
[ "public", "static", "Properties", "convert", "(", "OBDADataSource", "source", ")", "{", "String", "id", "=", "source", ".", "getSourceID", "(", ")", ".", "toString", "(", ")", ";", "String", "url", "=", "source", ".", "getParameter", "(", "RDBMSourceParamete...
These properties are compatible with OBDAProperties' keys.
[ "These", "properties", "are", "compatible", "with", "OBDAProperties", "keys", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/DataSource2PropertiesConvertor.java#L18-L34
120,458
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/UnionNodeImpl.java
UnionNodeImpl.liftBindingFromLiftedChildren
private IQTree liftBindingFromLiftedChildren(ImmutableList<IQTree> liftedChildren, VariableGenerator variableGenerator, IQProperties currentIQProperties) { /* * Cannot lift anything if some children do not have a construction node */ if...
java
private IQTree liftBindingFromLiftedChildren(ImmutableList<IQTree> liftedChildren, VariableGenerator variableGenerator, IQProperties currentIQProperties) { /* * Cannot lift anything if some children do not have a construction node */ if...
[ "private", "IQTree", "liftBindingFromLiftedChildren", "(", "ImmutableList", "<", "IQTree", ">", "liftedChildren", ",", "VariableGenerator", "variableGenerator", ",", "IQProperties", "currentIQProperties", ")", "{", "/*\n * Cannot lift anything if some children do not have a...
Has at least two children
[ "Has", "at", "least", "two", "children" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/UnionNodeImpl.java#L302-L335
120,459
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/UnionNodeImpl.java
UnionNodeImpl.projectAwayUnnecessaryVariables
private IQTree projectAwayUnnecessaryVariables(IQTree child, IQProperties currentIQProperties) { if (child.getRootNode() instanceof ConstructionNode) { ConstructionNode constructionNode = (ConstructionNode) child.getRootNode(); AscendingSubstitutionNormalization normalization = normaliz...
java
private IQTree projectAwayUnnecessaryVariables(IQTree child, IQProperties currentIQProperties) { if (child.getRootNode() instanceof ConstructionNode) { ConstructionNode constructionNode = (ConstructionNode) child.getRootNode(); AscendingSubstitutionNormalization normalization = normaliz...
[ "private", "IQTree", "projectAwayUnnecessaryVariables", "(", "IQTree", "child", ",", "IQProperties", "currentIQProperties", ")", "{", "if", "(", "child", ".", "getRootNode", "(", ")", "instanceof", "ConstructionNode", ")", "{", "ConstructionNode", "constructionNode", ...
Projects away variables only for child construction nodes
[ "Projects", "away", "variables", "only", "for", "child", "construction", "nodes" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/UnionNodeImpl.java#L474-L495
120,460
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/ResultViewTablePanel.java
ResultViewTablePanel.canWrite
private boolean canWrite(File outputFile) { boolean fileIsValid = false; if (outputFile.exists()) { int result = JOptionPane.showConfirmDialog( this, "File exists, overwrite?", "Warning", JOptionPane.YES_NO_CANCEL_OPTION); switch (result) { case JOptionPane.YES_OPTION: fileIsValid = true; ...
java
private boolean canWrite(File outputFile) { boolean fileIsValid = false; if (outputFile.exists()) { int result = JOptionPane.showConfirmDialog( this, "File exists, overwrite?", "Warning", JOptionPane.YES_NO_CANCEL_OPTION); switch (result) { case JOptionPane.YES_OPTION: fileIsValid = true; ...
[ "private", "boolean", "canWrite", "(", "File", "outputFile", ")", "{", "boolean", "fileIsValid", "=", "false", ";", "if", "(", "outputFile", ".", "exists", "(", ")", ")", "{", "int", "result", "=", "JOptionPane", ".", "showConfirmDialog", "(", "this", ",",...
A utility method to check if the result should be written to the target file. Return true if the target file doesn't exist yet or the user allows overwriting.
[ "A", "utility", "method", "to", "check", "if", "the", "result", "should", "be", "written", "to", "the", "target", "file", ".", "Return", "true", "if", "the", "target", "file", "doesn", "t", "exist", "yet", "or", "the", "user", "allows", "overwriting", "....
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/ResultViewTablePanel.java#L136-L153
120,461
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/impl/IQTreeTools.java
IQTreeTools.normalizeDescendingSubstitution
public Optional<ImmutableSubstitution<? extends VariableOrGroundTerm>> normalizeDescendingSubstitution( IQTree tree, ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution) throws UnsatisfiableDescendingSubstitutionException { ImmutableSubstitution<? extends Variab...
java
public Optional<ImmutableSubstitution<? extends VariableOrGroundTerm>> normalizeDescendingSubstitution( IQTree tree, ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution) throws UnsatisfiableDescendingSubstitutionException { ImmutableSubstitution<? extends Variab...
[ "public", "Optional", "<", "ImmutableSubstitution", "<", "?", "extends", "VariableOrGroundTerm", ">", ">", "normalizeDescendingSubstitution", "(", "IQTree", "tree", ",", "ImmutableSubstitution", "<", "?", "extends", "VariableOrGroundTerm", ">", "descendingSubstitution", "...
Excludes the variables that are not projected by the IQTree If a "null" variable is propagated down, throws an UnsatisfiableDescendingSubstitutionException.
[ "Excludes", "the", "variables", "that", "are", "not", "projected", "by", "the", "IQTree" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/impl/IQTreeTools.java#L34-L50
120,462
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java
VirtualABoxStatistics.getStatistics
public int getStatistics(String datasourceId, String mappingId) { final HashMap<String, Integer> mappingStat = getStatistics(datasourceId); int triplesCount = mappingStat.get(mappingId).intValue(); return triplesCount; }
java
public int getStatistics(String datasourceId, String mappingId) { final HashMap<String, Integer> mappingStat = getStatistics(datasourceId); int triplesCount = mappingStat.get(mappingId).intValue(); return triplesCount; }
[ "public", "int", "getStatistics", "(", "String", "datasourceId", ",", "String", "mappingId", ")", "{", "final", "HashMap", "<", "String", ",", "Integer", ">", "mappingStat", "=", "getStatistics", "(", "datasourceId", ")", ";", "int", "triplesCount", "=", "mapp...
Returns one triple count from a particular mapping. @param datasourceId The data source identifier. @param mappingId The mapping identifier. @return The number of triples.
[ "Returns", "one", "triple", "count", "from", "a", "particular", "mapping", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java#L86-L91
120,463
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java
VirtualABoxStatistics.getTotalTriples
public int getTotalTriples() throws Exception { int total = 0; for (HashMap<String, Integer> mappingStat : statistics.values()) { for (Integer triplesCount : mappingStat.values()) { int triples = triplesCount.intValue(); if (triples == -1) { throw new Exception("An error was occurred in the counting...
java
public int getTotalTriples() throws Exception { int total = 0; for (HashMap<String, Integer> mappingStat : statistics.values()) { for (Integer triplesCount : mappingStat.values()) { int triples = triplesCount.intValue(); if (triples == -1) { throw new Exception("An error was occurred in the counting...
[ "public", "int", "getTotalTriples", "(", ")", "throws", "Exception", "{", "int", "total", "=", "0", ";", "for", "(", "HashMap", "<", "String", ",", "Integer", ">", "mappingStat", ":", "statistics", ".", "values", "(", ")", ")", "{", "for", "(", "Intege...
Gets the total number of triples from all the data sources and mappings. @return The total number of triples. @throws Exception
[ "Gets", "the", "total", "number", "of", "triples", "from", "all", "the", "data", "sources", "and", "mappings", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/utils/VirtualABoxStatistics.java#L99-L111
120,464
ontop/ontop
engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/dialect/impl/OracleSQLDialectAdapter.java
OracleSQLDialectAdapter.nameViewOrVariable
private String nameViewOrVariable(final String prefix, final String intermediateName, final String suffix, final Collection<String> alreadyDefinedNames, boolean putQuote) { int borderLength = prefix.length() + suffix.length(); int signatureVarLength = intermediateName.len...
java
private String nameViewOrVariable(final String prefix, final String intermediateName, final String suffix, final Collection<String> alreadyDefinedNames, boolean putQuote) { int borderLength = prefix.length() + suffix.length(); int signatureVarLength = intermediateName.len...
[ "private", "String", "nameViewOrVariable", "(", "final", "String", "prefix", ",", "final", "String", "intermediateName", ",", "final", "String", "suffix", ",", "final", "Collection", "<", "String", ">", "alreadyDefinedNames", ",", "boolean", "putQuote", ")", "{", ...
Makes sure the view or variable name never exceeds the max length supported by Oracle. Strategy: shortens the intermediateName and introduces a number to avoid conflict with similar names.
[ "Makes", "sure", "the", "view", "or", "variable", "name", "never", "exceeds", "the", "max", "length", "supported", "by", "Oracle", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/dialect/impl/OracleSQLDialectAdapter.java#L375-L414
120,465
ontop/ontop
engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/ImmutableCQSyntacticContainmentCheck.java
ImmutableCQSyntacticContainmentCheck.isContainedIn
@Override public boolean isContainedIn(ImmutableCQ cq1, ImmutableCQ cq2) { return cq2.getAnswerVariables().equals(cq1.getAnswerVariables()) && !cq2.getAtoms().stream().anyMatch(a -> !cq1.getAtoms().contains(a)); }
java
@Override public boolean isContainedIn(ImmutableCQ cq1, ImmutableCQ cq2) { return cq2.getAnswerVariables().equals(cq1.getAnswerVariables()) && !cq2.getAtoms().stream().anyMatch(a -> !cq1.getAtoms().contains(a)); }
[ "@", "Override", "public", "boolean", "isContainedIn", "(", "ImmutableCQ", "cq1", ",", "ImmutableCQ", "cq2", ")", "{", "return", "cq2", ".", "getAnswerVariables", "(", ")", ".", "equals", "(", "cq1", ".", "getAnswerVariables", "(", ")", ")", "&&", "!", "cq...
Check if query cq1 is contained in cq2, syntactically. That is, if the head of cq1 and cq2 are equal and each atom in cq2 is also in the body of cq1
[ "Check", "if", "query", "cq1", "is", "contained", "in", "cq2", "syntactically", ".", "That", "is", "if", "the", "head", "of", "cq1", "and", "cq2", "are", "equal", "and", "each", "atom", "in", "cq2", "is", "also", "in", "the", "body", "of", "cq1" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/ImmutableCQSyntacticContainmentCheck.java#L12-L16
120,466
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TargetQueryRenderer.java
TargetQueryRenderer.getNestedConcats
public static void getNestedConcats(StringBuilder stb, ImmutableTerm term1, ImmutableTerm term2) { if (term1 instanceof ImmutableFunctionalTerm) { ImmutableFunctionalTerm f = (ImmutableFunctionalTerm) term1; getNestedConcats(stb, f.getTerms().get(0), f.getTerms().get(1)); } else ...
java
public static void getNestedConcats(StringBuilder stb, ImmutableTerm term1, ImmutableTerm term2) { if (term1 instanceof ImmutableFunctionalTerm) { ImmutableFunctionalTerm f = (ImmutableFunctionalTerm) term1; getNestedConcats(stb, f.getTerms().get(0), f.getTerms().get(1)); } else ...
[ "public", "static", "void", "getNestedConcats", "(", "StringBuilder", "stb", ",", "ImmutableTerm", "term1", ",", "ImmutableTerm", "term2", ")", "{", "if", "(", "term1", "instanceof", "ImmutableFunctionalTerm", ")", "{", "ImmutableFunctionalTerm", "f", "=", "(", "I...
Appends nested concats
[ "Appends", "nested", "concats" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TargetQueryRenderer.java#L112-L125
120,467
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TargetQueryRenderer.java
TargetQueryRenderer.getDisplayName
private static String getDisplayName(ImmutableTerm term, PrefixManager prefixManager) { if (term instanceof ImmutableFunctionalTerm) return displayFunction((ImmutableFunctionalTerm) term, prefixManager); if (term instanceof Variable) return displayVariable((Variable)term); ...
java
private static String getDisplayName(ImmutableTerm term, PrefixManager prefixManager) { if (term instanceof ImmutableFunctionalTerm) return displayFunction((ImmutableFunctionalTerm) term, prefixManager); if (term instanceof Variable) return displayVariable((Variable)term); ...
[ "private", "static", "String", "getDisplayName", "(", "ImmutableTerm", "term", ",", "PrefixManager", "prefixManager", ")", "{", "if", "(", "term", "instanceof", "ImmutableFunctionalTerm", ")", "return", "displayFunction", "(", "(", "ImmutableFunctionalTerm", ")", "ter...
Prints the text representation of different terms.
[ "Prints", "the", "text", "representation", "of", "different", "terms", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TargetQueryRenderer.java#L130-L142
120,468
ontop/ontop
engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/JDBC2ConstantConverter.java
JDBC2ConstantConverter.buildDefaultDateTimeFormatter
private static ImmutableList<DateTimeFormatter> buildDefaultDateTimeFormatter() { return ImmutableList.<DateTimeFormatter>builder() .add(DateTimeFormatter.ISO_LOCAL_DATE_TIME) // ISO with 'T' .add(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss[[.SSSSSSSSS][.SSSSSSS][.S...
java
private static ImmutableList<DateTimeFormatter> buildDefaultDateTimeFormatter() { return ImmutableList.<DateTimeFormatter>builder() .add(DateTimeFormatter.ISO_LOCAL_DATE_TIME) // ISO with 'T' .add(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss[[.SSSSSSSSS][.SSSSSSS][.S...
[ "private", "static", "ImmutableList", "<", "DateTimeFormatter", ">", "buildDefaultDateTimeFormatter", "(", ")", "{", "return", "ImmutableList", ".", "<", "DateTimeFormatter", ">", "builder", "(", ")", ".", "add", "(", "DateTimeFormatter", ".", "ISO_LOCAL_DATE_TIME", ...
default possible date time format
[ "default", "possible", "date", "time", "format" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/JDBC2ConstantConverter.java#L59-L68
120,469
ontop/ontop
engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/JDBC2ConstantConverter.java
JDBC2ConstantConverter.buildDateTimeFormatterMap
private static ImmutableMap<System,ImmutableList<DateTimeFormatter>> buildDateTimeFormatterMap() { return ImmutableMap.of( DEFAULT, ImmutableList.<DateTimeFormatter>builder() .addAll(defaultDateTimeFormatter) // another common case .build(), ...
java
private static ImmutableMap<System,ImmutableList<DateTimeFormatter>> buildDateTimeFormatterMap() { return ImmutableMap.of( DEFAULT, ImmutableList.<DateTimeFormatter>builder() .addAll(defaultDateTimeFormatter) // another common case .build(), ...
[ "private", "static", "ImmutableMap", "<", "System", ",", "ImmutableList", "<", "DateTimeFormatter", ">", ">", "buildDateTimeFormatterMap", "(", ")", "{", "return", "ImmutableMap", ".", "of", "(", "DEFAULT", ",", "ImmutableList", ".", "<", "DateTimeFormatter", ">",...
special cases on different systems
[ "special", "cases", "on", "different", "systems" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/sql/core/src/main/java/it/unibz/inf/ontop/answering/resultset/impl/JDBC2ConstantConverter.java#L71-L87
120,470
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java
QuestStatement.execute
@Override public <R extends OBDAResultSet> R execute(InputQuery<R> inputQuery) throws OntopConnectionException, OntopReformulationException, OntopQueryEvaluationException, OntopResultConversionException { if (inputQuery instanceof SelectQuery) { return (R) executeInThread((SelectQuery) inputQuery, thi...
java
@Override public <R extends OBDAResultSet> R execute(InputQuery<R> inputQuery) throws OntopConnectionException, OntopReformulationException, OntopQueryEvaluationException, OntopResultConversionException { if (inputQuery instanceof SelectQuery) { return (R) executeInThread((SelectQuery) inputQuery, thi...
[ "@", "Override", "public", "<", "R", "extends", "OBDAResultSet", ">", "R", "execute", "(", "InputQuery", "<", "R", ">", "inputQuery", ")", "throws", "OntopConnectionException", ",", "OntopReformulationException", ",", "OntopQueryEvaluationException", ",", "OntopResult...
Calls the necessary tuple or graph query execution Implements describe uri or var logic Returns the result set for the given query
[ "Calls", "the", "necessary", "tuple", "or", "graph", "query", "execution", "Implements", "describe", "uri", "or", "var", "logic", "Returns", "the", "result", "set", "for", "the", "given", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java#L191-L209
120,471
ontop/ontop
engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java
QuestStatement.executeInThread
private <R extends OBDAResultSet, Q extends InputQuery<R>> R executeInThread(Q inputQuery, Evaluator<R, Q> evaluator) throws OntopReformulationException, OntopQueryEvaluationException { log.debug("Executing SPARQL query: \n{}", inputQuery); CountDownLatch monitor = new CountDownLatch(1); ExecutableQuery exec...
java
private <R extends OBDAResultSet, Q extends InputQuery<R>> R executeInThread(Q inputQuery, Evaluator<R, Q> evaluator) throws OntopReformulationException, OntopQueryEvaluationException { log.debug("Executing SPARQL query: \n{}", inputQuery); CountDownLatch monitor = new CountDownLatch(1); ExecutableQuery exec...
[ "private", "<", "R", "extends", "OBDAResultSet", ",", "Q", "extends", "InputQuery", "<", "R", ">", ">", "R", "executeInThread", "(", "Q", "inputQuery", ",", "Evaluator", "<", "R", ",", "Q", ">", "evaluator", ")", "throws", "OntopReformulationException", ",",...
Internal method to start a new query execution thread type defines the query type SELECT, ASK, CONSTRUCT, or DESCRIBE
[ "Internal", "method", "to", "start", "a", "new", "query", "execution", "thread", "type", "defines", "the", "query", "type", "SELECT", "ASK", "CONSTRUCT", "or", "DESCRIBE" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/system/core/src/main/java/it/unibz/inf/ontop/answering/connection/impl/QuestStatement.java#L307-L343
120,472
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java
RAExpressionAttributes.isAbsent
private boolean isAbsent(QuotedID attribute) { ImmutableSet<RelationID> occurrences = attributeOccurrences.get(attribute); return (occurrences == null) || occurrences.isEmpty(); }
java
private boolean isAbsent(QuotedID attribute) { ImmutableSet<RelationID> occurrences = attributeOccurrences.get(attribute); return (occurrences == null) || occurrences.isEmpty(); }
[ "private", "boolean", "isAbsent", "(", "QuotedID", "attribute", ")", "{", "ImmutableSet", "<", "RelationID", ">", "occurrences", "=", "attributeOccurrences", ".", "get", "(", "attribute", ")", ";", "return", "(", "occurrences", "==", "null", ")", "||", "occurr...
checks if the attributeOccurrences contains the attribute @param attribute a {@link QuotedID} @return true if attributeOccurrences contains the attribute otherwise false
[ "checks", "if", "the", "attributeOccurrences", "contains", "the", "attribute" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java#L45-L48
120,473
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java
RAExpressionAttributes.attributeOccurrencesUnion
private static ImmutableSet<RelationID> attributeOccurrencesUnion(QuotedID id, RAExpressionAttributes re1, RAExpressionAttributes re2) { ImmutableSet<RelationID> s1 = re1....
java
private static ImmutableSet<RelationID> attributeOccurrencesUnion(QuotedID id, RAExpressionAttributes re1, RAExpressionAttributes re2) { ImmutableSet<RelationID> s1 = re1....
[ "private", "static", "ImmutableSet", "<", "RelationID", ">", "attributeOccurrencesUnion", "(", "QuotedID", "id", ",", "RAExpressionAttributes", "re1", ",", "RAExpressionAttributes", "re2", ")", "{", "ImmutableSet", "<", "RelationID", ">", "s1", "=", "re1", ".", "a...
treats null values as empty sets @param id a {@link QuotedID} @param re1 a {@link RAExpressionAttributes} @param re2 a {@link RAExpressionAttributes} @return the union of occurrences of id in e1 and e2
[ "treats", "null", "values", "as", "empty", "sets" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java#L246-L260
120,474
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java
RAExpressionAttributes.checkRelationAliasesConsistency
private static void checkRelationAliasesConsistency(RAExpressionAttributes re1, RAExpressionAttributes re2) throws IllegalJoinException { ImmutableSet<RelationID> alias1 = re1.attributes.keySet().stream() .filter(id -> id.getRelation() != ...
java
private static void checkRelationAliasesConsistency(RAExpressionAttributes re1, RAExpressionAttributes re2) throws IllegalJoinException { ImmutableSet<RelationID> alias1 = re1.attributes.keySet().stream() .filter(id -> id.getRelation() != ...
[ "private", "static", "void", "checkRelationAliasesConsistency", "(", "RAExpressionAttributes", "re1", ",", "RAExpressionAttributes", "re2", ")", "throws", "IllegalJoinException", "{", "ImmutableSet", "<", "RelationID", ">", "alias1", "=", "re1", ".", "attributes", ".", ...
throw IllegalJoinException if a relation alias occurs in both arguments of the join @param re1 a {@link RAExpressionAttributes} @param re2 a {@link RAExpressionAttributes} @throws IllegalJoinException if the same alias occurs in both arguments
[ "throw", "IllegalJoinException", "if", "a", "relation", "alias", "occurs", "in", "both", "arguments", "of", "the", "join" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/RAExpressionAttributes.java#L293-L308
120,475
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/join/RedundantJoinFKExecutor.java
RedundantJoinFKExecutor.extractDataNodeMap
private ImmutableMultimap<RelationDefinition, ExtensionalDataNode> extractDataNodeMap(IntermediateQuery query, InnerJoinNode joinNode) { return query.getChildren(joinNode).stream() .filter(c -> c instanceof...
java
private ImmutableMultimap<RelationDefinition, ExtensionalDataNode> extractDataNodeMap(IntermediateQuery query, InnerJoinNode joinNode) { return query.getChildren(joinNode).stream() .filter(c -> c instanceof...
[ "private", "ImmutableMultimap", "<", "RelationDefinition", ",", "ExtensionalDataNode", ">", "extractDataNodeMap", "(", "IntermediateQuery", "query", ",", "InnerJoinNode", "joinNode", ")", "{", "return", "query", ".", "getChildren", "(", "joinNode", ")", ".", "stream",...
Predicates not having a DatabaseRelationDefinition are ignored
[ "Predicates", "not", "having", "a", "DatabaseRelationDefinition", "are", "ignored" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/executor/join/RedundantJoinFKExecutor.java#L107-L114
120,476
ontop/ontop
engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitnessSet.java
TreeWitnessSet.getTreeWitnessGenerators
private Collection<TreeWitnessGenerator> getTreeWitnessGenerators(QueryFolding qf) { Collection<TreeWitnessGenerator> twg = null; log.debug("CHECKING WHETHER THE FOLDING {} CAN BE GENERATED: ", qf); for (TreeWitnessGenerator g : allTWgenerators) { Intersection<ObjectPropertyExpression> subp = qf.getProperties...
java
private Collection<TreeWitnessGenerator> getTreeWitnessGenerators(QueryFolding qf) { Collection<TreeWitnessGenerator> twg = null; log.debug("CHECKING WHETHER THE FOLDING {} CAN BE GENERATED: ", qf); for (TreeWitnessGenerator g : allTWgenerators) { Intersection<ObjectPropertyExpression> subp = qf.getProperties...
[ "private", "Collection", "<", "TreeWitnessGenerator", ">", "getTreeWitnessGenerators", "(", "QueryFolding", "qf", ")", "{", "Collection", "<", "TreeWitnessGenerator", ">", "twg", "=", "null", ";", "log", ".", "debug", "(", "\"CHECKING WHETHER THE FOLDING {} CAN BE GENER...
can return null if there are no applicable generators!
[ "can", "return", "null", "if", "there", "are", "no", "applicable", "generators!" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitnessSet.java#L218-L257
120,477
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/injection/impl/OntopModelSettingsImpl.java
OntopModelSettingsImpl.getBoolean
Optional<Boolean> getBoolean(String key) { Object value = get(key); if (value == null) { return Optional.empty(); } if (value instanceof Boolean) { return Optional.of((Boolean) value); } else if (value instanceof String) { return Opti...
java
Optional<Boolean> getBoolean(String key) { Object value = get(key); if (value == null) { return Optional.empty(); } if (value instanceof Boolean) { return Optional.of((Boolean) value); } else if (value instanceof String) { return Opti...
[ "Optional", "<", "Boolean", ">", "getBoolean", "(", "String", "key", ")", "{", "Object", "value", "=", "get", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "return", "Optional", ".", "empty", "(", ")", ";", "}", "if", "(", "va...
Returns the boolean value of the given key.
[ "Returns", "the", "boolean", "value", "of", "the", "given", "key", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/injection/impl/OntopModelSettingsImpl.java#L113-L129
120,478
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/injection/impl/OntopModelSettingsImpl.java
OntopModelSettingsImpl.getInteger
Optional<Integer> getInteger(String key) { String value = (String) get(key); return Optional.ofNullable(Integer.parseInt(value)); }
java
Optional<Integer> getInteger(String key) { String value = (String) get(key); return Optional.ofNullable(Integer.parseInt(value)); }
[ "Optional", "<", "Integer", ">", "getInteger", "(", "String", "key", ")", "{", "String", "value", "=", "(", "String", ")", "get", "(", "key", ")", ";", "return", "Optional", ".", "ofNullable", "(", "Integer", ".", "parseInt", "(", "value", ")", ")", ...
Returns the integer value of the given key.
[ "Returns", "the", "integer", "value", "of", "the", "given", "key", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/injection/impl/OntopModelSettingsImpl.java#L140-L143
120,479
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java
TurtleWriter.put
void put(String subject, String predicate, String object) { // Subject to Predicates map ArrayList<String> predicateList = subjectToPredicates.get(subject); if (predicateList == null) { predicateList = new ArrayList<String>(); } insert(predicateList, predicate); subjectToPredicates.put(subject, predicate...
java
void put(String subject, String predicate, String object) { // Subject to Predicates map ArrayList<String> predicateList = subjectToPredicates.get(subject); if (predicateList == null) { predicateList = new ArrayList<String>(); } insert(predicateList, predicate); subjectToPredicates.put(subject, predicate...
[ "void", "put", "(", "String", "subject", ",", "String", "predicate", ",", "String", "object", ")", "{", "// Subject to Predicates map", "ArrayList", "<", "String", ">", "predicateList", "=", "subjectToPredicates", ".", "get", "(", "subject", ")", ";", "if", "(...
Adding the subject, predicate and object components to this container. @param subject The subject term of the Function. @param predicate The Function predicate. @param object The object term of the Function.
[ "Adding", "the", "subject", "predicate", "and", "object", "components", "to", "this", "container", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java#L72-L88
120,480
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java
TurtleWriter.insert
private void insert(ArrayList<String> list, String input) { if (!list.contains(input)) { if (input.equals("a") || input.equals("rdf:type")) { list.add(0, input); } else { list.add(input); } } }
java
private void insert(ArrayList<String> list, String input) { if (!list.contains(input)) { if (input.equals("a") || input.equals("rdf:type")) { list.add(0, input); } else { list.add(input); } } }
[ "private", "void", "insert", "(", "ArrayList", "<", "String", ">", "list", ",", "String", "input", ")", "{", "if", "(", "!", "list", ".", "contains", "(", "input", ")", ")", "{", "if", "(", "input", ".", "equals", "(", "\"a\"", ")", "||", "input", ...
Utility method to insert the predicate
[ "Utility", "method", "to", "insert", "the", "predicate" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java#L91-L99
120,481
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java
TurtleWriter.print
String print() { StringBuilder sb = new StringBuilder(); for (String subject : subjectToPredicates.keySet()) { sb.append(subject); sb.append(" "); boolean semiColonSeparator = false; for (String predicate : subjectToPredicates.get(subject)) { if (semiColonSeparator) { sb.append(" ; "); } ...
java
String print() { StringBuilder sb = new StringBuilder(); for (String subject : subjectToPredicates.keySet()) { sb.append(subject); sb.append(" "); boolean semiColonSeparator = false; for (String predicate : subjectToPredicates.get(subject)) { if (semiColonSeparator) { sb.append(" ; "); } ...
[ "String", "print", "(", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "subject", ":", "subjectToPredicates", ".", "keySet", "(", ")", ")", "{", "sb", ".", "append", "(", "subject", ")", ";", "sb", ...
Prints the container. @return The Turtle short representation.
[ "Prints", "the", "container", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java#L106-L134
120,482
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/impl/tree/DefaultIntermediateQueryBuilder.java
DefaultIntermediateQueryBuilder.buildQuery
protected IntermediateQuery buildQuery(DBMetadata metadata, DistinctVariableOnlyDataAtom projectionAtom, QueryTreeComponent treeComponent) { return new IntermediateQueryImpl(metadata, projectionAtom, treeComponent, executorRe...
java
protected IntermediateQuery buildQuery(DBMetadata metadata, DistinctVariableOnlyDataAtom projectionAtom, QueryTreeComponent treeComponent) { return new IntermediateQueryImpl(metadata, projectionAtom, treeComponent, executorRe...
[ "protected", "IntermediateQuery", "buildQuery", "(", "DBMetadata", "metadata", ",", "DistinctVariableOnlyDataAtom", "projectionAtom", ",", "QueryTreeComponent", "treeComponent", ")", "{", "return", "new", "IntermediateQueryImpl", "(", "metadata", ",", "projectionAtom", ",",...
Can be overwritten to use another constructor
[ "Can", "be", "overwritten", "to", "use", "another", "constructor" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/impl/tree/DefaultIntermediateQueryBuilder.java#L154-L160
120,483
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/CompositeQueryNodeImpl.java
CompositeQueryNodeImpl.normalizeAscendingSubstitution
protected AscendingSubstitutionNormalization normalizeAscendingSubstitution( ImmutableSubstitution<ImmutableTerm> ascendingSubstitution, ImmutableSet<Variable> projectedVariables) { Var2VarSubstitution downRenamingSubstitution = substitutionFactory.getVar2VarSubstitution( ascendingS...
java
protected AscendingSubstitutionNormalization normalizeAscendingSubstitution( ImmutableSubstitution<ImmutableTerm> ascendingSubstitution, ImmutableSet<Variable> projectedVariables) { Var2VarSubstitution downRenamingSubstitution = substitutionFactory.getVar2VarSubstitution( ascendingS...
[ "protected", "AscendingSubstitutionNormalization", "normalizeAscendingSubstitution", "(", "ImmutableSubstitution", "<", "ImmutableTerm", ">", "ascendingSubstitution", ",", "ImmutableSet", "<", "Variable", ">", "projectedVariables", ")", "{", "Var2VarSubstitution", "downRenamingSu...
Prevents creating construction nodes out of ascending substitutions
[ "Prevents", "creating", "construction", "nodes", "out", "of", "ascending", "substitutions" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/CompositeQueryNodeImpl.java#L33-L53
120,484
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/model/type/impl/LangDatatype.java
LangDatatype.getCommonDenominator
private TermType getCommonDenominator(LanguageTag otherLanguageTag) { return langTag.getCommonDenominator(otherLanguageTag) .map(newLangTag -> newLangTag.equals(langTag) ? (TermType) this : new LangDatatype(newLangTag, parentAncestry, typeFactory))...
java
private TermType getCommonDenominator(LanguageTag otherLanguageTag) { return langTag.getCommonDenominator(otherLanguageTag) .map(newLangTag -> newLangTag.equals(langTag) ? (TermType) this : new LangDatatype(newLangTag, parentAncestry, typeFactory))...
[ "private", "TermType", "getCommonDenominator", "(", "LanguageTag", "otherLanguageTag", ")", "{", "return", "langTag", ".", "getCommonDenominator", "(", "otherLanguageTag", ")", ".", "map", "(", "newLangTag", "->", "newLangTag", ".", "equals", "(", "langTag", ")", ...
Common denominator between two lang strings
[ "Common", "denominator", "between", "two", "lang", "strings" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/model/type/impl/LangDatatype.java#L47-L54
120,485
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java
IQ2DatalogTranslatorImpl.translate
@Override public DatalogProgram translate(IQ initialQuery) { IQ orderLiftedQuery = liftOrderBy(initialQuery); Optional<MutableQueryModifiers> optionalModifiers = extractTopQueryModifiers(orderLiftedQuery); // Mutable DatalogProgram dProgram; if (optionalModifiers.isPresent()){ MutableQueryModifie...
java
@Override public DatalogProgram translate(IQ initialQuery) { IQ orderLiftedQuery = liftOrderBy(initialQuery); Optional<MutableQueryModifiers> optionalModifiers = extractTopQueryModifiers(orderLiftedQuery); // Mutable DatalogProgram dProgram; if (optionalModifiers.isPresent()){ MutableQueryModifie...
[ "@", "Override", "public", "DatalogProgram", "translate", "(", "IQ", "initialQuery", ")", "{", "IQ", "orderLiftedQuery", "=", "liftOrderBy", "(", "initialQuery", ")", ";", "Optional", "<", "MutableQueryModifiers", ">", "optionalModifiers", "=", "extractTopQueryModifie...
Translate an intermediate query tree into a Datalog program. Each (strict) subquery will be translated as a rule with head Pred(var_1, .., var_n), where the string for Pred is of the form SUBQUERY_PRED_PREFIX + y, with y > subqueryCounter.
[ "Translate", "an", "intermediate", "query", "tree", "into", "a", "Datalog", "program", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java#L102-L126
120,486
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java
IQ2DatalogTranslatorImpl.extractTopQueryModifiers
private Optional<MutableQueryModifiers> extractTopQueryModifiers(IQ query) { IQTree tree = query.getTree(); QueryNode rootNode = tree.getRootNode(); if (rootNode instanceof QueryModifierNode) { Optional<SliceNode> sliceNode = Optional.of(rootNode) .filter(n -> n instanceof SliceNode) .map(n -> (Slice...
java
private Optional<MutableQueryModifiers> extractTopQueryModifiers(IQ query) { IQTree tree = query.getTree(); QueryNode rootNode = tree.getRootNode(); if (rootNode instanceof QueryModifierNode) { Optional<SliceNode> sliceNode = Optional.of(rootNode) .filter(n -> n instanceof SliceNode) .map(n -> (Slice...
[ "private", "Optional", "<", "MutableQueryModifiers", ">", "extractTopQueryModifiers", "(", "IQ", "query", ")", "{", "IQTree", "tree", "=", "query", ".", "getTree", "(", ")", ";", "QueryNode", "rootNode", "=", "tree", ".", "getRootNode", "(", ")", ";", "if", ...
Assumes that ORDER BY is ABOVE the first construction node and the order between these operators is respected and they appear ONE time maximum
[ "Assumes", "that", "ORDER", "BY", "is", "ABOVE", "the", "first", "construction", "node", "and", "the", "order", "between", "these", "operators", "is", "respected", "and", "they", "appear", "ONE", "time", "maximum" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java#L166-L213
120,487
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java
IQ2DatalogTranslatorImpl.getFirstNonQueryModifierTree
private IQTree getFirstNonQueryModifierTree(IQ query) { // Non-final IQTree iqTree = query.getTree(); while (iqTree.getRootNode() instanceof QueryModifierNode) { iqTree = ((UnaryIQTree) iqTree).getChild(); } return iqTree; }
java
private IQTree getFirstNonQueryModifierTree(IQ query) { // Non-final IQTree iqTree = query.getTree(); while (iqTree.getRootNode() instanceof QueryModifierNode) { iqTree = ((UnaryIQTree) iqTree).getChild(); } return iqTree; }
[ "private", "IQTree", "getFirstNonQueryModifierTree", "(", "IQ", "query", ")", "{", "// Non-final", "IQTree", "iqTree", "=", "query", ".", "getTree", "(", ")", ";", "while", "(", "iqTree", ".", "getRootNode", "(", ")", "instanceof", "QueryModifierNode", ")", "{...
Assumes that ORDER BY is ABOVE the first construction node
[ "Assumes", "that", "ORDER", "BY", "is", "ABOVE", "the", "first", "construction", "node" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/datalog/impl/IQ2DatalogTranslatorImpl.java#L229-L236
120,488
ontop/ontop
mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/AbstractTurtleOBDAParser.java
AbstractTurtleOBDAParser.parse
@Override public ImmutableList<TargetAtom> parse(String input) throws TargetQueryParserException { StringBuffer bf = new StringBuffer(input.trim()); if (!bf.substring(bf.length() - 2, bf.length()).equals(" .")) { bf.insert(bf.length() - 1, ' '); } if (!prefixes.isEmpty()) { // Update the input by appendi...
java
@Override public ImmutableList<TargetAtom> parse(String input) throws TargetQueryParserException { StringBuffer bf = new StringBuffer(input.trim()); if (!bf.substring(bf.length() - 2, bf.length()).equals(" .")) { bf.insert(bf.length() - 1, ' '); } if (!prefixes.isEmpty()) { // Update the input by appendi...
[ "@", "Override", "public", "ImmutableList", "<", "TargetAtom", ">", "parse", "(", "String", "input", ")", "throws", "TargetQueryParserException", "{", "StringBuffer", "bf", "=", "new", "StringBuffer", "(", "input", ".", "trim", "(", ")", ")", ";", "if", "(",...
Returns the CQIE object from the input string. If the input prefix manager is null then no directive header will be appended. @param input A target query string written in Turtle syntax. @return A CQIE object.
[ "Returns", "the", "CQIE", "object", "from", "the", "input", "string", ".", "If", "the", "input", "prefix", "manager", "is", "null", "then", "no", "directive", "header", "will", "be", "appended", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/AbstractTurtleOBDAParser.java#L71-L99
120,489
ontop/ontop
mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/AbstractTurtleOBDAParser.java
AbstractTurtleOBDAParser.appendDirectives
private void appendDirectives(StringBuffer query) { StringBuffer sb = new StringBuffer(); for (String prefix : prefixes.keySet()) { sb.append("@PREFIX"); sb.append(" "); sb.append(prefix); sb.append(" "); sb.append("<"); sb.append(prefixes.get(prefix)); sb.append(">"); sb.append(" .\n"); }...
java
private void appendDirectives(StringBuffer query) { StringBuffer sb = new StringBuffer(); for (String prefix : prefixes.keySet()) { sb.append("@PREFIX"); sb.append(" "); sb.append(prefix); sb.append(" "); sb.append("<"); sb.append(prefixes.get(prefix)); sb.append(">"); sb.append(" .\n"); }...
[ "private", "void", "appendDirectives", "(", "StringBuffer", "query", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "String", "prefix", ":", "prefixes", ".", "keySet", "(", ")", ")", "{", "sb", ".", "append", "(", ...
The turtle syntax predefines the quest, rdf, rdfs and owl prefixes. Adds directives to the query header from the PrefixManager.
[ "The", "turtle", "syntax", "predefines", "the", "quest", "rdf", "rdfs", "and", "owl", "prefixes", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/core/src/main/java/it/unibz/inf/ontop/spec/mapping/parser/impl/AbstractTurtleOBDAParser.java#L106-L124
120,490
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/MappingManagerPanel.java
MappingManagerPanel.parseSearchString
private List<TreeModelFilter<SQLPPTriplesMap>> parseSearchString(String textToParse) throws Exception { List<TreeModelFilter<SQLPPTriplesMap>> listOfFilters = null; if (textToParse != null) { ANTLRStringStream inputStream = new ANTLRStringStream(textToParse); MappingFilterLexer lexer = new MappingFilterLexe...
java
private List<TreeModelFilter<SQLPPTriplesMap>> parseSearchString(String textToParse) throws Exception { List<TreeModelFilter<SQLPPTriplesMap>> listOfFilters = null; if (textToParse != null) { ANTLRStringStream inputStream = new ANTLRStringStream(textToParse); MappingFilterLexer lexer = new MappingFilterLexe...
[ "private", "List", "<", "TreeModelFilter", "<", "SQLPPTriplesMap", ">", ">", "parseSearchString", "(", "String", "textToParse", ")", "throws", "Exception", "{", "List", "<", "TreeModelFilter", "<", "SQLPPTriplesMap", ">>", "listOfFilters", "=", "null", ";", "if", ...
Parses the string in the search field. @param textToParse The target text @return A list of filter objects or null if the string was empty or erroneous
[ "Parses", "the", "string", "in", "the", "search", "field", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/MappingManagerPanel.java#L719-L736
120,491
ontop/ontop
client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/MappingManagerPanel.java
MappingManagerPanel.applyFilters
private void applyFilters(List<TreeModelFilter<SQLPPTriplesMap>> filters) { FilteredModel model = (FilteredModel) mappingList.getModel(); model.removeAllFilters(); model.addFilters(filters); }
java
private void applyFilters(List<TreeModelFilter<SQLPPTriplesMap>> filters) { FilteredModel model = (FilteredModel) mappingList.getModel(); model.removeAllFilters(); model.addFilters(filters); }
[ "private", "void", "applyFilters", "(", "List", "<", "TreeModelFilter", "<", "SQLPPTriplesMap", ">", ">", "filters", ")", "{", "FilteredModel", "model", "=", "(", "FilteredModel", ")", "mappingList", ".", "getModel", "(", ")", ";", "model", ".", "removeAllFilt...
This function add the list of current filters to the model and then the Tree is refreshed shows the mappings after the filters have been applied.
[ "This", "function", "add", "the", "list", "of", "current", "filters", "to", "the", "model", "and", "then", "the", "Tree", "is", "refreshed", "shows", "the", "mappings", "after", "the", "filters", "have", "been", "applied", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/client/protege/src/main/java/it/unibz/inf/ontop/protege/panels/MappingManagerPanel.java#L742-L746
120,492
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/dbschema/UniqueConstraint.java
Builder.add
public Builder add(Attribute attribute) { if (relation != attribute.getRelation()) throw new IllegalArgumentException("Unique Key requires the same table in all attributes: " + relation + " " + attribute); builder.add(attribute); return this; }
java
public Builder add(Attribute attribute) { if (relation != attribute.getRelation()) throw new IllegalArgumentException("Unique Key requires the same table in all attributes: " + relation + " " + attribute); builder.add(attribute); return this; }
[ "public", "Builder", "add", "(", "Attribute", "attribute", ")", "{", "if", "(", "relation", "!=", "attribute", ".", "getRelation", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"Unique Key requires the same table in all attributes: \"", "+", "relat...
adds an attribute to the UNIQUE constraint @param attribute @return
[ "adds", "an", "attribute", "to", "the", "UNIQUE", "constraint" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/dbschema/UniqueConstraint.java#L66-L72
120,493
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java
LeftJoinNodeImpl.getPossibleVariableDefinitions
@Override public ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions(IQTree leftChild, IQTree rightChild) { ImmutableSet<ImmutableSubstitution<NonVariableTerm>> leftDefs = leftChild.getPossibleVariableDefinitions(); ImmutableSet<Variable> rightSpecificVariables = Set...
java
@Override public ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions(IQTree leftChild, IQTree rightChild) { ImmutableSet<ImmutableSubstitution<NonVariableTerm>> leftDefs = leftChild.getPossibleVariableDefinitions(); ImmutableSet<Variable> rightSpecificVariables = Set...
[ "@", "Override", "public", "ImmutableSet", "<", "ImmutableSubstitution", "<", "NonVariableTerm", ">", ">", "getPossibleVariableDefinitions", "(", "IQTree", "leftChild", ",", "IQTree", "rightChild", ")", "{", "ImmutableSet", "<", "ImmutableSubstitution", "<", "NonVariabl...
Returns possible definitions for left and right-specific variables.
[ "Returns", "possible", "definitions", "for", "left", "and", "right", "-", "specific", "variables", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java#L200-L220
120,494
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java
LeftJoinNodeImpl.selectDownSubstitution
private ImmutableSubstitution<NonFunctionalTerm> selectDownSubstitution( ImmutableSubstitution<NonFunctionalTerm> simplificationSubstitution, ImmutableSet<Variable> rightVariables) { ImmutableMap<Variable, NonFunctionalTerm> newMap = simplificationSubstitution.getImmutableMap().entrySet().stream() ...
java
private ImmutableSubstitution<NonFunctionalTerm> selectDownSubstitution( ImmutableSubstitution<NonFunctionalTerm> simplificationSubstitution, ImmutableSet<Variable> rightVariables) { ImmutableMap<Variable, NonFunctionalTerm> newMap = simplificationSubstitution.getImmutableMap().entrySet().stream() ...
[ "private", "ImmutableSubstitution", "<", "NonFunctionalTerm", ">", "selectDownSubstitution", "(", "ImmutableSubstitution", "<", "NonFunctionalTerm", ">", "simplificationSubstitution", ",", "ImmutableSet", "<", "Variable", ">", "rightVariables", ")", "{", "ImmutableMap", "<"...
Selects the entries that can be applied to the right child. Useful when there is an equality between two variables defined on the right (otherwise would not converge)
[ "Selects", "the", "entries", "that", "can", "be", "applied", "to", "the", "right", "child", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java#L572-L578
120,495
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java
LeftJoinNodeImpl.containsEqualityRightSpecificVariable
private boolean containsEqualityRightSpecificVariable( ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, IQTree leftChild, IQTree rightChild) { ImmutableSet<Variable> leftVariables = leftChild.getVariables(); ImmutableSet<Variable> rightVariables = ri...
java
private boolean containsEqualityRightSpecificVariable( ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, IQTree leftChild, IQTree rightChild) { ImmutableSet<Variable> leftVariables = leftChild.getVariables(); ImmutableSet<Variable> rightVariables = ri...
[ "private", "boolean", "containsEqualityRightSpecificVariable", "(", "ImmutableSubstitution", "<", "?", "extends", "VariableOrGroundTerm", ">", "descendingSubstitution", ",", "IQTree", "leftChild", ",", "IQTree", "rightChild", ")", "{", "ImmutableSet", "<", "Variable", ">"...
Returns true when an equality between a right-specific and a term that is not a fresh variable is propagated down through a substitution.
[ "Returns", "true", "when", "an", "equality", "between", "a", "right", "-", "specific", "and", "a", "term", "that", "is", "not", "a", "fresh", "variable", "is", "propagated", "down", "through", "a", "substitution", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/LeftJoinNodeImpl.java#L831-L847
120,496
ontop/ontop
core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/OrderByNodeImpl.java
OrderByNodeImpl.liftChildConstructionNode
private IQTree liftChildConstructionNode(ConstructionNode newChildRoot, UnaryIQTree newChild, IQProperties liftedProperties) { UnaryIQTree newOrderByTree = iqFactory.createUnaryIQTree( applySubstitution(newChildRoot.getSubstitution()), newChild.getChild(), lifted...
java
private IQTree liftChildConstructionNode(ConstructionNode newChildRoot, UnaryIQTree newChild, IQProperties liftedProperties) { UnaryIQTree newOrderByTree = iqFactory.createUnaryIQTree( applySubstitution(newChildRoot.getSubstitution()), newChild.getChild(), lifted...
[ "private", "IQTree", "liftChildConstructionNode", "(", "ConstructionNode", "newChildRoot", ",", "UnaryIQTree", "newChild", ",", "IQProperties", "liftedProperties", ")", "{", "UnaryIQTree", "newOrderByTree", "=", "iqFactory", ".", "createUnaryIQTree", "(", "applySubstitution...
Lifts the construction node above and updates the order comparators
[ "Lifts", "the", "construction", "node", "above", "and", "updates", "the", "order", "comparators" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/model/src/main/java/it/unibz/inf/ontop/iq/node/impl/OrderByNodeImpl.java#L69-L77
120,497
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java
PushUpBooleanExpressionOptimizerImpl.pushAboveUnions
private IntermediateQuery pushAboveUnions(IntermediateQuery query) throws EmptyQueryException { boolean fixPointReached; do { fixPointReached = true; for (QueryNode node : query.getNodesInTopDownOrder()) { if (node instanceof UnionNode) { Optio...
java
private IntermediateQuery pushAboveUnions(IntermediateQuery query) throws EmptyQueryException { boolean fixPointReached; do { fixPointReached = true; for (QueryNode node : query.getNodesInTopDownOrder()) { if (node instanceof UnionNode) { Optio...
[ "private", "IntermediateQuery", "pushAboveUnions", "(", "IntermediateQuery", "query", ")", "throws", "EmptyQueryException", "{", "boolean", "fixPointReached", ";", "do", "{", "fixPointReached", "=", "true", ";", "for", "(", "QueryNode", "node", ":", "query", ".", ...
Can be optimized by reducing after each iteration the set of union nodes to be reviewed
[ "Can", "be", "optimized", "by", "reducing", "after", "each", "iteration", "the", "set", "of", "union", "nodes", "to", "be", "reviewed" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java#L109-L125
120,498
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java
PushUpBooleanExpressionOptimizerImpl.getExpressionsToPropagateAboveUnion
private ImmutableSet<ImmutableExpression> getExpressionsToPropagateAboveUnion(ImmutableSet<CommutativeJoinOrFilterNode> providers) { return providers.stream() .map(n -> n.getOptionalFilterCondition().get().flattenAND()) .reduce(this::computeIntersection).get(); }
java
private ImmutableSet<ImmutableExpression> getExpressionsToPropagateAboveUnion(ImmutableSet<CommutativeJoinOrFilterNode> providers) { return providers.stream() .map(n -> n.getOptionalFilterCondition().get().flattenAND()) .reduce(this::computeIntersection).get(); }
[ "private", "ImmutableSet", "<", "ImmutableExpression", ">", "getExpressionsToPropagateAboveUnion", "(", "ImmutableSet", "<", "CommutativeJoinOrFilterNode", ">", "providers", ")", "{", "return", "providers", ".", "stream", "(", ")", ".", "map", "(", "n", "->", "n", ...
Returns the boolean conjuncts shared by all providers.
[ "Returns", "the", "boolean", "conjuncts", "shared", "by", "all", "providers", "." ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java#L349-L353
120,499
ontop/ontop
core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java
PushUpBooleanExpressionOptimizerImpl.adjustProposal
private Optional<PushUpBooleanExpressionProposal> adjustProposal(PushUpBooleanExpressionProposal proposal, IntermediateQuery query) { QueryNode currentNode = proposal.getUpMostPropagatingNode(); Optional<QueryNode> optChild; // Will be...
java
private Optional<PushUpBooleanExpressionProposal> adjustProposal(PushUpBooleanExpressionProposal proposal, IntermediateQuery query) { QueryNode currentNode = proposal.getUpMostPropagatingNode(); Optional<QueryNode> optChild; // Will be...
[ "private", "Optional", "<", "PushUpBooleanExpressionProposal", ">", "adjustProposal", "(", "PushUpBooleanExpressionProposal", "proposal", ",", "IntermediateQuery", "query", ")", "{", "QueryNode", "currentNode", "=", "proposal", ".", "getUpMostPropagatingNode", "(", ")", "...
If the expression was blocked by a union or the root of the query
[ "If", "the", "expression", "was", "blocked", "by", "a", "union", "or", "the", "root", "of", "the", "query" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/core/optimization/src/main/java/it/unibz/inf/ontop/iq/optimizer/impl/PushUpBooleanExpressionOptimizerImpl.java#L356-L399