input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
protected void add partner role property descriptor object object item property descriptors add create item property descriptor composeable adapter factory adapter factory get root adapter factory get resource locator get string ui tpartner link partner role feature get string ui property descriptor description ui tpartner link partner role feature ui tpartner link type process package e instance get tpartner link partner role true item property descriptor generic value image null null
|
this adds a property descriptor for the partner role feature
|
public object get image object object return get resource locator get image full obj16 tpartner link
|
this returns tpartner link
|
public string get text object object string label tpartner link object get name return label null label length 0 get string ui tpartner link type get string ui tpartner link type label
|
this returns the label text for the adapted class
|
public void notify changed notification notification update children notification switch notification get feature id tpartner link class case process package tpartner link my role case process package tpartner link name case process package tpartner link partner link type case process package tpartner link partner role fire notify changed new viewer notification notification notification get notifier false true return super notify changed notification
|
this handles model notifications by calling
|
public string name return telos kbname
|
return the name of the kb
|
public int size return individuals size
|
return the size of the kb
|
public kb kb return telos kb
|
return the individuals kb
|
public boolean is empty return individuals null individuals size 0
|
tell if the kb is empty
|
public individual individual string id if individuals null individuals size 0 return null telos parser individual ind telos parser individual name2individual get id if ind null string id ind id ind telos kb this return ind for int i 0 i individuals size i telos parser individual t telos parser individual individuals get i string tname t telos name if tname equals id t telos kb this return t return null
|
return an individual whose id equals id
|
public string label return telos name
|
return the individuals name
|
public int level if this cls equals token return 0 if this cls equals simple class return 1 if this cls equals meta class return 2 if this cls equals meta meta class return 3 if this cls equals meta meta meta class return 4 else return 0
|
return the individuals class level
|
public void remove and delete proposition proposition arg0 int index individuals index of arg0 if index individuals size index 1 return individuals remove index individuals trim to size updated by xiaoxue feb 22 2005 remove the individual from name2individual as well name2individual remove telos parser individual arg0 id
|
remove arg0 from the kb
|
public boolean is builtin if this telos name starts with string this telos name starts with real this telos name starts with integer this telos name starts with m3 class this telos name starts with m2 class this telos name starts with m1 class this telos name starts with sclass this telos name starts with individual class this telos name starts with class this telos name starts with individual this telos name starts with proposition this telos name starts with telos parser individual this telos name starts with omega class return true return false
|
tell if an individual is built in
|
public boolean is ancestor of proposition arg0 return arg0 is instance of this
|
tell if an individual is an ancestor of arg0
|
public boolean is child of proposition arg0 if this parents null direct child for int i 0 i this parents size i string parent string this parents get i if parent equals arg0 telos name return true indirect child for int i 0 i this parents size i string parent string this parents get i telos parser individual ind parent telos parser individual telos kb individual parent ind parent telos kb telos kb if ind parent is child of arg0 return true return false
|
tell if an individual is a child of arg0
|
public boolean is instance of proposition arg0 if this types null direct instance for int i 0 i this types size i string ancestor string this types get i if ancestor equals arg0 telos name return true indirect instance for int i 0 i this types size i string ancestor string this types get i telos parser individual ind ancestor telos parser individual telos kb individual ancestor if ind ancestor null continue ind ancestor telos kb telos kb if ind ancestor is instance of arg0 return true return false
|
tell if an individual is an instance of arg0
|
public boolean is parent of proposition arg0 return arg0 is child of this
|
tell if an individual is a parent of arg0
|
public void add direct ancestors proposition arg0 if arg0 null arg0 0 null return for int i 0 i arg0 length i types add arg0 i telos name
|
add arg0 to the individuals direct ancestors list
|
public void add direct parents proposition arg0 for int i 0 i arg0 length i parents add arg0 i telos name
|
add arg0 to the individuals direct parents list
|
public void remove direct ancestor proposition arg0 types remove arg0 telos name
|
remove arg0 from the individuals direct ancestors list
|
public void remove direct parent proposition arg0 parents remove arg0 telos name
|
remove arg0 from the individuals direct parents list
|
public void remove direct attr attribute arg0 telos attribute attr telos attribute arg0 array list key new array list string cate attr categories if attr label equals for int i 0 i cate length i key add cate i else for int i 0 i cate length i key add cate i key add attr label if attributes contains key key attributes remove key
|
remove arg0 from the individuals direct attributes list
|
public string telos name return id
|
return the individuals teloa name
|
public boolean undo edit if undo stack null return false if undo stack is empty return false undoable edit undo undo stack pop if undo can undo undo stack new undoable edit stack return false undo undo redo stack push undo return true
|
return true if the undo is performed
|
public boolean redo edit if redo stack null return false if redo stack is empty return false undoable edit redo redo stack pop if redo can redo redo stack new undoable edit stack return false redo redo undo stack push redo return true
|
return true if the redo is performed
|
public void add edit undoable edit edit undo stack push edit
|
add undoable edit to the undo stack
|
public void add edit undoable edit edit undoable add edit edit update undo info
|
add undoable edit to the undo stack
|
public void die alive false
|
sets alive to false
|
public void undo throws cannot undo exception if can undo throw new cannot undo exception has been done false
|
throws cannot undo exception if can undo returns false
|
public boolean can undo return alive has been done
|
returns true if this edit is alive and has been done is true
|
public void redo throws cannot redo exception if can redo throw new cannot redo exception has been done true
|
throws cannot redo exception if can redo returns false
|
public boolean can redo return alive has been done
|
returns true if this edit is alive and has been done is false
|
public boolean add edit undoable edit an edit return false
|
this default implementation returns false
|
public boolean replace edit undoable edit an edit return false
|
this default implementation returns false
|
public string get presentation name return
|
this default implementation returns
|
public string get undo presentation name string name get presentation name if name name undo name name else name undo name return name
|
if get presentation name returns returns
|
public string get redo presentation name string name get presentation name if name name redo name name else name redo name return name
|
if get presentation name returns returns
|
private string construct name string project path string extension string name null if project path null int index project path index of if index 1 name project path substring 0 index extension return name
|
construct a file name from the base project name and an extension
|
public omemodel get model return model
|
returns the model in which this telos link is in
|
public object get type we cache the type return type
|
returns this telos links type
|
public void on project path change string old path string new path if new path null update path clses field classes update path its instances field instances
|
the system calls this method when the user changes the project name
|
public collection get links return links
|
returns a collection of omelinks which correspond to the links of this
|
public void add link omelink l links add l
|
adds the given omelink to the collection of links attached to this telos
|
public void set id int id this id id d o telos link set id called erroniously
|
set the id for this telos link
|
public omeobject get to d o link id getting to attribute atts to individual direct attributes tocat to if atts to length 0 proposition p proposition atts to first to return model get object p return null
|
returns the destination of this telos link
|
public omeobject get from attribute atts from individual direct attributes fromcat from if atts from length 0 proposition p proposition atts from first to return model get object p return null
|
returns the source of this telos link
|
public boolean validate contents boolean is complete has valid value clses field has valid value its instances field if is complete is complete false return is complete
|
called by the system when the user presses the ok button
|
public void set from omeobject o throws exception remove any pre extant fields then add a new one attribute from individual direct attributes fromcat from individual target null if from length 0 target individual from first to individual remove direct attr from first try proposition p kb new attribute individual fromcat from telos object o get individual o get links add this o add link this d o telos link id from set to telos model get object proposition p to get id catch telos exception te if from length 0 kb new attribute individual fromcat from target throw te
|
set the source for this telos link
|
public void set name string newname throws exception remove the current name attribute name individual direct attributes namecat nolabel if name length 0 individual remove direct attr name first set the new name if this were to fail then what makes us think that we ll be able to replace the original attribute we hope it never happens because jtelos is daft string safenewname newname replace kb new attribute individual namecat nolabel new telos string safenewname
|
sets the name of this telos element
|
private reader get reader string property name property list sources reader reader null string filename sources get string property name if filename null reader file utilities get reader filename return reader
|
extract a relative file name from the sources property list and turn it
|
private writer get writer string property name property list sources writer writer null string filename sources get string property name if filename null writer file utilities get writer filename return writer
|
extract a relative file name from the sources property list and turn it
|
public kb create kb throws exception if kbs2filenames null kbs2filenames new hash map file d new file file f file create temp file tmpkb kbs d f delete kb kb new cpp kb kb kbcount f get name kb kb new telos parser kb kb kbcount f get name kbs2filenames put kb f get name d o kb created return kb
|
create a new kb
|
public collection get plugins return mm get plugins this
|
returns the omeplugins that consider themselves compatible with this
|
public model element create element object type throws exception telos element te null try te new telos element kb framework this elementcount 1 type elements add te elementcount props2objects put te get individual telos name te catch exception e d o e throw e return te
|
creates a new element within the model which can then be manipulated
|
public model link create link object type throws exception try telos link tl new telos link kb framework this linkcount type links add tl props2objects put tl get individual telos name tl return tl catch exception e d o link creation exception e throw e return null
|
creates a new link within the model which can then be manipulated through
|
public void delete element model element element delete object element
|
deletes the element from this telos model
|
public void delete link model link link delete object link
|
deletes the link from this telos model
|
public omeframework get framework return framework
|
returns the framework on which this telos model is based on
|
public collection get elements return elements
|
returns the elements within this telos model
|
public void save file f throws exception mm save model to this f if system get property protege null mm save model to protege this
|
saves this model and all its views
|
private int unmangle id string s string tokenizer st new string tokenizer s if st next token equals element element else link int rval integer value of st next token int value d o unmangling to rval return rval
|
returns the int value stored in string code s code
|
public omeelement get element proposition p if p null return null else return omeelement props2objects get p telos name
|
returns the omeelement which a proposition represents
|
public omelink get link proposition p if p null return null return omelink props2objects get p telos name
|
returns the omelink which a proposition represents
|
public omeobject get object proposition p if p null return null omeobject o omeobject props2objects get p telos name return o
|
returns the omeobject which a proposition represents
|
public model manager get model manager return mm
|
returns this telos models model manager
|
public view manager get view manager return viewmanager
|
returns this telos models viewmanager
|
public void clear knowledge base kb this get knowledge base cls c kb get cls omeobject clear cls kb c c kb get cls standard class clear instances kb c
|
reset the knowledge base to an empty one with system meta classes only
|
private button create check box composite group string label button button new button group swt check swt left button set text label button add selection listener this grid data data new grid data button set layout data data return button
|
creates an new checkbox instance and sets the default
|
private composite create composite composite parent int num columns composite composite new composite parent swt null grid layout grid layout layout new grid layout layout num columns num columns composite set layout layout grid data grid data data new grid data data vertical alignment grid data fill data horizontal alignment grid data fill composite set layout data data return composite
|
creates composite control and sets the default layout data
|
private label create label composite parent string text label label new label parent swt left label set text text grid data data new grid data data horizontal span 2 data horizontal alignment grid data fill label set layout data data return label
|
utility method that creates a label instance
|
private button create push button composite parent string label button button new button parent swt push button set text label button add selection listener this grid data data new grid data data horizontal alignment grid data fill button set layout data data return button
|
utility method that creates a push button instance
|
private text create text field composite parent text text new text parent swt single swt border text add modify listener this grid data data new grid data data horizontal alignment grid data fill data grab excess horizontal space true data vertical alignment grid data center data grab excess vertical space false text set layout data data return text
|
create a text field specific for this application
|
protected ipreference store do get preference store return plugin get plugin get preference store
|
the code readme preference page code implementation of this
|
private void initialize defaults perform action 0
|
initializes states of the controls using default values
|
private void initialize values perform action 1
|
initializes states of the controls from the preference store
|
private void store values perform action 1 perform action 2 also save to system properties
|
save the states of the controls into the preference store
|
private void tab forward composite parent label vfiller new label parent swt left grid data grid data new grid data grid data new grid data grid data horizontal alignment grid data beginning grid data grab excess horizontal space false grid data vertical alignment grid data center grid data grab excess vertical space false vfiller set layout data grid data
|
creates a tab of one horizontal spans
|
protected void populate tool bar itool bar manager toolbar toolbar add get detach tab action
|
invoked during toolbar creation to populate the main grouping
|
protected void populate viewer menu imenu manager viewer menu viewer menu add get detach tab action
|
invoked during menu creation to populate the main grouping
|
public void update human intervention dialog jpanel contentpane new jpanel set content pane contentpane contentpane set layout new box layout contentpane box layout y axis set title evaluation label judgment contentpane set border border factory create empty border 10 10 10 10 add weak impact resolution panel get content pane add make panel1 put some space between the panels get content pane add box create rigid area new dimension 0 20 get content pane add box create vertical glue
|
the contributing impacts for mo can change while the dialog is up
|
private jpanel make left panel jcomponent comp int offset jpanel leftpanel new jpanel leftpanel set layout new box layout leftpanel box layout x axis leftpanel add box create rigid area new dimension offset 0 leftpanel add comp leftpanel add box create horizontal glue return leftpanel
|
returns a panel that will be growable but will display the
|
private image get impact icon impact impact image table it model get framework get image table image im impact get image image im new image return it get sizing im 0 iconheight
|
returns a small image for the impact of the given impact
|
private image get label image object type image table it modelobject get model get framework get image table image im modelobject get model get framework get image type return it get sizing im 0 iconheight return get label image type iconheight
|
returns a small image for the given softgoal label
|
private image get label image object type int height image table it modelobject get model get framework get image table image im modelobject get model get framework get image type return it get sizing im 0 height
|
returns an image for the given softgoal label of the specified
|
public int create view int viewtype switch viewtype case 0 d o graphic view will be created views add new graphic view model high id graphic viewtypes add high id 0 if graphic 1 break case 1 views add new tree view model d o tree view will be created tree high id viewtypes add high id 1 break case 2 views add new text view model d o textual description will be created textual high id viewtypes add high id 2 set view id return high id
|
creates a view of the current model
|
public void delete view view v
|
destroys a view
|
public iterator get views return views iterator
|
returns a list of extant views
|
public iterator serialized views return null
|
returns a list of the serialized views
|
public iterator active views return null
|
returns a list of the active open onscreen views
|
public view get view by index int index d o come to get view by index index iterator i views iterator while i has next view v view i next if v get id index d o current id is v get id return v return null
|
returns the view with the requested index and if no such view exists
|
public rectangle get bounds return new rectangle get centre x int dx get scale width 2 get centre y int dy get scale height 2 width height
|
returns a rectangle that bounds our text
|
public void set font if get scale 1 font view get default font else int defaultsize view get default font get size font new font sans serif font plain int get scale defaultsize 30 30 int get scale 10 font new font arial font plain int get scale defaultsize 30 30 int get scale 10 fontmetrics view get font metrics font set text text need to recalculate the word wrapping
|
sets our font
|
public void write byte b throws ioexception fos write b
|
writes out a byte
|
rectangle get highlight bounds linda do this get selectable bounds 5 in every direction return null
|
the bounds of the area that is highlighted when this object is
|
public void write short s throws ioexception fos write s short 0xff fos write s 8
|
writes out a short
|
public void write int i throws ioexception fos write i 0xff i 8 fos write i 0xff i 8 fos write i 0xff i 8 fos write i 0xff
|
writes out an int
|
public boolean is highlighted return view get highlighted objects contains this
|
returns true iff this object is currently highlighted
|
public void set highlighted boolean highlight if highlight if is highlighted view get highlighted objects add this else if element is selected we deselect it otherwise we do nothing if is highlighted view get highlighted objects remove this
|
sets whether this object is highlighted
|
protected iterator get attributes return attributes iterator
|
returns an iterator of our attributes
|
protected rectangle get attribute bounds iterator i get attributes rectangle totalbounds null while i has next rectangle attbounds graphic view attribute i next get bounds if attbounds null if totalbounds null totalbounds attbounds else totalbounds add attbounds return totalbounds
|
returns a bounding rectangle for all of our attributes
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.