factor/extra/semantic-db/context/context.factor

15 lines
453 B
Factor
Raw Normal View History

2008-02-14 23:43:47 -05:00
! Copyright (C) 2008 Alex Chapman
! See http://factorcode.org/license.txt for BSD license.
2008-02-21 04:44:15 -05:00
USING: kernel semantic-db semantic-db.type ;
2008-02-14 23:43:47 -05:00
IN: semantic-db.context
2008-02-21 04:44:15 -05:00
! : all-contexts ( -- contexts )
! has-type-relation context-type relation-object-subjects ;
!
! : context-relations ( context -- relations )
! has-context-relation swap relation-object-subjects ;
2008-02-14 23:43:47 -05:00
2008-02-21 04:44:15 -05:00
: ensure-context ( name -- context-id )
2008-02-14 23:43:47 -05:00
context-type swap ensure-node-of-type ;