Examples of inModel()


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

    Resource user = VirtuserHandler.getSubject();
    if (user != null) {
      resultModel.add(JenaUtil.getExpandedResource(user, 3));
      transaction
          .addProperty(TRANSACTION.user, user.inModel(resultModel));
    }
    /*if (user.hasProperty(AUTHORIZATION.permission, AUTHORIZATION.edit)) {
      user = (Resource)user.inModel(resultModel);
      user.addProperty(KNOBOT.canEdit, resource);
    }*/
 
View Full Code Here

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

    Resource agentInResult = (Resource) agent.inModel(resultModel);
    while (knowers.hasNext()) {
      Resource current = knowers.nextResource();
      Model miniDescription = getMiniDescription(current);
      resultModel.add(miniDescription);
      agentInResult.addProperty(FOAFEX.knownBy, current
          .inModel(resultModel));
    }
    knowers.close();
  }
View Full Code Here

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

    StmtIterator descriptions = agent.listProperties(FOAF.isPrimaryTopicOf);
    while (descriptions.hasNext()) {
      Resource current = descriptions.nextStatement().getResource();
      if (current.hasProperty(RDF.type,
          RWCF.AuthoritativelyServedResource)) {
        ((Resource) current.inModel(result)).addProperty(RDF.type,
            RWCF.AuthoritativelyServedResource);
      }
      if (current.hasProperty(RDF.type, FOAF.PersonalProfileDocument)) {
        ((Resource) current.inModel(result)).addProperty(RDF.type,
            FOAF.PersonalProfileDocument);
View Full Code Here

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

          RWCF.AuthoritativelyServedResource)) {
        ((Resource) current.inModel(result)).addProperty(RDF.type,
            RWCF.AuthoritativelyServedResource);
      }
      if (current.hasProperty(RDF.type, FOAF.PersonalProfileDocument)) {
        ((Resource) current.inModel(result)).addProperty(RDF.type,
            FOAF.PersonalProfileDocument);
      }
    }
    descriptions.close();
    return result;
View Full Code Here

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

      ResIterator attachments = mailModel.listSubjectsWithProperty(RDF.type,
          ATTACH.Attachment);
      while (attachments.hasNext()) {
        Resource currentAttachment = attachments.nextResource();
        Resource document = currentAttachment.getProperty(ATTACH.document).getResource();
        mailModel.add(JenaUtil.getExpandedResource((Resource) document.inModel(model), 2));
      }
      attachments.close();
    }

    /**
 
View Full Code Here

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

    transaction.addProperty(DC.description, new EnhancedRequest(request)
        .getRootURL().toString());
        Resource user = VirtuserHandler.getSubject();
        if (user != null) {
            resultModel.add(JenaUtil.getExpandedResource(user, 3));
            transaction.addProperty(TRANSACTION.user, user.inModel(resultModel));
        }
    //get all hosts
    String[] hostNames = request.getRequestURI().getParameterValues(
        "rootHost");
    if (hostNames != null) {
View Full Code Here

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

      }
    }
    nodes.close();
    for (Iterator<Resource> iter = expandingURIs.iterator(); iter.hasNext();) {
      Resource current =  iter.next();
      Model expansion = JenaUtil.getExpandedResource((Resource) current
          .inModel(resource.getModel()), 10);
      resultModel.add(expansion);
    }

  }
View Full Code Here

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

        mboxes.close();
        existingAgent.removeProperties();
        // Remove properties of mboxes
        // no need, as this has already been done by IFPPResolver
        // JenaUtil.replace(importing, agent, existingAgent);
        agent = (Resource) existingAgent.inModel(importing);
        addParticipants(existingAgent); // reconstruct
        // the
        // hasParticipant
        // properties
        removeParticipations(existingAgent, importing);
View Full Code Here

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

          .getResource();
      Resource existingGroup = getExistingAgent(group);
      if (existingGroup != null) {
        // don't change existing group
        group.removeProperties();
        JenaUtil.replace(importing, group, (Resource) existingGroup
            .inModel(importing));
        group = existingGroup;
      } else {
        Resource namedGroup = new ContactHandler(importing, ehRequest
            .getRootURL()).createContact();
View Full Code Here

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

    while (participations.hasNext()) {
      Resource current = participations.nextResource();
      // TODO fix: since participation is anonymous, it is not found in
      // importing
      // remove it iff it does not exist in importing
      if (!((Resource) current.inModel(importing)).hasProperty(RDF.type)) {
        Collection inverseProperties = new ArrayList();
        {
          StmtIterator inversePropertiesIter = model.listStatements(
              null, null, current);
          while (inversePropertiesIter.hasNext()) {
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.