예제 #1
0
 /** A convenience version of getGlobalProperty which can only return a boolean result. */
 public boolean testGlobalProperty(Node property) {
   Node resultNode = getGlobalProperty(property);
   if (resultNode.isLiteral()) {
     Object result = resultNode.getLiteralValue();
     if (result instanceof Boolean) {
       return ((Boolean) result).booleanValue();
     }
   }
   throw new ReasonerException(
       "Global property test returned non-boolean value"
           + "\nTest was: "
           + property
           + "\nResult was: "
           + resultNode);
 }
예제 #2
0
파일: RDFS.java 프로젝트: hardyce/cororalt
 /** The RDFS vocabulary, expressed for the SPI layer in terms of .graph Nodes. */
 public static class Nodes {
   public static final Node Class = Node.createURI(uri + "Class");
   public static final Node Datatype = Node.createURI(uri + "Datatype");
   public static final Node ConstraintProperty = Node.createURI(uri + "ConstraintProperty");
   public static final Node Container = Node.createURI(uri + "Container");
   public static final Node ContainerMembershipProperty =
       Node.createURI(uri + "ContainerMembershipProperty");
   public static final Node Literal = Node.createURI(uri + "Literal");
   public static final Node Resource = Node.createURI(uri + "Resource");
   public static final Node comment = Node.createURI(uri + "comment");
   public static final Node domain = Node.createURI(uri + "domain");
   public static final Node label = Node.createURI(uri + "label");
   public static final Node isDefinedBy = Node.createURI(uri + "isDefinedBy");
   public static final Node range = Node.createURI(uri + "range");
   public static final Node seeAlso = Node.createURI(uri + "seeAlso");
   public static final Node subClassOf = Node.createURI(uri + "subClassOf");
   public static final Node subPropertyOf = Node.createURI(uri + "subPropertyOf");
   public static final Node member = Node.createURI(uri + "member");
 }