--- /dev/null
+#JAVA_LIBS = .:lib:ext/json-jdk1.5-2007-05-01.jar:ext/wstx-asl-3.2.1.jar:ext/stax-api-1.0.1.jar:ext/xercesImpl-1.4.4-2.jar
+JAVA_LIBDIR = .lib
+JAVAC=javac -J-Xmx256m
+JAVA=java -Xmx256m
+JAVA_LIBS = .:$(JAVA_LIBDIR):ext/json-jdk1.5-2007-05-01.jar:ext/wstx-asl-3.2.1.jar:ext/stax-api-1.0.1.jar
+JAVA_SRC = \
+ org/opensrf/net/xmpp/*.java \
+ org/opensrf/util/*.java \
+ org/opensrf/*.java \
+ org/opensrf/test/*.java
+
+all:
+ mkdir -p $(JAVA_LIBDIR)
+ $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1
+
+# only prints the first 30 lines of errors
+slim:
+ mkdir -p $(JAVA_LIBDIR)
+ $(JAVAC) -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
+ @echo -e "\nTruncating at 30 lines"
+
+check:
+ mkdir -p $(JAVA_LIBDIR)
+ $(JAVAC) -Xlint:unchecked -d $(JAVA_LIBDIR) -cp $(JAVA_LIBS) $(JAVA_SRC) 2>&1 | head -n 30
+ @echo -e "\nTruncating at 30 lines"
+
+run:
+ $(JAVA) -cp $(JAVA_LIBS) $(JAVA_EXE) $(JAVA_ARGS)
+
+docs:
+ find . -name *.java > files;
+ javadoc -classpath $(JAVA_LIBS) -d doc @files;
+ rm files;
+
+clean:
+ rm -r $(JAVA_LIBDIR)
+
+
+
/**
* Parses XML data from the provided XMPP stream.
- * @param inStream The stream to parse.
*/
public void read() {
/**
* Returns the configuration value found at the requested path.
- * @see org.opensrf.util.Utils.findPath for path description.
* @param path The search path
* @return The config value, or null if no value exists at the given path.
* @throws ConfigException thrown if nothing is found at the path
/**
* Returns the configuration object found at the requested path.
- * @see org.opensrf.util.Utils.findPath for path description.
* @param path The search path
* @return The config value
* @throws ConfigException thrown if nothing is found at the path
private String json;
/**
- * @param The JSON to parse
+ * @param json The JSON to parse
*/
public JSONReader(String json) {
this.json = json;
/**
* Parses JSON and creates an object.
- * @param json The JSON string to parse
* @return The resulting object which may be a List,
* Map, Number, String, Boolean, or null
*/
/**
- * @see write(Object, StringBuffer)
+ * Encodes a java object to JSON.
*/
public String write() {
StringBuffer sb = new StringBuffer();
/**
- * @see escape(String, StringBuffer)
+ * Escapes a string.
*/
public static String escape(String string) {
StringBuffer sb = new StringBuffer();