theorem_serializer.rb revision 0c8dc1f7204f00ba5c866b113c6b5fc22ca7da8d
2454dfa32c93c20a8522c6ed42fe057baaac9f9aStephan Boschclass TheoremSerializer < ApplicationSerializer
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen class Reference < ApplicationSerializer
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen attributes :iri
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen attributes :name
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen def iri
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen qualified_locid_for(object)
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen end
cf0ad1a0bddb0787f3d7b408a96d721a8b2a98a3Timo Sirainen end
6e5f8923e3353300e0922adf2c44bdef6e8e03f7Timo Sirainen
ffd8dc932516bc55bf01d91355540daab365e5e9Timo Sirainen attributes :iri, :symbols
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen attributes :name, :text, :imported
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
6c2ce1d5bf17b21e804a079eb0f973b7ab83e0d8Timo Sirainen has_one :ontology, serializer: OntologySerializer::Reference
fb08a91e3f2949ecefb647fa38206ca9aad5307fTimo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen def iri
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen Reference.new(object).iri
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen end
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen def symbols
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainen qualified_locid_for(object, :symbols)
d0720f3037064af4b92eccfc20a8814adcacf827Timo Sirainen end
d176f84ce5ca2073f4dfbafb457b9c74f6bf0d76Timo Sirainenend
bdc81a44ea0cf97571da9aa11741c7881b9b64e5Timo Sirainen