<s> from ooi . occi . core import attribute <EOL> from ooi . occi . core import entity <EOL> from ooi . occi . core import kind <EOL> from ooi . occi . core import link <EOL> from ooi . occi import helpers <EOL> class Resource ( entity . Entity ) : <EOL> """<STR_LIT>""" <EOL> attributes = attribute . AttributeCollection ( [ "<STR_LIT>" ] ) <EOL> kind = kind . Kind ( helpers . build_scheme ( '<STR_LIT>' ) , '<STR_LIT>' , <EOL> '<STR_LIT>' , attributes , '<STR_LIT>' , <EOL> related = [ entity . Entity . kind ] ) <EOL> def __init__ ( self , title , mixins , id = None , summary = None ) : <EOL> super ( Resource , self ) . __init__ ( title , mixins , id = id ) <EOL> self . attributes [ "<STR_LIT>" ] = attribute . MutableAttribute ( <EOL> "<STR_LIT>" , summary ) <EOL> self . _links = [ ] <EOL> def __eq__ ( self , other ) : <EOL> return all ( [ self . attributes [ i ] . value == other . attributes [ i ] . value <EOL> for i in self . attributes ] ) <EOL> @ property <EOL> def links ( self ) : <EOL> return self . _links <EOL> def link ( self , target , mixins = [ ] ) : <EOL> l = link . Link ( "<STR_LIT>" , mixins , self , target ) <EOL> self . _links . append ( l ) <EOL> def add_link ( self , link ) : <EOL> self . _links . append ( link ) <EOL> @ property <EOL> def summary ( self ) : <EOL> return self . attributes [ "<STR_LIT>" ] . value <EOL> @ summary . setter <EOL> def summary ( self , value ) : <EOL> self . attributes [ "<STR_LIT>" ] . value = value </s>
