new $k.RDFImporter()
Creates a new RDFImporter
- Version
- Experimental feature, might be removed at any time
Methods
importFromString(rdf, sourceURIopt) → {Array.<object>}
Import RDF
| Name | Type | Attributes | Description |
|---|---|---|---|
rdf | string | Ontology in RDF syntax | |
sourceURI | string | <optional> | Source URI. Will be used as base URI if no base is defined in the RDF file. |
- Since
- 4.3.3
Object with information about the import. { "errorCount":
Each log entry contains some or all of the following properties: { "message" : "
- Type:
- Array.<object>
importFromURI(uri) → {Array.<string>}
Import RDF from an URI
| Name | Type | Description |
|---|---|---|
uri | string |
Object with information about the import. { "errorCount":
Each log entry contains some or all of the following properties: { "message" : "
- Type:
- Array.<string>
setActivateTriggers(bool) → {$k.RDFImporter}
activate Triggers
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setAllowDeferredRelations(bool) → {$k.RDFImporter}
Allow deferred relation creation
| Name | Type | Description |
|---|---|---|
bool | boolean |
- Since
- 5.3.3
The Importer
- Type:
- $k.
RDFImporter
setAvoidDuplicateProperties(bool) → {$k.RDFImporter}
Avoid duplicate properties
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setBlobHandler(handlerFunction)
The blob handler function is called when a blob value is imported. The export passes the string value of the XML element and the (optional) language of the blob as arguments. The handler function then can import the blob, e.g. read it from a ZIP archive. The function must return the blob value as a $k.NetEntity.
| Name | Type | Description |
|---|---|---|
handlerFunction | function | Handler function. Signature: handlerFunction(string, string) => $k.NetEntity |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.8.3
setEnableCreateSchema(bool) → {$k.RDFImporter}
Allow schema changes
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setEnforceInverseRelationConcepts(bool) → {$k.RDFImporter}
Create inverse relation types
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setFormat(format) → {$k.RDFImporter}
Sets the RDF file format
| Name | Type | Description |
|---|---|---|
format | boolean | Either 'xml' or 'turtle' |
- Since
- 5.8.3
The Importer
- Type:
- $k.
RDFImporter
setIdentifyGlobalResourcesByID(bool) → {$k.RDFImporter}
Identify objects with global URI also by local ID
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setIgnoreHTTPExceptions(bool) → {$k.RDFImporter}
Ignore HTTP errors
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setImportInverseRelationTypes(bool) → {$k.RDFImporter}
Allow deferred relation creation
| Name | Type | Description |
|---|---|---|
bool | boolean |
- Deprecated
- Use setAllowDeferredRelations() instead
The Importer
- Type:
- $k.
RDFImporter
setImportReferencedResources(bool) → {$k.RDFImporter}
Import referenced resources
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setImportStrategy(strategy) → {$k.RDFImporter}
Import strategy
| Name | Type | Description |
|---|---|---|
strategy | string | "updateOrCreate": Update or create if not found "default": Default "update": Update "replace": Replace "supress": Do not import "locate": Locate |
The Importer
- Type:
- $k.
RDFImporter
setLogModifiedRelationTargets(bool) → {$k.RDFImporter}
Add modified relation targets to logged objects
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter
setModifiedElementCallback(callback) → {$k.RDFImporter}
Set the logging callback function
| Name | Type | Description |
|---|---|---|
callback | function | Callback function that receives two arguments, the affected element and a change type string |
- Version
- Experimental feature, might be removed at any time
- Since
- 5.3.2
The Importer
- Type:
- $k.
RDFImporter
setSingleTransaction(bool) → {$k.RDFImporter}
Import in a single transaction
| Name | Type | Description |
|---|---|---|
bool | boolean | False if not defined |
The Importer
- Type:
- $k.
RDFImporter
setStoreInFolder(bool) → {$k.RDFImporter}
Add imported objects to a folder (will be created in the private folder)
| Name | Type | Description |
|---|---|---|
bool | boolean |
The Importer
- Type:
- $k.
RDFImporter