Package org.apache.marmotta.ldpath.backend.sesame

Examples of org.apache.marmotta.ldpath.backend.sesame.SesameConnectionBackend


        try {
            RepositoryConnection con = sesameService.getConnection();
            try {
                con.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(con);
                for(SelectorFunction<Value> function : ldPathService.getFunctions()) {
                    Map<String,String> fmap = new HashMap<String, String>();
                    fmap.put("name", function.getPathExpression(backend));
                    fmap.put("signature",function.getSignature());
                    fmap.put("description",function.getDescription());
View Full Code Here


    public Response getFunction(@PathParam("name") String name) {
        try {
            RepositoryConnection con = sesameService.getConnection();
            try {
                con.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(con);

                for (SelectorFunction<Value> function : ldPathService.getFunctions()) {
                    final String fName = function.getPathExpression(backend);
                    if (name.equals(fName)) {
                        Map<String, String> fmap = new HashMap<String, String>();
View Full Code Here

        } else {
            try {
                RepositoryConnection conn = sesameService.getConnection();
                try {
                    conn.begin();
                    SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);
                    config.addFunction(Constants.NS_LMF_FUNCS + function.getPathExpression(backend), function);
                } finally {
                    conn.commit();
                    conn.close();
                }
View Full Code Here

    public Collection<Value> pathQuery(Value context, String path, Map<String, String> namespaces) throws LDPathParseException {
        try {
            RepositoryConnection conn = sesameService.getConnection();
            try {
                conn.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);
                LDPath<Value> ldpath = new LDPath<Value>(backend, config);

                return ldpath.pathQuery(context, path, namespaces);
            } finally {
                conn.commit();
View Full Code Here

    public Map<String, Collection<?>> programQuery(Value context, String program) throws LDPathParseException {
        try {
            RepositoryConnection conn = sesameService.getConnection();
            try {
                conn.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);
                LDPath<Value> ldpath = new LDPath<Value>(backend, config);

                return ldpath.programQuery(context, new StringReader(program));
            } finally {
                conn.commit();
View Full Code Here

        Map<Value,  Map<String, Collection<?>>> result = new HashMap<>();
        try {
            RepositoryConnection conn = sesameService.getConnection();
            try {
                conn.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);
                LDPath<Value> ldpath = new LDPath<Value>(backend, config);

                Program<Value> p = ldpath.parseProgram(new StringReader(program));

                // TODO: not very efficient, LDPath should support more efficient listing of resources based on filter
View Full Code Here

        try {
            RepositoryConnection con = sesameService.getConnection();
            try {
                con.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(con);
                for(SelectorFunction<Value> function : ldPathService.getFunctions()) {
                    Map<String,String> fmap = new HashMap<String, String>();
                    fmap.put("name", function.getPathExpression(backend));
                    fmap.put("signature",function.getSignature());
                    fmap.put("description",function.getDescription());
View Full Code Here

    public Response getFunction(@PathParam("name") String name) {
        try {
            RepositoryConnection con = sesameService.getConnection();
            try {
                con.begin();
                SesameConnectionBackend backend = SesameConnectionBackend.withConnection(con);

                for (SelectorFunction<Value> function : ldPathService.getFunctions()) {
                    final String fName = function.getPathExpression(backend);
                    if (name.equals(fName)) {
                        Map<String, String> fmap = new HashMap<String, String>();
View Full Code Here

                if (px.equals(FUNCTION_PREFIX)) {
                    try {
                        final RepositoryConnection conn = sesameService.getConnection();
                        try {
                            conn.begin();
                            SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);

                            final Set<SelectorFunction<Value>> functions = ldPathService.getFunctions();
                            List<String> suggestions = new ArrayList<String>();
                            for (SelectorFunction<Value> fn : functions) {
                                final String fName = fn.getPathExpression(backend);
View Full Code Here

                if (px.equals(FUNCTION_PREFIX)) {
                    try {
                        final RepositoryConnection conn = sesameService.getConnection();
                        try {
                            conn.begin();
                            SesameConnectionBackend backend = SesameConnectionBackend.withConnection(conn);

                            final Set<SelectorFunction<Value>> functions = ldPathService.getFunctions();
                            List<String> suggestions = new ArrayList<String>();
                            for (SelectorFunction<Value> fn : functions) {
                                final String fName = fn.getPathExpression(backend);
View Full Code Here

TOP

Related Classes of org.apache.marmotta.ldpath.backend.sesame.SesameConnectionBackend

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.