input
stringlengths
10
828
output
stringlengths
5
107
public void set label string ont label label ont label
set the label for this ontology
public owl class get owl class return aug class
get the owl class of objects that this augmenter enhances
public void set name string ont name name ont name
set the name for this ontology
public void set prior url prior version prior prior version
set the prior version for this ontology
public void set url url ont url url ont url
set the url for this ontology
protected boolean is overwrite return overwrite
return whether the overwrite flag is set
public owl object property get inverse return inverse
get the inverse property for this property
public owl class get domain return domain
get the owl class domain for this property
public boolean is inverse functional return inv functional
return whether the property is an inverse functional property
public boolean is refine return refine
return whether the refine flag has been set
protected void set display name string display display name display
set the display name for this property
public void set domain owl class domain class domain domain class
set the domain class for this property
public void set functional boolean flag functional flag
set this property as a functional property
public void set inverse functional boolean flag inv functional flag
set this property as an inverse functional property
public void set config string config value
set the configuration string for this augmenter
public owl class get range if range null parent null range parent get range return range
get the range for this object property
public void set overwrite boolean flag overwrite flag
set the overwrite flag
public boolean is symmetric return symmetric
return whether this object property is symmetric
public void set owl class owl class owl class aug class owl class
set the owl class of objects that this augmenter enhances
public void set refine boolean refine flag refine refine flag
set the flag that indicates whether this augmenter should try to refine
public boolean is transitive return transitive
return whether this object property is transitive
public void remove relation owl thing owl thing owl thing related owl thing remove relation get name related if parent null parent remove relation owl thing related if symmetric related remove relation get name owl thing if inverse null set owl thing inv related related get related inverse get name if inv related null inv related contains owl thing inverse remove relation related owl thing
removes the relationship for this property for the owl things
public void add accessor reasoners semantic accessor access for string temp name reasoners key set data template template access get template temp name access set reasoner template reasoners get temp name
apply the reasoners read by this reader to the specified accessor
public semantic reasoner get reasoner string name return reasoners get name
return the reasoner matching the named template
public void set config file string config file throws file not found exception file input stream in stream new file input stream config file set config in stream
set the configuration from a local file
public void set inverse owl object property inverse property inverse inverse property
set the inverse property
private void set parent owl object property prop parent prop
set the parent for this property
public void close try prepend the doctype at the beginning out writer write doctype rdf rdf n entity xsd http www w3 org 2001 xmlschema n entity owl http www w3 org 2002 07 owl n n transformer transform new domsource doc new stream result out writer out writer close catch exception exc exc print stack trace
close the owl file writing the contents to the specified output stream
public void set range owl class owl cls range owl cls
set the range for this property
protected void set symmetric boolean flag symmetric flag
set whether this property is symmetric
public owl restriction get inverse value range inv type null if type equals value range has value inv type value range not value else if type equals value range all values from type equals value range some values from inv type value range no values from return new owl restriction prop name inv type good values
create a restriction which is the inverse of this restriction
private void create collection set validating coll element elem for validating valid coll if valid instanceof owl class element cls elem create child owl class elem cls elem set attribute rdf about valid to string else system out println collection element for valid
create a collection of validating objects
protected void set transitive boolean flag transitive flag
set whether this property is transitive
public int get max cardinality return max card
get the maximum cardinality for this restriction
public int get min cardinality return min card
get the minimum cardinality for this restriction
private void prepare doc doc doc build new document doc set xml version 1 0 root doc create element rdf rdf doc append child root root set attribute xmlns owl http www w3 org 2002 07 owl root set attribute xmlns rdf http www w3 org 1999 02 22 rdf syntax ns root set attribute xmlns rdfs http www w3 org 2000 01 rdf schema root set attribute xmlns xsd http www w3 org 2001 xmlschema
build the xml document for the kml file
public data type get data type return field desc get field type
get the basic data type expected by this property
public owl restriction get range restriction return sub rest
get a restriction which applies to the allowed values
public string get range type return range type
get the range type for this datatype
public value range get range type return type
return the type of restriction
public void set field desc field desc desc field desc desc if range type null derive range type
set the field descriptor for this datatype property
public owl class get restriction class return values from
get the class of objects this restriction restricts the values to
public string apply transform string value return int desc apply transform value
applies the string transformation to the field value
public string get field name return int desc get field name
get the name of the field
private void set parent owl datatype property prop parent prop
set the parent for this property
public boolean is in equivalence return in equivalence
return whether this restriction is in an equivalence clause for its
public string transform get transform return int desc get transform
get the transform if any for this descriptor
public boolean is valid property string property name owl thing owl thing boolean valid property name equals prop name if valid switch type case all values from if values from null restriction defined by class valid values from is member owl thing else if sub rest null valid sub rest is valid owl thing else restriction defined by values valid good values contains owl thing break case has value valid good values contains owl thing break case not value valid good values contains owl thing break return valid
determines whether the given owl thing may be assigned to the property in
public void parse value into record data record rec string value try int desc parse value into record rec value catch parse exception exc ignore
parse the string value into the record
public void set in equivalence boolean equiv flag in equivalence equiv flag
set whether this restriction is in an equivalence clause
public boolean augment record data record rec boolean augmented false if rec get name null rec get name trim length 0 owl thing thing create thing rec for reason field desc desc fields string prop name desc get property get name set owl thing related thing get related prop name if related null for owl thing rel related string rel name desc apply transform rel get name desc parse value into record rec rel name rec set text field owl class thing get owl class get name rec set text field owl thing thing get name augmented true return augmented
augment the data record with information from the ontology
public boolean can convert data record rec boolean convertible false for string full field rec get text field names convertible full field equals class field return convertible
return whether the given record can be converted by this adapter
private owl thing find thing string name string transform xform owl thing found null if xform null found owl thing find owl thing name else for owl thing thing owl thing get all things string thing name thing get name string xform name xform apply transform thing name if xform name equals name found thing return found
find the owl thing matching the name
public owl class get owl class return base class
get the base class for this reasoner
public void store triples set rdf triple triples for rdf triple triple triples owl thing subj owl thing get owl thing triple get subject get name owl thing obj owl thing get owl thing triple get object get name subj add relation triple get property get name obj triple get type
store new rdf triples into the triple store
public owl class get refined class owl class refined base class get refined class assign map if refined null boolean valid true for string field assign map key set owl thing assigned assign map get field valid base class is valid property field assigned if valid refined base class return refined
get the refined class for this base class and assignment map
public void set assignment string assignment string words assignment split if words length 2 throw new illegal argument exception cannot assign assignment owl thing assigned owl thing get owl thing words 1 trim assign map put words 0 trim assigned
set a particular assignment
public owl ontology get ontology url url return loading get url
get the ontology definition for an ontology that has already been
public void set owl class owl class owl class base class owl class
set the base class for this reasoner
public void set owl class name string class name base class owl class get owl class class name
set the base class for this reasoner
public boolean is loaded url url return loading contains key url
return whether the given url has been loaded
public void set query field string field query field field
set the query field for this reasoner
public url load data string file name throws ioexception saxexception url url null try url new url file name load data url catch malformed urlexception exc interpret as simple path url new file file name to uri to url load data url return url
load the ontology data from the specified file
public void add to disjoint owl class cls if disjoint null disjoint new hash set owl class disjoint add cls set owl class descend get descendants for owl class desc descend desc add to disjoint cls
add an owl class to the set of disjoint classes for this class
private void parse sub class element element elem element sub elem element elem get elements by tag name owlx sub item 0 element cls elem element sub elem get elements by tag name owlx class item 0 string sub name cls elem get attribute owlx name system out println sub name sub name system out flush owl class cls owl class get owl class sub name element sup elem element elem get elements by tag name owlx super item 0 cls parse sub class element sup elem
parse a sub class element which contains information about the class and
private void add to implied owl class cls if implied add cls set owl class descend get descendants for owl class desc descend desc add to implied cls
add a class to the list of implied classes for this class
protected void parse unknown element element elem
parse an element with an unknown tag
public void add to intersection validating valid if intersection null intersection new hash set validating intersection add valid if valid instanceof owl class implied add owl class valid implied add all owl class valid get implied classes set owl class dis owl class valid get disjoint if dis null if disjoint null disjoint new hash set owl class disjoint add all dis modified true
add a validating object to the intersection for this class
public void add to union validating valid if union null union new hash set validating union add valid if valid instanceof owl class owl class valid add to implied this set owl class dis owl class valid get disjoint if dis null if disjoint null disjoint new hash set owl class disjoint add all dis else disjoint retain all dis modified true
add a validating object to the union for this class
public boolean check equivalence owl thing thing boolean can refine false boolean has equivalence false if implied contains thing get owl class can refine true for owl restriction rest restrictions if rest is in equivalence has equivalence true can refine rest is valid thing if can refine has equivalence thing refine class this return can refine has equivalence
check whether a particular owl thing matches any equivalence relations
public void add same as string alt name owl thing alt thing thing map get alt name if alt thing null thing map put alt name this alt names add alt name
create a same as reference for a particular object
public string get class comment return class comment
get the comment for this owl class if any
private void build relationship owl object property obj prop owl thing related owl class rng cls obj prop get range for owl restriction rest owl cls find restrictions obj prop get name owl class rest cls rest get restriction class if rng cls null rest cls null rng cls get descendants contains rest cls rng cls rest cls if rng cls null owl class rel cls related get owl class if rel cls null rng cls get descendants contains rng cls related set owl class rng cls obj prop build relation this related rdf triple triple type explicit
build the relationship with the owl thing argument
public void copy values owl thing other thing for rdf triple triple other thing get relationships property prop triple get property triple type type triple get type if type equals triple type explicit prop instanceof owl property owl property prop add value to thing this triple get object get name
copy explicit properties from another owl thing to this one
public void derive values if owl cls null owl cls set defined values this
derive all values for this owl thing
public owl class get parent return parent
gets the parent of this owl class if any
public owl class get refined class map string owl thing assign map owl class refined null for owl class cls class map values set validating inter cls get intersection if inter null inter contains this boolean valid true for validating val chk inter if valid val chk instanceof owl restriction owl restriction rest owl restriction val chk string rest prop rest get property name owl thing value assign map get rest prop if value null rest is valid property rest prop value valid false if valid refined cls return refined
gets the refined class for a particular set of assignments
public void merge thing owl thing owl thing first determine if the other thing has a more specific class owl class other cls owl thing get owl class if owl cls get descendants contains other cls owl cls other cls for rdf triple triple owl thing get relationships property prop triple get property rdf thing obj triple get object set string values get values prop get name if obj null values null values contains obj get name prop instanceof owl property owl property prop add value to thing this obj get name add same as owl thing get name
merge another defined thing with this thing
protected void add structure data structure spec spec string name spec get name if spec instanceof dataset spec dataset names add name else if spec instanceof graph spec graph names add name else if spec instanceof grid spec grid names add name else if spec instanceof tree spec tree names add name specs put name spec
add a data structure specification to this accessor
protected void add template data template template string name template get name if templates contains key name templates put name template
add a data template to this accessor
public data structure spec get spec string name return specs get name
gets the named data structure specification
public data structure type get structure type string data name data structure type type null if dataset names contains data name type data structure type dataset else if graph names contains data name type data structure type graph else if grid names contains data name type data structure type grid else if tree names contains data name type data structure type tree return type
get the data type for the specified data name
public data template get template string name return templates get name
gets the named data template
public boolean is match owl thing thing boolean match true for owl restriction restrict restrictions check to see if the values are correct and legal match restrict is valid thing if match allowed null match allowed contains thing if match disjoint null thing get owl class null set owl class thing impl thing get owl class get implied classes for owl class cls disjoint match thing impl contains cls if match parent null match parent is match thing return match
return whether the specified thing could be a member of this owl class
public void remove all same as for iterator string str iter thing map key set iterator str iter has next string name str iter next if thing map get name equals this name equals get name str iter remove
remove all same as links to this owl thing
public void set config file url config url throws ioexception set config config url open stream
set the configuration from a url
public boolean is member owl thing owl thing owl class thing cls owl thing get owl class boolean member thing cls null thing cls get implied classes contains this if member intersection null intersection is empty boolean matches all true for validating val check intersection matches all val check is valid owl thing member matches all if member union null union is empty for validating val check union member val check is valid owl thing if complement null member complement is member owl thing if member member check equivalence owl thing return member
checks if the provided owl thing is a member of this owl class
public void remove relation string relation name owl thing related to boolean specified false for iterator rdf triple rel iter relations iterator rel iter has next rdf triple relation rel iter next if relation get property get name equals relation name if relation get object equals related to rel iter remove else specified true if specified relations add new rdf triple this relation name null triple type unspecified
removes a relation to from owl things list of relations
public void remove relations string relation name for iterator rdf triple rel iter relations iterator rel iter has next rdf triple relation rel iter next if relation get property get name equals relation name rel iter remove
removes all relations of a given relationship name
public void remove same as string alt name if alt names contains alt name alt names remove alt name thing map remove alt name
remove a same as reference for a particular object
private void remove unspecified string relation name for iterator rdf triple rel iter relations iterator rel iter has next rdf triple relation rel iter next if relation get property get name equals relation name relation get type equals triple type unspecified rel iter remove
remove any unspecified relations for the given relation name
protected void set owl class owl class owl class owl cls owl class
set this owl things owl class
public boolean validate boolean valid false if owl cls null valid owl cls is valid this return valid
validate this owl thing
public void add name key string name key name keys add name key
add a name key for this template
private void build enum fields set data record records hash set string enum fields new hash set string hash set string enum vals new hash set string for data record rec records enum fields add all rec get enum field names for string field enum fields enum vals clear for data record rec records string val rec get enum field field if val null enum vals add val field descs put field new enum field desc field enum vals
build the enumerated value field descriptors from a set of records
private void build int fields set data record records for data record rec records set string int fields rec get int field names for string field int fields if field descs contains key field field descs put field new int field desc field
build the integer field descriptors from a set of records
private void build location fields set data record records for data record rec records set string loc fields rec get location field names for string field loc fields if field descs contains key field field descs put field new location field desc field
build the location field descriptors from a set of records
private void parse one of element element element allowed new hash set owl thing node list nodes element get child nodes for int i 0 i nodes get length i node node nodes item i if node instanceof element element elem element node string tag name elem get tag name if tag name equals owl thing tag name equals owlx individual string thing name parse reference elem owl thing thing owl thing get owl thing thing name if thing get owl class null thing set owl class this allowed add thing
parses the one of element and initializes the relevant definitions in
private void build measure fields set data record records for data record rec records set string msr fields rec get measure field names for string field msr fields measure msr rec get measure field field if field descs contains key field field descs put field new measure field desc field msr get unit
build the measure value field descriptors from a set of records
private void build string fields set data record records for data record rec records set string str fields rec get text field names for string field str fields if field descs contains key field field descs put field new text field desc field
build the string field descriptors from a set of records