Module: SchemaOrg::Mixins::ConstraintNode

Includes:
Intangible
Included in:
ConstraintNode, StatisticalVariable
Defined in:
lib/schema_org/mixins/constraint_node.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/schema_org/mixins/constraint_node.rb', line 11

def self.schema_property_definitions
  {
    constraint_property: {
      schema_name: "constraintProperty",
      schema_url: "https://schema.org/constraintProperty",
      comment_lines: ["Indicates a property used as a constraint. For example, in the definition of a [[StatisticalVariable]]. The value is a property, either from within Schema.org or from other compatible (e.g. RDF) systems such as DataCommons.org or Wikidata.org."].freeze,
      ranges: ["URL"].freeze,
      external_ranges: ["Property"].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    num_constraints: {
      schema_name: "numConstraints",
      schema_url: "https://schema.org/numConstraints",
      comment_lines: ["Indicates the number of constraints property values defined for a particular [[ConstraintNode]] such as [[StatisticalVariable]]. This helps applications understand if they have access to a sufficiently complete description of a [[StatisticalVariable]] or other construct that is defined using properties on template-style nodes."].freeze,
      ranges: ["Integer"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#constraint_propertyObject

Indicates a property used as a constraint. For example, in the definition of a [[StatisticalVariable]]. The value is a property, either from within Schema.org or from other compatible (e.g. RDF) systems such as DataCommons.org or Wikidata.org.



37
38
39
# File 'lib/schema_org/mixins/constraint_node.rb', line 37

def constraint_property
  read_property(:constraint_property)
end

#constraint_property=(value) ⇒ Object

Indicates a property used as a constraint. For example, in the definition of a [[StatisticalVariable]]. The value is a property, either from within Schema.org or from other compatible (e.g. RDF) systems such as DataCommons.org or Wikidata.org.



42
43
44
# File 'lib/schema_org/mixins/constraint_node.rb', line 42

def constraint_property=(value)
  write_property(:constraint_property, value)
end

#num_constraintsObject

Indicates the number of constraints property values defined for a particular [[ConstraintNode]] such as [[StatisticalVariable]]. This helps applications understand if they have access to a sufficiently complete description of a [[StatisticalVariable]] or other construct that is defined using properties on template-style nodes.



47
48
49
# File 'lib/schema_org/mixins/constraint_node.rb', line 47

def num_constraints
  read_property(:num_constraints)
end

#num_constraints=(value) ⇒ Object

Indicates the number of constraints property values defined for a particular [[ConstraintNode]] such as [[StatisticalVariable]]. This helps applications understand if they have access to a sufficiently complete description of a [[StatisticalVariable]] or other construct that is defined using properties on template-style nodes.



52
53
54
# File 'lib/schema_org/mixins/constraint_node.rb', line 52

def num_constraints=(value)
  write_property(:num_constraints, value)
end