Application "dataspects"

From SMW CindyKate - Main
Component 759410
Jump to: navigation, search
[edit]

Content

Dataspects Business Aspects



What's the story behind Application "dataspects"?

Application "dataspects" is a Ruby command-line application for managing/refactoring Semantic MediaWikis. It supports the following use cases:


It plays a vital role in Concept "Controlled, faceted, multilateral, asynchronous, bidirectional synchronisation of multiple SMWs (CFMABS)".

It uses connection and configuration profiles (declared in YAML files) for all SMWs that you want to work with.

It supports 2 levels of content/process directives:

How can Application "dataspects" be used?

Each use case works with a set of pages originating somewhere

This set of SMWCindyKate::Pages loads SMWCindyKate::Page instances into its @pages[page.sPageName] = page:


You can then define selections of pages using these methods


You can then filter these page selections using these methods

Notice:

In order to reduce complexity, the following NOT_ selectors only select pages if all but the leftmost arguments match.

I.e. for a page to be selected by NOT_having_FIELD_VALUE_for_FIELD_NAME_in_TEMPLATE_NAME, it must have FIELD_NAME in TEMPLATE_NAME.

If you want to select pages which "don't have FIELD_VALUE in FIELD_NAME" because they don't have FIELD_NAME to begin with, you have to use NOT_having_FIELD_NAME_in_TEMPLATE_NAME.


On filtered page selections you can mutate wikitext using these methods


When done, you can use these methods to store pages


Finally, you can use monitoring methods for quality control


Commands

Application Command Synopsis Examples
Application Command "smw-cindykate content compare"

smw-cindykate

  • Flag --profile <smw-profiles.yaml>

content

  • Switch --recent-changes-since

compare

Application Command "smw-cindykate content extract"

smw-cindykate

  • Flag --profile <smw-profiles.yaml>

content

  • Switch --extract-page-history
  • Switch --recent-changes-since
  • Switch --dry-run

extract

This command takes a content-reference and calls SMWCindyKate::SMWContentReference.store_pages_to_repository(repository_url). (An alternative is to use Application Command "smw-cindykate content manage" and call SMWCindyKate::OntologyRepositoryObject.store(ontorepo, page) on each of the final SMWCindyKate::Pages.pages.)

smw-cindykate content extract smwck_restored#my_extraction_script1.rb /home/user/smwck_repo1/
Application Command "smw-cindykate content inject"

smw-cindykate

  • Flag --profile <smw-profiles.yaml>

smw-cindykate content

  • Switch --allow-uncommitted-or-non-git
  • Switch --dry-run

smw-cindykate inject

  • Argument 1 <repository-url>
  • Argument 2 <smw-identifier>
Application Command "smw-cindykate content manage"

smw-cindykate

smw-cindykate content

  • Switch --print-pages-wikitext
  • Switch --purge-pages

smw-cindykate manage

Application Command "smw-cindykate monitor"


Methods and Testing

See Overview "Testing smw-cindykate".

Concepts and Architecture

Example: Using a facets-management-script.rb for managing facets

The command's synopsis is as follows:

[email protected]:~$ SDMS --profile ~/profiles.yaml content manage facets-management-script.rb
Notice:

What can be used how in a facets-management-script.rb?

DSSMWMS Concepts and Architecture Overview.png