[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
] [
Newsgroup Home
]
[news.eclipse.tools.emf] Problems reading instances serialized with an old package
From
:
cagiva92@xxxxxxxxxxx
(Ben)
Date
: Mon, 13 Oct 2008 21:05:20 +0000 (UTC)
Newsgroups
:
eclipse.tools.emf
Organization
: Eclipse
User-agent
: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Though the reading does throw an exception, should not the objects in the resource still be populated with the information?
File file = new File(args[i]);
URI uri = file.isFile() ? URI.createFileURI(file.getAbsolutePath()): URI.createURI(args[0]);
Resource resource = null;
try {
resource = resourceSet.getResource(uri, true);
} catch (RuntimeException exception) {
exception.printStackTrace();
// An error occurred:
// org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
// uri '
http://www.acme.com/XYZ3.2
' not found.
for (EObject eObject : resource.getContents()) {
Diagnostic diagnostic = Diagnostician.INSTANCE.validate(eObject);
if (diagnostic.getSeverity() != Diagnostic.OK) {
printDiagnostic(diagnostic, "");
}
}
}
Follow-Ups
:
[news.eclipse.tools.emf] Re: Problems reading instances serialized with an old package
From:
Ed Merks
Prev by Date:
[news.eclipse.tools.emf] Mapping EObject Objects to Diagnostic Objects
Next by Date:
[news.eclipse.tools.emf] [Announce] EMF NET4J 1.0.1 is available
Previous by thread:
[news.eclipse.tools.emf] Mapping EObject Objects to Diagnostic Objects
Next by thread:
[news.eclipse.tools.emf] Re: Problems reading instances serialized with an old package
Index(es):
Date
Thread