Package org.apache.stanbol.commons.jsonld

Examples of org.apache.stanbol.commons.jsonld.JsonLdProfile.addType()


    public void testToSQLFromProfile() throws Exception {
        DerbyFactStore fs = new DerbyFactStore();
        JsonLdProfile jsonLd = new JsonLdProfile();
        jsonLd.addNamespacePrefix("http://iks-project.eu/ont/", "iks");
       
        jsonLd.addType("person", "iks:person");
        jsonLd.addType("organization", "iks:organization");
       
        String profile = "http://iks-project.eu/ont/employeeOf";
        String profileB64 = Base64.encodeBase64URLSafeString(profile.getBytes());
       
View Full Code Here


        DerbyFactStore fs = new DerbyFactStore();
        JsonLdProfile jsonLd = new JsonLdProfile();
        jsonLd.addNamespacePrefix("http://iks-project.eu/ont/", "iks");
       
        jsonLd.addType("person", "iks:person");
        jsonLd.addType("organization", "iks:organization");
       
        String profile = "http://iks-project.eu/ont/employeeOf";
        String profileB64 = Base64.encodeBase64URLSafeString(profile.getBytes());
       
        String expected = "CREATE TABLE aHR0cDovL2lrcy1wcm9qZWN0LmV1L29udC9lbXBsb3llZU9m (id INT GENERATED ALWAYS AS IDENTITY, context_id INT NOT NULL CONSTRAINT aHR0cDovL2lrcy1wcm9qZWN0LmV1L29udC9lbXBsb3llZU9m_foreign_key REFERENCES factcontexts ON DELETE CASCADE ON UPDATE RESTRICT, person VARCHAR(1024), organization VARCHAR(1024))";
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.