I don't know but I sure hope so. This is the first day I'm trying to use odftoolkit and I haven't really done Java for ages. And I'm trying to avoid the need to compile odftoolkit myself as I would just like to use it.
In maven there seems to be org.apache.clerezza / utils / version 0.1-incubating It contains only the org.apache.clerezza.utils... packages and everything compiles now for me. Unfortunately it also pulls 8 other jars for dependencies. I have now total 20 jars that are required to compile and run my simple odf test class which reads a document, changes metadata and writes :) Getting rid of the clerezza thing would reduce that already nicely. Here are my current maven dependencies (in eclipse) if it helps anyone <dependencies> <dependency> <groupId>org.apache.odftoolkit</groupId> <artifactId>simple-odf</artifactId> <version>0.7-incubating</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.clerezza</groupId> <artifactId>utils</artifactId> <version>0.1-incubating</version> </dependency> <dependency> <groupId>net.rootdev</groupId> <artifactId>java-rdfa</artifactId> <version>0.4.2</version> </dependency> <dependency> <groupId>com.hp.hpl.jena</groupId> <artifactId>jena</artifactId> <version>2.6.4</version> <scope>provided</scope> </dependency> </dependencies> On Thu, Aug 15, 2013 at 9:41 PM, Ryan O'Meara <[email protected] > wrote: > Would this do the same thing, with standard Java libraries? I found it > with a quick search ( > http://wills-tech-notes.blogspot.com/2010/09/uri-encoding-in-java.html) > > > import java.io.UnsupportedEncodingException; > import java.net.URISyntaxException; > import java.net.URLEncoder; > > String uriTest2(String uri) { > String encodedUri = null; > String encoding = "UTF-8"; > try { > encodedUri = URLEncoder.encode(uri, encoding); > } catch (UnsupportedEncodingException e) { > System.err.println("Unsuported encoding: "+encoding); > e.printStackTrace(); > } > return encodedUri; > } > > > -Ryan O'Meara > > > On Aug 15, 2013, at 3:33 PM, Rob Weir <[email protected]<mailto: > [email protected]>> wrote: > > On Thu, Aug 15, 2013 at 7:06 AM, Eero Torri <[email protected]<mailto: > [email protected]>> wrote: > Odftoolkit seems to have a dependency on the Clerezza project. > > Clerezza project says that "Clerezza is a service platform based on OSGi > (Open Services Gateway initiative) which provides a set of functionality > for management of semantically linked data accessible through RESTful Web > Services and in a secured way." > > Looking further where odftoolkit uses clerezza: > > odfdom et$ grep -Rin clerezza . > ./pkg/rdfa/Util.java:28:import org.apache.clerezza.utils.UriException; > ./pkg/rdfa/Util.java:29:import org.apache.clerezza.utils.UriUtil; > > So it uses only the classes called UriException and UriUtil and only in one > file > > > Now how are they actually used: > > String ret = sb.toString(); > try { > ret = UriUtil.encodePath(ret); > } catch (UriException e) { > } > > Transform string to another string and do nothing if it blows. > > This must be some kind of simple mistake. > I don't see how it would be worth importing a "service platform" just to do > URI path encoding. > > +1. This looks like overkill. Do you know, is there an equivalent > function that could be substituted in, within one of the existing > dependencies? > > -Rob > >
