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

Examples of uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl


    }

    @Nonnull
    @Parameterized.Parameters
    public static Collection<Object[]> parameters() {
        OWLDataFactoryImpl noCaching = new OWLDataFactoryImpl(false, false);
        OWLDataFactoryImpl withCaching = new OWLDataFactoryImpl(true, false);
        return Arrays.asList(new Object[] { noCaching },
                new Object[] { withCaching });
    }
View Full Code Here


    @Nonnull
    private SWRLRule rule;

    @Before
    public void setUp() {
        OWLDataFactory dataFactory = new OWLDataFactoryImpl();
        PrefixManager pm = new DefaultPrefixManager(null, null,
                "http://stuff.com/A/");
        OWLClass clsA = Class("A", pm);
        OWLClass clsB = Class("B", pm);
        OWLClass clsC = Class("C", pm);
        OWLClass clsD = Class("D", pm);
        OWLClass clsE = Class("E", pm);
        SWRLVariable varA = dataFactory.getSWRLVariable(IRI
                .create("http://other.com/A/VarA"));
        SWRLVariable varB = dataFactory.getSWRLVariable(IRI
                .create("http://other.com/A/VarA"));
        SWRLVariable varC = dataFactory.getSWRLVariable(IRI
                .create("http://other.com/A/VarA"));
        body.add(dataFactory.getSWRLClassAtom(clsC, varA));
        body.add(dataFactory.getSWRLClassAtom(clsB, varB));
        body.add(dataFactory.getSWRLClassAtom(clsA, varC));
        head.add(dataFactory.getSWRLClassAtom(clsE, varA));
        head.add(dataFactory.getSWRLClassAtom(clsD, varA));
        rule = dataFactory.getSWRLRule(body, head);
    }
View Full Code Here

    private OWLOntologyManager manager;

    @Before
    public void setUp() {
        manager = new OWLOntologyManagerImpl(new OWLDataFactoryImpl());
        OWLOntologyBuilderImpl builder = new OWLOntologyBuilderImpl();
        manager.getOntologyFactories().add(
                new EmptyInMemOWLOntologyFactory(builder));
        manager.getIRIMappers().add(new NonMappingOntologyIRIMapper());
    }
View Full Code Here

    private OWLOntologyManager man;

    @Before
    public void setUp() {
        // Use the reference implementation
        man = new OWLOntologyManagerImpl(new OWLDataFactoryImpl());
        man.getOntologyStorers().add(new RDFXMLStorerFactory());
        ParsableOWLOntologyFactory factory = new ParsableOWLOntologyFactory(
                new OWLOntologyBuilderImpl());
        man.getOntologyFactories().add(factory);
    }
View Full Code Here

    protected OWLEntityChecker entityChecker;
    private ParserWrapper parser;

    @Before
    public void setUp() {
        OWLDataFactory dataFactory = new OWLDataFactoryImpl();
        OWLClass cls = mock(OWLClass.class);
        when(cls.getIRI()).thenReturn(mock(IRI.class));
        when(entityChecker.getOWLClass("C")).thenReturn(cls);
        OWLClass clsC1 = mock(OWLClass.class);
        when(clsC1.getIRI()).thenReturn(mock(IRI.class));
        when(entityChecker.getOWLClass("C1")).thenReturn(clsC1);
        OWLObjectProperty oP = mock(OWLObjectProperty.class);
        when(oP.getIRI()).thenReturn(mock(IRI.class));
        when(oP.asOWLObjectProperty()).thenReturn(oP);
        when(entityChecker.getOWLObjectProperty("oP")).thenReturn(oP);
        when(entityChecker.getOWLDataProperty("dP")).thenReturn(
                mock(OWLDataProperty.class));
        when(entityChecker.getOWLAnnotationProperty("aP")).thenReturn(
                mock(OWLAnnotationProperty.class));
        when(entityChecker.getOWLAnnotationProperty("rdfs:comment"))
                .thenReturn(dataFactory.getRDFSComment());
        OWLNamedIndividual ind = mock(OWLNamedIndividual.class);
        when(entityChecker.getOWLIndividual("ind")).thenReturn(ind);
        when(ind.asOWLNamedIndividual()).thenReturn(ind);
        parser = new ParserWrapper();
    }
View Full Code Here

        /*}
        return null;*/
    }

    public static void addEquivalentClasses(OWLOntologyManager manager, OWLOntology ontology, Set<OWLClass> clazzes) throws OWLOntologyChangeException {
        manager.addAxiom(ontology, new OWLEquivalentClassesAxiomImpl(new OWLDataFactoryImpl(), clazzes, Collections.<OWLAnnotation>emptySet()));
    }
View Full Code Here

            try {
                BinaryOWLOntologyDocumentSerializer serializer = new BinaryOWLOntologyDocumentSerializer();
                is = new BufferedInputStream(new FileInputStream(ontologyDocument));
                final Handler handler = new Handler();
                serializer.read(is, handler, new OWLDataFactoryImpl());
                OWLOntologyID id = handler.getOntologyID();
                if(!id.isAnonymous()) {
                    ontologyIDs.add(id);
                    iri2Document.put(id.getOntologyIRI(), IRI.create(ontologyDocument.toURI()));
                    if(id.getVersionIRI() != null) {
View Full Code Here

    private SuppliedNameSuffixEntityCrudKitHandler handler;

    @Before
    public void setUp() throws Exception {
        dataFactory = new OWLDataFactoryImpl();
        when(prefixSettings.getIRIPrefix()).thenReturn(PREFIX);
        when(suffixSettings.getWhiteSpaceTreatment()).thenReturn(whiteSpaceTreatment);
        when(crudContext.getDataFactory()).thenReturn(dataFactory);
        when(crudContext.getTargetOntology()).thenReturn(ontology);
        when(crudContext.getPrefixedNameExpander()).thenReturn(PrefixedNameExpander.builder().withNamespaces(Namespaces.values()).build());
View Full Code Here

        this.documentStore = documentStore;
        this.projectEventManager = EventManager.create(PROJECT_EVENT_LIFE_TIME);
        final boolean useCachingInDataFactory = false;
        final boolean useCompressionInDataFactory = false;

        OWLDataFactory df = new OWLDataFactoryImpl(useCachingInDataFactory, useCompressionInDataFactory);

        // The delegate - we use the concurrent ontology manager
        delegateManager = new ProtegeOWLOntologyManager(df);
        // We only support the binary format for speed
        delegateManager.addOntologyStorer(new BinaryOWLOntologyDocumentStorer());
View Full Code Here

    private UUIDEntityCrudKitHandler handler;

    @Before
    public void setUp() throws Exception {
        OWLDataFactoryImpl dataFactory = new OWLDataFactoryImpl();
        when(prefixSettings.getIRIPrefix()).thenReturn(PREFIX);
        when(crudContext.getDataFactory()).thenReturn(dataFactory);
        when(crudContext.getTargetOntology()).thenReturn(ontology);
        when(crudContext.getPrefixedNameExpander()).thenReturn(PrefixedNameExpander.builder().withNamespaces(Namespaces.values()).build());
        when(crudContext.getTargetLanguage()).thenReturn(Optional.<String>absent());
View Full Code Here

TOP

Related Classes of uk.ac.manchester.cs.owl.owlapi.OWLDataFactoryImpl

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.