input
stringlengths
10
828
output
stringlengths
5
107
protected void set mfrag cache map mfrag owlindividual mfrag cache this mfrag cache mfrag cache
this map contains a temporary cache for mfrags and owl individuals representing them
public void set module name string module name this module name module name this set name module name this set title module name this update ui this repaint
setter for this module name
public void generate cpt throws invalid operation exception if is cpt generated potential table cpt prob node get probability function cpt add variable prob node float probability of each state 1 0f possible values size for int i 0 i possible values size i cpt set value i probability of each state cpt generated true else throw new invalid operation exception
generate the cpt of this node using the possible values
public void remove all parents list ssbnnode aux new array list ssbnnode aux add all this get parents for ssbnnode node aux this remove parent node node get children remove this remove context father ssbnnode
remove all parents of the ssbnnode
public void generate cptfor all ssbnnodes ssbn ssbn throws mebnexception ssbnnode general exception initial assertion if ssbn null return iterate over all nodes for ssbnnode root ssbn get ssbn node list if root is cpt already generated ignore nodes returning true for is cpt already generated continue else generate cpt root set flag to ignore next time root set cpt already generated true
it generates cpts for all
private void destroy path entity node node entity node parent node get parent if parent null parent remove children node if parent get children size 0 destroy path parent
destroy a path in the tree
private int get ov level ordinary variable ov entity node node root int level 0 while node get ov equals ov node null node node get children get 0 level if node null return level else return 1
get the level of a ov in the tree
public string get name string name new string this resident node get name name for ovinstance ovi this get arguments if name char at name length 1 name name ovi get entity get instance name name name id id p permanent return name
returns the name of the node which is the same of residents and
public string execute command string command for int i 0 i this get maximum query attempt count i try return pli s evaluate command module finding name null to string catch exception e debug println this get class failed to query powerloom attempt i e try thread sleep this get maximum query attempt wait time catch throwable t debug println this get class failed to sleep thread until next powerloom query attemtp t continue return
debug method used for execute a command directely in the powerloom
public string get description string name new string this resident node get name name for ovinstance ovi this get arguments if name char at name length 1 name name ovi get entity get instance name name name id id p permanent return name
returns the name of the node which is the same of residents and
public boolean set parameter value int parameter string value if parameter list get parameter null parameter list put parameter value return true else return false
set a value of a parameter
protected void set context cache map context node owlindividual context cache this context cache context cache
this map contains a temporary cache for
protected void add input node father input node father get parent input nodes list add father
add a node in the list of input nodes fathers of this node
private void remove resident node father resident node node get resident node father list remove node
dont use this method use remove resident node child list
public void delete node list clear for imulti entity node node resident node list node remove from mfrag resident node list new array list resident node for imulti entity node node input node list node remove from mfrag input node list new array list input node for ordinary variable variable ordinary variable list variable remove from mfrag ordinary variable list new array list ordinary variable todo cuidado analisar se a classe mae realmente esta deletando estes nodos for imulti entity node node context node list node remove from mfrag context node list new array list context node
method responsible for deleting this mfrag but not its nodes and
public int get maximum query attempt count return maximum query attempt count
this is the amount of times a query to powerloom will be attempted
public void add context node context node context node context node list add context node add node context node context node set mfrag this get multi entity bayesian network plus context node nul
method responsible for adding the given node in its context node list
public void add resident node resident node resident node resident node list add resident node add node resident node get multi entity bayesian network plus domain resident node num
method responsible for adding the given node in its resident node list
public void set maximum query attempt count int maximum query attempt count this maximum query attempt count maximum query attempt count
this is the amount of times a query to powerloom will be attempted
public void add input node input node input node input node list add input node add node input node get multi entity bayesian network plus generative input node num
method responsible for adding the given node in its input node list
public void add ordinary variable ordinary variable ordinary variable ordinary variable list add ordinary variable ordinary variable num add node ordinary variable
method responsible for adding the given ordinary variable in its ordinary variable list
public long get maximum query attempt wait time return maximum query attempt wait time
this is the amount of time in milliseconds to wait when a query
public object entity get object entity by name string name for object entity oe list entity if oe get name equals name return oe return null
returns the object entity with the name
public void clear all instances object entity entity this list entity instances remove all entity get instance list entity remove all instances
clears all instances of a particular object entity
public void set prowl ontology namespace uri string prowl ontology namespace uri if this get prowl model user delegator null default prowl2 model user this get prowl model user delegator set prowl ontology namespace uri prowl ontology namespace uri this prowl ontology namespace uri prowl ontology namespace uri
this string identifies the uri of pr owl elements http www
public void set parents list ssbnnode parents this parents parents
this method sets a parent without checking structure consistency
public void set maximum query attempt wait time long maximum query attempt wait time this maximum query attempt wait time maximum query attempt wait time
this is the amount of time in milliseconds to wait when a query
public void remove node from list is possible value of imulti entity node node list is possible value of remove node
removes the given node from the list where this entity is a possible
public void set mfrag mfrag frag m frag frag
set the mfrag where this node resides
public void remove ordinary variable ordinary variable ordinary variable ordinary variable list remove ordinary variable remove node ordinary variable
method responsible for removing the given ordinary variable from its ordinary variable list
public imebnelement factory get mebnfactory return mebn factory
this factory instantiates the mebn elements loaded from an owl ontology
public void add mfrag mfrag m frag default mutable tree node new child new default mutable tree node pog default tree model get model insert node into new child root root get child count scroll path to visible new tree path new child get path new child set user object m frag node tree map put new child m frag inverse node map put m frag new child scroll path to visible new tree path new child get path repaint
add a mfrag to the tree how child of the root node
public void add node mfrag m frag node node default mutable tree node node father inverse node map get m frag default mutable tree node new child new default mutable tree node pog default tree model get model insert node into new child node father node father get child count scroll path to visible new tree path new child get path new child set user object node node father add new child node tree map put new child node node inverse node map put node new child scroll path to visible new tree path new child get path repaint
add a node into the tree how child of a mfrag
public void set mebnfactory imebnelement factory mebn factory this mebn factory mebn factory
this factory instantiates the mebn elements loaded from an owl ontology
public icompiler get compiler if this get resident null return this get resident get compiler return null
obtains the compiler to be used by this ssbn node
public owlreasoner get last owlreasoner return owl reasoner
this is the last owlreasoner used by
public void set compiler icompiler compiler if this get resident null return this get resident set compiler compiler
sets which compiler class we should use to parse pseudocode and generate cpt
public string get has mexpression property name return has mexpression property name
this is the name of has mexpression object property
public void show table edition pane resident node resident mebn controller open cptdialog resident
show the table edit in the top component
public void set last owlreasoner owlreasoner owl reasoner this owl reasoner owl reasoner
this is the last owlreasoner used by
private void next char if index text length look text index else look look index text length text index
reads the next input character updates lookup character
public iowlclass expression parser facade get owl class expression parser delegator if owl class expression parser delegator null instantiate the default owl expression parser owl class expression parser delegator owlclass expression parser facade get instance this get last owlontology return owl class expression parser delegator
it will lazily instantiate owlclass expression parser facade if none was specified
public void set has mexpression property name string has mexpression property name this has mexpression property name has mexpression property name
this is the name of has mexpression object property
public boolean contains domain resident node resident node resident node return resident node list contains resident node
method responsible to tell if the domain resident node list contains the given
public void update if tree mfrag null tree mfrag update tree
update the tree of ordinary variables of the mfrag active
public boolean contains generative input node input node generative input node return input node list contains generative input node
method responsible to tell if the generative input node list contains the given
public node contains node string name array list node list this get node list node node null for int i 0 i list size i node list get i if node get name equals ignore case name return node return null
checks if there are any node with a particular name inside this mfrag
public void set description text string description image icon icon text area set text description if icon null icon icon controller get txt file icon jbutton btn new jbutton icon btn set background color white btn set size 20 20 btn se jlabel label description new jlabel resource get string description label label description set background color white tool bar remove all tool bar add btn tool bar add label description
changes the text of the description pane and its icon
public void set description text string description int type image icon icon null switch type case description pane resident icon icon controller get resident node icon break case description pane input icon icon controller get input node icon break case description pane context icon icon controller get context node icon break case description pane ovariable icon icon controller get ovariable node icon break case description pane mfrag icon icon controller get mfrag icon break case description pane mtheory icon icon controller get mtheory node icon break default icon null break this set description text description icon
changes the text of the description pane and its icon using
public void set node resident node node this node node if this node null this node get mfrag null this mebn this node get mfrag get multi entity bayesian network
setting this to null or not setting at all makes
protected void set built in rvcache map string owlindividual built in rvcache this built in rvcache built in rvcache
this is a cache of individuals of built in rvs
private boolean is valid conditionant value multi entity bayesian network mebn string conditionant name string conditionant value node conditionant mebn get node conditionant name if conditionant null debug println no conditionant of name conditionant name return false debug println conditionant node found conditionant get name if conditionant instanceof iresident node debug println is multientitynode return iresident node conditionant get possible value by name conditionant value null else debug println conditionant is not a resident node return false
consistency check c09
public void reload entity list this update
reloads and updates the list of entities
private void update object entity ant selected selected list model clear list entity mebn controller get multi entity bayesian network get object entity container get list entity list model new default list model for entity entity list entity list model add element entity jl entities set model list model selected ant selected
update the list of entities
public void clear arguments for mfrag this arguments for mfrag clear
clears the currently stored map of arguments for a given
public boolean turn arguments for mfrag mfrag m frag if m frag equals this get resident get mfrag if is recursive arguments arguments for mfrag get m frag this set currently selected mfrag by turn arguments m frag return true else return true else list ovinstance arguments temp arguments for mfrag get m frag if arguments temp null arguments arguments temp this set currently selected mfrag by turn arguments m frag return true else return false
turn the arguemnts of the ssbnnode for the arguments that it should
public string get prowl2 model file path return prowl2 model file path
this is a path to an owl file containing pr owl2 definitions
public int get index try return int index float this original text length float this text length catch exception e maybe there were a division by zero return index
use this method to determine where the error has occurred
public void set prowl2 model file path string prowl2 model file path this prowl2 model file path prowl2 model file path
this is a path to an owl file containing pr owl2 definitions
public void reset cache try this set ontology prefix cache new hash map owlontology prefix manager catch exception e e print stack trace
this method is a facilitator to clear and initialize internal cache
private ikboption panel builder get selected kboption panel if this get kb to option map null return null for jradio button menu item option this get kb to option map key set if option is selected return this get kb to option map get option return null
obtains the currently selected by j option radio button panel for kb options
public string get state at int index return evaluation ssbnnode state values index name
returns a state of this ssbn node
public void change to mtheory pane if this get mode mebn mode try if mtheory view pane null mtheory view pane new mtheory view pane this mebncontroller this get controller main content pane add mtheory view pane mebn pane mtheory view pane else mtheory view pane get graph pane update mtheory view pane refresh mtheory tree mebncontroller this get controller set edition mode this get card layout show get main content pane mebn pane mtheory view pane catch class cast exception e throw new illegal argument exception the controller of this network window must be set to mebncontroller e
this method changes the main screen from edition pane to
public int get states size return evaluation ssbnnode state values length
returns a number of states of this ssbn node
public int get type return this get id
returns an id of this object
public multi entity bayesian network get multi entity bayesian network return multi entity bayesian network this get controller get network
retorna a rede probabil stica code probabilistic network code
public evidence tree get evidence tree if ssbn compilation pane null return ssbn compilation pane get evidence tree else return null
obtains the evidence tree
public void execute return
currently it does nothing but it might be useful for implementing
public void set status string status try super set status status catch exception e e print stack trace if ssbn compilation pane null ssbn compilation pane set status status
updates the status shown at compilation pane
public void unselect buttons group buttons tabs enumeration abstract button ab enumeration group buttons tabs get elements while ab enumeration has more elements ab enumeration next element set selected false
unselect all the buttons of the group buttons tabs buttons of tabs
public boolean is empty nested clauses clauses are asserted not to be null because we do not have a setter for clauses return this clauses size 0
tests if this table is empty
public void save mebn file file multi entity bayesian network mebn owlmodel owlmodel throws ioexception iomebn exception this set owlmodel to use owlmodel this save mebn file mebn
save the mebn structure in an file pr owl
protected void load meta entities classes owlnamed class meta entity class collection instances rdfindividual individual one meta entity class owl model get owlnamed class meta entity instances meta entity class get instances false for object rdfindividual instances individual one rdfindividual rdfindividual try type type mebn get type container create type individual one get browser text mebn get names used add individual one get browser text catch type already exists exception exception ok remember that basic types already exist debug println meta entity loaded individual one get browser text
load the meta entities for types of the mebn structure
public jpanel get main content pane return main content pane
this is the panel where the default mebn edition is placed
public void set main content pane jpanel main content pane this main content pane main content pane
this is the panel where the default mebn edition is placed
public imebnedition panel plugin manager get plugin manager return plugin manager
this is the manager for mebn editor panels plugin framework
public void set plugin manager imebnedition panel plugin manager plugin manager this plugin manager plugin manager
this is the manager for mebn editor panels plugin framework
public jscroll pane get plugin distribution scroll pane return plugin distribution scroll pane
this is the last plugin node editor pane created in
public mfrag get currently selected mfrag by turn arguments return currently selected mfrag by turn arguments
this is the last mfrag set by
protected void clear all prowlontology individuals jena owlmodel model collection owlindividual individuals null collection string untouchable individuals this get names of all modified labels for string class names this get names of all modified prowlclasses try individuals model get owlnamed class class names get instances false for owlindividual individual individuals try if untouchable individuals contains individual get name individual delete debug println this get class removing all prowl individuals individual get name model delete instance individual catch exception e e print stack trace continue catch exception e2 e2 print stack trace continue
clears pr owl specific individuals
public jtool bar get plugin node name tool bar return plugin distribution bar
this is the toolbar used for changing plugin node name
public void set plugin node name tool bar jtool bar plugin distributio bar this plugin distribution bar plugin distributio bar
this is the toolbar used for changing plugin node name
public void clear all prowlmodel owlmodel model minimize memory stored ontology try this clear all prowlontology individuals jena owlmodel model this clear all object entity jena owlmodel model catch exception e this is not a major problem yet lets go e print stack trace
clears all pr owl ontology components within a jena owlmodel
public boolean supports string extension boolean is load only return fileextension equals ignore case extension
cheks file extension compatibility
public jbutton get plugin node name tool bar button return plugin node tool bar button
this is a button inside
public void add node resident node node node formula tree node place formula view tree get node formula active if node place null node place set name node get name resident node pointer resident node pointer new resident node pointer node context node node place set node variable resident node pointer node place set type node enum type operand node place set sub type node enum sub type node formula view tree update tree
add one ordinary variable in the formula tree replace
public jtext field get plugin node name text field return plugin node name text field
this is a text field to change plugin node name
protected void save context node for mfrag mfrag mebn get domain mfrag list for context node context node mfrag get context node list owlindividual context node individual map context get context node node formula tree formula node context node get formula tree if formula node null save context node formula formula node context node individual context node save context possible values context node individual context node if context node get description null context node individual add comment context node get description
load the context nodes from the mebn structure for the pr owl structure
public void set plugin node name text field jtext field plugin node name text field this plugin node name text field plugin node name text field
this is a text field to change plugin node name
public graph load file input boolean is to use order of ubffile throws load exception ioexception this set to use order of ubffile is to use order of ubffile return this load input
delegates to load
protected base io set up plugin io instantiate the new io plugin aware file extension iodelegator io delegator plugin aware file extension iodelegator new instance false customize the attributes io delegator set core plugin id this get mebn module plugin id io delegator set extension point id this get mebn ioextension point id reload plugins io delegator reload plugins if no plugin was loaded add a default io if io delegator get delegators is empty io delegator get delegators add ubf io get instance return io delegator
this method uses
protected string get token string s throws illegal argument exception for int i 0 i tokens length i if tokens i 0 equals s return tokens i 1 throw new illegal argument exception this resource get string invalid syntax
convert a token type to
public void test execute command string result kb execute command retrieve all starshipzone x1 x assert not null result system out println result result kb execute command retrieve all isownstarship x11 assert not null result system out println result result kb execute command retrieve all not isownstarship x21 assert not null result system out println result try result kb execute command retrieve all itexists x666 catch exception e e print stack trace fail e get message assert not null result system out println result
test method for
protected void set token string s string new value throws illegal argument exception for int i 0 i tokens length i if tokens i 0 equals s tokens i 1 new value throw new illegal argument exception this resource get string invalid syntax
sets a token value
protected void save empty simple arg relationship owlindividual individual string name int arg number owlobject property has argument property owlobject property owl model get owlobject property has argument owlnamed class argument class owl model get owlnamed class simple argument relationship owlindividual argument individual argument class create owlindividual name arg number individual add property value has argument property argument individual owldatatype property has arg number owldatatype property owl model get owldatatype property has arg number argument individual set property value has arg number arg number
save a simple arg relationship without ordinary variable set
public void save mebn file file base io io multi entity bayesian network mebn throws iomebn exception ioexception io save file mebn
saves a mtheory into a file by using an i o class
protected void save context possible values owlindividual individual imulti entity node node has possible values owlobject property has possible values property owlobject property owl model get owlobject property has possible values for entity possible value node get possible value list if possible value instanceof categorical state entity individual add property value has possible values property this map categorical states get possible value else boolean states entity individual add property value has possible values property this map boolean states entity get possible value
save the possible values of a node
public boolean supports string extension boolean is load only for string ext this get supported file extensions is load only if ext equals ignore case extension return true return false
checks if file extension is compatible to what this i o expects
public string get has argument property name return has argument property name
this is the name of has argument property name
public void test set is using default cpt ssbnnode parent ssbnnode get instance this ssbnnode get probabilistic network resident node this resident get parents get 0 assert true this ssbnnode is using default cpt assert true parent is using default cpt this ssbnnode set using default cpt true assert true this ssbnnode is using default cpt assert true parent is using default cpt this ssbnnode set using default cpt false assert true this ssbnnode is using default cpt assert true parent is using default cpt
test method for