Examples of JsonLdIRI


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

                        String comparedRole = (String)compareValues.keySet().iterator().next();
                        String searchedValue = null;
                       
                        Object searchedValueObj = compareValues.get(comparedRole);
                        if (searchedValueObj instanceof JsonLdIRI) {
                            JsonLdIRI iri = (JsonLdIRI) searchedValueObj;
                            searchedValue = jsonLd.unCURIE(iri.getIRI());
                        }
                        else {
                            searchedValue = searchedValueObj.toString();
                        }
                       
View Full Code Here

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

        jsonLd.addNamespacePrefix("http://iks-project.eu/ont/", "iks");
        jsonLd.addNamespacePrefix("http://upb.de/persons/", "upb");
       
        JsonLdResource factResource = new JsonLdResource();
        factResource.setProfile("iks:employeeOf");
        factResource.putProperty("person", new JsonLdIRI("upb:bnagel"));
        factResource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(factResource);
       
        Fact fact = Fact.factFromJsonLd(jsonLd);
        assertEquals("http://iks-project.eu/ont/employeeOf", fact.getFactSchemaURN());
        assertEquals(2, fact.getRoles().size());
View Full Code Here

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

        jsonLd.addNamespacePrefix("http://upb.de/persons/", "upb");
       
        JsonLdResource fact1Resource = new JsonLdResource();
        fact1Resource.setSubject("fact1");
        fact1Resource.setProfile("iks:employeeOf");
        fact1Resource.putProperty("person", new JsonLdIRI("upb:bnagel"));
        fact1Resource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(fact1Resource);

        JsonLdResource fact2Resource = new JsonLdResource();
        fact2Resource.setSubject("fact2");
        fact2Resource.setProfile("iks:employeeOf");
        fact2Resource.putProperty("person", new JsonLdIRI("upb:fchrist"));
        fact2Resource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(fact2Resource);
       
        Fact fact = Fact.factFromJsonLd(jsonLd);
        assertNull(fact);
    }
View Full Code Here

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

        jsonLd.addNamespacePrefix("http://upb.de/persons/", "upb");
       
        JsonLdResource fact1Resource = new JsonLdResource();
        fact1Resource.setSubject("fact1");
        fact1Resource.setProfile("iks:employeeOf");
        fact1Resource.putProperty("person", new JsonLdIRI("upb:bnagel"));
        fact1Resource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(fact1Resource);

        JsonLdResource fact2Resource = new JsonLdResource();
        fact2Resource.setSubject("fact2");
        fact2Resource.setProfile("iks:employeeOf");
        fact2Resource.putProperty("person", new JsonLdIRI("upb:fchrist"));
        fact2Resource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(fact2Resource);
       
        Set<Fact> facts = Fact.factsFromJsonLd(jsonLd);
        assertNotNull(facts);
        assertEquals(2, facts.size());
View Full Code Here

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

        jsonLd.addNamespacePrefix("http://upb.de/persons/", "upb");
       
        JsonLdResource fact1Resource = new JsonLdResource();
        fact1Resource.setSubject("fact1");
        fact1Resource.setProfile("iks:employeeOf");
        fact1Resource.putProperty("person", new JsonLdIRI("upb:bnagel"));
        fact1Resource.putProperty("organization", new JsonLdIRI("http://uni-paderborn.de"));
        jsonLd.put(fact1Resource);

        JsonLdResource fact2Resource = new JsonLdResource();
        fact2Resource.setSubject("fact2");
        fact2Resource.setProfile("iks:friendOf");
        fact2Resource.putProperty("person", new JsonLdIRI("upb:bnagel"));
        fact2Resource.putProperty("friend", new JsonLdIRI("upb:fchrist"));
        jsonLd.put(fact2Resource);
       
        Set<Fact> facts = Fact.factsFromJsonLd(jsonLd);
        assertNotNull(facts);
        assertEquals(2, facts.size());
View Full Code Here

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

        select.add("person");
        subject.putProperty("select", select);
        subject.putProperty("from", "iks:employeeOf");

        Map<String, Object> orga = new HashMap<String, Object>();
        orga.put("organization", new JsonLdIRI("http://upb.de"));

        Map<String, Object> eq = new HashMap<String, Object>();
        eq.put("=", orga);
       
        List<Object> where = new ArrayList<Object>();
View Full Code Here

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

        select.add("person");
        subject.putProperty("select", select);
        subject.putProperty("from", "iks:employeeOf");

        Map<String, Object> orga = new HashMap<String, Object>();
        orga.put("person", new JsonLdIRI("upb:fchrist"));

        Map<String, Object> eq = new HashMap<String, Object>();
        eq.put("=", orga);
       
        List<Object> where = new ArrayList<Object>();
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.