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

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


    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

          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

      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

    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

      }
    }
    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

        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

          .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

    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

    for (Iterator iter = knowsSet.iterator(); iter.hasNext();) {
      Resource currentKnownAgent = (Resource) iter.next();
      Resource currentKnownAgentInModel = getExistingAgent(currentKnownAgent);
      if (currentKnownAgentInModel != null) {
        JenaUtil.replace(importing, currentKnownAgent,
            (Resource) currentKnownAgentInModel.inModel(importing));
      } else {
        Resource contactResource = new ContactHandler(importing,
            ehRequest.getRootURL()).createContact();
        JenaUtil.replace(importing, currentKnownAgent, contactResource);
      }
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.