Package com.hp.hpl.jena.sparql.syntax

Examples of com.hp.hpl.jena.sparql.syntax.ElementGroup


         * @return this query
         */
        public ComponentQuery addInputPort(String accepts) {
            if (accepts != null && !accepts.isEmpty()) {
                Node node = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasInput"), node));
                group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "accepts"), NodeFactory
                    .createURI(accepts)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here


         * @return this query
         */
        public ComponentQuery addMeasureInputPort(String relatedObject, String measure) {
            if (measure != null && !measure.isEmpty()) {
                Node node = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasInput"), node));
                if (relatedObject != null && !relatedObject.isEmpty()) {
                    group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "relatesTo"),
                        NodeFactory.createURI(ONTOLOGY_IRI + relatedObject)));
                }
                group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "accepts"), NodeFactory
                    .createURI(measure)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here

         * @return this query
         */
        public ComponentQuery addOutputPort(String provides) {
            if (provides != null && !provides.isEmpty()) {
                Node node = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasOutput"), node));
                group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "provides"), NodeFactory
                    .createURI(provides)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here

         * @return this query
         */
        public ComponentQuery addMeasureOutputPort(String relatedObject, String measure) {
            if (measure != null && !measure.isEmpty()) {
                Node node = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasOutput"), node));
                if (relatedObject != null && !relatedObject.isEmpty()) {
                    group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "relatesTo"),
                        NodeFactory.createURI(ONTOLOGY_IRI + relatedObject)));
                }
                group.addTriplePattern(new Triple(node, NodeFactory.createURI(ONTOLOGY_IRI + "provides"), NodeFactory
                    .createURI(measure)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here

         */
        public ComponentQuery addInstallationEnvironment(String environment) {
            if (environment != null && !environment.isEmpty()) {
                Node processNode = NodeFactory.createAnon();
                Node installationNode = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasSubProcess"),
                    processNode));
                group.addTriplePattern(new Triple(processNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "requiresInstallation"), installationNode));
                group.addTriplePattern(new Triple(installationNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "hasEnvironment"), NodeFactory.createURI(environment)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here

        public ComponentQuery addInstallationEnvironmentType(String environmentClass) {
            if (environmentClass != null && !environmentClass.isEmpty()) {
                Node processNode = NodeFactory.createAnon();
                Node installationNode = NodeFactory.createAnon();
                Node environmentNode = NodeFactory.createAnon();
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasSubProcess"),
                    processNode));
                group.addTriplePattern(new Triple(processNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "requiresInstallation"), installationNode));
                group.addTriplePattern(new Triple(installationNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "hasEnvironment"), environmentNode));
                group.addTriplePattern(new Triple(environmentNode, NodeFactory.createURI(TYPE_IRI), NodeFactory
                    .createURI(environmentClass)));
                query.addElement(group);
            }
            return this;
        }
View Full Code Here

         */
        private void finishMigrationPathFilter() {
            if (migrationPathTargetPattern != null && !migrationPathTargetPattern.isEmpty()) {
                Node migrationPath = NodeFactory.createAnon();
                Node toMimetype = NodeFactory.createVariable("migrationPathTarget");
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(ONTOLOGY_IRI + "migrates"),
                    migrationPath));
                group.addTriplePattern(new Triple(migrationPath, NodeFactory.createURI(TYPE_IRI), NodeFactory
                    .createURI(ONTOLOGY_IRI + "MigrationPath")));
                group.addTriplePattern(new Triple(migrationPath,
                    NodeFactory.createURI(ONTOLOGY_IRI + "targetMimetype"), toMimetype));
                query.addElement(group);
                ElementFilter filter = new ElementFilter(new E_StrContains(new ExprVar(toMimetype),
                    new NodeValueString(migrationPathTargetPattern)));
                query.addElementFilter(filter);
View Full Code Here

            if (dependencyLabelPattern != null && !dependencyLabelPattern.isEmpty()) {
                Node processNode = NodeFactory.createAnon();
                Node installationNode = NodeFactory.createAnon();
                Node dependencyNode = NodeFactory.createAnon();
                Node dependencyLabel = NodeFactory.createVariable("dependencyLabel");
                ElementGroup group = new ElementGroup();
                group.addTriplePattern(new Triple(wfNode, NodeFactory.createURI(WFDESC_IRI + "hasSubProcess"),
                    processNode));
                group.addTriplePattern(new Triple(processNode, NodeFactory.createURI(ONTOLOGY_IRI
                    + "requiresInstallation"), installationNode));
                group.addTriplePattern(new Triple(installationNode, NodeFactory.createURI(ONTOLOGY_IRI + "dependsOn"),
                    dependencyNode));
                group.addTriplePattern(new Triple(dependencyNode, NodeFactory.createURI(SKOS_LABEL), dependencyLabel));
                query.addElement(group);
                ElementFilter filter = new ElementFilter(new E_StrContains(new ExprVar(dependencyLabel),
                    new NodeValueString(dependencyLabelPattern)));
                query.addElementFilter(filter);
            }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.syntax.ElementGroup

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.