Package org.apache.marmotta.commons.sesame.facading.foaf.model

Examples of org.apache.marmotta.commons.sesame.facading.foaf.model.OnlineAccount


            for (OnlineAccount account : hans_meier.getOnlineAccounts()) {
                Assert.assertNotNull(account);
                final Resource accountRSC = account.getDelegate();
                Assert.assertNotNull(accountRSC);

                final OnlineAccount oa = facading.createFacade(accountRSC, OnlineAccount.class);
                Assert.assertNotNull(oa);

                Assert.assertEquals(hans_meier, oa.getHolder());
            }

        } finally {
            connection.close();
        }
View Full Code Here


            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();

            Assert.assertThat(person.getOnlineAccounts(), CoreMatchers.hasItem(account));
View Full Code Here

        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"));
            Assert.assertThat(account.getChatId(), hasItems("bar", "foo"));
        } finally {
            connection.close();
        }
    }
View Full Code Here

            for (OnlineAccount account : hans_meier.getOnlineAccounts()) {
                Assert.assertNotNull(account);
                final Resource accountRSC = account.getDelegate();
                Assert.assertNotNull(accountRSC);

                final OnlineAccount oa = facading.createFacade(accountRSC, OnlineAccount.class);
                Assert.assertNotNull(oa);

                Assert.assertEquals(hans_meier, oa.getHolder());
            }

        } finally {
            connection.close();
        }
View Full Code Here

            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();

            Assert.assertThat(person.getOnlineAccounts(), CoreMatchers.hasItem(account));
View Full Code Here

        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"));
            Assert.assertThat(account.getChatId(), hasItems("bar", "foo"));
        } finally {
            connection.close();
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.commons.sesame.facading.foaf.model.OnlineAccount

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.