Cross Reference: sentence.rb
xref
: /
ontohub
/
app
/
models
/
sentence.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
sentence.rb revision aa0d3bd1475dc0b577b113f5582a81a0794eb9f3
6362
N/A
class
Sentence
<
ActiveRecord
::
Base
6362
N/A
include
Metadatable
6362
N/A
include
Readability
6362
N/A
6362
N/A
belongs_to
:
ontology
6362
N/A
has_and_belongs_to_many
:
symbols
,
class_name
:
'OntologyMember::Symbol'
6362
N/A
has_many
:
translated_sentences
,
dependent
: :
destroy
6362
N/A
6362
N/A
scope
:
original
,
where
(
imported
:
false
)
6362
N/A
6362
N/A
attr_accessible
:
locid
6362
N/A
6362
N/A
delegate
:
repository
,
to
: :
ontology
6362
N/A
6362
N/A
def
self.find
_with_locid
(
locid
,
_iri
=
nil
)
6362
N/A
where
(
locid
:
locid
)
.
first
6362
N/A
end
6362
N/A
6362
N/A
def
hierarchical_class_names
6362
N/A
match
=
self.text.match
(%r
{
6362
N/A
\s*
6362
N/A
Class
:
6362
N/A
\s*
6362
N/A
(?:
6362
N/A
<
(?<
first_class
>.+)
>|
6362
N/A
(?<
first_class
>.+)
6362
N/A
)
6362
N/A
\s*
6362
N/A
SubClassOf
:
6362
N/A
\s*
6362
N/A
(?:
6362
N/A
<
(?<
second_class
>.+)
>|
6362
N/A
(?<
second_class
>.+)
6362
N/A
)
6362
N/A
\s*}x)
6362
N/A
if
match
6362
N/A
[
match
[:
first_class
].
strip
,
match
[:
second_class
].
strip
]
6362
N/A
else
6362
N/A
[]
6362
N/A
end
6362
N/A
end
6362
N/A
6362
N/A
def
to_s
6362
N/A
name
6362
N/A
end
6362
N/A
end
6362
N/A