def add_field(name, predicate, options = {})
      # create a field object and store it in our hash
      field = field_for(name, predicate, options)
      @fields ||= {}
      @fields[name] = field

      # set up the accessors for the fields
      create_accessors(name, name, options)

      # create a URL validation if appropriate
      # (format nabbed from https://gist.github.com/joshuap/948880)
      validates(name, is_url: true) if field.is_uri?

      field
    end
def add_field(name, predicate, options = {})
      # create a field object and store it in our hash
      field = field_for(name, predicate, options)
      @fields ||= {}
      @fields[name] = field

      # set up the accessors for the fields
      create_accessors(name, name, options)

      # create a URL validation if appropriate
      # (format nabbed from https://gist.github.com/joshuap/948880)
      validates(name, is_url: true) if field.is_uri?

      field
    end
Define a field attribute for the +Resource+.

 @example Set the field.
   Person.add_field(:name, 'http://myfield')

 @param [ Symbol ] name The name of the field.
 @param [ String, RDF::URI ] predicate The predicate for the field.
 @param [ Hash ] options The hash of options.