Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.LiteralImpl


        logger.debug(dumpModelToRDFXML());

        assertModelNotEmpty();
        assertStatementsSize(null, null, null, 28);
        assertStatementsSize(null, RDF.TYPE, csv.rowType, 3);
        assertContains(null, csv.numberOfColumns, new LiteralImpl("4", XMLSchema.INTEGER));
        assertContains(null, csv.numberOfRows, new LiteralImpl("3", XMLSchema.INTEGER));
    }
View Full Code Here


        logger.debug(dumpModelToRDFXML());

        assertModelNotEmpty();
        assertStatementsSize(null, null, null, 28);
        assertStatementsSize(null, RDF.TYPE, csv.rowType, 3);
        assertContains(null, csv.numberOfColumns, new LiteralImpl("4", XMLSchema.INTEGER));
        assertContains(null, csv.numberOfRows, new LiteralImpl("3", XMLSchema.INTEGER));
    }
View Full Code Here

        logger.debug(dumpModelToRDFXML());

        assertModelNotEmpty();
        assertStatementsSize(null, null, null, 21);
        assertStatementsSize(null, RDF.TYPE, csv.rowType, 3);
        assertContains(null, csv.numberOfColumns, new LiteralImpl("2", XMLSchema.INTEGER));
        assertContains(null, csv.numberOfRows, new LiteralImpl("3", XMLSchema.INTEGER));
        assertContains(null, null, new LiteralImpl("5.2", XMLSchema.FLOAT));
        assertContains(null, null, new LiteralImpl("7.9", XMLSchema.FLOAT));
        assertContains(null, null, new LiteralImpl("10" , XMLSchema.INTEGER));
    }
View Full Code Here

                lang = meta.getLang();
            }
            out.writeTriple(
                    documentURI,
                    meta.getName(),
                    new LiteralImpl(meta.getContent(), lang)
            );
        }
    }
View Full Code Here

            out.writeTriple(documentURI, csv.row, rowSubject);
            // the progressive row number
            out.writeTriple(
                    rowSubject,
                    csv.rowPosition,
                    new LiteralImpl(String.valueOf(index))
            );
            index++;
        }
        // add some CSV metadata such as the number of rows and columns
        addTableMetadataStatements(
View Full Code Here

            }
            if (!RDFUtils.isAbsoluteURI(header[index])) {
                out.writeTriple(
                        singleHeader,
                        RDFS.LABEL,
                        new LiteralImpl(header[index])
                );
            }
            out.writeTriple(
                    singleHeader,
                    csv.columnPosition,
                    new LiteralImpl(String.valueOf(index), XMLSchema.INTEGER)
            );
            index++;
        }
    }
View Full Code Here

            if (isInteger(cell)) {
                datatype = XMLSchema.INTEGER;
            } else if(isFloat(cell)) {
                datatype = XMLSchema.FLOAT;
            }
            object = new LiteralImpl(cell, datatype);
        }
        return object;
    }
View Full Code Here

            int numberOfRows,
            int numberOfColumns) {
        out.writeTriple(
                documentURI,
                csv.numberOfRows,
                new LiteralImpl(String.valueOf(numberOfRows), XMLSchema.INTEGER)
        );
        out.writeTriple(
                documentURI,
                csv.numberOfColumns,
                new LiteralImpl(String.valueOf(numberOfColumns), XMLSchema.INTEGER)
        );
    }
View Full Code Here

                null
        );
        jsonWriter.receiveTriple(
                new URIImpl("http://sub/2"),
                new URIImpl("http://pred/2"),
                new LiteralImpl("language literal", "en"),
                new URIImpl("http://graph/2"),
                null
        );
        jsonWriter.receiveTriple(
                new URIImpl("http://sub/3"),
                new URIImpl("http://pred/3"),
                new LiteralImpl("123", new URIImpl("http://datatype")),
                null,
                null
        );
        jsonWriter.endDocument(documentURI);
        jsonWriter.close();
View Full Code Here

        URI narrower = new URIImpl("http://www.w3.org/2004/02/skos/core#narrower");

        SailConnection sc = sail.getConnection();
        try {
            sc.begin();
            sc.addStatement(planet, RDFS.LABEL, new LiteralImpl("planet", "en"));
            sc.addStatement(gasGiant, RDFS.LABEL, new LiteralImpl("gas giant", "en"));
            sc.addStatement(planet, narrower, gasGiant);
            sc.commit();
        } finally {
            sc.close();
        }
View Full Code Here

TOP

Related Classes of org.openrdf.model.impl.LiteralImpl

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.