Package org.apache.stanbol.commons.jsonld

Examples of org.apache.stanbol.commons.jsonld.JsonLdProfile


    public List<String> getTypesOfRole(String role) {
        return this.roleMap.get(role);
    }
   
    public JsonLdProfile toJsonLdProfile() {
        JsonLdProfile profile = new JsonLdProfile();
       
        for (String role : this.roleMap.keySet()) {
            profile.addTypes(role, this.roleMap.get(role));
        }
       
        return profile;
    }
View Full Code Here


            return validationResponse;
        }

        logger.info("Request for putting new fact schema {}", factSchemaURN);

        JsonLdProfile profile = null;
        try {
            profile = JsonLdProfileParser.parseProfile(jsonLdProfileString);
        } catch (Exception e) { /* ignore this exception here - it was logged by the parser */}

        if (profile == null) {
View Full Code Here

public class DerbyFactStoreTest {

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

Related Classes of org.apache.stanbol.commons.jsonld.JsonLdProfile

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.