Package org.semanticweb.owlapi.util

Examples of org.semanticweb.owlapi.util.BidirectionalShortFormProviderAdapter


        String expression = "yearValue some ";
        OWLOntology wine = loadOntologyFromString(onto);
        Set<OWLOntology> ontologies = m.getOntologies();
        ShortFormProvider sfp = new ManchesterOWLSyntaxPrefixNameShortFormProvider(
                wine.getOWLOntologyManager().getOntologyFormat(wine));
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                ontologies, sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(expression);
        parser.setDefaultOntology(wine);
        parser.setOWLEntityChecker(new ShortFormEntityChecker(shortFormProvider));
View Full Code Here


        m.addAxiom(o, annotation(dateTime, "dateTime"));
        // select a short form provider that uses annotations
        ShortFormProvider sfp = new AnnotationValueShortFormProvider(
                Arrays.asList(df.getRDFSLabel()),
                Collections.<OWLAnnotationProperty, List<String>> emptyMap(), m);
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                m.getOntologies(), sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(text1);
        ShortFormEntityChecker owlEntityChecker = new ShortFormEntityChecker(
                shortFormProvider);
View Full Code Here

        m.addAxiom(o, df.getOWLSubClassOfAxiom(expected, d));
        // select a short form provider that uses annotations
        ShortFormProvider sfp = new AnnotationValueShortFormProvider(
                Arrays.asList(df.getRDFSLabel()),
                Collections.<OWLAnnotationProperty, List<String>> emptyMap(), m);
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                m.getOntologies(), sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(text1);
        ShortFormEntityChecker owlEntityChecker = new ShortFormEntityChecker(
                shortFormProvider);
View Full Code Here

        m.addAxiom(o, annotation(p, "p"));
        // select a short form provider that uses annotations
        ShortFormProvider sfp = new AnnotationValueShortFormProvider(
                Arrays.asList(df.getRDFSLabel()),
                Collections.<OWLAnnotationProperty, List<String>> emptyMap(), m);
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                m.getOntologies(), sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(text1);
        ShortFormEntityChecker owlEntityChecker = new ShortFormEntityChecker(
                shortFormProvider);
View Full Code Here

        m.addAxiom(o, df.getOWLSubClassOfAxiom(expected, d));
        // select a short form provider that uses annotations
        ShortFormProvider sfp = new AnnotationValueShortFormProvider(
                Arrays.asList(df.getRDFSLabel()),
                Collections.<OWLAnnotationProperty, List<String>> emptyMap(), m);
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                m.getOntologies(), sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(text1);
        ShortFormEntityChecker owlEntityChecker = new ShortFormEntityChecker(
                shortFormProvider);
View Full Code Here

        m.addAxiom(o, df.getOWLDeclarationAxiom(b));
        // select a short form provider that uses annotations
        ShortFormProvider sfp = new AnnotationValueShortFormProvider(
                Arrays.asList(df.getRDFSLabel()),
                Collections.<OWLAnnotationProperty, List<String>> emptyMap(), m);
        BidirectionalShortFormProvider shortFormProvider = new BidirectionalShortFormProviderAdapter(
                m.getOntologies(), sfp);
        ManchesterOWLSyntaxParser parser = OWLManager.createManchesterParser();
        parser.setStringToParse(in);
        ShortFormEntityChecker owlEntityChecker = new ShortFormEntityChecker(
                shortFormProvider);
View Full Code Here

        OWLOntologyManager manager = rootOntology.getOWLOntologyManager();
        Set<OWLOntology> importsClosure = rootOntology.getImportsClosure();
        // Create a bidirectional short form provider to do the actual mapping.
        // It will generate names using the input
        // short form provider.
        bidiShortFormProvider = new BidirectionalShortFormProviderAdapter(
                manager, importsClosure, shortFormProvider);
    }
View Full Code Here

  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;
View Full Code Here

            for (OWLOntology auxOnt : auxiliaryOntologies) {
                ontologies.addAll(auxOnt.getImportsClosure());
            }
        }
        ShortFormEntityChecker defaultInstance = new ShortFormEntityChecker(
                new BidirectionalShortFormProviderAdapter(manager, ontologies,
                        shortFormProvider));
        entityChecker = new AdvancedEntityChecker(defaultInstance, ontologies,
                inputOntology.getOWLOntologyManager());
    }
View Full Code Here

    private ReadWriteLock readWriteLock = new ReentrantReadWriteLock();

    public WebProtegeBidirectionalShortFormProvider(OWLAPIProject project) {
        this.project = project;
        final Set<OWLOntology> importsClosure = project.getRootOntology().getImportsClosure();
        delegate = new BidirectionalShortFormProviderAdapter(importsClosure, new WebProtegeShortFormProvider(project)) {
            @Override
            public void remove(OWLEntity entity) {
                if (!entity.isBuiltIn()) {
                    super.remove(entity);
                }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.util.BidirectionalShortFormProviderAdapter

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.