コード例 #1
0
  /**
   * Builds the predicate and object of a data type definition like [] rr:dataType xsd:date
   *
   * @param type a Node_URI object containing the type resource URI
   * @return a PredicateAndObject object containing the predicate (rr:dataType) and the object (e.g.
   *     xsd:string) of the rr:dataType expression
   */
  private PredicateAndObject buildDataTypePredAndObj(Node_URI type) {

    Property rrDataTypePredicate = ResourceFactory.createProperty(rrNamespace, "dataType");

    // FIXME: there must be a better way of converting Node_URI to Resource
    Resource rrDataTypeObject = ResourceFactory.createResource(type.toString());

    PredicateAndObject rrDataType = new PredicateAndObject(rrDataTypePredicate, rrDataTypeObject);

    return rrDataType;
  }