Class SubjectAreaDefinitionSample

java.lang.Object
org.odpi.openmetadata.accessservices.subjectarea.samples.definition.SubjectAreaDefinitionSample

public class SubjectAreaDefinitionSample extends Object
SubjectAreaDefinition Sample provides a client program that calls the Subject Area OMAS to create a category hierarchy that matches the subject area definitions defined by Coco Pharmaceuticals.
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      The main program takes the URL root for the server.
      Parameters:
      args - URL root for the OMAG server platform; OMAG server name; userId
      Throws:
      IOException - IO Exception
    • getUrl

      public static String getUrl(String[] args) throws IOException
      This method gets the url that the sample will use to issue calls to the server.

      If arguments are supplied then the first parameter is used as the url.

      If no url is supplied then prompt the user to enter a valid url, enter means to use the default url.

      Parameters:
      args - arguments supplied
      Returns:
      the url to use on the calls to the server
      Throws:
      IOException - IO exception occurred while getting input from the user.
    • getServerName

      public static String getServerName(String[] args) throws IOException
      This method gets the server name that the sample will use to issue calls to the server.

      If arguments are supplied then the second parameter is used as a server name.

      If no name is supplied then prompt the user to enter a valid server name, enter means to use the default server name.

      Parameters:
      args - arguments supplied
      Returns:
      the url to use on the calls to the server
      Throws:
      IOException - IO exception occurred while getting input from the user.
    • getUserId

      public static String getUserId(String[] args) throws IOException
      This method gets the userId that the sample will use to issue calls to the server.

      If arguments are supplied then the third parameter is used as a userId.

      If no userId is supplied then prompt the user to enter a valid userId, enter means to use the default userId.

      Parameters:
      args - arguments supplied
      Returns:
      the url to use on the calls to the server
      Throws:
      IOException - IO exception occurred while getting input from the user.