Package org.openrdf.model

Examples of org.openrdf.model.Value.stringValue()


        RepositoryResult<Statement> statements = getStatements(null, RDF.TYPE, vVCARD.VCard);
        while (statements.hasNext()) {
            Resource vcard = statements.next().getSubject();
            final Value fnValue = findObject(vcard, vVCARD.fn);
            Assert.assertNotNull(fnValue);
            String fn = fnValue.stringValue();
            final Value vcardValue = findObject(vcard, vVCARD.url);
            Assert.assertNotNull(vcardValue);
            String url = vcardValue.stringValue();
            final Value emailValue = findObject(vcard, vVCARD.email);
            Assert.assertNotNull(emailValue);
View Full Code Here


            final Value fnValue = findObject(vcard, vVCARD.fn);
            Assert.assertNotNull(fnValue);
            String fn = fnValue.stringValue();
            final Value vcardValue = findObject(vcard, vVCARD.url);
            Assert.assertNotNull(vcardValue);
            String url = vcardValue.stringValue();
            final Value emailValue = findObject(vcard, vVCARD.email);
            Assert.assertNotNull(emailValue);
            String mail = emailValue.stringValue();
            Assert.assertEquals("Joe Public", fn);
            Assert.assertEquals("http://example.com/", url);
View Full Code Here

            final Value vcardValue = findObject(vcard, vVCARD.url);
            Assert.assertNotNull(vcardValue);
            String url = vcardValue.stringValue();
            final Value emailValue = findObject(vcard, vVCARD.email);
            Assert.assertNotNull(emailValue);
            String mail = emailValue.stringValue();
            Assert.assertEquals("Joe Public", fn);
            Assert.assertEquals("http://example.com/", url);
            Assert.assertEquals("mailto:joe@example.com", mail);
        }
    }
View Full Code Here

            List<String> ids = limit > 0 ? new ArrayList<String>(limit) : new ArrayList<String>();
            while(results.hasNext()){
                BindingSet result = results.next();
                Value value = result.getValue(query.getRootVariableName());
                if(value instanceof Resource){
                    ids.add(value.stringValue());
                }
            }
            con.commit();
            return new QueryResultListImpl<String>(query,ids,String.class);
        } catch (RepositoryException e) {
View Full Code Here

            if (valueOfC2 != null) {
              System.out.println(valueOfC2.stringValue() + "\t");
              resultFile.print(valueOfC2.stringValue() + ",");
            }
            if (valueOfCount != null) {
              System.out.println(valueOfCount.stringValue() + "\t");
              resultFile.print(valueOfCount.stringValue());
            }
            System.out.println();
            resultFile.print("\n");
         
View Full Code Here

              System.out.println(valueOfC2.stringValue() + "\t");
              resultFile.print(valueOfC2.stringValue() + ",");
            }
            if (valueOfCount != null) {
              System.out.println(valueOfCount.stringValue() + "\t");
              resultFile.print(valueOfCount.stringValue());
            }
            System.out.println();
            resultFile.print("\n");
         
        } finally {
View Full Code Here

            if (valueOfP != null) {
              System.out.println(valueOfP.stringValue() + "\t");
              resultFile.print(valueOfP.stringValue() + ",");
            }
            if (valueOfCount != null) {
              System.out.println(valueOfCount.stringValue() + "\t");
              resultFile.print(valueOfCount.stringValue());
            }
            System.out.println();
            resultFile.print("\n");
         
View Full Code Here

              System.out.println(valueOfP.stringValue() + "\t");
              resultFile.print(valueOfP.stringValue() + ",");
            }
            if (valueOfCount != null) {
              System.out.println(valueOfCount.stringValue() + "\t");
              resultFile.print(valueOfCount.stringValue());
            }
            System.out.println();
            resultFile.print("\n");
         
        } finally {
View Full Code Here

           
            Value value = bindingSet.getValue(_valueVar.getName());
            Value count = bindingSet.getValue(_countVar.getName());
           
            String s = valueToString(value);
            int c = Integer.parseInt(count.stringValue());
           
            FacetChoice fc = new FacetChoice();
            fc._value = value;
            fc._valueString = s;
            fc._count = c;
View Full Code Here

                if (pStr.startsWith("http://127.0.0.1/")) {
                    pStr = pStr.substring(17);
                }

                Value o = st.getObject();
                String oStr = o.stringValue();

                // Determine if our object and subjects are URI
                boolean objectIsURI = false;
                try {
                    oStr = (new java.net.URL(oStr).toString());
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.