Package org.semanticweb.owlapi.util

Examples of org.semanticweb.owlapi.util.SimpleIRIShortFormProvider


public class SimpleIRIShortFormProviderTestCase {

    @Test
    public void testFragmentShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/ontology/x#A");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("A", shortForm);
    }
View Full Code Here


    }

    @Test
    public void testLastPathShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/ontology/x");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("x", shortForm);
    }
View Full Code Here

    }

    @Test
    public void testEmptyPathShortForm() {
        IRI iri = IRI("http://owl.cs.manchester.ac.uk/");
        SimpleIRIShortFormProvider sfp = new SimpleIRIShortFormProvider();
        String shortForm = sfp.getShortForm(iri);
        assertEquals("<http://owl.cs.manchester.ac.uk/>", shortForm);
    }
View Full Code Here

        String shortForm = "MyLabel";
        Ontology(m,
                AnnotationAssertion(prop, root.getIRI(), Literal(shortForm)));
        AnnotationValueShortFormProvider sfp = new AnnotationValueShortFormProvider(
                m, new SimpleShortFormProvider(),
                new SimpleIRIShortFormProvider(), props, langMap);
        sfp.setLiteralRenderer(new StringAnnotationVisitor() {

            private static final long serialVersionUID = 1L;

            @Nonnull
View Full Code Here

    private OWLObject focusedObject;

    /** default constructor */
    public DLSyntaxObjectRenderer() {
        shortFormProvider = new SimpleShortFormProvider();
        iriShortFormProvider = new SimpleIRIShortFormProvider();
        buffer = new StringBuilder();
    }
View Full Code Here

    /**
     * @param knownVocab the set of tags that are known by this generator
     */
    public OBOTagValuePairList(List<OBOVocabulary> knownVocab) {
        this.vocab = knownVocab;
        iriSFP = new SimpleIRIShortFormProvider();
    }
View Full Code Here

    private OWLObject focusedObject;

    public DLSyntaxObjectRenderer() {
        this.shortFormProvider = new SimpleShortFormProvider();
        this.iriShortFormProvider = new SimpleIRIShortFormProvider();
        this.buffer = new StringBuilder();
    }
View Full Code Here

    private OWLObject focusedObject;

    public DLSyntaxObjectRenderer() {
        this.shortFormProvider = new SimpleShortFormProvider();
        this.iriShortFormProvider = new SimpleIRIShortFormProvider();
        this.buffer = new StringBuilder();
    }
View Full Code Here

    /**
     * @param knownVocab the set of tags that are known by this generator
     */
    public OBOTagValuePairList(List<OBOVocabulary> knownVocab) {
        this.vocab = knownVocab;
        iriSFP = new SimpleIRIShortFormProvider();
    }
View Full Code Here

TOP

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

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.