Damiano Falcioni (c229ccbb) at 07 Dec 11:07
added readme
Patrik Burzynski (b32ba2c7) at 13 Sep 08:49
added methods to get ALL code for ADO... classes
There is a problem when trying to retrieve files using ADOApplicationLibraryNew.findFileValue(Identifier)
I am using the following method:
private void addFiles(ADOApplicationLibraryNew toAddLib) {
Set<Identifier> fileIds = toAddLib.getFileList();
Val fileContent = null;
for (Identifier id : fileIds) {
fileContent = null;
try {
// The following line creates the exception.
// this.originalLib is of type ADOApplicationLibraryNew
fileContent = this.originalLib.findFileValue(id);
this.originalLib.addFile(id.getRaw(), fileContent.getRaw());
} catch (Exception ex) {
ex.printStackTrace();
conflicts.add(new FileConflict(id, fileContent));
}
}
}
Two example exceptions that are printed by printStackTrace:
java.lang.Exception: Impossible to find an file with id <ADOxxAddonExtension2nd.EMprocedures>
at org.adoxx.all.api.library.newlib.Files.findFileValue(Files.java:47)
at org.adoxx.all.api.library.newlib.NewLib.findFileValue(NewLib.java:80)
at org.adoxx.all.abstracted.ADOApplicationLibraryNew.findFileValue(ADOApplicationLibraryNew.java:240)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addFiles(AdoxxLibraryMerger.java:127)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addToOriginal(AdoxxLibraryMerger.java:65)
at org.omilab.adoxx.tool.Main.main(Main.java:29)
java.lang.Exception: Impossible to find an file with id <ASC_GlobalFunctions_Conversion.asc>
at org.adoxx.all.api.library.newlib.Files.findFileValue(Files.java:47)
at org.adoxx.all.api.library.newlib.NewLib.findFileValue(NewLib.java:80)
at org.adoxx.all.abstracted.ADOApplicationLibraryNew.findFileValue(ADOApplicationLibraryNew.java:240)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addFiles(AdoxxLibraryMerger.java:127)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addToOriginal(AdoxxLibraryMerger.java:65)
at org.omilab.adoxx.tool.Main.main(Main.java:29)
But the files are located in the ALL that is loaded through ADOLibFactory.loadFromAllFile(args[1], false);
:
Found the issue, was trying to find the file in the wrong library.
There is a problem when trying to retrieve files using ADOApplicationLibraryNew.findFileValue(Identifier)
I am using the following method:
private void addFiles(ADOApplicationLibraryNew toAddLib) {
Set<Identifier> fileIds = toAddLib.getFileList();
Val fileContent = null;
for (Identifier id : fileIds) {
fileContent = null;
try {
// The following line creates the exception.
// this.originalLib is of type ADOApplicationLibraryNew
fileContent = this.originalLib.findFileValue(id);
this.originalLib.addFile(id.getRaw(), fileContent.getRaw());
} catch (Exception ex) {
ex.printStackTrace();
conflicts.add(new FileConflict(id, fileContent));
}
}
}
Two example exceptions that are printed by printStackTrace:
java.lang.Exception: Impossible to find an file with id <ADOxxAddonExtension2nd.EMprocedures>
at org.adoxx.all.api.library.newlib.Files.findFileValue(Files.java:47)
at org.adoxx.all.api.library.newlib.NewLib.findFileValue(NewLib.java:80)
at org.adoxx.all.abstracted.ADOApplicationLibraryNew.findFileValue(ADOApplicationLibraryNew.java:240)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addFiles(AdoxxLibraryMerger.java:127)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addToOriginal(AdoxxLibraryMerger.java:65)
at org.omilab.adoxx.tool.Main.main(Main.java:29)
java.lang.Exception: Impossible to find an file with id <ASC_GlobalFunctions_Conversion.asc>
at org.adoxx.all.api.library.newlib.Files.findFileValue(Files.java:47)
at org.adoxx.all.api.library.newlib.NewLib.findFileValue(NewLib.java:80)
at org.adoxx.all.abstracted.ADOApplicationLibraryNew.findFileValue(ADOApplicationLibraryNew.java:240)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addFiles(AdoxxLibraryMerger.java:127)
at org.omilab.adoxx.merger.AdoxxLibraryMerger.addToOriginal(AdoxxLibraryMerger.java:65)
at org.omilab.adoxx.tool.Main.main(Main.java:29)
But the files are located in the ALL that is loaded through ADOLibFactory.loadFromAllFile(args[1], false);
:
Patrik Burzynski (73be2e11) at 09 Sep 08:27
made attributeList public to fit other classes
... and 1 more commit
There doesn't seem to be an easy way to access the ArrayList<Attribute> attributeList
of AttrProf
and RecordClass
. For example documentation from RecordClass
:
The Class
and RelationClass
solve this problem by providing their ArrayList<Attribute> attributeList
as public variables.
Is there a reason why the Attributes aren't available for AttrProf
and RecordClass
?
The method private ADOApplicationLibraryNew addRecordClass(RecordClass recordClass)
is specified as private, but weirdly the Attribute Profile version public ADOApplicationLibraryNew addAttrProf(AttrProf attrProf)
is public, even though RecordClass
and AttrProf
they seem to have the same structure:
private Identifier identifier = null;
private Identifier superClassIdentifier = null;
private ArrayList<Attribute> attributeList = new ArrayList<Attribute>();
Is there a specific reason for this difference?