Examples of CategoricScale


Examples of cross.reputation.model.CategoricScale

    }
  } 
 
  public CategoricScale getCategoricScale(Model model,
      Resource resource) throws Exception {
    CategoricScale categoricScale = (CategoricScale) getResourceFromCache(
        resource, CategoricScale.class);
    if(categoricScale != null) {     
      return categoricScale;
    }
    categoricScale = (CategoricScale) getScale(model, resource, CategoricScale.class);
    Property allowValue = ResourceFactory.createProperty(
        riNamespace + "allowValue");
    // allowValue //
    StmtIterator stmtI1 = model.listStatements(resource,
        allowValue, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate allowValue property //
      if(!statement.getObject().isLiteral()) {         
        if(!ModelException.throwException(ModelException.SCALE,
            "allowValue property of CategoricScale resource:"+
            resource.getURI()+" is not a literal")) {
          return null;
        }
      } else {
        categoricScale.addCategories(statement.getObject().asLiteral().getString());
      }
    }   
    return categoricScale;
  }
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.