Package org.apache.marmotta.commons.sesame.facading.api

Examples of org.apache.marmotta.commons.sesame.facading.api.Facading


    @Test
    public void testWriteInverserRDF() throws RepositoryException {
        final RepositoryConnection connection = repositoryRDF.getConnection();
        try {
            final Facading facading = FacadingFactory.createFacading(connection);

            URI p = connection.getValueFactory().createURI("http://localhost/person");
            Person person = facading.createFacade(p, Person.class);

            URI a = connection.getValueFactory().createURI("http://localhost/account");
            OnlineAccount account = facading.createFacade(a, OnlineAccount.class);

            account.setHolder(person);

            connection.commit();
View Full Code Here


    @Test
    public void testAdd() throws RepositoryException {
        final RepositoryConnection connection = repositoryRDF.getConnection();
        try {
            final Facading facading = FacadingFactory.createFacading(connection);

            URI a = connection.getValueFactory().createURI("http://localhost/account");
            OnlineAccount account = facading.createFacade(a, OnlineAccount.class);

            account.addChatId("foo");
            Assert.assertThat(account.getChatId(), hasItem("foo"));
            account.addChatId("bar");
            Assert.assertThat(account.getChatId(), hasItems("foo", "bar"));
View Full Code Here

TOP

Related Classes of org.apache.marmotta.commons.sesame.facading.api.Facading

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.