Package cross.reputation.model

Examples of cross.reputation.model.EntityType


    return null;
  }
 
  public EntityType getEntityType(Model model,
      Resource resource) throws Exception {
    EntityType entityType = (EntityType) getResourceFromCache(
        resource, EntityType.class);
    if(entityType != null) {     
      return entityType;
    }   
    entityType = new EntityType();
    addResourceInstanceToCache(resource, entityType);
    // type //
    Property type = ResourceFactory.createProperty(riNamespace + "type");
    StmtIterator stmtI1 = model.listStatements(resource,
        type, (RDFNode)null);
    while(stmtI1.hasNext()) {
      Statement statement = stmtI1.nextStatement();
      // validate type property //
      if(!statement.getObject().isLiteral()) {         
        if(!ModelException.throwException(ModelException.ENTITYTYPE,
            "type property of EntityType resource:"+
            resource.getURI()+" is not a literal")) {
          return null;
        }
      } else {
        entityType.setType(statement.getObject().asLiteral().getString());
      }
    }
    return entityType;
  }
View Full Code Here


            resource.getURI()+" is not a resource")) {
          repAlg = null;
          return;
        }
      } else {
        EntityType entityTypeIns = (EntityType) getResourceFromCache(
            statement.getObject().asResource(),EntityType.class);
        if(entityTypeIns == null) {
          entityTypeIns = getEntityType(model,
              statement.getObject().asResource());       
        }
View Full Code Here

TOP

Related Classes of cross.reputation.model.EntityType

Copyright © 2018 www.massapicom. 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.