Examples of listSubjectsWithProperty()


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

    } else {
      String serializedModel = body.getParameter("model");
      Model importing = ModelFactory.createDefaultModel();
      importing.read(new StringReader(serializedModel), ehRequest
          .getRequestURLWithoutParams().toString(), "RDF/XML")
      ResIterator importCriterionIter = importing.listSubjectsWithProperty(RDF.type, MAILPUSH.MailingList);
      while (importCriterionIter.hasNext()) {
        importCriterion(importCriterionIter.nextResource(), importing);
      }
      importCriterionIter.close();
    }
View Full Code Here

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

    Resource nextRelation = null;
    if (nextStmt != null) {
      nextRelation = nextStmt.getResource();
      nextStmt.remove();
    }
    ResIterator previousStmtIter = model.listSubjectsWithProperty(
        KNOBOT.nextRelation, relation);
    if (previousStmtIter.hasNext()) {
      Resource previous = previousStmtIter.nextResource();
      model.remove(model.createStatement(previous, KNOBOT.nextRelation,
          relation));
View Full Code Here

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

          relation));
      if (nextRelation != null) {
        previous.addProperty(KNOBOT.nextRelation, nextRelation);
      }
    } else {
      ResIterator sourceResIter = model.listSubjectsWithProperty(
          KNOBOT.firstRelation, relation);
      if (!sourceResIter.hasNext()) {
        throw new RuntimeException(
            "no nextRelation or firstRelation property points to the relation to be removed");
      }
View Full Code Here

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

    if (codeOrig != null) {
      Resource resOrig = getSpatialThingByID(codeOrig);
      resOrig.removeProperties();
    }
   
    ResIterator importCountryIter = importing.listSubjectsWithProperty(
        RDF.type, GEOF.SpatialThing);
    boolean delete;
    if (body.getParameter("delete") != null) {
      delete = true;
    } else {
View Full Code Here

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

  private static InternetAddress getIntenetAddress(Resource addressResource)
  throws AddressException {
    Model model = addressResource.getModel();
    InternetAddress result = null;
    ResIterator agentIter = model.listSubjectsWithProperty(FOAF.mbox,
        addressResource);
    if (agentIter.hasNext()) {
      Resource agent = agentIter.nextResource();
      if (agent.hasProperty(FOAF.name)) {
        try {
View Full Code Here

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

                    request, model, hashStore);
        } catch (MalformedURLException e) {
            throw new RuntimeException(e);
        }
        model.add(importing);
        ResIterator entries = importing.listSubjectsWithProperty(RDF.type, ATOM.Entry);
        while (entries.hasNext()) {
            Resource currentEntry = entries.nextResource();
            createRelation(topic, (Resource)currentEntry.inModel(model));
            if (log.isDebugEnabled()) {
                log.debug("added relation to "+currentEntry);
View Full Code Here

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

                            .getURI() + '/');
                    if (!existingChannel.hasProperty(RDF.type, RSS.channel)
                            && !existingChannel.hasProperty(RDF.type,
                                    KNOBOT.Topic)) {

                        ResIterator topicIterator = importing
                                .listSubjectsWithProperty(RDF.type,
                                        KNOBOT.Topic);
                        if (topicIterator.hasNext()) {
                            existingChannel = topicIterator.nextResource();
                        } else {
View Full Code Here

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

                                .listSubjectsWithProperty(RDF.type,
                                        KNOBOT.Topic);
                        if (topicIterator.hasNext()) {
                            existingChannel = topicIterator.nextResource();
                        } else {
                            ResIterator channelterator = importing
                                    .listSubjectsWithProperty(RDF.type,
                                            RSS.channel);
                            if (channelterator.hasNext()) {
                                existingChannel = channelterator.nextResource();
                            } else {
View Full Code Here

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

   * @param string
   */
  public static void changeVariant(Resource target, String contentURI, String origContentType, String contentType, String language) {
    log.debug("changing variant with content "+contentURI+" to "+language);
    Model model = target.getModel();
    ResIterator contentURIMatching = model.listSubjectsWithProperty(
        DOCUMENT.content, model.createResource(contentURI));
    while (contentURIMatching.hasNext()) {
      Resource current = contentURIMatching.nextResource();
      log.debug("changing "+current);
      if (current.hasProperty(DOCUMENT.contentType, origContentType)) {
View Full Code Here

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

            Model incoming = ModelFactory.createDefaultModel();
            incoming.read( new StringReader(src), null, "N3");

            // Find the bNode that will be rewritten
            Property name = incoming.createProperty("http://xmlns.com/foaf/0.1/", "name");
            ResIterator ri = incoming.listSubjectsWithProperty(name, "Ian Dickinson");
            Resource bNode = ri.nextResource();
            ri.close();
           
            // Rewrite it to ground form
            int originalCount = bNode.listProperties().toList().size();
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.