com.marklogic.client.expression.SemExpr Maven / Gradle / Ivy
Show all versions of marklogic-client-api Show documentation
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.expression;
import com.marklogic.client.type.CtsQueryExpr;
import com.marklogic.client.type.XsAnyAtomicTypeSeqVal;
import com.marklogic.client.type.XsAnyAtomicTypeVal;
import com.marklogic.client.type.XsBooleanVal;
import com.marklogic.client.type.XsDateTimeVal;
import com.marklogic.client.type.XsDoubleVal;
import com.marklogic.client.type.XsQNameVal;
import com.marklogic.client.type.XsStringSeqVal;
import com.marklogic.client.type.XsStringVal;
import com.marklogic.client.type.ServerExpression;
import com.marklogic.client.type.SemStoreExpr;
import com.marklogic.client.type.SemStoreSeqExpr;
// IMPORTANT: Do not edit. This file is generated.
/**
* Builds expressions to call functions in the sem server library for a row
* pipeline and constructs client values with sem.* server types.
*/
public interface SemExpr extends SemValue {
/**
* This function returns an identifier for a blank node, allowing the construction of a triple that refers to a blank node. This XQuery function backs up the SPARQL BNODE() function.
*
*
*
* Provides a client interface to the sem:bnode server function.
* @return a server expression with the sem:blank server data type
*/
public ServerExpression bnode();
/**
* This function returns an identifier for a blank node, allowing the construction of a triple that refers to a blank node. This XQuery function backs up the SPARQL BNODE() function.
*
* Provides a client interface to the sem:bnode server function.
* @param value If provided, the same blank node identifier is returned for the same argument value passed to the function. (of xs:anyAtomicType)
* @return a server expression with the sem:blank server data type
*/
public ServerExpression bnode(ServerExpression value);
/**
* Returns the value of the first argument that evaluates without error. This XQuery function backs up the SPARQL COALESCE() functional form.
*
*
*
* Provides a client interface to the sem:coalesce server function.
* @param parameter1 A value. (of item)
* @return a server expression with the item server data type
*/
public ServerExpression coalesce(ServerExpression... parameter1);
/**
* Returns the name of the simple type of the atomic value argument as a SPARQL style IRI. If the value is derived from sem:unknown or sem:invalid, the datatype IRI part of those values is returned. This XQuery function backs up the SPARQL datatype() function.
*
*
*
* Provides a client interface to the sem:datatype server function.
* @param value The value to return the type of. (of xs:anyAtomicType)
* @return a server expression with the sem:iri server data type
*/
public ServerExpression datatype(ServerExpression value);
/**
* Returns the iri of the default graph.
*
*
*
* Provides a client interface to the sem:default-graph-iri server function.
* @return a server expression with the sem:iri server data type
*/
public ServerExpression defaultGraphIri();
/**
* The IF function form evaluates the first argument, interprets it as a effective boolean value, then returns the value of expression2 if the EBV is true, otherwise it returns the value of expression3. Only one of expression2 and expression3 is evaluated. If evaluating the first argument raises an error, then an error is raised for the evaluation of the IF expression. This XQuery function backs up the SPARQL IF() functional form.
*
*
*
* Provides a client interface to the sem:if server function.
* @param condition The condition. (of xs:boolean)
* @param then The then expression. (of item)
* @param elseExpr The else expression. (of item)
* @return a server expression with the item server data type
*/
public ServerExpression ifExpr(ServerExpression condition, ServerExpression then, ServerExpression elseExpr);
/**
* Returns a sem:invalid value with the given literal value and datatype IRI. The sem:invalid type extends xs:untypedAtomic, and represents an RDF value whose literal string is invalid according to the schema for it's datatype.
*
* Provides a client interface to the sem:invalid server function.
* @param string The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the sem:invalid server data type
*/
public ServerExpression invalid(ServerExpression string, String datatype);
/**
* Returns a sem:invalid value with the given literal value and datatype IRI. The sem:invalid type extends xs:untypedAtomic, and represents an RDF value whose literal string is invalid according to the schema for it's datatype.
*
*
*
* Provides a client interface to the sem:invalid server function.
* @param string The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the sem:invalid server data type
*/
public ServerExpression invalid(ServerExpression string, ServerExpression datatype);
/**
* Returns the datatype IRI of a sem:invalid value.
*
*
*
* Provides a client interface to the sem:invalid-datatype server function.
* @param val The sem:invalid value. (of sem:invalid)
* @return a server expression with the sem:iri server data type
*/
public ServerExpression invalidDatatype(ServerExpression val);
/**
* This is a constructor function that takes a string and constructs an item of type sem:iri from it.
*
*
*
* Provides a client interface to the sem:iri server function.
* @param stringIri The string with which to construct the sem:iri. (of item)
* @return a server expression with the sem:iri server data type
*/
public ServerExpression iri(ServerExpression stringIri);
/**
* Converts an IRI value to a QName value.
*
*
* @param arg1 the arg1 value. (of xs:string)
* @return a server expression with the xs:QName server data type
*/
public ServerExpression iriToQName(ServerExpression arg1);
/**
* Returns true if the argument is an RDF blank node - that is, derived from type sem:blank. This XQuery function backs up the SPARQL isBlank() function.
*
*
*
* Provides a client interface to the sem:isBlank server function.
* @param value The value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression isBlank(ServerExpression value);
/**
* Returns true if the argument is an RDF IRI - that is, derived from type sem:iri, but not derived from type sem:blank. This XQuery function backs up the SPARQL isIRI() and isURI() functions.
*
*
*
* Provides a client interface to the sem:isIRI server function.
* @param value The value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression isIRI(ServerExpression value);
/**
* Returns true if the argument is an RDF literal - that is, derived from type xs:anyAtomicType, but not derived from type sem:iri. This XQuery function backs up the SPARQL isLiteral() function.
*
*
*
* Provides a client interface to the sem:isLiteral server function.
* @param value The value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression isLiteral(ServerExpression value);
/**
* Returns true if the argument is a valid numeric RDF literal. This XQuery function backs up the SPARQL isNumeric() function.
*
*
*
* Provides a client interface to the sem:isNumeric server function.
* @param value The value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression isNumeric(ServerExpression value);
/**
* Returns the language of the value passed in, or the empty string if the value has no language. Only values derived from rdf:langString have a language. This XQuery function backs up the SPARQL lang() function.
*
*
*
* Provides a client interface to the sem:lang server function.
* @param value The value to return the language of. (of xs:anyAtomicType)
* @return a server expression with the xs:string server data type
*/
public ServerExpression lang(ServerExpression value);
/**
* Returns true if lang-tag matches lang-range according to the basic filtering scheme defined in RFC4647. This XQuery function backs up the SPARQL langMatches() function.
*
* Provides a client interface to the sem:langMatches server function.
* @param langTag The language tag. (of xs:string)
* @param langRange The language range. (of xs:string)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression langMatches(ServerExpression langTag, String langRange);
/**
* Returns true if lang-tag matches lang-range according to the basic filtering scheme defined in RFC4647. This XQuery function backs up the SPARQL langMatches() function.
*
*
*
* Provides a client interface to the sem:langMatches server function.
* @param langTag The language tag. (of xs:string)
* @param langRange The language range. (of xs:string)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression langMatches(ServerExpression langTag, ServerExpression langRange);
/**
* Converts a QName value to an IRI value.
*
*
* @param arg1 the arg1 value. (of xs:QName)
* @return a server expression with the sem:iri server data type
*/
public ServerExpression QNameToIri(ServerExpression arg1);
/**
* Returns a random double between 0 and 1. This XQuery function backs up the SPARQL RAND() function.
*
*
*
* Provides a client interface to the sem:random server function.
* @return a server expression with the xs:double server data type
*/
public ServerExpression random();
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(String locations);
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
*
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(ServerExpression locations);
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @param store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database. (of sem:store)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(String locations, SemStoreExpr... store);
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @param store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database. (of sem:store)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(ServerExpression locations, ServerExpression store);
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @param store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database. (of sem:store)
* @param options Options as a sequence of string values. Available options are: "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(String locations, ServerExpression store, String options);
/**
* The sem:ruleset-store function returns a set of triples derived by applying the ruleset to the triples in the sem:store constructor provided in store ("the triples that can be inferred from these rules").
*
* Provides a client interface to the sem:ruleset-store server function.
* @param locations The locations of the rulesets. (of xs:string)
* @param store The base store(s) over which to apply the ruleset to get inferred triples. The default for sem:store is an empty sequence, which means accessing the current database's triple index using the default rulesets configured for that database. (of sem:store)
* @param options Options as a sequence of string values. Available options are: "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr rulesetStore(ServerExpression locations, ServerExpression store, ServerExpression options);
/**
* Returns true if the arguments are the same RDF term as defined by the RDF concepts specification. This XQuery function backs up the SPARQL sameTerm() function.
*
* Provides a client interface to the sem:sameTerm server function.
* @param a The first value to test. (of xs:anyAtomicType)
* @param b The second value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression sameTerm(ServerExpression a, String b);
/**
* Returns true if the arguments are the same RDF term as defined by the RDF concepts specification. This XQuery function backs up the SPARQL sameTerm() function.
*
*
*
* Provides a client interface to the sem:sameTerm server function.
* @param a The first value to test. (of xs:anyAtomicType)
* @param b The second value to test. (of xs:anyAtomicType)
* @return a server expression with the xs:boolean server data type
*/
public ServerExpression sameTerm(ServerExpression a, ServerExpression b);
/**
* The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query").
*
*
*
* Provides a client interface to the sem:store server function.
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr store();
/**
* The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query").
*
* Provides a client interface to the sem:store server function.
* @param options Options as a sequence of string values. Available options are: "any" Values from any fragment should be included. "document" Values from document fragments should be included. "properties" Values from properties fragments should be included. "locks" Values from locks fragments should be included. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. "no-default-rulesets" Don't apply the database's default rulesets to the sem:store. "locking=read-write/write" read-write: Read-lock documents containing triples being accessed, write-lock documents being updated; write: Only write-lock documents being updated. Default is locking=read-write. Locking is ignored in query transaction. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr store(String options);
/**
* The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query").
*
* Provides a client interface to the sem:store server function.
* @param options Options as a sequence of string values. Available options are: "any" Values from any fragment should be included. "document" Values from document fragments should be included. "properties" Values from properties fragments should be included. "locks" Values from locks fragments should be included. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. "no-default-rulesets" Don't apply the database's default rulesets to the sem:store. "locking=read-write/write" read-write: Read-lock documents containing triples being accessed, write-lock documents being updated; write: Only write-lock documents being updated. Default is locking=read-write. Locking is ignored in query transaction. (of xs:string)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr store(ServerExpression options);
/**
* The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query").
*
* Provides a client interface to the sem:store server function.
* @param options Options as a sequence of string values. Available options are: "any" Values from any fragment should be included. "document" Values from document fragments should be included. "properties" Values from properties fragments should be included. "locks" Values from locks fragments should be included. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. "no-default-rulesets" Don't apply the database's default rulesets to the sem:store. "locking=read-write/write" read-write: Read-lock documents containing triples being accessed, write-lock documents being updated; write: Only write-lock documents being updated. Default is locking=read-write. Locking is ignored in query transaction. (of xs:string)
* @param query Only include triples in fragments selected by the cts:query. The triples do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations. If a string is entered, the string is treated as a cts:word-query of the specified string. (of cts:query)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr store(String options, ServerExpression query);
/**
* The sem:store function defines a set of criteria, that when evaluated, selects a set of triples to be passed in to sem:sparql(), sem:sparql-update(), or sem:sparql-values() as part of the options argument. The sem:store constructor queries from the current database's triple index, restricted by the options and the cts:query argument (for instance, "triples in documents matching this query").
*
* Provides a client interface to the sem:store server function.
* @param options Options as a sequence of string values. Available options are: "any" Values from any fragment should be included. "document" Values from document fragments should be included. "properties" Values from properties fragments should be included. "locks" Values from locks fragments should be included. "checked" Word positions should be checked when resolving the query. "unchecked" Word positions should not be checked when resolving the query. "size=number of MB" The maximum size of the memory used to cache inferred triples. This defaults to the default inference size set for the app-server. If the value provided is bigger than the maximum inference size set for the App Server, an error is raised [XDMP-INFSIZE]. "no-default-rulesets" Don't apply the database's default rulesets to the sem:store. "locking=read-write/write" read-write: Read-lock documents containing triples being accessed, write-lock documents being updated; write: Only write-lock documents being updated. Default is locking=read-write. Locking is ignored in query transaction. (of xs:string)
* @param query Only include triples in fragments selected by the cts:query. The triples do not need to match the query, but they must occur in fragments selected by the query. The fragments are not filtered to ensure they match the query, but instead selected in the same manner as "unfiltered" cts:search operations. If a string is entered, the string is treated as a cts:word-query of the specified string. (of cts:query)
* @return a server expression with the sem:store server data type
*/
public SemStoreExpr store(ServerExpression options, ServerExpression query);
/**
* Returns the timezone of an xs:dateTime value as a string. This XQuery function backs up the SPARQL TZ() function.
*
*
*
* Provides a client interface to the sem:timezone-string server function.
* @param value The dateTime value (of xs:dateTime)
* @return a server expression with the xs:string server data type
*/
public ServerExpression timezoneString(ServerExpression value);
/**
* Returns a value to represent the RDF typed literal with lexical value value and datatype IRI datatype. Returns a value of type sem:unknown for datatype IRIs for which there is no schema, and a value of type sem:invalid for lexical values which are invalid according to the schema for the given datatype. This XQuery function backs up the SPARQL STRDT() function.
*
* Provides a client interface to the sem:typed-literal server function.
* @param value The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the xs:anyAtomicType server data type
*/
public ServerExpression typedLiteral(ServerExpression value, String datatype);
/**
* Returns a value to represent the RDF typed literal with lexical value value and datatype IRI datatype. Returns a value of type sem:unknown for datatype IRIs for which there is no schema, and a value of type sem:invalid for lexical values which are invalid according to the schema for the given datatype. This XQuery function backs up the SPARQL STRDT() function.
*
*
*
* Provides a client interface to the sem:typed-literal server function.
* @param value The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the xs:anyAtomicType server data type
*/
public ServerExpression typedLiteral(ServerExpression value, ServerExpression datatype);
/**
* Returns a sem:unknown value with the given literal value and datatype IRI. The sem:unknown type extends xs:untypedAtomic, and represents an RDF value with a datatype IRI for which no schema is available.
*
* Provides a client interface to the sem:unknown server function.
* @param string The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the sem:unknown server data type
*/
public ServerExpression unknown(ServerExpression string, String datatype);
/**
* Returns a sem:unknown value with the given literal value and datatype IRI. The sem:unknown type extends xs:untypedAtomic, and represents an RDF value with a datatype IRI for which no schema is available.
*
*
*
* Provides a client interface to the sem:unknown server function.
* @param string The lexical value. (of xs:string)
* @param datatype The datatype IRI. (of sem:iri)
* @return a server expression with the sem:unknown server data type
*/
public ServerExpression unknown(ServerExpression string, ServerExpression datatype);
/**
* Returns the datatype IRI of a sem:unknown value.
*
*
*
* Provides a client interface to the sem:unknown-datatype server function.
* @param val The sem:unknown value. (of sem:unknown)
* @return a server expression with the sem:iri server data type
*/
public ServerExpression unknownDatatype(ServerExpression val);
/**
* Return a UUID URN (RFC4122) as a sem:iri value. This XQuery function backs up the SPARQL UUID() function.
*
*
*
* Provides a client interface to the sem:uuid server function.
* @return a server expression with the sem:iri server data type
*/
public ServerExpression uuid();
/**
* Return a string that is the scheme specific part of random UUID URN (RFC4122). This XQuery function backs up the SPARQL STRUUID() function.
*
*
*
* Provides a client interface to the sem:uuid-string server function.
* @return a server expression with the xs:string server data type
*/
public ServerExpression uuidString();
/**
* Constructs a sequence of SemStoreExpr items.
* @param items the SemStoreExpr items collected by the sequence
* @return a SemStoreSeqExpr sequence
*/
public SemStoreSeqExpr storeSeq(SemStoreExpr... items);
}