Package org.apache.stanbol.rules.adapters.sparql

Examples of org.apache.stanbol.rules.adapters.sparql.SPARQLFunction


        sb.append(sparqlFunction1);
        sb.append("/");
        sb.append(sparqlFunction2);
        sb.append(")");

        return (T) new SPARQLFunction(sb.toString());

    }
View Full Code Here


        IObjectAtom argument = tmp.getUriResource();

        SPARQLObject sparqlObject = adapter.adaptTo(argument, SPARQLObject.class);

        String sparql = "<http://jena.hpl.hp.com/ARQ/function#namespace>(" + sparqlObject.getObject() + ")";
        return (T) new SPARQLFunction(sparql);
    }
View Full Code Here

            String ns = namespaceSparqlAtom.getObject();
            String label = labelSparqlAtom.getObject();

            String sparql = "<http://www.stlab.istc.cnr.it/semion/function#propString>(" + ns + ", " + label
                            + ")";
            return (T) new SPARQLFunction(sparql);

        } catch (UnsupportedTypeForExportException e) {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
        } catch (UnavailableRuleObjectException e) {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
View Full Code Here

        if (argument.startsWith(Symbols.variablesPrefix)) {
            argument = "?" + argument.replace(Symbols.variablesPrefix, "");
        }

        String sparql = "<http://www.stlab.istc.cnr.it/semion/function#createLabel>(" + argument + ")";
        return (T) new SPARQLFunction(sparql);

    }
View Full Code Here

        }

        String sparqlUnion = " { " + scope1 + " } UNION { " + scope2 + " } ";

        return (T) new SPARQLFunction(sparqlUnion);
    }
View Full Code Here

            String length = lengthSparqlAtom.getObject();

            String sparql = "<http://www.w3.org/2005/xpath-functions#substring> (" + uriResourceString + ", "
                            + start + ", " + length + ")";

            return (T) new SPARQLFunction(sparql);

        } catch (UnsupportedTypeForExportException e) {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
        } catch (UnavailableRuleObjectException e) {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
View Full Code Here

        org.apache.stanbol.rules.manager.atoms.NumberAtom tmp = (org.apache.stanbol.rules.manager.atoms.NumberAtom) ruleAtom;

        String number = tmp.getNumber();

        return (T) new SPARQLFunction(number);
    }
View Full Code Here

        IObjectAtom argumentAtom = tmp.getUriResource();

        SPARQLObject sparqlObject = adapter.adaptTo(argumentAtom, SPARQLObject.class);

        String sparql = "str(" + sparqlObject.getObject() + ")";
        return (T) new SPARQLFunction(sparql);
    }
View Full Code Here

        org.apache.stanbol.rules.manager.atoms.NewIRIAtom tmp = (org.apache.stanbol.rules.manager.atoms.NewIRIAtom) ruleAtom;

        SPARQLObject binding = adapter.adaptTo(tmp.getBinding(), SPARQLObject.class);
        SPARQLObject variable = adapter.adaptTo(tmp.getNewNodeVariable(), SPARQLObject.class);

        SPARQLObject sparqlObject = new SPARQLFunction("BIND(" + "IRI(" + binding.getObject() + ") AS "
                                                       + variable.getObject() + ")");
        return (T) sparqlObject;

    }
View Full Code Here

        org.apache.stanbol.rules.manager.atoms.StringAtom tmp = (org.apache.stanbol.rules.manager.atoms.StringAtom) ruleAtom;

        String string = tmp.getString();

        return (T) new SPARQLFunction(string);

    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.rules.adapters.sparql.SPARQLFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.