public void createParser() throws IOException {
- String parserPackagePostfix = "_exp";
+
String importerClassPostfix = "Exporter";
String parserClassPostfix = "Writer";
- elementPackageName = name+parserPackagePostfix;
importParserDir= new File(converter.getParserDir().getAbsolutePath()+"/"+elementPackageName);
if (!importParserDir.exists())
mainWriter.close();
}
+ @Override
+ protected String getPackagePostFix() {
+ return "_exp";
+ }
+
// @Override
// protected void handle(TopLevelAttribute topLevelAttribute) {
//
String attrName;
if (name != null) {
attrName = name;
- relationName = ontShort+"has"+name;
+ relationName = ontShort+"has"+base.getName(attribute);
if (parent != null)
- relationName = ontShort+getName(parent)+"_has"+name;
+ relationName = ontShort+getName(parent)+"_has"+base.getName(attribute);
}
else if (ref != null && parent != null) {
attrName = ref.getLocalPart();
- relationName = ontShort+getName(parent)+"_has"+ref.getLocalPart();
+ relationName = ontShort+getName(parent)+"_has"+base.getName(ref);
Attribute referred = base.getRefAttribute(ref);
if (referred != null) {
FileWriter fw = getWriter(parent);
NamedAttributeGroup group = this.base.getAttributeGroup(attribute.getRef());
fw.writer.println(commentTag+" AttributeGroup " + group.getName());
- SchemaObject obj = new SchemaObject(parent,attribute);
+ SchemaObject obj = new SchemaObject(base,parent,attribute);
for (Annotated annotated : group.getAttributeOrAttributeGroup()) {
if (annotated instanceof Attribute) {
//handle("AttributeGroups_"+group.getName(),(Attribute)annotated);