Cross Reference: proof_attempt_configuration.rb
xref
: /
ontohub
/
app
/
models
/
proof_attempt_configuration.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
proof_attempt_configuration.rb revision 44f41210d9e3ab001acbbe8df9b39445ac00b5dd
2
N/A
class
ProofAttemptConfiguration
<
ActiveRecord
::
Base
2
N/A
include
Numbering
2
N/A
numbering_parent_column
'ontology_id'
2
N/A
2
N/A
belongs_to
:
logic_mapping
2
N/A
belongs_to
:
prover
2
N/A
belongs_to
:
ontology
2
N/A
has_many
:
proof_attempts
,
dependent
: :
destroy
2
N/A
has_and_belongs_to_many
:
axioms
,
2
N/A
class_name
:
'Axiom'
,
2
N/A
association_foreign_key
:
'sentence_id'
,
2
N/A
join_table
:
'axioms_proof_attempt_configurations'
2
N/A
has_and_belongs_to_many
:
goals
,
2
N/A
class_name
:
'Theorem'
,
2
N/A
association_foreign_key
:
'sentence_id'
,
2
N/A
join_table
:
'goals_proof_attempt_configurations'
2
N/A
# timeout in seconds
2
N/A
attr_accessible
:
timeout
2
N/A
attr_accessible
:
locid
2
N/A
58
N/A
validates
:
ontology
,
presence
:
true
2
N/A
before_create
:
generate_locid
2
N/A
2
N/A
protected
2
N/A
23
N/A
def
self.find
_with_locid
(
locid
,
_iri
=
nil
)
23
N/A
where
(
locid
:
locid
)
.
first
23
N/A
end
23
N/A
23
N/A
def
generate_locid
32
N/A
# It's possible that the database columns `locid` and `number` have not yet
32
N/A
# been created.
32
N/A
if
respond_to
?
(:
locid
)
&&
respond_to
?
(:
number
)
34
N/A
self.locid
=
32
N/A
"#{
ontology.locid
}//#{
self.class.to_s.underscore.dasherize
}-#{number}"
34
N/A
end
32
N/A
end
32
N/A
end
58
N/A