Examples of applyChanges()


Examples of org.apache.tuscany.das.rdb.DAS.applyChanges()

        DataObject customer = (DataObject) root.get("CUSTOMER[1]");

        //Modify customer
        customer.set("LASTNAME", "Pavick");

        das.applyChanges(root);

        //Verify changes
        root = select.executeQuery();
        assertEquals("Pavick", root.getString("CUSTOMER[1]/LASTNAME"));
View Full Code Here

Examples of org.apache.tuscany.das.rdb.DAS.applyChanges()

        //Modify customer
        customer.set("LASTNAME", "Pavick");

        //Build apply changes command
        das.applyChanges(root);

        //Verify changes
        root = select.executeQuery();
        assertEquals("Pavick", root.getString("CUSTOMER[1]/LASTNAME"));
View Full Code Here

Examples of org.apache.tuscany.das.rdb.DAS.applyChanges()

            System.out.println("Modifying department: " + department.getString("NAME"));
            department.setString("NAME", "Dept-" + random);
            random = random + 1;
        }

        das.applyChanges(root);

    }

}
View Full Code Here

Examples of org.qi4j.spi.entitystore.EntityStoreUnitOfWork.applyChanges()

        EntityStoreUnitOfWork uow = entityStore.newUnitOfWork( usecase, module, System.currentTimeMillis() );
        try
        {
            EntityReference identityRef = EntityReference.parseEntityReference( identity );
            uow.entityStateOf( identityRef ).remove();
            uow.applyChanges().commit();
            getResponse().setStatus( Status.SUCCESS_NO_CONTENT );
        }
        catch( EntityNotFoundException e )
        {
            uow.discard();
View Full Code Here

Examples of org.semanticweb.owl.model.OWLOntologyManager.applyChanges()

          int rnd = m_random.nextInt(classes.size());
          OWLClassAssertionAxiom newAxiom = factory.getOWLClassAssertionAxiom(newIndividual(factory), classes.get(rnd));
          toAdd.add(new AddAxiom(ontology,newAxiom))
          System.out.println((i+1)+"- new axiom: "+newAxiom.toString());
        }       
        manager.applyChanges(toAdd);
        OutputStreamWriter sw = new FileWriter(new File(outputFile));
        OWLOntologyOutputTarget target = new WriterOutputTarget(sw);
        manager.saveOntology(ontology, target);
        return true;
      } catch (OWLOntologyChangeException e) {
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.applyChanges()

        // Changes needed for removal will be prepared
        for (OWLNamedIndividual ind : o.getIndividualsInSignature()) {
            ind.accept(remover);
        }
        // Now apply the changes
        m.applyChanges(remover.getChanges());
        int size = o.getIndividualsInSignature().size();
        assertTrue(previousNumberOfIndividuals + " supposed to be larger than "
                + size, previousNumberOfIndividuals > size);
    }
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.applyChanges()

        // be applied to remove all of the individuals that we have visited from
        // the pizza ontology. Notice that "batch" deletes can essentially be
        // performed - we simply visit all of the classes, properties and
        // individuals that we want to remove and then apply ALL of the changes
        // after using the entity remover to collect them
        man.applyChanges(remover.getChanges());
        // System.out.println("Number of individuals: "
        // + ont.getIndividualsInSignature().size());
        // At this point, if we wanted to reuse the entity remover, we would
        // have to reset it
        remover.reset();
View Full Code Here

Examples of org.semanticweb.owlapi.model.OWLOntologyManager.applyChanges()

                .getOWLImportsDeclaration(IRI.create(ontologyByVersion))));
        changes.add(new AddImport(ontology2, factory
                .getOWLImportsDeclaration(IRI.create(ontologyByName))));
        changes.add(new AddImport(ontology2, factory
                .getOWLImportsDeclaration(IRI.create(ontologyByOtherPath))));
        manager.applyChanges(changes);
        manager.saveOntology(ontology1, IRI.create(importsBothNameAndVersion));
        manager.saveOntology(ontology2, IRI.create(importsBothNameAndOther));
        // when
        OWLOntology o1 = m.loadOntology(IRI.create(importsBothNameAndVersion));
        OWLOntology o2 = m1.loadOntology(IRI.create(importsBothNameAndOther));
View Full Code Here

Examples of org.semanticweb.owlapitools.builders.BuilderAnnotationAssertion.applyChanges()

                .withValue(lit);
        OWLAxiom expected = df.getOWLAnnotationAssertionAxiom(ap, iri, lit,
                annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }

    @Test
View Full Code Here

Examples of org.semanticweb.owlapitools.builders.BuilderAnnotationPropertyDomain.applyChanges()

                .withAnnotations(annotations);
        OWLAxiom expected = df.getOWLAnnotationPropertyDomainAxiom(ap, iri,
                annotations);
        OWLOntology o = m.createOntology();
        // when
        builder.applyChanges(o);
        // then
        assertTrue(o.containsAxiom(expected));
    }

    @Test
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.