Package uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer

Examples of uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxOWLObjectRendererImpl


        try {
            DefaultPrefixManager pm = new DefaultPrefixManager("http://protege.cim3.net/file/pub/ontologies/tambis/tambis-full.owl#");
            SimpleShortFormProvider sfp = new SimpleShortFormProvider();
//            SimpleRenderer ren = new SimpleRenderer();
            ManchesterOWLSyntaxOWLObjectRendererImpl ren = new ManchesterOWLSyntaxOWLObjectRendererImpl();
            ren.setShortFormProvider(sfp);
            ToStringRenderer.getInstance().setRenderer(ren);

            OWLOntologyManager man = OWLManager.createOWLOntologyManager();
//            OWLOntology ont = man.loadOntologyFromOntologyDocument(URI.create("http://www.co-ode.org/ontologies/pizza/pizza.owl"));
            OWLOntology ont = man.loadOntologyFromOntologyDocument(IRI.create("http://owl.cs.manchester.ac.uk/repository/download?ontology=http://protege.cim3.net/file/pub/ontologies/tambis/tambis-full.owl&format=RDF/XML"));
View Full Code Here


     * Gets the browser text for a given OWLObject.
     * @param object The object.
     * @return The browser text for the object.
     */
    public String getBrowserText(OWLObject object) {
        OWLObjectRenderer owlObjectRenderer = new ManchesterOWLSyntaxOWLObjectRendererImpl();
        if (object instanceof OWLEntity || object instanceof IRI) {
            owlObjectRenderer.setShortFormProvider(shortFormProvider);
        }
        else {
            owlObjectRenderer.setShortFormProvider(new EscapingShortFormProvider(shortFormProvider));
        }
        String browserText = owlObjectRenderer.render(object);
        if(browserText == null) {
            return NULL_BROWSER_TEXT;
        }
        return browserText;
    }
View Full Code Here

    private AnnotationPropertyComparator annotationPropertyComparator;

    public AnnotationsGroupComparator(AnnotationPropertyComparator annotationPropertyComparator, ShortFormProvider shortFormProvider) {
        this.annotationPropertyComparator = annotationPropertyComparator;
        this.shortFormProvider = shortFormProvider;
        impl = new ManchesterOWLSyntaxOWLObjectRendererImpl();
        impl.setShortFormProvider(shortFormProvider);
    }
View Full Code Here

TOP

Related Classes of uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxOWLObjectRendererImpl

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.