class RDF::Tabular::Table
Constants
- DEFAULTS
- PROPERTIES
- REQUIRED
Public Instance Methods
has_annotations?()
click to toggle source
Does the Metadata
or any descendant have any common properties @return [Boolean]
Calls superclass method
RDF::Tabular::Metadata#has_annotations?
# File lib/rdf/tabular/metadata.rb, line 1433 def has_annotations? super || tableSchema && tableSchema.has_annotations? end
to_atd()
click to toggle source
Return Annotated Table
representation
# File lib/rdf/tabular/metadata.rb, line 1449 def to_atd object.inject({ "@id" => (id.to_s if id), "@type" => "AnnotatedTable", "url" => self.url.to_s, "tableSchema" => (tableSchema.to_atd if tableSchema), }) do |memo, (k, v)| memo[k.to_s] ||= v memo end.delete_if {|k,v| v.nil? || v.is_a?(Metadata) || k.to_s == "@context"} end
to_table_group()
click to toggle source
Return a new TableGroup
based on this Table
# File lib/rdf/tabular/metadata.rb, line 1438 def to_table_group content = {"@type" => "TableGroup", "tables" => [self]} content['@context'] = object.delete(:@context) if object[:@context] ctx = @context remove_instance_variable(:@context) if instance_variables.include?(:@context) tg = TableGroup.new(content, **@options.merge(context: ctx, filenames: @filenames, base: base)) @parent = tg # Link from parent tg end