Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.SWRLAtom


    private List<SWRLAtom> parseRuleAtoms() {
        String sep = COMMA.keyword();
        List<SWRLAtom> atoms = new ArrayList<>();
        while (COMMA.matches(sep)) {
            potentialKeywords.remove(COMMA);
            SWRLAtom atom = parseRuleAtom();
            atoms.add(atom);
            sep = peekToken();
            if (COMMA.matches(sep)) {
                consumeToken();
            }
View Full Code Here


    OWLAxiom axiom;

    @Before
    public void setUp() {
        SWRLVariable x = df.getSWRLVariable(IRI(NS + "#x"));
        SWRLAtom atom1 = df.getSWRLClassAtom(a, x);
        SWRLAtom atom2 = df.getSWRLClassAtom(b, x);
        Set<SWRLAtom> consequent = new TreeSet<>();
        consequent.add(atom1);
        OWLAnnotation annotation = df.getOWLAnnotation(RDFSComment(),
                Literal("Not a great rule"));
        Set<OWLAnnotation> annotations = new TreeSet<>();
View Full Code Here

    // Rules
    //
    // ////////////////////////////////////////////////////////////////////////////////////////////////////////////
    final public SWRLRule DLSafeRule() throws ParseException {
        Set<OWLAnnotation> annos;
        SWRLAtom atom;
        Set<SWRLAtom> body;
        Set<SWRLAtom> head;
        jj_consume_token(DLSAFERULE);
        jj_consume_token(OPENPAR);
        annos = AxiomAnnotationSet();
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public SWRLAtom Atom() throws ParseException {
        SWRLAtom atom;
        switch (jj_ntk == -1 ? jj_ntk_f() : jj_ntk) {
            case CLASSATOM: {
                atom = ClassAtom();
                break;
            }
View Full Code Here

        ExpressionAtom argument1 = tmp.getArgument1();
        ExpressionAtom argument2 = tmp.getArgument2();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument1, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(argument2, SWRLRule.class);

        SWRLDArgument swrldArgument1;
        SWRLDArgument swrldArgument2;

        List<SWRLAtom> listOfArguments = new ArrayList<SWRLAtom>();
View Full Code Here

        ExpressionAtom argument1 = tmp.getStringFunctionAtom1();
        ExpressionAtom argument2 = tmp.getStringFunctionAtom2();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument1, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(argument2, SWRLRule.class);

        SWRLDArgument swrldArgument1;
        SWRLDArgument swrldArgument2;

        List<SWRLAtom> listOfArguments = new ArrayList<SWRLAtom>();
View Full Code Here

        ExpressionAtom argument1 = tmp.getNumericFunctionAtom1();
        ExpressionAtom argument2 = tmp.getNumericFunctionAtom2();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument1, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(argument2, SWRLRule.class);

        SWRLDArgument swrldArgument1 = factory.getSWRLVariable(IRI.create(Symbols.variablesPrefix
                                                                          + mul_result));
        SWRLDArgument swrldArgument2;
        SWRLDArgument swrldArgument3;
View Full Code Here

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        IObjectAtom classResource = tmp.getClassResource();
        IObjectAtom argument = tmp.getArgument1();

        SWRLAtom classResourceAtom = (SWRLAtom) adapter.adaptTo(classResource, SWRLRule.class);
        SWRLAtom argumentAtom = (SWRLAtom) adapter.adaptTo(argument, SWRLRule.class);

        OWLClass classPredicate;
        SWRLIArgument argumentResource;

        if (classResourceAtom instanceof ArgumentSWRLAtom) {
View Full Code Here

        NumericFunctionAtom start = tmp.getStart();
        NumericFunctionAtom length = tmp.getLength();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom stringFunctionAtom = (SWRLAtom) adapter.adaptTo(stringFunction, SWRLRule.class);
        SWRLAtom startAtom = (SWRLAtom) adapter.adaptTo(start, SWRLRule.class);
        SWRLAtom lengthAtom = (SWRLAtom) adapter.adaptTo(length, SWRLRule.class);

        SWRLDArgument retArgument = factory.getSWRLVariable(IRI.create(Symbols.variablesPrefix
                                                                       + substring_result));
        ;
        SWRLDArgument stringArgument;
View Full Code Here

        ExpressionAtom argument = tmp.getArgument();
        ExpressionAtom term = tmp.getTerm();

        OWLDataFactory factory = OWLManager.getOWLDataFactory();

        SWRLAtom swrlAtom1 = (SWRLAtom) adapter.adaptTo(argument, SWRLRule.class);
        SWRLAtom swrlAtom2 = (SWRLAtom) adapter.adaptTo(term, SWRLRule.class);

        SWRLDArgument swrldArgument1;
        SWRLDArgument swrldArgument2;

        List<SWRLAtom> listOfArguments = new ArrayList<SWRLAtom>();
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.SWRLAtom

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.