Ejemplo n.º 1
0
def ask_input_filename():
    """ 
    Parse the xml file indicated by the user and returns its tree object.
    """
    filename = raw_input(
        "Enter SBVR specification filename (default: rules.xml): ")
    if filename == "":
        filename = "rules.xml"
    return filename


def ask_prefix():
    """ 
    Parse the xml file indicated by the user and returns its tree object.
    """
    return raw_input("Enter ontology base url (default: ''): ")


# Main steps
print_help_Message()
input_filename = ask_input_filename()
output_filename = ask_output_filename()
prefix = ask_prefix()

sbvr_specification = SBVRSpecification()
sbvr_specification.from_xml_file(input_filename)

sbvr_to_owl = SBVRToOWL(sbvr_specification, output_filename, prefix)

sbvr_to_owl.transform()
Ejemplo n.º 2
0
    """
    filename = raw_input("Enter SBVR specification filename (default: rules.xml): ")
    if filename == "":
        filename = "rules.xml"
    return filename

def ask_prefix():
    """ 
    Parse the xml file indicated by the user and returns its tree object.
    """
    return  raw_input("Enter ontology base url (default: ''): ")

# Main steps
print_help_Message()
input_filename = ask_input_filename()
output_filename = ask_output_filename()
prefix = ask_prefix()

sbvr_specification = SBVRSpecification()
sbvr_specification.from_xml_file(input_filename)


sbvr_to_owl = SBVRToOWL(sbvr_specification, output_filename, prefix) 

sbvr_to_owl.transform()