Hi,
i wrote a java program, that create a rdf file parsing a file tree.
On the last step the shockwaves and gifs are checked and the byte
sizes are written in the rdf file as nodes.
The 1. Problem: A java.lang.OutOf MemoryError is throwm. Sometimes on
the 45 shockwave, sometimes on the 53 shockwave...
code:
for(int i = 0; i < objects.getLeng th(); i++){
String xValue = "concat(./dir/text(), ./objects/object/param[@name
=
'movie']/@value)";
// XPath Ausdruck anwenden
XObject xO = XPathAPI.eval(o bjects.item(i), xValue);
// the shockwave
f = new File(xO.toStrin g());
// byte size
long size = f.length();
String x = "/*/Description[contains(@about , '" + f.getPath() +
"')]";
nodes = XPathAPI.select NodeList(root, x.replace('\\', '/'));
if(nodes.getLen gth() == 1){
Node extent = target.createEl ement("dcterms: extent");
Node bytesize = target.createEl ement("lom-tech:ByteSize") ;
Node value = target.createEl ement("rdf:valu e");
Node length = target.createTe xtNode("" + size);
value.appendChi ld(length);
bytesize.append Child(value);
extent.appendCh ild(bytesize);
nodes.item(0).a ppendChild(exte nt);
}
}
the 2. Problem.
After parsing the shockwaves i want to scall down images in the file
tree and save it. After this i want to add the new image url as node
to the rdf tree.
the same Exception!!!!
Thanks and greetings
novel
i wrote a java program, that create a rdf file parsing a file tree.
On the last step the shockwaves and gifs are checked and the byte
sizes are written in the rdf file as nodes.
The 1. Problem: A java.lang.OutOf MemoryError is throwm. Sometimes on
the 45 shockwave, sometimes on the 53 shockwave...
code:
for(int i = 0; i < objects.getLeng th(); i++){
String xValue = "concat(./dir/text(), ./objects/object/param[@name
=
'movie']/@value)";
// XPath Ausdruck anwenden
XObject xO = XPathAPI.eval(o bjects.item(i), xValue);
// the shockwave
f = new File(xO.toStrin g());
// byte size
long size = f.length();
String x = "/*/Description[contains(@about , '" + f.getPath() +
"')]";
nodes = XPathAPI.select NodeList(root, x.replace('\\', '/'));
if(nodes.getLen gth() == 1){
Node extent = target.createEl ement("dcterms: extent");
Node bytesize = target.createEl ement("lom-tech:ByteSize") ;
Node value = target.createEl ement("rdf:valu e");
Node length = target.createTe xtNode("" + size);
value.appendChi ld(length);
bytesize.append Child(value);
extent.appendCh ild(bytesize);
nodes.item(0).a ppendChild(exte nt);
}
}
the 2. Problem.
After parsing the shockwaves i want to scall down images in the file
tree and save it. After this i want to add the new image url as node
to the rdf tree.
the same Exception!!!!
Thanks and greetings
novel
Comment