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

Examples of com.hp.hpl.jena.rdf.model.StmtIterator.nextStatement()


    Property name = ResourceFactory.createProperty(
        foafNamespace + "name");
    StmtIterator stmtI1 = model.listStatements(resource,
        name, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate name property //
      if(!statement.getObject().isLiteral()) {         
        if(!ModelException.throwException(ModelException.FOAFAGENT,
            "name property of resource foaf:Agent:"+
            resource.getURI()+" is not a literal")) {
View Full Code Here


      return entity;
    }
    if(clazz == null) {
      StmtIterator stmtI1 = model.listStatements(resource, RDF.type, (RDFNode)null);           
      while(stmtI1.hasNext()) {
        Statement typeStatement = stmtI1.nextStatement();
        for(Resource resourceType : foafAgentClasses) {
          if(typeStatement.getObject().asResource().getURI().equals(
              resourceType.getURI())) {
            return getFoafAgent(model, resource);
          }
View Full Code Here

    Property identifier = ResourceFactory.createProperty(
        riNamespace + "identifier");
    StmtIterator stmtI1 = model.listStatements(resource,
        identifier, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate identifier property //
      if(!statement.getObject().isLiteral()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "identifier property of Entity resource:"+
            resource.getURI()+" is not a literal")) {
View Full Code Here

    Property hasReputation = ResourceFactory.createProperty(
        riNamespace + "hasMetric");   
    stmtI1 = model.listStatements(resource,
        hasReputation, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate hasReputation property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "hasReputation property of Entity resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property hasValue = ResourceFactory.createProperty(
        riNamespace + "hasValue");   
    stmtI1 = model.listStatements(resource,
        hasValue, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate hasValue property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "hasValue property of Entity resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property hasEvaluation = ResourceFactory.createProperty(
        riNamespace + "hasEvaluation");   
    stmtI1 = model.listStatements(resource,
        hasEvaluation, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate hasEvaluation property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "hasEvaluation property of Entity resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property foafAccount = ResourceFactory.createProperty(
        foafNamespace + "account");   
    stmtI1 = model.listStatements(resource,
        foafAccount, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate foafAccount property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "foafAccount property of Entity resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property foafHoldsAccount = ResourceFactory.createProperty(
        foafNamespace + "holdsAccount");   
    stmtI1 = model.listStatements(resource,
        foafHoldsAccount, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate foafHoldsAccount property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.ENTITY,
            "foafHoldsAccount property of Entity resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property fromCommunity = ResourceFactory.createProperty(
        riNamespace + "fromCommunity");   
    StmtIterator stmtI1 = model.listStatements(resource,
        fromCommunity, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate fromCommunity property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.REPUTATIONOBJECT,
            "fromCommunity property of ReputationObject resource:"+
            resource.getURI()+" is not a resource")) {
View Full Code Here

    Property hasValue = ResourceFactory.createProperty(
        riNamespace + "hasValue");   
    stmtI1 = model.listStatements(resource,
        hasValue, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate hasValue property //
      if(!statement.getObject().isResource()) {         
        if(!ModelException.throwException(ModelException.REPUTATIONOBJECT,
            "hasValue property of ReputationObject resource:"+
            resource.getURI()+" is not a resource")) {
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.