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

Examples of com.hp.hpl.jena.rdf.model.Resource.listProperties()


              || (languageStmt.getString().equals(language))) {
            String currentDocumentURL = currentAttachment
                .getProperty(ATTACH.document).getResource()
                .getURI();
            if (originalUrlCol.contains(currentDocumentURL)) {
              StmtIterator labelStmts = currentAttachment
                  .listProperties(RDFS.label);
              Collection otherLangLabels = new ArrayList();
              while (labelStmts.hasNext()) {
                Statement current = labelStmts.nextStatement();
                Literal value = current.getLiteral();
View Full Code Here


    Resource vPermDefinitions = model.createResource(requestURL.toString());
    Model resultModel = ModelFactory.createDefaultModel();
    resultModel.add(JenaUtil.getExpandedResource(vPermDefinitions,1));
    vPermDefinitions = (Resource) vPermDefinitions.inModel(resultModel);
    vPermDefinitions.addProperty(RDF.type, Definitions);
    StmtIterator vpermStmts = vPermDefinitions.listProperties(vperm);
    while (vpermStmts.hasNext()) {
      Resource vPerm = vpermStmts.nextStatement().getResource();
      resultModel.add(JenaUtil.getExpandedResource(vPerm,1));
    }
    vpermStmts.close();
View Full Code Here

    Resource vPermDefinitions = model.createResource(requestURL.toString());
    Model resultModel = ModelFactory.createDefaultModel();
    resultModel.add(JenaUtil.getExpandedResource(vPermDefinitions,1));
    vPermDefinitions = (Resource) vPermDefinitions.inModel(resultModel);
    vPermDefinitions.addProperty(RDF.type, Definitions);
    StmtIterator vpermStmts = vPermDefinitions.listProperties(vperm);
    while (vpermStmts.hasNext()) {
      Resource vPerm = vpermStmts.nextStatement().getResource();
      resultModel.add(JenaUtil.getExpandedResource(vPerm,1));
    }
    vpermStmts.close();
View Full Code Here

        out.print(current.getRequiredProperty(RWCF.javaClass).getString());
        out.println("</td><td>");
        out.print(current.getRequiredProperty(RWCF.priority).getInt());
        out.println("</td></tr>");
        out.println("<tr><td colspan=\"3\"><pre>");
        StmtIterator properties = current.listProperties();
        while (properties.hasNext()) {
          Statement currentStmt =  properties.nextStatement();
          out.println(currentStmt);
        }
        out.println("</pre></td></tr>");
View Full Code Here

   * @see org.wymiwyg.rwcf.Response#setBody(java.lang.Object)
   */
  public void setBody(Object body) throws HandlerException {
    Resource temporarySubject = VirtuserHandler.getSubject();
    //TODO ensure read-lock
    StmtIterator properties = temporarySubject.listProperties();
    if (properties.hasNext()) {
      saveTemporarySubjectToCookie(temporarySubject);
    }
    properties.close();
    super.setBody(body);
View Full Code Here

    }
    if ("true".equals(sourceType.getParameter("localized"))) {
      localized = true;
    }
    log.info("initializing ResourceModeler");
    StmtIterator targetTypes = handlerResource
        .listProperties(RWCF.targetType);
    while (targetTypes.hasNext()) {
      String current = targetTypes.nextStatement().getString();
      try {
        targetTypeSet.add(new MimeType(current));
View Full Code Here

      Resource currentAgent = agents.nextResource();
      if (((Resource) currentAgent.inModel(model)).hasProperty(RDF.type)) {
        continue;
      }
      SortedSet propertySet = new TreeSet(new StmtComparator());
      StmtIterator properties = currentAgent.listProperties();
      while (properties.hasNext()) {
        Statement currentStmt = properties.nextStatement();
        propertySet.add(currentStmt);
      }
      properties.close();
View Full Code Here

        Resource result = nextStatement.getResource();
        if (nextResource.equals(result)) {
          log.error("Resource loops back to itself");
          return null;
        }
        if (! result.listProperties().hasNext()) {
          /* The nextRelation property pointed to a nonexistent resource.
           * If we include resources with no properties, there will be NullpointerExceptions later.
           * Returning null will stop the list of child relations.
           */
          log.warn("resource "+nextStatement.getResource().toString()+ " of source "+source.toString()+" has no properties, ignoring");
View Full Code Here

                    log.warn("sequence with missing elements");
                    continue;
                }
                if (attachment.hasProperty(DC.language)) {
                    //check if one of supportedLanguages matches
                    StmtIterator languageStmts = attachment
                            .listProperties(DC.language);
                    while (languageStmts.hasNext()) {
                        String currentLang = languageStmts.nextStatement()
                                .getString();
                        if (acceptLanguagesStringList.contains(currentLang)) {
View Full Code Here

   * @param result
   */
  private static void addTitles(Seq personalHistory, Model result) {
    for (int i = 1; i <= personalHistory.size(); i++) {
      Resource current = personalHistory.getResource(i);
      StmtIterator currentTitleStatements = current
          .listProperties(RSS.title);
      if (!currentTitleStatements.hasNext()) {
        result.add(result.createStatement(current, RSS.title,
            "untitled"));
      }
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.