File fXmlFile = new File("./assets/poi-recommender.hml");
InputStream is;
try {
is = new FileInputStream(fXmlFile);
XTTModel model = HMLParser.parseHML(is);
System.out.println("Version: "+model.getVersion());
LinkedList<Type> types = model.getTypes();
for(Type t : types){
System.out.println("Type id: "+t.getId());
System.out.println("Type name: "+t.getName());
System.out.println("Type base: "+t.getBase());
System.out.println("Type length: "+t.getLength());
System.out.println("Type scale: "+t.getPrecision());
System.out.println("desc: "+t.getDescription());
for(Value v: t.getDomain().getValues()){
System.out.println("Value: "+v);
}
System.out.println("==========================");
}
LinkedList<Attribute> atts = model.getAttributes();
for(Attribute att: atts){
System.out.println("Att Id: "+att.getId());
System.out.println("Att name: "+att.getName());
System.out.println("Att typeName: "+att.getTypeId());
System.out.println("Att abbrev: "+att.getAbbreviation());
System.out.println("Att comm: "+att.getComm());
System.out.println("Att desc: "+att.getDescription());
System.out.println("Att class: "+att.getXTTClass());
System.out.println("==========================");
}
LinkedList<Table> tables = model.getTables();
for(Table t : tables){
System.out.println("Table id:"+t.getId());
System.out.println("Table name:"+t.getName());
LinkedList<heart.xtt.Attribute> cond = t.getPrecondition();
for(heart.xtt.Attribute a : cond){