Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI for the ontouml2gufo transformation #22

Closed
victorviola opened this issue Mar 9, 2020 · 1 comment · Fixed by #49
Closed

UI for the ontouml2gufo transformation #22

victorviola opened this issue Mar 9, 2020 · 1 comment · Fixed by #49
Assignees
Labels
enhancement New feature or request

Comments

@victorviola
Copy link
Contributor

In the plugin, the transformation must be requested through a button.

The button must open a window requesting the baseIRI, the desired syntax (format), and if entities should be identified by name or by id (uriFormatBy).

baseIRI must be a text field.

format must be a drop down with options: N-Triples, N-Quads, and Turtle.

uriFormatBy must be a drop down with options name and id.

The information must be saved in the configurations for future transformations.

Upon a successful response, a window must appear requesting for the path to save the transformed file.

The path must be saved for future transformations.

Upon an unsuccessful request, a dialog must appear informing the user that a problem occurred.

@victorviola victorviola added the enhancement New feature or request label Mar 9, 2020
@victorviola victorviola self-assigned this Mar 9, 2020
@tgoprince
Copy link
Member

tgoprince commented May 8, 2020

This is the structure of options object that the ontouml2gufo service accepts:

interface IOntoUML2GUFOOptions {
  baseIRI: string;
  createInverses?: boolean;
  createObjectProperty?: boolean;
  customElementMapping?: {
    [key: string]: {
      label?: {
        [key: string]: string;
      };
      uri: string;
    };
  };
  customPackageMapping?: {
    [key: string]: {
      prefix: string;
      uri: string;
    };
  };
  format?: string;
  preAnalysis?: boolean;
  prefixPackages?: boolean;
  uriFormatBy?: 'name' | 'id';
}

Default values:

{
  "baseIRI": "https://example.com",
  "createInverses": false,
  "createObjectProperty": false,
  "customElementMapping": {},
  "customPackageMapping": {},
  "format": "Turtle",
  "preAnalysis": true,
  "prefixPackages": false,
  "uriFormatBy": "name"
}

The field customElementMapping allows the user to override the URIs and labels generated by the transformation. The keys are the ids of classes, associations, associations ends, and attributes. The keys within the label field can be either equal to "default" or any language code (https://en.wikipedia.org/wiki/IETF_language_tag)

Here is an example:

{
  "customElementMapping": {
    "JoK2ZeaGAqACBxS5": {
      "uri": "Person",
      "label": {
        "default": "Person",
        "it": "Persona",
        "pt": "Pessoa"
      }
    },
    "ZXczxGAqACBxS5X": {
      "label": {
        "default": "Organization"
      }
    },
    "XCB2300xxafg245": {
      "uri": "EventPlan"
    }
  }
}

The customPackageMapping field is meant to override the the default package mapping done by the transformation. The key are package ids.

Here is an example:

{
  "customPackageMapping": {
    "ZPFjgI6GAqACCQyA": {
      "prefix": "customPerson",
      "uri": "https://custom.com/person#"
    },
    "ATSasI689qACULyA": {
      "prefix": "customSchool",
      "uri": "https://custom.com/school#"
    }
  }
}

@claudenirmf claudenirmf linked a pull request Aug 5, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants