public override IXmlTag CreateRootTag(IXmlTagHeaderNode header) { Logger.LogMessage("CreateRootTag {0}: {1}", header.Name.XmlName, header.GetText()); if (header.Name.XmlName == Keyword.HibernateMapping) { return new HibernateMappingTag(); } return new MiscellaneousTag(); }
public override IXmlTag CreateTag(IXmlTagHeaderNode header, IXmlTag parentTag) { Logger.LogMessage("CreateTag {0}: {1}", header.Name.XmlName, header.GetText()); string name = header.Name.XmlName; switch (name) { case Keyword.HibernateMapping: return new HibernateMappingTag(); case Keyword.Class: return new ClassTag(); case Keyword.Id: return new IdTag(); case Keyword.Property: return new PropertyTag(); case Keyword.Bag: return new BagTag(); case Keyword.IdBag: return new IdBagTag(); case Keyword.Set: return new SetTag(); case Keyword.Array: return new ArrayTag(); case Keyword.PrimitiveArray: return new PrimitiveArrayTag(); case Keyword.List: return new ListTag(); case Keyword.Any: return new AnyTag(); case Keyword.Map: return new MapTag(); case Keyword.Component: return new ComponentTag(); case Keyword.DynamicComponent: return new DynamicComponentTag(); case Keyword.Subclass: return new SubclassTag(); case Keyword.JoinedSubclass: return new JoinedSubclassTag(); case Keyword.OneToOne: return new OneToOneTag(); case Keyword.OneToMany: return new OneToManyTag(); case Keyword.ManyToMany: return new ManyToManyTag(); case Keyword.ManyToAny: return new ManyToAnyTag(); case Keyword.ManyToOne: return new ManyToOneTag(); case Keyword.CompositeElement: return new CompositeElementTag(); case Keyword.NestedCompositeElement: return new NestedCompositeElementTag(); case Keyword.Parent: return new ParentTag(); } return base.CreateTag(header, parentTag); }