input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private string parse reference element elem string ref name elem get attribute rdf resource if ref name null ref name length 0 ref name elem get attribute rdf about if ref name null ref name length 0 ref name elem get attribute owlx name if ref name starts with ref name ref name substring 1 return ref name
|
parse the name reference from the element
|
private void build time fields set data record records for data record rec records set string time fields rec get time field names for string field time fields if field descs contains key field field descs put field new time field desc field
|
build the time field descriptors from a set of records
|
public string get name key return name keys is empty null name keys get 0
|
get the name key
|
public string get record identifier return identifier
|
get the record identifier which is used by some accessors to determine
|
public void add l data tree l child new tree l data add child
|
adds a child with the specified data to this tree
|
public boolean add l data l parent data tree l parent node find child parent data boolean added false if parent node null parent node add data added true return added
|
adds the child with the specified data to the parent with the specified
|
public void set defined values owl thing owl thing for owl restriction restrict restrictions set any has value properties first set restriction value restrict owl thing if parent null parent set defined values owl thing if intersection null for validating val intersection if val instanceof owl class owl class val set defined values owl thing else if val instanceof owl restriction set restriction value owl restriction val owl thing
|
sets the values which are defined by this class for the specified
|
public void add tree l new child super add new child kid map put new child get data new child
|
adds a child to this tree
|
public int get level l data return find child data get level
|
gets the level of the specified data element
|
public int size int tree size 1 kid map size for tree l kid kid map values tree size kid size return tree size
|
return the size of the tree
|
public boolean matches template data record node return validate fields node get time field names contains all node get time field names get enum field names contains all node get enum field names get int field names contains all node get int field names get location field names contains all node get location field names get measure field names contains all node get measure field names get text field names contains all node get text field names
|
determines if a data record matches this data template
|
private void set parent string new parent parent get owl class new parent if parent null set owl class dis parent get disjoint if dis null disjoint new hash set owl class dis implied add parent implied add all parent get implied classes
|
set the parent of this owl class and update the supporting information
|
public void merge data data template other node super merge data other node hash map string field desc other field defs other node get field descriptions other field defs put all field descs field descs other field defs
|
merges the data from another data record with this one
|
public void set record identifier string record identifier identifier record identifier
|
set the record identifier which is used by some accessors to determine
|
public element to xml document doc element elem doc create element data template elem set attribute name get name for field desc desc field descs values elem append child desc to xml doc return elem
|
converts this data record template to an xml element
|
public void add edge e child edge edges add child edge
|
adds the edge
|
public double get weight return edges size
|
get the weight of the accumulated edge
|
public void remove edge e child edge edges remove child edge
|
removes the edge from this accumulated edge
|
public c get double coords c value value map get coords if value null interp range 0 figure how to do generalized interpolation return value
|
gets the cell at the specified coordinates
|
public c get int coords double dbl coords to double coords return get dbl coords
|
gets the cell at the specified coordinates
|
public int get dimension count return dim count
|
gets the dimension count
|
public c set double coords c element if coords length dim count throw new illegal argument exception coordinates must have dimension dim count return value map put coords element
|
sets the cell content at the specified coordinates
|
public c set int coords c element double dbl coords to double coords return value map put dbl coords element
|
sets the cell content at the specified coordinates
|
public n get destination return destination
|
get the destination node
|
public n get origin return origin
|
get the origin node
|
public boolean add n node return nodes add node
|
add a node to the graph
|
public boolean add edge e edge n orig n dest segment n e seg new segment n e orig edge dest nodes add orig nodes add dest return seg equals edges put edge seg
|
add the edge element to the graph
|
public e get edge n n1 n n2 e edge null for graph segment n e seg edges values n orig seg get origin n dest seg get destination if orig equals n1 dest equals n2 orig equals n2 dest equals n1 edge seg get edge return edge
|
get the edge between two nodes
|
public boolean add n node boolean added cluster map contains key node if added graph n e new graph directed new directed graph n e new undirected graph n e new graph add node cluster map put node new graph cluster set add new graph return added
|
add a node to the cluster graph
|
public e get edge n n1 n n2 graph n e cluster cluster map get n1 return cluster null cluster get edge n1 n2 null
|
get the edge between two nodes
|
public void add all graph extends n extends e graph for n node graph get node set add node for segment extends n extends e seg graph get segment set add edge seg get edge seg get origin seg get destination
|
add all elements from the specified graph to this graph
|
public void clear get edge set clear get node set clear
|
clear all nodes and edges from this graph
|
public boolean contains object obj return get node set contains obj
|
determines whether the given object is a node within this graph
|
public boolean contains edge object obj return get edge set contains obj
|
determines whether the given object is an edge within this graph
|
public boolean is empty return get node set is empty
|
return whether the graph is empty
|
public int order return get node set size
|
return the order of the graph
|
private void add element element elem int anc len ancestors size element parent ancestors get anc len 1 parent append child elem
|
adds the svg element to the current document
|
public boolean remove object obj boolean removed get node set remove obj if removed for prajna util graph segment n e seg get segment set n orig seg get origin n dest seg get destination if orig equals obj dest equals obj e edge seg get edge remove edge edge return removed
|
remove an object from the graph
|
public boolean remove edge object edge return get edge set remove edge
|
remove the edge from the graph
|
public int size return get edge set size
|
return the size of the graph
|
public int current segment double coords if current path is done shape next shape iter next current path next get path iterator transform return current path current segment coords
|
returns the coordinates and type of the current path segment in the
|
public int current segment float coords if current path is done shape next shape iter next current path next get path iterator transform return current path current segment coords
|
returns the coordinates and type of the current path segment in the
|
public int get winding rule return current path get winding rule
|
returns the winding rule for determining the interior of the path
|
public boolean is done return current path is done shape iter has next
|
tests if the iteration is complete
|
public void next if current path is done shape next shape iter next current path next get path iterator transform else current path next
|
moves the iterator to the next segment of the path forwards along the
|
public edge policy get edge policy return edge policy
|
gets the edge policy
|
public void add function string function if script body null element def elem svg doc create element defs element script elem svg doc create element script script elem set attribute type text javascript script body svg doc create text node script elem append child script body def elem append child script elem top elem insert before def elem top elem get first child string script text script body get data script body set data script text n function
|
adds a javascript function to the svg document
|
private void update cluster graph n e cluster cluster graph n e sub graph new cluster graph n e cluster set graph n e sub clusters sub graph get cluster set if sub clusters size 1 cluster has been split copy new clusters into place for graph n e sub clust sub clusters for n node sub clust get node set cluster map put node sub clust cluster set clear cluster set add all cluster map values
|
update a cluster to determine if it has been split
|
public void begin group map string string attributes element group elem svg doc create element g for string att attributes key set group elem set attribute att attributes get att add element group elem ancestors add group elem
|
begin a group of elements within the svg document
|
public void begin link string url string if link elem null link elem svg doc create element a link elem set attribute xlink href url string link elem set attribute target top add element link elem ancestors add link elem else system err println svg graphics error cannot start url string link already open
|
begin a hyperlink reference
|
public n get end node return end node
|
get the ending node of this path
|
public date get earliest time date tstart null for graph segment n e seg get segment set n orig seg get origin n dest seg get destination if orig instanceof sequential date start sequential orig get earliest time if tstart null start before tstart tstart start start sequential dest get earliest time if start before tstart tstart start e edge seg get edge if edge instanceof sequential date start sequential edge get earliest time if tstart null start before tstart tstart start return tstart
|
returns the earliest time for any activity within this graph
|
public date get latest time date tstop null for graph segment n e seg get segment set n orig seg get origin n dest seg get destination if orig instanceof sequential date stop sequential orig get latest time if tstop null stop after tstop tstop stop stop sequential dest get latest time if stop before tstop tstop stop e edge seg get edge if edge instanceof sequential date stop sequential edge get latest time if tstop null stop after tstop tstop stop return tstop
|
returns the latest time for any activity within this graph
|
public n get start node return start node
|
get the starting node of this path
|
public boolean is path valid return get valid path nodes null
|
return whether the path is valid or not
|
public void set end node n node end node node
|
set the ending node for this path
|
public void clear build svg doc
|
clear the current svg document and rebuild
|
public void set start node n node start node node
|
set the start node for this path
|
public boolean has next return child iter has next
|
return whether the iterator has more elements
|
public e next return child iter next
|
return the next element for this iterator
|
public void remove child iter remove child iter add null num filled
|
removes the current object
|
private int convert coords int coords int index 0 if coords length dim sizes length throw new illegal argument exception coordinates must have dimension dim sizes length for int i 0 i dim sizes length i if coords i dim sizes i coords i 0 throw new illegal argument exception coordinate i out of bounds coords i outside range 0 dim sizes i 1 index index dim sizes i coords i return index
|
convert coordinates into the cell index
|
public c get double coords int int coords to int coords return get int coords
|
gets the cell at the specified coordinates
|
public boolean add edge e edge n orig n dest segment n e seg new segment n e orig edge dest add orig add dest return seg equals edges put edge seg
|
add the edge element to the graph
|
public e get edge n n1 n n2 e edge null for graph segment n e seg get segment set n orig seg get origin n dest seg get destination if orig equals n1 dest equals n2 edge seg get edge return edge
|
get the edge between two nodes
|
public c get int coords int index convert coords coords return values get index
|
gets the cell at the specified coordinates
|
public int get dimension count return dim sizes length
|
gets the dimension count
|
public int get num values return num filled
|
get the number of cells filled
|
public boolean is continuous return false
|
return whether the grid values should be considered continuous
|
public c set double coords c element int int coords to int coords return set int coords element
|
sets the cell content at the specified coordinates
|
public c set int coords c element int index convert coords coords if element null num filled return values set index element
|
sets the cell content at the specified coordinates
|
public void set key string key if cipher null throw new illegal state exception cipher not properly initialized try string full key key if key length 24 full key key qwertyuiopasdfghjklzxcvbnm secret key factory key fac secret key factory get instance cipher get algorithm key spec spec new desede key spec full key get bytes cipher key key fac generate secret spec catch exception exc throw new illegal state exception exc
|
set the key
|
public int find key string lookup name string label tree map integer string lookup lookups get lookup name int key 1 if lookup null for int key val lookup key set string value lookup get key val if label equals value key key val return key
|
find the key value
|
public string get label string lookup name int key tree map integer string lookup lookups get lookup name return lookup null lookup get key null
|
gets the label for the specified key
|
public string get source return feed url to string
|
get the source for this reader
|
public boolean has more data return last read null new date get time last read get time delay
|
returns whether the reader has more data to read
|
public void set source string source try set url source new url source catch malformed urlexception exc throw new illegal argument exception url is malformed source
|
set the source for this rss reader
|
public boolean add to buffer x data throws ioexception buffer add data boolean write false if buffer size buffer size buffer size 1 write data buffer buffer clear write true return write
|
add a record to the internal buffer
|
public void close try write data buffer catch ioexception exc system err println problem writing buffer before close exc print stack trace
|
close the writer
|
public void write buffer throws ioexception if buffer size 0 write data buffer buffer clear
|
write the buffer to the output destination and ensure the information
|
public void arrange tree n tree dimension dim get size int margin get margin set node location tree get data new point dim width 2 margin int depth tree get depth int y span dim height 2 margin int spacing y span depth if spacing step down step down spacing arrange subtree tree margin dim width margin
|
arranges the tree starting at the root node
|
public void close try reader close catch ioexception exc ignore
|
close the current reader stream
|
public int get max records read return max read
|
get the maximum number of records read by each call to
|
public void end group int anc len ancestors size ancestors remove anc len 1
|
end the current group
|
public string get source return file name
|
get the source for this reader
|
public boolean has more data boolean ready false try ready reader ready catch ioexception ioe ignore and return false return ready
|
returns whether the reader has more data to read
|
private void read header try string line reader read line fields line split t catch ioexception exc ignore
|
parses the tabbed record file to extract the header
|
public void set input stream input stream in stream reader new buffered reader new input stream reader in stream read header
|
sets the input stream
|
public void set max records read int max records read max read max records read
|
set the maximum number of records read by each call to
|
public void set source string source try file name source input stream input stream new buffered input stream new file input stream source reader new buffered reader new input stream reader input stream read header catch file not found exception exc throw new illegal argument exception file not available source
|
set the source for this reader
|
public void end link int anc len ancestors size ancestors remove anc len 1 link elem null
|
end the current hyperlink element
|
public void arrange graph n e graph dimension dim get size int margin get margin int x span dim width margin 2 int y span dim height margin 2 for n node graph get node set point loc new point random next int x span margin random next int y span margin set node location node loc
|
arranges the specified graph
|
public void arrange tree n tree dimension dim get size int margin get margin int x span dim width margin 2 int y span dim height margin 2 for iterator n iter tree depth first iterator iter has next n node iter next point loc new point random next int x span margin random next int y span margin set node location node loc todo auto generated method stub
|
arrange the specified tree
|
public void update arrangement graph n e graph dimension dim get size int margin get margin int x span dim width margin 2 int y span dim height margin 2 for n node graph get node set point loc get node location node if loc null new point random next int x span margin random next int y span margin set node location node loc
|
arranges only those nodes which have not already had a location
|
public void update arrangement tree n tree dimension dim get size int margin get margin int x span dim width margin 2 int y span dim height margin 2 for iterator n iter tree depth first iterator iter has next n node iter next point loc get node location node if loc null loc new point random next int x span margin random next int y span margin set node location node loc todo auto generated method stub
|
arranges only those nodes which have not already had a location
|
public string get svg string writer writer new string writer write svg writer return writer to string
|
gets the svg
|
public void set size int width int height if width pane width height pane height pane width width pane height height top elem set attribute view box 0 0 width height
|
sets the size
|
private string to hex color int red color get red int blu color get blue int grn color get green string red str red 16 integer to string red 16 0 integer to string red 16 string grn str grn 16 integer to string grn 16 0 integer to string grn 16 string blu str blu 16 integer to string blu 16 0 integer to string blu 16 return red str grn str blu str
|
convert a color to a hexidecimal representation used by svg
|
public void write svg writer writer try transformer transform new domsource svg doc new stream result writer catch transformer exception exc throw new illegal state exception cannot transform and write in svg renderer exc
|
write the current svg content to a writer
|
public boolean get short flag return use shortest
|
returns the value of the short flag which is used to determine how
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.