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

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


                 
                  model.add(res,ParserUtil.skosLabel, model.createLiteral(name,key));
          }
         
          str = str.substring(0,str.indexOf("#"));
          Resource resource = model.createResource(str);
         
          model.add(res,ParserUtil.skosScheme,resource);
         
          model.add(res,ParserUtil.notation,code.getValue());
        }
View Full Code Here


      }
    }

    for(Concept concept:lstConcepts)
    {
      Resource con = model.createResource(ParserUtil.concepts + (concept.getId().toLowerCase().equals("time_period") ? "time" : concept.getId().toLowerCase()));
      model.add(con,ParserUtil.type,ParserUtil.sdmx);
      model.add(con,ParserUtil.notation,concept.getId().toLowerCase().equals("time_period") ? "time" : concept.getId().toLowerCase());
     
      //print multilingual labels
      hshName = concept.gethshName();
View Full Code Here

    Iterator it = obj.toc.entrySet().iterator();
    String lang = "";
    String title = "";
      while (it.hasNext()) {
      Map.Entry pairs = (Map.Entry)it.next();
      Resource dsd = model.createResource(ParserUtil.titleURI + pairs.getKey());
          hsh = (HashMap<String,String>)pairs.getValue();
          Iterator iter = hsh.entrySet().iterator();
          while(iter.hasNext())
          {
            Map.Entry titles = (Map.Entry)iter.next();
View Full Code Here

              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);
     
    }
   
    writeRDFToFile(fileName,model);
View Full Code Here

    public void createCatalog()
    {
        Model model = ParserUtil.getModelProperties();

        Resource eurostatURI = model.createResource(ParserUtil.baseURI + "Eurostat");
        String datatypeDate = ParserUtil.xsd + "date";

        Element element = xmlDocument.getDocumentElement();
        NodeList leafs = element.getElementsByTagName("nt:leaf");
        if(leafs != null && leafs.getLength() > 0)
View Full Code Here

                if(leaf.getAttribute("type").equals("dataset") || leaf.getAttribute("type").equals("table"))
                {
                    NodeList leafCodes = leaf.getElementsByTagName("nt:code");
                    String code = leafCodes.item(0).getTextContent().trim();

                    Resource dss = model.createResource(ParserUtil.dssURI + code);
                    Resource dsd = model.createProperty(ParserUtil.dsdURI + code);

                    //datasetURI a qb:DataSet
                    model.add(dss, ParserUtil.type, ParserUtil.qbDataset);
View Full Code Here

                    model.add(dss, ParserUtil.qb_structure, dsd);
                    //dsdURI a qb:DataStructureDefinition
                    model.add(dsd, ParserUtil.type, ParserUtil.dsd);

                    //datasetURI cc:license CC0
                    model.add(dss, ParserUtil.ccLicense, model.createResource("http://creativecommons.org/publicdomain/zero/1.0/"));

                    //datasetURI dcterms:identifier code
                    model.add(dss, model.createProperty(ParserUtil.dcterms + "identifier"), code);

                    //dcterms:title
View Full Code Here

                        {
                            Element leafDownloadLink = (Element)leafDownloadLinks.item(j);

                            if(leafDownloadLink.getAttribute("format").equals("tsv") || leafDownloadLink.getAttribute("format").equals("sdmx"))
                            {
                                model.add(dss, model.createProperty(ParserUtil.dcterms + "source"), model.createResource(leafDownloadLink.getTextContent().trim()));
                            }
                        }
                    }

                    //datasetURI dcterms:created created^^xsd:date
View Full Code Here

        StringBuilder nowYYYYMMDD = new StringBuilder( dateformatYYYYMMDD.format( dateNow ) );
        String datatypeDate = ParserUtil.xsd + "date";

        Model model = ParserUtil.getModelProperties();

        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"));
View Full Code Here

        String datatypeDate = ParserUtil.xsd + "date";

        Model model = ParserUtil.getModelProperties();

        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"));
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.