input
stringlengths
10
828
output
stringlengths
5
107
public doc data find doc data string name return corpus get name
find the document data for the document with the given name
public int get corpus size return corpus size
gets the corpus size which is the number of documents in the corpus
public boolean has more data return false
return whether the underlying data source has more data to be loaded
public boolean is graph dynamic return graph dynamic
get whether the graphs are dynamically created by this corpus
public void load corpus do nothing by default
load the document corpus from a data repository
public void remove doc doc data doc if corpus contains key doc get name corpus remove doc get name set string keys doc get keys for string key keys int val all keys get key if val 1 all keys remove key key graph remove key else all keys put key val 1 sim graph remove doc for accum edge doc data edge key graph get edge set edge remove edge doc if edge get weight 0 no docs left remove the accum edge key graph remove edge edge
remove a document from the corpus
public void set graph dynamic boolean dynamic graph dynamic dynamic
set whether the graphs are dynamically created
public boolean extend graph string graph name graph n e graph n node graph n e sub graph get graph graph name node node to string int node size graph order int edge size graph size graph add all sub graph return node size graph order edge size graph size
extend the given graph around the specified node
public boolean extend tree string tree name tree n tree n node use the basic tree retrieval but add nodename as additional arg tree n new root get tree tree name node node to string int kid count tree get child count new root should be the same as node so copy all children for tree n kid new root get child trees tree add kid get data node return kid count tree get child count
extend the given tree around the specified node
public boolean augment record data record rec boolean augmented false for semantic reasoner reasoner this augmented reasoner augment record rec return augmented
apply the reasoners in sequence to the data record
public void set filters string filters
set the filters for this reader
public data structure type get structure type string data name return type map get data name
get the data type for the specified data name
public semantic accessor get accessor return accessor
get the semantic accessor used by this data generator
public string get default data return def data
get the default data structure used for this data generator
public void set source string source rules clear swrl file source
set the source for this reader
public void init accessor file config file throws ioexception file input stream fis new file input stream config file accessor set config fis fis close
initialize the translator
public void clear svg render clear
clear any stored settings and data
public void set config input stream in stream
set the configuration information from an input stream
public void close if out writer null svg render write svg out writer try out writer close catch ioexception exc exc print stack trace
close this writer
public void init accessor url config url throws ioexception input stream stream config url open stream accessor set config stream stream close
initialize the translator
public string query string query string return generate data query string def data
generate data from the given endeca query string and format it into the
public string query string query string int max results accessor set max records max results return query query string
generate data from the given query string and format it into the
public void write data collection data record data todo auto generated method stub
write the collection of data
public void write graph graph data record data record graph svg render render svg graph graph
write graph data
public void set accessor semantic accessor sem accessor accessor sem accessor
set the semantic accessor used by this data generator
public void set doc base url document base if doc base null throw new illegal argument exception doc base cannot be null this doc base document base get dataset names get graph names get grid names get tree names
set the document base for this data accessor client
public void write grid grid data record grid todo auto generated method stub
write grid data
public void write tree tree data record tree svg render render svg tree tree
write tree data
public void set default data string default data def data default data
set the default data structure used for this data generator
public void set semantic writer semantic writer writer sem writer writer
set the semantic writer used by this translator
public void set structure type data structure type structure type def structure structure type
set the default structure type
public void set init parameters map string string parameters string doc base str parameters get doc base if doc base str null doc base null throw new illegal argument exception cannot determine doc base try set doc base new url doc base str catch malformed urlexception exc throw new illegal argument exception invalid doc base doc base str
set any initialization parameters required by this data accessor
private void add field to element element rec elem string field set vals if field starts with for object val vals element field elem doc create element field field elem set attribute name field text txt node doc create text node val to string field elem append child txt node rec elem append child field elem
add a set of values for a particular field to the record element
protected void add simile element data record rec set string time fields rec get time field names for string field time fields time span span rec get time field field element event elem create event element span rec doc get document element append child event elem
adds a simile element for the associated data record
public void clear try doc doc build new document element doc elem doc create element data doc append child doc elem catch exception exc exc print stack trace
clear any stored settings and data
public void clear try doc doc build new document element doc elem doc create element data structure doc append child doc elem catch exception exc exc print stack trace
clear any stored settings and data
public void write data collection data record data for data record rec data add simile element rec
write the collection of data
public void close if template flag insert the templates before all other elements element doc elem doc get document element node ref node doc elem get first child for data template template template set element temp elem template to xml doc if temp elem null doc elem insert before temp elem ref node try transformer transform new domsource doc new stream result out writer out writer close catch exception exc exc print stack trace
close this writer
public void write graph graph data record data record graph write data graph get node set write data graph get edge set
write graph data
public void write grid grid data record grid for data record rec grid if rec null add simile element rec
write grid data
public void write tree tree data record tree for iterator data record iter tree breadth first iterator iter has next data record rec iter next add simile element rec
write tree data
public void close try write command commit write command optimize if out writer null out writer flush out writer close catch ioexception exc exc print stack trace
close this writer
public void clear kml writer clear
clear any stored settings and data
public void close random rand new random for timed geo layer layer layers values render style style layer get render style if style get draw color null style set draw color new color rand next float rand next float rand next float kml writer add geo layer layer kml writer close
close this writer
private string find category data record rec string buffer category new string buffer if category fields null category fields size 0 for string field category fields string val rec get field as string field if val null val length 0 category append val category append int len category length return len 0 category to string substring 0 len 3 null
find the category for a given record
public string get time field return time field
get the field within the data records which is used to identify the
public void set category fields list string fields category fields fields
identify the fields which will be used to sort the features into
public void set time field string field name time field field name
set the field within the data records which is used to identify the
public void set writer writer writer kml writer set writer writer
sets the internal writer specifying the output destination
private element convert tree to xml tree data record tree node data record rec tree node get data element tree elem convert data to xml rec tree node element children doc create element children tree elem append child children for tree data record child tree node get child trees children append child convert tree to xml child return tree elem
recursively create elements for the tree
private void store shape geo shape shape if shape null data record rec shape get data time span span time field null rec get time field time field null string category find category rec if category null kml writer add timed shape shape span else timed geo layer layer layers get category if layer null layer new timed geo layer category layers put category layer layer add timed shape shape span
store a shape pulling time and category information from its data record
public void write data collection data record data for data record rec data geo shape shape convert to geometry rec if shape null store shape shape
write the collection of data
public void set destination string destination base url destination
set the destination for this writer
public void write tree tree data record tree todo auto generated method stub
write tree data
private void add branch tree data record branch element parent element branch elem null if branch get child count 0 branch elem doc create element branch for tree data record child branch get child trees add branch child branch elem else branch elem doc create element leaf map string string att map branch get data write fields to map for string field att map key set element att elem doc create element attribute att elem set attribute name field att elem set attribute value att map get field branch elem append child att elem parent append child branch elem
recursively add branches to the tree
public boolean is data written return data written
return whether the data elements should be written
private void add graph data key string field string type element key elem doc create element key key elem set attribute for all key elem set attribute attr name field key elem set attribute id field key elem set attribute attr type type data fields add field doc get document element append child key elem
add data fields for a graph
public void clear doc doc build new document data fields clear
clear any stored settings and data
public boolean is template written return template flag
return whether the templates should be written out by this
public void set write limit int limit write limit limit
set the maximum number of records written to the server
public void write data collection data record dataset
write a dataset
public void set data written boolean written flag data written written flag
set the data written flag
public void write grid grid data record grid
write grid data
public void update data collection data record records throws ioexception send data records true
update the solr instance with the set of records
public void set template written boolean template written template flag template written
set the template written flag
public void run polling true while poll time 0 poll try thread sleep poll time 1000 catch interrupted exception exc ignore polling false
run the polling loop of this polling corpus
public void set parser format reader doc data doc parser parser doc parser
sets the document parser
public void set poll time int seconds poll time seconds
sets the poll time
public void write data collection data record records throws ioexception send data records false write command commit
write the collection of records to the solr instance
public void add source field string src field source fields add src field
add a field to the set of source fields for this descriptor
public string apply transform string value string xformed transform null transform apply transform value value return xformed
applies the string transformation to the field value
public void write graph graph data record data record graph try write data graph get node set write data graph get edge set catch ioexception exc throw new runtime exception cannot write graph data exc
write graph data
public string get lookup table return lookup table
get the name of the table used to look up indexed values
public void write data collection data record dataset element set elem doc create element dataset for data record rec dataset element data elem convert data to xml rec item if data elem has child nodes set elem append child data elem doc get document element append child set elem
write the collection of data
public string transform get transform return transform
get the transform if any for this descriptor
public void write grid grid data record grid try write data grid get all values catch ioexception exc throw new runtime exception cannot write grid data exc
write grid data
public void set default value t value default value value
set the default value for this field description
public void write data structure spec data structure spec spec template set add all spec get templates element struc elem spec to xml doc if struc elem null doc get document element append child struc elem
write the data structure specification element to the xml file
protected void set field name string name field name name
set the field name
public void set multi value boolean multi flag multi value multi flag
set whether this field is a multi valued field
public void write tree tree data record tree hash set data record recs new hash set data record for iterator data record iter tree breadth first iterator iter has next data record rec iter next recs add rec try write data recs catch ioexception exc throw new runtime exception cannot write tree data exc
write tree data
public boolean augment record data record rec boolean enhanced false if filter accept rec if add fields null rec merge data add fields enhanced true if set fields null enhanced true set string all set fields set fields get all field names for string field all set fields rec remove field field rec merge data set fields else if clear set fields set fields null enhanced true set string all set fields set fields get all field names for string field all set fields rec remove field field return enhanced
augment the data record
public void set add fields record data record rec add fields rec
set the add fields record
public void set set fields record data record rec set fields rec
set the set fields record
public void write graph spec graph spec spec template set add all spec get templates template set add all spec get edge templates element struc elem spec to xml doc if struc elem null doc get document element append child struc elem
write the graph specification element to the xml file
public void set pattern pattern new pattern pattern new pattern
set the pattern used by this token field
public void write tree tree data record tree element tree elem doc create element tree tree elem append child convert tree to xml tree doc get document element append child tree elem if template flag need to write node classes edge classes tree elem set attribute tree node class tree nodes set data record leaf set new hash set data record for iterator data record iter tree breadth first iterator iter has next leaf set add iter next template set add new data template tree nodes leaf set
write tree data
public owl class get owl class return owl cls
get the owl class for this thing
public void set owl class owl class cls owl cls cls
set the owl class for this thing
public void add relation string relation name owl thing related to boolean found false for owl restriction rest restricts value range type rest get range type if rest get property name equals relation name type equals value range all values from type equals value range some values from set string things rest get values if things null things add related to get name found true if found hash set string things new hash set string things add related to get name owl restriction rest new owl restriction relation name value range some values from things restricts add rest
add a relation to the set of relations to match
public void add restriction owl restriction rest restricts add rest
add a restriction to the set of restrictions for this query
public void add properties string prop list string props prop list split for string prop name props prop name prop name trim property property property get property prop name if property null throw new illegal argument exception property prop name not defined add property property
add a property or list of properties by name
public owl class get query class return query class
return the query class
public void add property property prop properties add prop if prop instanceof owl property owl class domain owl property prop get domain if aug class null aug class domain else if domain null domain equals aug class if domain get implied classes contains aug class aug class domain else todo determine proper class check restrictions prop
add a property which is augmented by this augmenter
public void set query class owl class cls query class cls
set the query class
public void add comment string comment comments add comment
add a comment to this ontology
public void add import url import url imports add import url
add an import to this ontology
private int check restrictions property prop int max card 1 set owl restriction rest set aug class find restrictions prop get name for owl restriction rest rest set max card rest get max cardinality if prop instanceof owl property owl property prop is functional max card 1 return max card
check restrictions for the augmented class and property name
public url get prior return prior
get the prior version for this ontology
public string get config return null
get the configuration string