input
stringlengths
10
828
output
stringlengths
5
107
protected boolean isprotected boolean r false if this protec null r this protec matches s 1 true s return r
predicate to check whether a classpath entry is protected
public void enter ant lib string uri this dlgt enter ant lib uri
called at the start of processing an antlib
public boolean match class path entry c boolean r false r c null this kind null match k this kind c kind true this path null match p this path c path true this excluding null match e this excluding c excluding true this output null match o this output c output true this sourcepath null match s this sourcepath c sourcepath true this epop null match p this epop c epop true if dot class path this debug system err println matching this c r return r
check whether this classpath entry matches a given one
public void exit ant lib this dlgt exit ant lib
called at the end of processing an antlib
final public object getref string s return s null null get project get reference s
reference object denoted by string b s b
final public string get property string s project p get project return p null p get property s null
a convenient method to retrieve a project property
protected groovy class loader get loader class loader parent groovy class loader loader parent get class get class loader loader new groovy class loader parent return loader
return a groovy class loader instance
public void add data type definition string type name class type class this dlgt add data type definition type name type class ant type definition def new ant type definition def set name type name def set class type class update data type definition def get project log user datatype type name type class get name project msg debug
adds a new datatype definition
static public groovenizer new instance return instance
returns groovenizer instance
protected boolean iseq class path entry other string kind boolean r false string ts get kind string os other get kind if ts null os null return ts os if ts equals os return true if kind equals path file tf of tf new file ts of new file os try r tf get canonical path equals of get canonical path catch exception e if dot class path this debug system err println exception comparing paths via absolute path names r tf equals of return r
check whether this entry and another entry are equal when comparing
public string get string name string otherwise return this param get property name otherwise
get value of attribute
public void add task definition string task name class task class this dlgt check task class task class ant type definition def new ant type definition def set name task name def set class loader task class get class loader def set class task class def set adapter class task adapter class def set class name task class get name def set adapt to class task class update data type definition def
adds a new task definition to the project
protected boolean cmplibsrc class path entry lib class path entry src boolean r false if lib path null src path null return lib path src path return r
test whether the src and lib attribute are equal
public boolean equals object obj class path entry other class path entry obj if iseq other kind iseq other path return true if cmplibsrc this other cmplibsrc other this return true return false
test whether this classpath equals a given object
public void eval list bucket class path entry c directory scanner s string files string base s this fileset get directory scanner files s get included files base s get basedir get absolute path replace for int i 0 i files length i c new class path entry c set kind lib c set path base files i c eval bucket
evaluate this fileset and create instance of type
public void set in string expr this expr static trim3 get project expr this expr
the argument list to be iterated over
public void set var string var this var static trim3 get project var this var
set the var attribute
public object parse properties string value throws build exception object obj ask the original handler to resolve references for me obj super parse properties value if this enabled obj null obj instanceof string resolve el references string text obj to string project p this get project obj static elresolve p text return obj
decode properties from a string representation
public void set comment string s this tr set cl s
set the character sequence identifying a comment line
public void set shift string s this tr set shift s
set the shift attribute
final static public string jar2var string v char c string s string v v if v null return v v trim if v equals return strip directory and extension v getstem v if v null return s for int i 0 i v length i c v char at i if character is letter or digit c s character to upper case c else everything else gets mapped to s return s
translates a given loc name in its official dependency name
protected void eval list bucket logical class path entry entry if bucket null for int j 0 j this list size j entry logical class path entry this list get j entry eval bucket
iterates over each logical classpath entries and evaluates each entry into
public void execute throws build exception do nothing
standard task execution interface
public void set at least string x this arg static trim2 x this arg
set the minimum ant version required
public string to string logical class path entry entry string builder buf list bucket string s buf new string builder bucket new array list collect entries eval bucket for int i 0 i bucket size i entry class path entry bucket get i s entry to string if s null s trim length 0 buf append n buf append s return buf to string
this method will render a string representation of all physical classpath
public void set refid string s this refid static trim2 s this refid
use attribute code refid code to change the reference holding all known
public void set ref string s set refid s
use attribute code ref code to change the reference holding all known
static private void get properties node el dependency dep node list children el get child nodes for int i 0 i children get length i node child children item i if child get node type node element node string text value get text node value element child if text value null text value text value trim dep put property child get local name text value
adds arbitrary properties to the dependency
static private string get text node value element el node list children el get child nodes for int i 0 i children get length i node child children item i if child get node type node text node return child get node value return null
gets the text content of an element
public boolean is selected file basedir string filename file file dependency d boolean r if this needsinit init find a dependency matching this filename d have dependency filename r d null match d false return this invert r r
implements a selector which can be used to restrict a given fileset
protected void op update list clazzpath throws build exception if clazzpath null this list null this list size 0 class path entry c for int i 0 i this list size i c class path entry this list get i if good c contains clazzpath c clazzpath add c
update xml element by adding classpath entries
public void set type string string this type string
sets the type or extension of the dependency
public string m1path string s string b basename must have either id or groupd and artifact or jar if this group null b null b equals return null s if this group null s this group else s s if this type null s this type else s jar s s s b return s
returns the path expected on the remote repository
static final public object makecomp project p string s return comphelper p create component s
shortcut to create a component
public string m2path string s string b basename must have either id or group and artifact or jar if this group null b null b equals return null s if this group null s this group replace else s s if this name null s this name s if this rev null s this rev s s basename return s
returns the path expected on the remote repository
static final public class getclass project p string s return comphelper p get component class s
shortcut to get a components class
public string put property string key string value if key null return null if this props null this props new properties return string this props put key value
sets a property value
public string get property string key if key null this props null return null return string this props get key
returns a property value
public boolean equals object other if other null return false if this get class equals other get class return false dependency other dep dependency other return this basename equals other dep basename
checks this dep against another dependency for equality
final static protected string replace string s char c string sub char x string r for int i 0 i s length i x s char at i if x c r sub else r x return r
replace all code c code characters in code s code with string
final static protected string substring string s int i int j string r null int l int j j try l s length j j i i j l l j r s substring i j catch exception e system err println this should never happen return r
similar as code s
final static public pattern patterncompile string s int f char c1 c2 pattern p null string s s int sz s length if sz 1 c1 s char at 0 c2 s char at sz 1 if c1 c2 if isregexchar c1 ispatternchar c2 s s substring 1 sz 1 if c1 c2 ispatternchar c1 s static pattern as regex s try p pattern compile s f catch exception e try p pattern compile static pattern as regex s f catch exception ex system err println exception ex return p
a standard way to compile a given pattern into a re pattern
final static public string elresolve project project string text el ctxref el project return ctxref null text ctxref tostr text
resolve embedded el references in code text code
final static public string el2str project project string expr el ctxref el project return ctxref null expr ctxref tostr expr
evaluate el expression in a string context
final static public object el2obj project project string expr el ctxref el project return ctxref null expr ctxref toobj expr
evaluate el expression
final static public boolean el2bool project project string expr el ctxref el project todo match expr for true false if ctxref null expr expr null false expr return ctxref null false ctxref tobool expr
evaluate a el expression in a boolean context
final static public el el project project el ctxref null try ctxref el project get reference static el if ctxref null ctxref new el project project add reference static el ctxref ctxref el project get reference static el catch null pointer exception npe system err println internal error el null called catch exception e error project q static el references unexpected object return ctxref
a function to return a el context reference consisting of a context and
public isemantic binding create string content rdf string resource id throws exception logger info create return isemantic binding new semantic binding realization sesame get repository content rdf resource id
creates a sesame repository with the rdf supplied
public string get content string inp logger info sbra get content try throw new exception illegal operation over atlas database catch exception e todo auto generated catch block e print stack trace return illegal operation over atlas database
not an allowable operation over an atlas database
public isemantic binding create string content rdf string resource id string adrs boolean url throws exception logger info sbfra create this address adrs return isemantic binding new semantic binding realization atlas get repository content rdf resource id url
sends rdf to the atlas database using the url supplied
public string mini inference query string type of query string query string ontology file logger info sbra mini inference query try throw new exception illegal operation over atlas database catch exception e todo auto generated catch block e print stack trace return illegal operation over atlas database
not an allowable operation over an atlas database
public isemantic binding create string content rdf string resource id string adrs throws exception logger info sbfra create this address adrs return isemantic binding new semantic binding realization atlas get repository content rdf resource id
sends rdf to the atlas database using the rdf content supplied
public string get content java lang string in param throws java rmi remote exception logger info getcontent string res null try semantic binding resource sb resource get resource res sb resource get content in param catch exception e logger info get content failed e to string throw new java rmi remote exception get content failed e return res
returns the ontology associated with the binding
public string mini query string type of query string query logger info sbra mini query private call set operation name new qname http metadata service ontokit ontogrid ist eu query string answer null try answer string private call invoke new object query catch remote exception e logger info sbra mini query failed e to string return answer try throw new exception illegal operation over atlas database catch exception e todo auto generated catch block e print stack trace return illegal operation over atlas database
queries the atlas database over its whole store with the sparql
public call get repository logger info sbfra get repository string endpoint this address try if call null service service new service try call call service create call catch service exception e logger info sbfra get repository failed e to string call set target endpoint address new java net url endpoint catch exception e logger info sbfra get repository failed e to string return call
returns the atlas database associated with this semantic binding service
public isemantic binding create string content rdf string sb resource id throws exception logger info sbfra empty atlas create return null
satisfies the needs of the interface but is not used
public string write string content logger info sbra write string ret null try private call set operation name new qname http metadata service ontokit ontogrid ist eu store by url ret string private call invoke new object content catch exception e logger info sbra write failed e to string return fail system out println ret return ret try throw new exception illegal operation over atlas database catch exception e todo auto generated catch block e print stack trace return illegal operation over atlas database
writes the new rdf content for the binding to
public string update sbcontent string in param throws java rmi remote exception logger info update sbcontent semantic binding resource sb resource get resource string res null try res sb resource write in param catch exception e logger info update sbcontent failed e to string throw new java rmi remote exception update sbcontent failed e return res
changes the ontology of the seemantic binding
public get resource property response get resource property qname name throws remote exception invalid resource property qname fault type org oasis wsrf properties resource unknown fault type logger info get resource property get resource property response response null try response get resource property provider get resource property name catch exception e logger info get resource property failed e to string throw new java rmi remote exception get resource property failed e return response
returns the resource property associated with the qname passed in
public destroy response destroy destroy destroy request throws java rmi remote exception org oasis wsrf lifetime resource not destroyed fault type org oasis wsrf lifetime resource unknown fault type logger info destroy destroy response response null have to send a destroyed notification to interested parties eg atlas try response destroy provider destroy destroy request catch exception e logger info destroy failed e to string throw new java rmi remote exception destroy failed e return response
destroys the semantic binding
public get multiple resource properties response get multiple resource properties get multiple resource properties element get multiple resource properties request throws java rmi remote exception org oasis wsrf properties invalid resource property qname fault type org oasis wsrf properties resource unknown fault type logger info get multiple resource properties get multiple resource properties response response null try response get multiple resource properties provider get multiple resource properties get multiple resource properties request catch exception e logger info get multiple resource properties failed e to string throw new java rmi remote exception get multiple resource properties failed e return response
returns multiple resource properties based on the names passe in
public subscribe response subscribe subscribe subscribe request throws remote exception subscribe creation failed fault type topic path dialect unknown fault type resource unknown fault type logger info subscribe subscribe response response null try response subscribe provider subscribe subscribe request catch exception e logger info subscribe failed e to string throw new java rmi remote exception subscribe failed e return response
subscribes to the topics specified by the client
public resource property set get resource property set logger info sbr get resource property list return prop set
resource property set containing the content creator grid
public string archive string input throws java rmi remote exception logger info archive semantic binding resource sb resource get resource try sb resource set validity validity enumeration archived catch exception e logger info archive failed e to string throw new java rmi remote exception archive failed e return null
sets the validity of the binding to archived
public string get sbcontent state string input throws java rmi remote exception logger info get content state string val null try semantic binding resource sb resource get resource resource property set set sb resource get resource property set resource property valid set get semantic binding constants rp validity val valid get 0 to string catch exception e logger info get sbcontent state failed e to string throw new java rmi remote exception get sbcontent state failed e return val
returns the state of the binding
public object get id logger info sbr get id return id
returns the unique id representing this sb instance
public string mini query mini query intype query throws exception logger info mini query string res null try string type of query query get type of query string query string query get query string res this resource realization mini query type of query query string catch exception e throw new exception e return res
allows a miniquery to be carried out on the content
private semantic binding resource get resource throws remote exception logger info get resource object resource null try resource resource context get resource context get resource catch exception e logger info get resource failed e to string throw new java rmi remote exception get resource failed e semantic binding resource sb resource semantic binding resource resource return sb resource
finds the resource associated with this instance
public resource key create throws exception try logger info msrh create system out println msrh create master service resource ms resource master service resource create new instance ms resource initialize this key type name master constants resource key resource key key new simple resource key key type name ms resource get id add key ms resource return key catch exception e logger info msrh create failed e to string system out println exception when creating the master service resource from home n e to string return null
creates an instance of the master service
private master service resource get resource throws remote exception system out println msi get resource logger info msi get resource object resource null resource resource context get resource context get resource master service resource ms resource master service resource resource return ms resource
finds the instance of the service based on its epr
public resource property set get resource property set logger info msr get resource property set system out println msr get resource property set return prop set
returns the resource property set for the instance
public topic list get topic list logger info msr get topic list system out println msr get topic list return topic list
returns the topic list associated with the instance
public string set grid property int new value throws remote exception logger info msi set grid property system out println msi set grid property try master service resource ms resource get resource ms resource set value new value return msi set grid property success catch exception e logger info msi set grid property failed e to string return msi set grid property fail
use to change one of the master service rps therfore triggering
public void set value int new value logger info msr set value system out println msr set value value rp set 0 new value
sets the value rp resource property to whatever is passed in
public void set name string new name logger info msr set name system out println msr set name resource property name this get resource property set get master constants rp name name set 0 new name
sets the name resource property of this instance to whatever is passed in
public string change grid entity string reason throws remote exception system out println msi change grid entity logger info msi change grid entity try master service resource ms resource get resource ms resource change grid entity reason ms resource set last modified time return msi change grid entity success catch exception e logger info msi change grid entity failed e to string return msi change grid entity fail
use with the master service acting as the grid entity
public void set last modified time logger info msr set last modified system out println msr set last modified time last modified rp set 0 calendar get instance
use to trigger notifications to the semantic binding
public object get id logger info msr get id system out println msr get id return id
returns the unique id for this instance
public string change ontology string reason throws remote exception system out println msi change ontology logger info msi change ontology new ontology reason try master service resource ms resource get resource ms resource change grid entity reason ms resource set last modified time return msi change ontology success catch exception e logger info msi change ontology failed e to string return msi change ontology fail
use with the master service acting as the onology knowledge service
public int get value logger info msr get value system out println msr get value integer value integer value rp get 0 return value int value
returns the value reource property
public string destroy string reason throws remote exception system out println msi destroy logger info msi destroy try master service resource ms resource get resource ms resource change grid entity reason ms resource set last modified time return msi destroy success catch exception e logger info msi destroy failed e to string return msi destroy fail
a fake destroy method which is used to trigger a
public string get content string inp throws exception logger info get content string res null try if provider equals ignore case sesame return sb state get content value res this resource realization get content inp else if provider equals ignore case atlas no unique database per sb for atlas provider so provide from memory res sb state get content value catch exception e throw new exception e return res
returns the content which is stored in the database the sb
public string get name logger info msr get name system out println msr get name string name string name rp get 0 return name
rreturns the name resource property
public void change grid entity string reason logger info msr change grid entity system out println msr change grid entity calendar update time calendar get instance grid entity update type message new grid entity update type reason update time grid entity update wrapper type msg wrapper new grid entity update wrapper type message try grid entity update notification notify msg wrapper catch exception e e print stack trace
sends a notification to the semantic binding telling it what has changed
public void destroy logger info msr destroy system out println msr destroy calendar destroy time calendar get instance termination notification rp set 0 destroy time
fake destroy method used to trigger a termination
public string get validity throws exception logger info get validity string res null try resource property validity rp this get resource property set get semantic binding constants rp validity res validity rp get 0 to string catch exception e throw new exception e return res
returns the validity archived stable etc
public isemantic binding create string content rdf string resource id throws exception system out println sbfra create logger info sbfra create return isemantic binding new semantic binding realization atlas get repository content rdf resource id
creates an instance of the atlas database binding
private call get repository system out println sbfra get repository logger info sbfra get repository try if call null string endpoint insert your endpoint here service service new service try call call service create call catch service exception e logger info sbfra get repository failed e to string call set target endpoint address new java net url endpoint catch exception e logger info sbfra get repository failed e to string return call
returns the atlas database associated with this semantic binding service
public string get content string inp system out println sbra get content logger info sbra get content return illegal operation over atlas database
not an allowable operation over an atlas database
public string mini inference query string query string ontology file system out println sbra mini inference query logger info sbra mini inference query return illegal operation over atlas database
not an allowable operation over an atlas database
public string mini query string query system out println sbra mini query logger info sbra mini query private call set operation name new qname http metadata service ontokit ontogrid ist eu query string answer null try answer string private call invoke new object query catch remote exception e logger info sbra mini query failed e to string return answer
queries the atlas database over its whole store with the sparql
public string write string content system out println sbra write logger info sbra write string ret null try private call set operation name new qname http metadata service ontokit ontogrid ist eu store by url ret string private call invoke new object content catch exception e logger info sbra write failed e to string return fail return ret
writes the new rdf content for the binding to
public string get content value throws exception logger info get content value string res null try resource property content rp this get resource property set get semantic binding constants rp content res string content rp get 0 catch exception e throw new exception e return res
returns the rdf description of the service semantics
public string get content java lang string in param throws java rmi remote exception system out println sbsi get content logger info sbsi getcontent semantic binding resource sb resource get resource string res sb resource get content in param return res
returns the ontology associated with the binding
public string update sbcontent string in param throws java rmi remote exception system out println sbsi update sbcontent logger info sbsi update sbcontent semantic binding resource sb resource get resource string res null try res sb resource write in param catch exception e logger info sbsi update sbcontent failed e to string return res
changes the ontology of the seemantic binding
public get resource property response get resource property qname name throws remote exception invalid resource property qname fault type org oasis wsrf properties resource unknown fault type system out println sbsi get resource property name get namespace uri logger info sbsi get resource property get resource property response response get resource property provider get resource property name return response
returns the resource property associated with the qname passed in
public string set content value string content val throws exception logger info set content value string res null try this prop content set 0 content val sb state set content value content val res success catch exception e logger info set content value failed e to string throw new exception e try store catch exception e throw new runtime exception e get message return res
allows the content of the sb to be overwritten
public set termination time response set termination time set termination time set termination time request throws java rmi remote exception org oasis wsrf lifetime unable to set termination time fault type org oasis wsrf lifetime resource unknown fault type org oasis wsrf lifetime termination time change rejected fault type system out println sbsi set termination time logger info sbsi set termination time set termination time response response set termination time provider set termination time set termination time request return response
sets the termination time of the semantic binding
public destroy response destroy destroy destroy request throws java rmi remote exception org oasis wsrf lifetime resource not destroyed fault type org oasis wsrf lifetime resource unknown fault type system out println sbsi destroy logger info sbsi destroy destroy response response destroy provider destroy destroy request return response
destroys the semantic binding
public get multiple resource properties response get multiple resource properties get multiple resource properties element get multiple resource properties request throws java rmi remote exception org oasis wsrf properties invalid resource property qname fault type org oasis wsrf properties resource unknown fault type system out println sbsi get multiple resource properties response logger info sbsi get multiple resource properties get multiple resource properties response response get multiple resource properties provider get multiple resource properties get multiple resource properties request return response
returns multiple resource properties based on the names passe in