@sricsl/sunflower-client v2.1.2
@sricsl/sunflower-client
sunflower_client - JavaScript client for @sricsl/sunflower-client Sunflower Server This SDK is automatically generated by the OpenAPI Generator project:
- API version: 2.0.0
- Package version: 2.1.2
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
To publish the library as a npm, please follow the procedure in "Publishing npm packages".
Then install it via:
npm install @sricsl/sunflower-client --save
Finally, you need to build the module:
npm run build
Local development
To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json
(and this README). Let's call this JAVASCRIPT_CLIENT_DIR
. Then run:
npm install
Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR
:
npm link
To use the link you just defined in your project, switch to the directory you want to use your @sricsl/sunflower-client from, and run:
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
Finally, you need to build the module:
npm run build
git
If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
npm install GIT_USER_ID/GIT_REPO_ID --save
For browser
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with npm install -g browserify
,
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Webpack Configuration
Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:
module: {
rules: [
{
parser: {
amd: false
}
}
]
}
Getting Started
Please follow the installation instruction and execute the following JS code:
var sunflower_client = require('@sricsl/sunflower-client');
var defaultClient = sunflower_client.ApiClient.instance;
// Configure Bearer (jwt) access token for authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"
var api = new sunflower_client.SunflowerServiceApi()
var docId = "docId_example"; // {String} document id
var id = "id_example"; // {String} subject
var arrowType = new sunflower_client.ArrowType(); // {ArrowType} arrowType
var frameType = new sunflower_client.FrameType(); // {FrameType} frameType
var prop = "prop_example"; // {String} prop
api.addBooleanProperty(docId, id, arrowType, frameType, prop).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
sunflower_client.SunflowerServiceApi | addBooleanProperty | POST /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType} | add a boolean property value |
sunflower_client.SunflowerServiceApi | addDirective | POST /sfweb/rest/docs/{docId}/directives | add a directive |
sunflower_client.SunflowerServiceApi | addDocument | POST /sfweb/rest/docs | add a new document |
sunflower_client.SunflowerServiceApi | addHilogFact | POST /sfweb/rest/docs/{docId}/hilog | add a hilog (non-frame) fact |
sunflower_client.SunflowerServiceApi | addImport | POST /sfweb/rest/docs/{docId}/imports | add an import |
sunflower_client.SunflowerServiceApi | addInstance | POST /sfweb/rest/docs/{docId}/ids/{id}/a-instances | add an instance to an identifier |
sunflower_client.SunflowerServiceApi | addLatentQuery | POST /sfweb/rest/docs/{docId}/latent-queries | add a latent query |
sunflower_client.SunflowerServiceApi | addNamespace | POST /sfweb/rest/docs/{docId}/namespaces | add a namespace definition |
sunflower_client.SunflowerServiceApi | addQuery | POST /sfweb/rest/docs/{docId}/queries | add a query |
sunflower_client.SunflowerServiceApi | addRootClass | POST /sfweb/rest/docs/{docId}/root-classes | add a root class |
sunflower_client.SunflowerServiceApi | addRule | POST /sfweb/rest/docs/{docId}/rules | add a rule |
sunflower_client.SunflowerServiceApi | addSubclass | POST /sfweb/rest/docs/{docId}/ids/{id}/a-subclasses | add a sub-class to an identifier |
sunflower_client.SunflowerServiceApi | addSuperclass | POST /sfweb/rest/docs/{docId}/ids/{id}/a-superclasses | add a super-class to an identifier |
sunflower_client.SunflowerServiceApi | addTripleProperty | POST /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType} | add a triple property value |
sunflower_client.SunflowerServiceApi | addTriplePropertyWithCardinalities | POST /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{min}/{max} | add a triple property value with cardinalities |
sunflower_client.SunflowerServiceApi | addType | POST /sfweb/rest/docs/{docId}/ids/{id}/a-types | add a type to an identifier |
sunflower_client.SunflowerServiceApi | addUDF | POST /sfweb/rest/docs/{docId}/udfs | add a user-defined function |
sunflower_client.SunflowerServiceApi | applyOntologyChange | POST /sfweb/rest/changes | apply an ontology change |
sunflower_client.SunflowerServiceApi | createContent | POST /sfweb/rest/docs/{docId}/content/create | create flora content |
sunflower_client.SunflowerServiceApi | deleteBooleanProperty | DELETE /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType} | delete a boolean property value |
sunflower_client.SunflowerServiceApi | deleteContent | POST /sfweb/rest/docs/{docId}/content/delete | delete flora content |
sunflower_client.SunflowerServiceApi | deleteDirective | DELETE /sfweb/rest/docs/{docId}/directives/{did} | delete a directive |
sunflower_client.SunflowerServiceApi | deleteDocument | DELETE /sfweb/rest/docs/{docId} | delete a document |
sunflower_client.SunflowerServiceApi | deleteHilogFact | DELETE /sfweb/rest/docs/{docId}/hilog/{hid} | delete a hilog (non-frame) fact |
sunflower_client.SunflowerServiceApi | deleteIdentifier | DELETE /sfweb/rest/docs/{docId}/ids/{id} | delete an identifier |
sunflower_client.SunflowerServiceApi | deleteImport | DELETE /sfweb/rest/docs/{docId}/imports/{importId} | delete an import |
sunflower_client.SunflowerServiceApi | deleteInstance | DELETE /sfweb/rest/docs/{docId}/ids/{id}/a-instances/{instId} | delete an instance from an identifier |
sunflower_client.SunflowerServiceApi | deleteLatentQuery | DELETE /sfweb/rest/docs/{docId}/latent-queries/{lqId} | delete a latent query |
sunflower_client.SunflowerServiceApi | deleteNamespace | DELETE /sfweb/rest/docs/{docId}/namespaces/{prefix} | delete a namespace definition |
sunflower_client.SunflowerServiceApi | deleteQuery | DELETE /sfweb/rest/docs/{docId}/queries/{qid} | delete a query |
sunflower_client.SunflowerServiceApi | deleteRule | DELETE /sfweb/rest/docs/{docId}/rules/{ruleId} | delete a rule |
sunflower_client.SunflowerServiceApi | deleteSubclass | DELETE /sfweb/rest/docs/{docId}/ids/{id}/a-subclasses/{clsId} | delete a sub-class from an identifier |
sunflower_client.SunflowerServiceApi | deleteSuperclass | DELETE /sfweb/rest/docs/{docId}/ids/{id}/a-superclasses/{clsId} | delete a super-class from an identifier |
sunflower_client.SunflowerServiceApi | deleteTripleProperty | DELETE /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{value} | delete a triple property value |
sunflower_client.SunflowerServiceApi | deleteTriplePropertyWithCardinalities | DELETE /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType}/{min}/{max}/{value} | delete a triple property value with cardinalities |
sunflower_client.SunflowerServiceApi | deleteType | DELETE /sfweb/rest/docs/{docId}/ids/{id}/a-types/{clsId} | delete a type from an identifier |
sunflower_client.SunflowerServiceApi | deleteUDF | DELETE /sfweb/rest/docs/{docId}/udfs/{uid} | delete a user-defined function |
sunflower_client.SunflowerServiceApi | english | POST /sfweb/rest/docs/{docId}/english | generate english for a flora term |
sunflower_client.SunflowerServiceApi | getAssertedInstances | GET /sfweb/rest/docs/{docId}/ids/{id}/a-instances | get the asserted instances of an identifier |
sunflower_client.SunflowerServiceApi | getAssertedSubclasses | GET /sfweb/rest/docs/{docId}/ids/{id}/a-subclasses | get the asserted sub-classes of an identifier |
sunflower_client.SunflowerServiceApi | getAssertedSuperclasses | GET /sfweb/rest/docs/{docId}/ids/{id}/a-superclasses | get the asserted super-classes of an identifier |
sunflower_client.SunflowerServiceApi | getAssertedTypes | GET /sfweb/rest/docs/{docId}/ids/{id}/a-types | get the asserted types of an identifier |
sunflower_client.SunflowerServiceApi | getBooleanProperties | GET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props | get the boolean properties of an identifier |
sunflower_client.SunflowerServiceApi | getBooleanPropertiesForFrameType | GET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType} | get the boolean properties of an identifier for a given frame type |
sunflower_client.SunflowerServiceApi | getBooleanPropertiesForFrameTypeAndProperty | GET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop} | get the boolean properties of an identifier for a given frame type and property |
sunflower_client.SunflowerServiceApi | getBooleanPropertiesForFrameTypeAndPropertyAndArrowType | GET /sfweb/rest/docs/{docId}/ids/{id}/boolean-props/{frameType}/{prop}/{arrowType} | get the boolean properties of an identifier for a given frame type, property, and arrow type |
sunflower_client.SunflowerServiceApi | getDirective | GET /sfweb/rest/docs/{docId}/directives/{did} | get a directive |
sunflower_client.SunflowerServiceApi | getDirectives | GET /sfweb/rest/docs/{docId}/directives | get the directives |
sunflower_client.SunflowerServiceApi | getDocuments | GET /sfweb/rest/docs | retrieve all the documents |
sunflower_client.SunflowerServiceApi | getFloraText | GET /sfweb/rest/docs/{docId}/flora | get the raw flora text of the document |
sunflower_client.SunflowerServiceApi | getHilogFact | GET /sfweb/rest/docs/{docId}/hilog/{hid} | get a hilog (non-frame) fact |
sunflower_client.SunflowerServiceApi | getHilogFacts | GET /sfweb/rest/docs/{docId}/hilog | get the hilog (non-frame) facts |
sunflower_client.SunflowerServiceApi | getIdentifier | GET /sfweb/rest/docs/{docId}/ids/{id} | get information about an identifier |
sunflower_client.SunflowerServiceApi | getIdentifiers | GET /sfweb/rest/docs/{docId}/ids | get all the identifiers |
sunflower_client.SunflowerServiceApi | getImportedBy | GET /sfweb/rest/docs/{docId}/importedBy | get the importing documents |
sunflower_client.SunflowerServiceApi | getImports | GET /sfweb/rest/docs/{docId}/imports | get the imports |
sunflower_client.SunflowerServiceApi | getInstances | GET /sfweb/rest/docs/{docId}/ids/{id}/instances | get the instances of an identifier |
sunflower_client.SunflowerServiceApi | getLatentQueries | GET /sfweb/rest/docs/{docId}/latent-queries | get the latent queries |
sunflower_client.SunflowerServiceApi | getLatentQuery | GET /sfweb/rest/docs/{docId}/latent-queries/{lqId} | get a latent query |
sunflower_client.SunflowerServiceApi | getNamespaces | GET /sfweb/rest/docs/{docId}/namespaces | get namespace definitions |
sunflower_client.SunflowerServiceApi | getOntologyChanges | GET /sfweb/rest/changes | retrieve all the ontology changes |
sunflower_client.SunflowerServiceApi | getQueries | GET /sfweb/rest/docs/{docId}/queries | get the queries |
sunflower_client.SunflowerServiceApi | getQuery | GET /sfweb/rest/docs/{docId}/queries/{qid} | get a query |
sunflower_client.SunflowerServiceApi | getRootClasses | GET /sfweb/rest/docs/{docId}/root-classes | get the root classes |
sunflower_client.SunflowerServiceApi | getRootInfo | GET /sfweb/rest | get service information |
sunflower_client.SunflowerServiceApi | getRule | GET /sfweb/rest/docs/{docId}/rules/{ruleId} | get information about a rule |
sunflower_client.SunflowerServiceApi | getRules | GET /sfweb/rest/docs/{docId}/rules | get the rules |
sunflower_client.SunflowerServiceApi | getSubclasses | GET /sfweb/rest/docs/{docId}/ids/{id}/subclasses | get the sub-classes of an identifier |
sunflower_client.SunflowerServiceApi | getSuperclasses | GET /sfweb/rest/docs/{docId}/ids/{id}/superclasses | get the super-classes of an identifier |
sunflower_client.SunflowerServiceApi | getTripleProperties | GET /sfweb/rest/docs/{docId}/ids/{id}/triple-props | get the triple properties of an identifier |
sunflower_client.SunflowerServiceApi | getTriplePropertiesForFrameType | GET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType} | get the triple properties of an identifier for a given frame type |
sunflower_client.SunflowerServiceApi | getTriplePropertiesForFrameTypeAndProperty | GET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop} | get the triple properties of an identifier for a given frame type and property |
sunflower_client.SunflowerServiceApi | getTriplePropertiesForFrameTypeAndPropertyAndArrowType | GET /sfweb/rest/docs/{docId}/ids/{id}/triple-props/{frameType}/{prop}/{arrowType} | get the triple properties of an identifier for a given frame type, property, and arrow type |
sunflower_client.SunflowerServiceApi | getTypes | GET /sfweb/rest/docs/{docId}/ids/{id}/types | get the types of an identifier |
sunflower_client.SunflowerServiceApi | getUDF | GET /sfweb/rest/docs/{docId}/udfs/{uid} | get a user-defined function |
sunflower_client.SunflowerServiceApi | getUDFs | GET /sfweb/rest/docs/{docId}/udfs | get the Sunflower_User-defined functions |
sunflower_client.SunflowerServiceApi | getUncategorizedIdentifiers | GET /sfweb/rest/docs/{docId}/uncategorized-identifiers | get the uncategorized identifiers (not class or instance) |
sunflower_client.SunflowerServiceApi | importFloraDir | POST /sfweb/rest/import | import a flora directory |
sunflower_client.SunflowerServiceApi | latentQuery | POST /sfweb/rest/docs/{docId}/latent-query | execute a latent query |
sunflower_client.SunflowerServiceApi | query | POST /sfweb/rest/docs/{docId}/query | execute a query |
sunflower_client.SunflowerServiceApi | retrieveContent | POST /sfweb/rest/docs/{docId}/content/retrieve | retrieve flora content |
sunflower_client.SunflowerServiceApi | retrieveJPQL | POST /sfweb/rest/docs/{docId}/content/jpql | retrieve flora content via manual JPQL query |
sunflower_client.SunflowerServiceApi | trace | POST /sfweb/rest/docs/{docId}/trace | execute a trace |
sunflower_client.SunflowerServiceApi | updateLatentQuery | PUT /sfweb/rest/docs/{docId}/latent-queries/{lqId} | update a latent query |
sunflower_client.SunflowerServiceApi | updateRule | PUT /sfweb/rest/docs/{docId}/rules/{ruleId} | update a rule |
Documentation for Models
- sunflower_client.ArrowType
- sunflower_client.BindingValue
- sunflower_client.BooleanPropertyFact
- sunflower_client.BooleanPropertyInfo
- sunflower_client.Directive
- sunflower_client.DirectiveInfo
- sunflower_client.Fact
- sunflower_client.FrameType
- sunflower_client.HilogFact
- sunflower_client.HilogFactInfo
- sunflower_client.Import
- sunflower_client.InstanceOf
- sunflower_client.InstanceOfInfo
- sunflower_client.Justification
- sunflower_client.JustificationType
- sunflower_client.LatentQuery
- sunflower_client.LatentQueryAbbrevInfo
- sunflower_client.LatentQueryInfo
- sunflower_client.NLRequest
- sunflower_client.NLResult
- sunflower_client.Namespace
- sunflower_client.NamespaceInfo
- sunflower_client.NamespaceSpec
- sunflower_client.OntologyAdd
- sunflower_client.OntologyChange
- sunflower_client.OntologyDelete
- sunflower_client.PropertyFact
- sunflower_client.Query
- sunflower_client.QueryInfo
- sunflower_client.QueryRequest
- sunflower_client.QueryResult
- sunflower_client.QueryStatus
- sunflower_client.QueryType
- sunflower_client.Rule
- sunflower_client.RuleAbbrevInfo
- sunflower_client.RuleInfo
- sunflower_client.Solution
- sunflower_client.SubclassOf
- sunflower_client.SubclassOfInfo
- sunflower_client.TraceNode
- sunflower_client.TraceNodeJustification
- sunflower_client.TraceResult
- sunflower_client.TriplePropertyFact
- sunflower_client.TriplePropertyInfo
- sunflower_client.UDF
- sunflower_client.UDFInfo
Documentation for Authorization
bearerAuth
- Type: Bearer authentication (jwt)
3 years ago