(clear) (reset) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#CartaoCredito) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#CheckIn) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Cliente) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#ConfirmacaoCancelamento) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Conta) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#DespesasQuarto) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Endereco) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Espera) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Funcionario) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Hotel) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#ItemConsumo) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Periodo) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Quarto) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#Reserva) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#ReservaAgencia) (mapclass http://www.owl-ontologies.com/Ontology1243946193.owl#ReservaIndividuo) (defrule inicio => (printout t "Bem Vindo ao Hotelzinho!" crlf "Digite a data atual (dd/mm/aaaa):") (assert (dataAtual (read))) (printout t "--- MENU PRINCIPAL ---" crlf "Digite 1 para inserir um quarto" crlf "Digite 2 para fazer uma reserva" crlf "Digite 3 para fazer check-in" crlf "Digite 4 para fazer check-out"crlf "Digite 5 para cadastrar funcionario"crlf "Digite 6 para cadastrar um cliente" crlf "Digite 10 para sair"crlf "-------------------------------------------" crlf) (assert (listaOpcoes (read))) ) (defrule inserirQuarto (listaOpcoes 1) => (printout t "Digite o tipo do Quarto(Luxo/Simples):" crlf) (bind ?tipoQuarto(read)) (printout t "Digite o taxa do Quarto:" crlf) (bind ?taxaQuarto(read)) (printout t "Digite a categoria do quarto(fumante/nao-fumante):" crlf) (bind ?categoria (read)) (printout t "Digite se o Quarto esta disponivel(sim/nao):" crlf) (bind ?disponivel(read)) (make-instance of http://www.owl-ontologies.com/Ontology1243946193.owl#Quarto (http://www.owl-ontologies.com/Ontology1243946193.owl#categoriaQuarto ?categoria) (http://www.owl-ontologies.com/Ontology1243946193.owl#taxa ?taxaQuarto) (http://www.owl-ontologies.com/Ontology1243946193.owl#tipoDoQuarto ?tipoQuarto) (http://www.owl-ontologies.com/Ontology1243946193.owl#quartoDisponivel ?disponivel) (http://www.owl-ontologies.com/Ontology1243946193.owl#ehQuartoDe http://www.owl-ontologies.com/Ontology1243946193.owl#Hotelzinho) ) ) (defrule inserirReserva (listaOpcoes 2) => (printout t "Selecione o tipo da Reserva:" crlf "1- Por Agencia" crlf "2- Pessoal" crlf "-------------------------------------------" crlf) (assert (opcoesReserva (read))) ) (defrule inserirReservaAgencia (opcoesReserva 1) => (printout t "Digite a categoria do quarto(fumante/nao-fumante):" crlf) (bind ?categoria (read)) (printout t "Digite o nome da agencia:" crlf) (bind ?nomeAgencia (read)) (printout t "Digite o nome do agente:" crlf) (bind ?nomeAgente(read)) (printout t "Digite o tipo do Quarto(Luxo/Simples):" crlf) (bind ?tipoQuarto(read)) (printout t "Digite o id da Reserva:" crlf) (bind ?idReserva(read)) (printout t "Digite o nome Cliente:" crlf) (bind ?nomeCliente(read)) (printout t "Digite o nome do funcionário:" crlf) (bind ?nomeFuncionario(read)) (printout t "Digite a data inicial(aaaa-mm-dd):" crlf) (bind ?dataInicial(read)) (printout t "Digite a data final(aaaa-mm-dd):" crlf) (bind ?dataFinal(read)) (make-instance of http://www.owl-ontologies.com/Ontology1243946193.owl#ReservaAgencia (http://www.owl-ontologies.com/Ontology1243946193.owl#categoriaQuarto ?categoria) (http://www.owl-ontologies.com/Ontology1243946193.owl#nomeAgencia ?nomeAgencia) (http://www.owl-ontologies.com/Ontology1243946193.owl#tipoDoQuarto ?tipoQuarto) (http://www.owl-ontologies.com/Ontology1243946193.owl#id ?idReserva) (http://www.owl-ontologies.com/Ontology1243946193.owl#nomeAgente ?nomeAgente) (http://www.owl-ontologies.com/Ontology1243946193.owl#temCliente (str-cat http://www.owl-ontologies.com/Ontology1243946193.owl# ?nomeCliente)) (http://www.owl-ontologies.com/Ontology1243946193.owl#temFuncionario (str-cat http://www.owl-ontologies.com/Ontology1243946193.owl# ?nomeFuncionario)) (http://www.owl-ontologies.com/Ontology1243946193.owl#ehReservaDe http://www.owl-ontologies.com/Ontology1243946193.owl#Hotelzinho) ) ) (defrule inserirReservaIndividuo (opcoesReserva 2) => (printout t "Digite a categoria do quarto(fumante/nao-fumante):" crlf) (bind ?categoria (read)) (printout t "Digite o tipo do Quarto(Luxo/Simples):" crlf) (bind ?tipoQuarto(read)) (printout t "Digite o id da Reserva:" crlf) (bind ?idReserva(read)) (printout t "Digite o nome Cliente:" crlf) (bind ?nomeCliente(read)) (printout t "Digite o nome do funcionário:" crlf) (bind ?nomeFuncionario(read)) (printout t "Digite a data inicial:" crlf) (bind ?dataInicial(read)) (printout t "Digite a data final:" crlf) (bind ?dataFinal(read)) (make-instance of http://www.owl-ontologies.com/Ontology1243946193.owl#ReservaIndividuo (http://www.owl-ontologies.com/Ontology1243946193.owl#categoriaQuarto ?categoria) (http://www.owl-ontologies.com/Ontology1243946193.owl#tipoDoQuarto ?tipoQuarto) (http://www.owl-ontologies.com/Ontology1243946193.owl#id ?idReserva) (http://www.owl-ontologies.com/Ontology1243946193.owl#temCliente (str-cat http://www.owl-ontologies.com/Ontology1243946193.owl# ?nomeCliente)) (http://www.owl-ontologies.com/Ontology1243946193.owl#temFuncionario (str-cat http://www.owl-ontologies.com/Ontology1243946193.owl# ?nomeFuncionario)) ) (make-instance http://www.owl-ontologies.com/Ontology1243946193.owl#PeriodoReserva (http://www.owl-ontologies.com/Ontology1243946193.owl#dataInicial "~@http://www.w3.org/2001/XMLSchema#date ?ano-?mes-?dia") ) ) (defrule inserirFuncionario (listaOpcoes 5) => (printout t "Digite o nome do funcionario:" crlf) (bind ?nomeFuncionario(read)) (make-instance of http://www.owl-ontologies.com/Ontology1243946193.owl#Funcionario (http://www.owl-ontologies.com/Ontology1243946193.owl#nome ?nomeFuncionario) ) ) (defrule inserirCliente (listaOpcoes 6) => (printout t "Digite o nome do cliente:" crlf) (bind ?nomeCliente(read)) (printout t "Digite o telefone:" crlf) (bind ?telefoneCliente(read)) (printout t "Digite o endereço:" crlf) (bind ?enderecoCliente(read)) (make-instanceof http://www.owl-ontologies.com/Ontology1243946193.owl#Cliente (http://www.owl-ontologies.com/Ontology1243946193.owl#nome ?nomeCliente) (http://www.owl-ontologies.com/Ontology1243946193.owl#telefone ?telefoneCliente) (http://www.owl-ontologies.com/Ontology1243946193.owl#temEndereco (str-cat http://www.owl-ontologies.com/Ontology1243946193.owl# ?enderecoCliente)) ) ) (run)