Examples of nextResource()


Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

  public void loadFromModel(Model metaModel) {
//    ResIterator  resIterator = metaModel.listSubjectsWithProperty(RDF.type,
//        METAMODEL.Assertion);
    ResIterator  resIterator = metaModel.listSubjectsWithProperty(METAMODEL.asserter);
    while (resIterator.hasNext()) {
      Resource assertion = resIterator.nextResource();
     
      Resource assertedComponent = assertion.getProperty(
          METAMODEL.assertedComponent).getResource();
      Resource type = null;
      StmtIterator typeIter = assertedComponent.listProperties(RDF.type);
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    for (Source source : sources) {
      Resource sourceRes = metaModel.createResource(source.getURIRef());
      ResIterator assertions = metaModel.listSubjectsWithProperty(
          METAMODEL.asserter, sourceRes);
      while (assertions.hasNext()) {
        Resource assertion = assertions.nextResource();
        Literal assertionTimeLit = assertion.getProperty(
            METAMODEL.assertionTime).getLiteral();
        Resource assertedComponent = assertion.getProperty(
            METAMODEL.assertedComponent).getResource();
        if (!assertedComponent.hasProperty(RDF.type, type)) {
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    Resource component = metaModel
        .createResource(componentName.getURIRef());
    ResIterator assertionsOfComponent = metaModel.listSubjectsWithProperty(
        METAMODEL.assertedComponent, component);
    while (assertionsOfComponent.hasNext()) {
      Resource assertion = assertionsOfComponent.nextResource();
      if (!assertion.hasProperty(METAMODEL.asserter, sourceRes)) {
        continue;
      }
      Literal assertionTimeLit = assertion.getProperty(
          METAMODEL.assertionTime).getLiteral();
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    for (Source source : sources) {
      Resource sourceRes = metaModel.createResource(source.getURIRef());
      ResIterator assertions = metaModel.listSubjectsWithProperty(
          METAMODEL.asserter, sourceRes);
      while (assertions.hasNext()) {
        Resource assertion = assertions.nextResource();
        Literal assertionTimeLit = assertion.getProperty(
            METAMODEL.assertionTime).getLiteral();
        Date assertionTime;
        try {
          assertionTime = ((XSDDateTime) assertionTimeLit.getValue())
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    Resource sourceRes = metaModel.createResource(source.getURIRef());
    ResIterator assertions = metaModel.listSubjectsWithProperty(
        METAMODEL.asserter, sourceRes);
    Set<NamedNode> result = new HashSet<NamedNode>();
    while (assertions.hasNext()) {
      Resource assertion = assertions.nextResource();
      Literal assertionTimeLit = assertion.getProperty(
          METAMODEL.assertionTime).getLiteral();
      Resource assertedComponent = assertion.getProperty(
          METAMODEL.assertedComponent).getResource();
      if (!assertedComponent.hasProperty(RDF.type, type)) {
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

    Resource sourceRes = metaModel.createResource(source.getURIRef());
    ResIterator assertions = metaModel.listSubjectsWithProperty(
        METAMODEL.asserter, sourceRes);
    Set<NamedNode> result = new HashSet<NamedNode>();
    while (assertions.hasNext()) {
      Resource assertion = assertions.nextResource();
      Resource assertedComponent = assertion.getProperty(
          METAMODEL.assertedComponent).getResource();
      if (!assertedComponent.hasProperty(RDF.type, type)) {
        continue;
      }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

  private Resource getUserResource(String username) {
    Graph graph  = configGOT.getGraph(new Date());
    Model model = JenaUtil.getModelFromGraph(graph);
    ResIterator resIter = model.listSubjectsWithProperty(ACCOUNTMANAGER.userName, username);
    if (resIter.hasNext()) {
      return resIter.nextResource();
    } else {
      return model.createResource();
    }
  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

  private Resource getUserResource(String username) {
    Graph graph  = configGOT.getGraph(new Date());
    Model model = JenaUtil.getModelFromGraph(graph);
    ResIterator resIter = model.listSubjectsWithProperty(ACCOUNTMANAGER.userName, username);
    if (resIter.hasNext()) {
      return resIter.nextResource();
    } else {
      return null;
    }
   
  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

      public boolean hasNext() {
        return resIterator.hasNext();
      }

      public ComponentDirectory next() {
        return new ComponentDirectory(resIterator.nextResource()
            .getURI());
      }

      public void remove() {
        throw new UnsupportedOperationException();
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.ResIterator.nextResource()

      public boolean hasNext() {
        return resIterator.hasNext();
      }

      public ComponentDirectory next() {
        return new ComponentDirectory(resIterator.nextResource()
            .getURI());
      }

      public void remove() {
        throw new UnsupportedOperationException();
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.