Package org.openrdf.model

Examples of org.openrdf.model.ValueFactory.createLiteral()


        URI pfollows = MBB_FOLLOWS.getURI(g);
//       
//        if(!g.contains(lastAction, pfollows, vf.createLiteral(String.valueOf((axis+3)%6), xsdInt))) { XXX
          g.add(action,
              MBB_FOLLOWSALONGAXIS.getURI(g),
              vf.createLiteral(String.valueOf(axis), xsdInt));
   
          g.add(action,
              pfollows,
              lastAction);
         
View Full Code Here


   
    g.add(contextUri,
          DC_CREATOR.getURI(g),
          (_user.indexOf("mailto:")==0 ||
           _user.indexOf("user:")==0 ||
           _user.indexOf("ip:")==0)?vf.createURI(_user):vf.createLiteral(_user, xsdString));

    g.add(contextUri,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
View Full Code Here

           _user.indexOf("user:")==0 ||
           _user.indexOf("ip:")==0)?vf.createURI(_user):vf.createLiteral(_user, xsdString));

    g.add(contextUri,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
        MBB_UPDATEDATE.getURI(g),
View Full Code Here

    g.add(contextUri,
        MBB_CREATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
        MBB_UPDATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
     
    Repository.MAIN_REPOSITORY.getLocalRepository().addGraph(g);
View Full Code Here

    g.add(contextUri,
        MBB_ACCESSDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
    g.add(contextUri,
        MBB_UPDATEDATE.getURI(g),
        vf.createLiteral(date, xsdDateTime));
     
    Repository.MAIN_REPOSITORY.getLocalRepository().addGraph(g);
  }

View Full Code Here

                org.openrdf.model.URI predicateURI = vf.createURI(predicate.getKey());
                for(RDFNode objectNode : predicate.getValue()) {
                    org.openrdf.model.Value objectValue;
                    if( objectNode instanceof Literal) {
                        if(((Literal) objectNode).getLanguage() != null )
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent(),
                                                ((Literal)objectNode).getLanguage());
                        else if(((Literal) objectNode).getType() != null)
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent(),
                                                vf.createURI(((Literal)objectNode).getType().getUri()));
                        else
View Full Code Here

                    if( objectNode instanceof Literal) {
                        if(((Literal) objectNode).getLanguage() != null )
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent(),
                                                ((Literal)objectNode).getLanguage());
                        else if(((Literal) objectNode).getType() != null)
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent(),
                                                vf.createURI(((Literal)objectNode).getType().getUri()));
                        else
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent());
                    } else {
                        if( objectNode instanceof URI ) {
View Full Code Here

                                                ((Literal)objectNode).getLanguage());
                        else if(((Literal) objectNode).getType() != null)
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent(),
                                                vf.createURI(((Literal)objectNode).getType().getUri()));
                        else
                            objectValue = vf.createLiteral(((Literal)objectNode).getContent());
                    } else {
                        if( objectNode instanceof URI ) {
                            objectValue = vf.createURI(((URI)objectNode).getUri());
                        } else {
                            objectValue = vf.createBNode(((BNode)objectNode).getAnonId());
View Full Code Here

            // add the type based on the facebook category
            if(data.get("category") != null) {
                model.add(subject, RDF.TYPE, getType(data.get("category").toString()));
            }

            model.add(subject,DCTERMS.identifier,vf.createLiteral(data.get("id").toString()));

            // schema:name is the facebook name (can have multiple languages)
            model.add(subject, SCHEMA.name, vf.createLiteral(data.get("name").toString(), language));
            model.add(subject, DCTERMS.title, vf.createLiteral(data.get("name").toString(), language));
View Full Code Here

            }

            model.add(subject,DCTERMS.identifier,vf.createLiteral(data.get("id").toString()));

            // schema:name is the facebook name (can have multiple languages)
            model.add(subject, SCHEMA.name, vf.createLiteral(data.get("name").toString(), language));
            model.add(subject, DCTERMS.title, vf.createLiteral(data.get("name").toString(), language));

            // dct:description in case a description or about is present (all content in English)
            if(data.get("description") != null) {
                model.add(subject,SCHEMA.description, vf.createLiteral(data.get("description").toString(), "en"));
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.