Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.Model.createLiteral()


          {
            Map.Entry entry = (Map.Entry) entryIterator.next();
                  String key = (String) entry.getKey();
                  name = hshName.get(key);
                 
                  model.add(res,ParserUtil.skosLabel, model.createLiteral(name,key));
          }
         
          str = str.substring(0,str.indexOf("#"));
          Resource resource = model.createResource(str);
         
View Full Code Here


          while(iter.hasNext())
          {
            Map.Entry titles = (Map.Entry)iter.next();
            lang = (String) titles.getKey();
            title = hsh.get(lang);
            model.add(dsd,ParserUtil.dcTitle,model.createLiteral(title,lang));
          }
      }

    writeRDFToFile("title", model);
  }
View Full Code Here

      {
        Map.Entry entry = (Map.Entry) entrySetIterator.next();
              String key = (String) entry.getKey();
              name = hshName.get(key);
              //writeLinetoFile("    skos:prefLabel \"" + name + "\"@" + key + ";");
              model.add(con,ParserUtil.skosLabel,model.createLiteral(name,key));
      }
     
      Resource res = model.createResource(ParserUtil.concepts);
      model.add(con,ParserUtil.skosScheme,res);
     
View Full Code Here

                                {
                                    model.add(dss, ParserUtil.dcTitle, leafTitleTextContent);
                                }
                                else
                                {
                                    model.add(dss, ParserUtil.dcTitle, model.createLiteral(leafTitleTextContent, leafTitle.getAttribute("language").trim()));
                                }
                            }
                        }
                    }
View Full Code Here

                                {
                                    model.add(dss, model.createProperty(ParserUtil.dcterms + "description"), leafDescriptionTextContent);
                                }
                                else
                                {
                                    model.add(dss, model.createProperty(ParserUtil.dcterms + "description"), model.createLiteral(leafDescriptionTextContent, leafDescription.getAttribute("language").trim()));
                                }
                            }
                        }
                    }
View Full Code Here

        Resource eurostatURI = model.createResource(ParserUtil.baseURI);
        Resource eurostatVoIDURI = model.createResource(ParserUtil.baseURI + "void.ttl");
        Resource eurostatDatasetURI = model.createResource(ParserUtil.baseURI + "void.ttl#eurostat");

        model.add(eurostatVoIDURI, ParserUtil.type, model.createResource(ParserUtil.voidURI + "DatasetDescription"));
        model.add(eurostatVoIDURI, model.createProperty(ParserUtil.dcterms + "title"), model.createLiteral("A VoID Description of the eurostat.linked-statistics.org Dataset", "en"));
        model.add(eurostatVoIDURI, model.createProperty(ParserUtil.dcterms + "creator"), model.createResource("http://csarven.ca/#i"));
        model.add(eurostatVoIDURI, model.createProperty(ParserUtil.foaf + "primaryTopic"), eurostatDatasetURI);

        model.add(eurostatDatasetURI, ParserUtil.type, ParserUtil.voidDataset);
        model.add(eurostatDatasetURI, model.createProperty(ParserUtil.foaf + "homepage"), eurostatURI);
View Full Code Here

        model.add(eurostatVoIDURI, model.createProperty(ParserUtil.dcterms + "creator"), model.createResource("http://csarven.ca/#i"));
        model.add(eurostatVoIDURI, model.createProperty(ParserUtil.foaf + "primaryTopic"), eurostatDatasetURI);

        model.add(eurostatDatasetURI, ParserUtil.type, ParserUtil.voidDataset);
        model.add(eurostatDatasetURI, model.createProperty(ParserUtil.foaf + "homepage"), eurostatURI);
        model.add(eurostatDatasetURI, model.createProperty(ParserUtil.dcterms + "title"), model.createLiteral("Eurostat Linked Data", "en"));

        model.add(eurostatDatasetURI, model.createProperty(ParserUtil.dcterms + "modified"), model.createTypedLiteral(nowYYYYMMDD, datatypeDate));
/*
TODO: Add
dcterms:source [ foaf:homepage <http://eurostat.linked-statistics.org/> ] ;
View Full Code Here

                    iriFactory.construct( MY_NS +"product/1" )
                        .toString() );

            final Property hasName = model.createProperty( MY_NS, "#hasName");
            final Statement stmt = model.createStatement(
                    product1, hasName, model.createLiteral("Beach Ball","en") );
            out.println("Statement = " + stmt);

            model.add(stmt);

            // just for fun
View Full Code Here

  }

  public void testRDFNodeAsLiteral()
  {
    final Model m = ModelHelper.modelWithStatements(this, "");
    final Literal l = m.createLiteral("hello, world");
    Assert.assertSame(l, ((RDFNode) l).asLiteral());
  }

  public void testRDFNodeAsResource()
  {
View Full Code Here

  {
    final List<String> history = new ArrayList<String>();
    final Model m = ModelFactory.createDefaultModel();
    final RDFNode S = m.createResource();
    final RDFNode P = m.createProperty("eh:PP");
    final RDFNode O = m.createLiteral("LL");
    /* */
    final RDFVisitor rv = new RDFVisitor() {
      @Override
      public Object visitBlank( final Resource R, final AnonId id )
      {
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.