Package org.coode.owlapi.manchesterowlsyntax

Examples of org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser$ClassHasKeyListItemParser


   
    return newowlclass;   
  }
 
  public OWLClassExpression runManchesterQuery(String manchesterQuery) throws ManchesterQueryException{
    ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(manager.getOWLDataFactory(), manchesterQuery);
        parser.setDefaultOntology(oldOntology);
        ShortFormProvider shortFormProvider = new SimpleShortFormProvider();
        Set<OWLOntology> importsClosure = oldOntology.getImportsClosure();
        BidirectionalShortFormProvider bidiShortFormProvider = new BidirectionalShortFormProviderAdapter(manager, importsClosure, shortFormProvider);
        // Specify an entity checker that wil be used to check a class expression contains the correct names.
        OWLEntityChecker entityChecker = new ShortFormEntityChecker(bidiShortFormProvider);
        parser.setOWLEntityChecker(entityChecker);

        OWLClassExpression classExp=null;
        try {
            classExp = parser.parseClassExpression();
        } catch (ParserException e) {
          e.printStackTrace();
          throw new ManchesterQueryException("Invalid manchester query",e.getMessage());          
        }
    return classExp;
View Full Code Here


            // models of the ontology)
            boolean consistent = reasoner.isConsistent();
            System.out.println("Consistent: " + consistent);
            System.out.println("\n");

            ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(manager.getOWLDataFactory(), "Class PotableLiquid" );
            //parser.setOWLEntityChecker(new ManchesterOWLSyntaxEditorParser.DefaultEntityChecker());
            parser.setBase( LOGICAL_URI );
            try {
                OWLClassExpression descr = parser.parseClassExpression();
                System.out.println( descr.toString() );
            }
            catch (ParserException e) {
                e.printStackTrace();
            }
View Full Code Here

                    else if( !(name3 instanceof OWLIndividual) ) {
                      throw new PelletCmdException( "Not a defined individual: " + names[2] );
                    }
        }
        else {
          ManchesterOWLSyntaxEditorParser parser = new ManchesterOWLSyntaxEditorParser(
              loader.getManager().getOWLDataFactory(), names[2] );
          try {
            name3 = parser.parseConstant();
          } catch( ParserException e ) {
            throw new PelletCmdException( "Not a valid literal: " + names[2] );
          }
        }
View Full Code Here

TOP

Related Classes of org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser$ClassHasKeyListItemParser

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.