diff --git a/javadoc/allclasses-frame.html b/javadoc/allclasses-frame.html new file mode 100644 index 0000000..8a7731a --- /dev/null +++ b/javadoc/allclasses-frame.html @@ -0,0 +1,257 @@ + + + +
+ +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+EMAIL_PATTERN |
+"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+serialVersionUID |
+1L |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+ACCESS_DUMP_FILE_PREFIX |
+"access_" |
+
+
+public static final java.lang.String |
+ACCOUNT_DUMP_FILE_PREFIX |
+"accounts_" |
+
+
+public static final int |
+CACHE_MAXSIZE |
+10000 |
+
+
+public static final int |
+EXIST_MAXSIZE |
+4000000 |
+
+
+public static final java.lang.String |
+FOLLOWERS_DUMP_FILE_PREFIX |
+"followers_" |
+
+
+public static final java.lang.String |
+FOLLOWING_DUMP_FILE_PREFIX |
+"following_" |
+
+
+public static final java.lang.String |
+MESSAGE_DUMP_FILE_PREFIX |
+"messages_" |
+
+
+public static final java.lang.String |
+USER_DUMP_FILE_PREFIX |
+"users_" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final double |
+meter |
+9.0E-6 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+DIMENSION_ANOT0 |
+4 |
+
+
+public static final int |
+DIMENSION_ANOT1 |
+5 |
+
+
+public static final int |
+DIMENSION_ANOT2 |
+6 |
+
+
+public static final int |
+DIMENSION_ANOT3 |
+7 |
+
+
+public static final int |
+DIMENSION_BOTTOM |
+3 |
+
+
+public static final int |
+DIMENSION_LEFT |
+2 |
+
+
+public static final int |
+DIMENSION_RIGHT |
+0 |
+
+
+public static final int |
+DIMENSION_TOP |
+1 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+BLUE |
+255L |
+
+
+public static final long |
+GREEN |
+65280L |
+
+
+public static final long |
+GREY |
+8947848L |
+
+
+public static final double |
+PI180 |
+0.017453292519943295 |
+
+
+public static final double |
+PI2 |
+1.5707963267948966 |
+
+
+public static final double |
+PI32 |
+4.71238898038469 |
+
+
+public static final double |
+PI4 |
+0.7853981633974483 |
+
+
+public static final long |
+RED |
+16711680L |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+EVENT_PREFIX |
+"event_" |
+
+
+public static final int |
+MAX_FINISHED |
+1000 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+CHARSET |
+"UTF-8" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+CREATED_AT_FIELDNAME |
+"created_at" |
+
+
+public static final java.lang.String |
+TIMESTAMP_FIELDNAME |
+"timestamp" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+RICH_TEXT_SEPARATOR |
+"\n***\n" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+field_appearance_first |
+"appearance_first" |
+
+
+public static final java.lang.String |
+field_appearance_latest |
+"appearance_latest" |
+
+
+public static final java.lang.String |
+field_name |
+"name" |
+
+
+public static final java.lang.String |
+field_profile_image |
+"profile_image" |
+
+
+public static final java.lang.String |
+field_profile_image_url_http |
+"profile_image_url_http" |
+
+
+public static final java.lang.String |
+field_profile_image_url_https |
+"profile_image_url_https" |
+
+
+public static final java.lang.String |
+field_screen_name |
+"screen_name" |
+
+
+public static final java.lang.String |
+field_user_id |
+"user_id" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+blankTypeString |
+"____" |
+
+
+public static final int |
+systemMacOSC |
+0 |
+
+
+public static final int |
+systemMacOSX |
+1 |
+
+
+public static final int |
+systemUnix |
+2 |
+
+
+public static final int |
+systemUnknown |
+-1 |
+
+
+public static final int |
+systemWindows |
+3 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final long |
+DAY_MILLIS |
+86400000L |
+
+
+public static final long |
+HOUR_MILLIS |
+3600000L |
+
+
+public static final long |
+MONTH_MILLIS |
+2592000000L |
+
+
+public static final java.lang.String |
+PATTERN_ISO8601 |
+"yyyy-MM-dd\'T\'HH:mm:ss\'Z\'" |
+
+
+public static final java.lang.String |
+PATTERN_ISO8601MILLIS |
+"yyyy-MM-dd\'T\'HH:mm:ss.SSS\'Z\'" |
+
+
+public static final java.lang.String |
+PATTERN_MONTHDAY |
+"yyyy-MM-dd" |
+
+
+public static final java.lang.String |
+PATTERN_MONTHDAYHOURMINUTE |
+"yyyy-MM-dd HH:mm" |
+
+
+public static final long |
+WEEK_MILLIS |
+604800000L |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+MOD_DATE_KEY_STRING |
+"$D" |
+
+
+public static final java.lang.String |
+OPERATION_KEY_STRING |
+"$P" |
+
+
+public static final java.lang.String |
+REFERRER_KEY_STRING |
+"$U" |
+
Method and Description | +
---|
org.loklak.server.Query.initPOST(Map<String, byte[]>) | +
Constructor and Description | +
---|
org.loklak.susi.SusiThought(String, String) | +
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+P(feature|category)
with
+ overall weight of 1.0
and an assumed probability of
+ 0.5
.P(feature|category)
with
+ overall weight of 1.0
, an assumed probability of
+ 0.5
and the given object to use for probability calculation.P(feature|category)
with
+ the given weight and an assumed probability of 0.5
and the
+ given object to use for probability calculation.P(feature|category)
with
+ the given weight, the given assumed probability and the given object to
+ use for probability calculation.Set
of categories the classifier knows about.Set
of features the classifier knows about.JSONString
interface allows a toJSONString()
+ method so that a class can change the behavior of
+ JSONObject.toString()
, JSONArray.toString()
,
+ and JSONWriter.value(
Object)
.NULL
object than to use Java's null
value.toJSONString
method allows a class to produce its own JSON
+ serialization.public class CDL
+extends java.lang.Object
++ Each row of text represents a row in a table or a data record. Each row + ends with a NEWLINE character. Each row contains one or more values. + Values are separated by commas. A value can contain any character except + for comma, unless is is wrapped in single quotes or double quotes. +
+ The first row usually contains the names of the columns. +
+ A comma delimited list can be converted into a JSONArray of JSONObjects. + The names for the elements in the JSONObjects can be taken from the names + in the first row.
Modifier and Type | +Method and Description | +
---|---|
static JSONArray |
+rowToJSONArray(JSONTokener x)
+Produce a JSONArray of strings from a row of comma delimited values.
+ |
+
static JSONObject |
+rowToJSONObject(JSONArray names,
+ JSONTokener x)
+Produce a JSONObject from a row of comma delimited text, using a
+ parallel JSONArray of strings to provides the names of the elements.
+ |
+
static java.lang.String |
+rowToString(JSONArray ja)
+Produce a comma delimited text row from a JSONArray.
+ |
+
static JSONArray |
+toJSONArray(JSONArray names,
+ JSONTokener x)
+Produce a JSONArray of JSONObjects from a comma delimited text string
+ using a supplied JSONArray as the source of element names.
+ |
+
static JSONArray |
+toJSONArray(JSONArray names,
+ java.lang.String string)
+Produce a JSONArray of JSONObjects from a comma delimited text string
+ using a supplied JSONArray as the source of element names.
+ |
+
static JSONArray |
+toJSONArray(JSONTokener x)
+Produce a JSONArray of JSONObjects from a comma delimited text string,
+ using the first row as a source of names.
+ |
+
static JSONArray |
+toJSONArray(java.lang.String string)
+Produce a JSONArray of JSONObjects from a comma delimited text string,
+ using the first row as a source of names.
+ |
+
static java.lang.String |
+toString(JSONArray ja)
+Produce a comma delimited text from a JSONArray of JSONObjects.
+ |
+
static java.lang.String |
+toString(JSONArray names,
+ JSONArray ja)
+Produce a comma delimited text from a JSONArray of JSONObjects using
+ a provided list of names.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static JSONArray rowToJSONArray(JSONTokener x) + throws JSONException+
x
- A JSONTokener of the source text.JSONException
public static JSONObject rowToJSONObject(JSONArray names, + JSONTokener x) + throws JSONException+
names
- A JSONArray of names. This is commonly obtained from the
+ first row of a comma delimited text file using the rowToJSONArray
+ method.x
- A JSONTokener of the source text.JSONException
public static java.lang.String rowToString(JSONArray ja)+
ja
- A JSONArray of strings.public static JSONArray toJSONArray(java.lang.String string) + throws JSONException+
string
- The comma delimited text.JSONException
public static JSONArray toJSONArray(JSONTokener x) + throws JSONException+
x
- The JSONTokener containing the comma delimited text.JSONException
public static JSONArray toJSONArray(JSONArray names, + java.lang.String string) + throws JSONException+
names
- A JSONArray of strings.string
- The comma delimited text.JSONException
public static JSONArray toJSONArray(JSONArray names, + JSONTokener x) + throws JSONException+
names
- A JSONArray of strings.x
- A JSONTokener of the source text.JSONException
public static java.lang.String toString(JSONArray ja) + throws JSONException+
ja
- A JSONArray of JSONObjects.JSONException
public static java.lang.String toString(JSONArray names, + JSONArray ja) + throws JSONException+
names
- A JSONArray of strings.ja
- A JSONArray of JSONObjects.JSONException
public class JSONArray
+extends java.lang.Object
+implements java.lang.Iterable<java.lang.Object>
+get
and opt
+ methods for accessing the values by index, and put
methods for
+ adding or replacing values. The values can be any of these types:
+ Boolean
, JSONArray
, JSONObject
,
+ Number
, String
, or the
+ JSONObject.NULL object
.
+
+ The constructor can convert a JSON text into a Java object. The
+ toString
method converts to JSON text.
+
+ A get
method returns a value if one can be found, and throws an
+ exception if one cannot be found. An opt
method returns a
+ default value instead of throwing an exception, and so is useful for
+ obtaining optional values.
+
+ The generic get()
and opt()
methods return an
+ object which you can cast or query for type. There are also typed
+ get
and opt
methods that do type checking and type
+ coercion for you.
+
+ The texts produced by the toString
methods strictly conform to
+ JSON syntax rules. The constructors are more forgiving in the texts they will
+ accept:
+
,
(comma) may appear just
+ before the closing bracket.null
value will be inserted when there is ,
+ (comma) elision.'
(single
+ quote).{ } [ ] / \ : , #
and if they do not look like numbers and
+ if they are not the reserved words true
, false
, or
+ null
.Constructor and Description | +
---|
JSONArray()
+Construct an empty JSONArray.
+ |
+
JSONArray(java.util.Collection<?> collection)
+Construct a JSONArray from a Collection.
+ |
+
JSONArray(JSONTokener x)
+Construct a JSONArray from a JSONTokener.
+ |
+
JSONArray(java.lang.Object array)
+Construct a JSONArray from an array
+ |
+
JSONArray(java.lang.String source)
+Construct a JSONArray from a source JSON text.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Object |
+get(int index)
+Get the object value associated with an index.
+ |
+
java.math.BigDecimal |
+getBigDecimal(int index)
+Get the BigDecimal value associated with an index.
+ |
+
java.math.BigInteger |
+getBigInteger(int index)
+Get the BigInteger value associated with an index.
+ |
+
boolean |
+getBoolean(int index)
+Get the boolean value associated with an index.
+ |
+
double |
+getDouble(int index)
+Get the double value associated with an index.
+ |
+
<E extends java.lang.Enum<E>> |
+getEnum(java.lang.Class<E> clazz,
+ int index)
+Get the enum value associated with an index.
+ |
+
int |
+getInt(int index)
+Get the int value associated with an index.
+ |
+
JSONArray |
+getJSONArray(int index)
+Get the JSONArray associated with an index.
+ |
+
JSONObject |
+getJSONObject(int index)
+Get the JSONObject associated with an index.
+ |
+
long |
+getLong(int index)
+Get the long value associated with an index.
+ |
+
java.lang.String |
+getString(int index)
+Get the string associated with an index.
+ |
+
boolean |
+isNull(int index)
+Determine if the value is null.
+ |
+
java.util.Iterator<java.lang.Object> |
+iterator() |
+
java.lang.String |
+join(java.lang.String separator)
+Make a string from the contents of this JSONArray.
+ |
+
int |
+length()
+Get the number of elements in the JSONArray, included nulls.
+ |
+
java.lang.Object |
+opt(int index)
+Get the optional object value associated with an index.
+ |
+
java.math.BigDecimal |
+optBigDecimal(int index,
+ java.math.BigDecimal defaultValue)
+Get the optional BigDecimal value associated with an index.
+ |
+
java.math.BigInteger |
+optBigInteger(int index,
+ java.math.BigInteger defaultValue)
+Get the optional BigInteger value associated with an index.
+ |
+
boolean |
+optBoolean(int index)
+Get the optional boolean value associated with an index.
+ |
+
boolean |
+optBoolean(int index,
+ boolean defaultValue)
+Get the optional boolean value associated with an index.
+ |
+
double |
+optDouble(int index)
+Get the optional double value associated with an index.
+ |
+
double |
+optDouble(int index,
+ double defaultValue)
+Get the optional double value associated with an index.
+ |
+
<E extends java.lang.Enum<E>> |
+optEnum(java.lang.Class<E> clazz,
+ int index)
+Get the enum value associated with a key.
+ |
+
<E extends java.lang.Enum<E>> |
+optEnum(java.lang.Class<E> clazz,
+ int index,
+ E defaultValue)
+Get the enum value associated with a key.
+ |
+
int |
+optInt(int index)
+Get the optional int value associated with an index.
+ |
+
int |
+optInt(int index,
+ int defaultValue)
+Get the optional int value associated with an index.
+ |
+
JSONArray |
+optJSONArray(int index)
+Get the optional JSONArray associated with an index.
+ |
+
JSONObject |
+optJSONObject(int index)
+Get the optional JSONObject associated with an index.
+ |
+
long |
+optLong(int index)
+Get the optional long value associated with an index.
+ |
+
long |
+optLong(int index,
+ long defaultValue)
+Get the optional long value associated with an index.
+ |
+
java.lang.String |
+optString(int index)
+Get the optional string value associated with an index.
+ |
+
java.lang.String |
+optString(int index,
+ java.lang.String defaultValue)
+Get the optional string associated with an index.
+ |
+
JSONArray |
+put(boolean value)
+Append a boolean value.
+ |
+
JSONArray |
+put(java.util.Collection<?> value)
+Put a value in the JSONArray, where the value will be a JSONArray which
+ is produced from a Collection.
+ |
+
JSONArray |
+put(double value)
+Append a double value.
+ |
+
JSONArray |
+put(int value)
+Append an int value.
+ |
+
JSONArray |
+put(int index,
+ boolean value)
+Put or replace a boolean value in the JSONArray.
+ |
+
JSONArray |
+put(int index,
+ java.util.Collection<?> value)
+Put a value in the JSONArray, where the value will be a JSONArray which
+ is produced from a Collection.
+ |
+
JSONArray |
+put(int index,
+ double value)
+Put or replace a double value.
+ |
+
JSONArray |
+put(int index,
+ int value)
+Put or replace an int value.
+ |
+
JSONArray |
+put(int index,
+ long value)
+Put or replace a long value.
+ |
+
JSONArray |
+put(int index,
+ java.util.Map<?,?> value)
+Put a value in the JSONArray, where the value will be a JSONObject that
+ is produced from a Map.
+ |
+
JSONArray |
+put(int index,
+ java.lang.Object value)
+Put or replace an object value in the JSONArray.
+ |
+
JSONArray |
+put(long value)
+Append an long value.
+ |
+
JSONArray |
+put(java.util.Map<?,?> value)
+Put a value in the JSONArray, where the value will be a JSONObject which
+ is produced from a Map.
+ |
+
JSONArray |
+put(java.lang.Object value)
+Append an object value.
+ |
+
java.lang.Object |
+remove(int index)
+Remove an index and close the hole.
+ |
+
boolean |
+similar(java.lang.Object other)
+Determine if two JSONArrays are similar.
+ |
+
JSONObject |
+toJSONObject(JSONArray names)
+Produce a JSONObject by combining a JSONArray of names with the values of
+ this JSONArray.
+ |
+
java.lang.String |
+toString()
+Make a JSON text of this JSONArray.
+ |
+
java.lang.String |
+toString(int indentFactor)
+Make a prettyprinted JSON text of this JSONArray.
+ |
+
java.io.Writer |
+write(java.io.Writer writer)
+Write the contents of the JSONArray as JSON text to a writer.
+ |
+
java.io.Writer |
+write(java.io.Writer writer,
+ int indentFactor,
+ int indent)
+Write the contents of the JSONArray as JSON text to a writer.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public JSONArray()+
public JSONArray(JSONTokener x) + throws JSONException+
x
- A JSONTokenerJSONException
- If there is a syntax error.public JSONArray(java.lang.String source) + throws JSONException+
source
- A string that begins with [
(left
+ bracket) and ends with ]
+ (right bracket).JSONException
- If there is a syntax error.public JSONArray(java.util.Collection<?> collection)+
collection
- A Collection.public JSONArray(java.lang.Object array) + throws JSONException+
JSONException
- If not an array.public java.util.Iterator<java.lang.Object> iterator()+
iterator
in interface java.lang.Iterable<java.lang.Object>
public java.lang.Object get(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If there is no value for the index.public boolean getBoolean(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If there is no value for the index or if the value is not
+ convertible to boolean.public double getDouble(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If the key is not found or if the value cannot be converted
+ to a number.public <E extends java.lang.Enum<E>> E getEnum(java.lang.Class<E> clazz, + int index) + throws JSONException+
clazz
- The type of enum to retrieve.index
- The index must be between 0 and length() - 1.JSONException
- if the key is not found or if the value cannot be converted
+ to an enum.public java.math.BigDecimal getBigDecimal(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If the key is not found or if the value cannot be converted
+ to a BigDecimal.public java.math.BigInteger getBigInteger(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If the key is not found or if the value cannot be converted
+ to a BigInteger.public int getInt(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If the key is not found or if the value is not a number.public JSONArray getJSONArray(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If there is no value for the index. or if the value is not a
+ JSONArraypublic JSONObject getJSONObject(int index) + throws JSONException+
index
- subscriptJSONException
- If there is no value for the index or if the value is not a
+ JSONObjectpublic long getLong(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If the key is not found or if the value cannot be converted
+ to a number.public java.lang.String getString(int index) + throws JSONException+
index
- The index must be between 0 and length() - 1.JSONException
- If there is no string value for the index.public boolean isNull(int index)+
index
- The index must be between 0 and length() - 1.public java.lang.String join(java.lang.String separator) + throws JSONException+
separator
string is inserted between each element. Warning:
+ This method assumes that the data structure is acyclical.separator
- A string that will be inserted between the elements.JSONException
- If the array contains an invalid number.public int length()+
public java.lang.Object opt(int index)+
index
- The index must be between 0 and length() - 1.public boolean optBoolean(int index)+
index
- The index must be between 0 and length() - 1.public boolean optBoolean(int index, + boolean defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- A boolean default.public double optDouble(int index)+
index
- The index must be between 0 and length() - 1.public double optDouble(int index, + double defaultValue)+
index
- subscriptdefaultValue
- The default value.public int optInt(int index)+
index
- The index must be between 0 and length() - 1.public int optInt(int index, + int defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- The default value.public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz, + int index)+
clazz
- The type of enum to retrieve.index
- The index must be between 0 and length() - 1.public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz, + int index, + E defaultValue)+
clazz
- The type of enum to retrieve.index
- The index must be between 0 and length() - 1.defaultValue
- The default in case the value is not foundpublic java.math.BigInteger optBigInteger(int index, + java.math.BigInteger defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- The default value.public java.math.BigDecimal optBigDecimal(int index, + java.math.BigDecimal defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- The default value.public JSONArray optJSONArray(int index)+
index
- subscriptpublic JSONObject optJSONObject(int index)+
index
- The index must be between 0 and length() - 1.public long optLong(int index)+
index
- The index must be between 0 and length() - 1.public long optLong(int index, + long defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- The default value.public java.lang.String optString(int index)+
index
- The index must be between 0 and length() - 1.public java.lang.String optString(int index, + java.lang.String defaultValue)+
index
- The index must be between 0 and length() - 1.defaultValue
- The default value.public JSONArray put(boolean value)+
value
- A boolean value.public JSONArray put(java.util.Collection<?> value)+
value
- A Collection value.public JSONArray put(double value) + throws JSONException+
value
- A double value.JSONException
- if the value is not finite.public JSONArray put(int value)+
value
- An int value.public JSONArray put(long value)+
value
- A long value.public JSONArray put(java.util.Map<?,?> value)+
value
- A Map value.public JSONArray put(java.lang.Object value)+
value
- An object value. The value should be a Boolean, Double,
+ Integer, JSONArray, JSONObject, Long, or String, or the
+ JSONObject.NULL object.public JSONArray put(int index, + boolean value) + throws JSONException+
index
- The subscript.value
- A boolean value.JSONException
- If the index is negative.public JSONArray put(int index, + java.util.Collection<?> value) + throws JSONException+
index
- The subscript.value
- A Collection value.JSONException
- If the index is negative or if the value is not finite.public JSONArray put(int index, + double value) + throws JSONException+
index
- The subscript.value
- A double value.JSONException
- If the index is negative or if the value is not finite.public JSONArray put(int index, + int value) + throws JSONException+
index
- The subscript.value
- An int value.JSONException
- If the index is negative.public JSONArray put(int index, + long value) + throws JSONException+
index
- The subscript.value
- A long value.JSONException
- If the index is negative.public JSONArray put(int index, + java.util.Map<?,?> value) + throws JSONException+
index
- The subscript.value
- The Map value.JSONException
- If the index is negative or if the the value is an invalid
+ number.public JSONArray put(int index, + java.lang.Object value) + throws JSONException+
index
- The subscript.value
- The value to put into the array. The value should be a
+ Boolean, Double, Integer, JSONArray, JSONObject, Long, or
+ String, or the JSONObject.NULL object.JSONException
- If the index is negative or if the the value is an invalid
+ number.public java.lang.Object remove(int index)+
index
- The index of the element to be removed.public boolean similar(java.lang.Object other)+
other
- The other JSONArraypublic JSONObject toJSONObject(JSONArray names) + throws JSONException+
names
- A JSONArray containing a list of key strings. These will be
+ paired with the values.JSONException
- If any of the names are null.public java.lang.String toString()+
+ Warning: This method assumes that the data structure is acyclical.
toString
in class java.lang.Object
public java.lang.String toString(int indentFactor) + throws JSONException+
indentFactor
- The number of spaces to add to each level of indentation.[
(left
+ bracket) and ending with ]
+ (right bracket).JSONException
public java.io.Writer write(java.io.Writer writer) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
JSONException
public java.io.Writer write(java.io.Writer writer, + int indentFactor, + int indent) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
writer
- Writes the serialized JSONindentFactor
- The number of spaces to add to each level of indentation.indent
- The indention of the top level.JSONException
public class JSONException
+extends java.lang.RuntimeException
+Constructor and Description | +
---|
JSONException(java.lang.String message)
+Constructs a JSONException with an explanatory message.
+ |
+
JSONException(java.lang.String message,
+ java.lang.Throwable cause)
+Constructs a JSONException with an explanatory message and cause.
+ |
+
JSONException(java.lang.Throwable cause)
+Constructs a new JSONException with the specified cause.
+ |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JSONException(java.lang.String message)+
message
- Detail about the reason for the exception.public JSONException(java.lang.String message, + java.lang.Throwable cause)+
message
- Detail about the reason for the exception.cause
- The cause.public JSONException(java.lang.Throwable cause)+
cause
- The cause.public class JSONML
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static JSONArray |
+toJSONArray(java.lang.String string)
+Convert a well-formed (but not necessarily valid) XML string into a
+ JSONArray using the JsonML transform.
+ |
+
static JSONArray |
+toJSONArray(XMLTokener x)
+Convert a well-formed (but not necessarily valid) XML string into a
+ JSONArray using the JsonML transform.
+ |
+
static JSONObject |
+toJSONObject(java.lang.String string)
+Convert a well-formed (but not necessarily valid) XML string into a
+ JSONObject using the JsonML transform.
+ |
+
static JSONObject |
+toJSONObject(XMLTokener x)
+Convert a well-formed (but not necessarily valid) XML string into a
+ JSONObject using the JsonML transform.
+ |
+
static java.lang.String |
+toString(JSONArray ja)
+Reverse the JSONML transformation, making an XML text from a JSONArray.
+ |
+
static java.lang.String |
+toString(JSONObject jo)
+Reverse the JSONML transformation, making an XML text from a JSONObject.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static JSONArray toJSONArray(java.lang.String string) + throws JSONException+
<[ [ ]]>
are ignored.string
- The source string.JSONException
public static JSONArray toJSONArray(XMLTokener x) + throws JSONException+
<[ [ ]]>
are ignored.x
- An XMLTokener.JSONException
public static JSONObject toJSONObject(XMLTokener x) + throws JSONException+
<[ [ ]]>
are ignored.x
- An XMLTokener of the XML source text.JSONException
public static JSONObject toJSONObject(java.lang.String string) + throws JSONException+
<[ [ ]]>
are ignored.string
- The XML source text.JSONException
public static java.lang.String toString(JSONArray ja) + throws JSONException+
ja
- A JSONArray.JSONException
public static java.lang.String toString(JSONObject jo) + throws JSONException+
jo
- A JSONObject.JSONException
public class JSONObject
+extends java.lang.Object
+get
and opt
methods for accessing
+ the values by name, and put
methods for adding or replacing
+ values by name. The values can be any of these types: Boolean
,
+ JSONArray
, JSONObject
, Number
,
+ String
, or the JSONObject.NULL
object. A
+ JSONObject constructor can be used to convert an external form JSON text
+ into an internal form whose values can be retrieved with the
+ get
and opt
methods, or to convert values into a
+ JSON text using the put
and toString
methods. A
+ get
method returns a value if one can be found, and throws an
+ exception if one cannot be found. An opt
method returns a
+ default value instead of throwing an exception, and so is useful for
+ obtaining optional values.
+
+ The generic get()
and opt()
methods return an
+ object, which you can cast or query for type. There are also typed
+ get
and opt
methods that do type checking and type
+ coercion for you. The opt methods differ from the get methods in that they
+ do not throw. Instead, they return a specified value, such as null.
+
+ The put
methods add or replace values in an object. For
+ example,
+
+
+ myString = new JSONObject() + .put("JSON", "Hello, World!").toString(); ++ + produces the string
{"JSON": "Hello, World"}
.
+
+ The texts produced by the toString
methods strictly conform to
+ the JSON syntax rules. The constructors are more forgiving in the texts they
+ will accept:
+
,
(comma) may appear just
+ before the closing brace.'
(single
+ quote).{ } [ ] / \ : , #
and if they do not look like numbers and
+ if they are not the reserved words true
, false
,
+ or null
.Modifier and Type | +Field and Description | +
---|---|
static java.lang.Object |
+NULL
+It is sometimes more convenient and less ambiguous to have a
+
+NULL object than to use Java's null value. |
+
Constructor and Description | +
---|
JSONObject()
+Construct an empty JSONObject.
+ |
+
JSONObject(boolean ordered)
+Construct an empty JSONObject.
+ |
+
JSONObject(JSONObject jo,
+ java.lang.String[] names)
+Construct a JSONObject from a subset of another JSONObject.
+ |
+
JSONObject(JSONTokener x)
+Construct a JSONObject from a JSONTokener.
+ |
+
JSONObject(java.util.Map<?,?> map)
+Construct a JSONObject from a Map.
+ |
+
JSONObject(java.lang.Object bean)
+Construct a JSONObject from an Object using bean getters.
+ |
+
JSONObject(java.lang.Object object,
+ java.lang.String[] names)
+Construct a JSONObject from an Object, using reflection to find the
+ public members.
+ |
+
JSONObject(java.lang.String source)
+Construct a JSONObject from a source JSON text string.
+ |
+
JSONObject(java.lang.String baseName,
+ java.util.Locale locale)
+Construct a JSONObject from a ResourceBundle.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+accumulate(java.lang.String key,
+ java.lang.Object value)
+Accumulate values under a key.
+ |
+
JSONObject |
+append(java.lang.String key,
+ java.lang.Object value)
+Append values to the array under a key.
+ |
+
static java.lang.String |
+doubleToString(double d)
+Produce a string from a double.
+ |
+
java.lang.Object |
+get(java.lang.String key)
+Get the value object associated with a key.
+ |
+
java.math.BigDecimal |
+getBigDecimal(java.lang.String key)
+Get the BigDecimal value associated with a key.
+ |
+
java.math.BigInteger |
+getBigInteger(java.lang.String key)
+Get the BigInteger value associated with a key.
+ |
+
boolean |
+getBoolean(java.lang.String key)
+Get the boolean value associated with a key.
+ |
+
double |
+getDouble(java.lang.String key)
+Get the double value associated with a key.
+ |
+
<E extends java.lang.Enum<E>> |
+getEnum(java.lang.Class<E> clazz,
+ java.lang.String key)
+Get the enum value associated with a key.
+ |
+
int |
+getInt(java.lang.String key)
+Get the int value associated with a key.
+ |
+
JSONArray |
+getJSONArray(java.lang.String key)
+Get the JSONArray value associated with a key.
+ |
+
JSONObject |
+getJSONObject(java.lang.String key)
+Get the JSONObject value associated with a key.
+ |
+
long |
+getLong(java.lang.String key)
+Get the long value associated with a key.
+ |
+
static java.lang.String[] |
+getNames(JSONObject jo)
+Get an array of field names from a JSONObject.
+ |
+
static java.lang.String[] |
+getNames(java.lang.Object object)
+Get an array of field names from an Object.
+ |
+
java.lang.String |
+getString(java.lang.String key)
+Get the string associated with a key.
+ |
+
boolean |
+has(java.lang.String key)
+Determine if the JSONObject contains a specific key.
+ |
+
JSONObject |
+increment(java.lang.String key)
+Increment a property of a JSONObject.
+ |
+
boolean |
+isNull(java.lang.String key)
+Determine if the value associated with the key is null or if there is no
+ value.
+ |
+
java.util.Iterator<java.lang.String> |
+keys()
+Get an enumeration of the keys of the JSONObject.
+ |
+
java.util.Set<java.lang.String> |
+keySet()
+Get a set of keys of the JSONObject.
+ |
+
int |
+length()
+Get the number of keys stored in the JSONObject.
+ |
+
JSONArray |
+names()
+Produce a JSONArray containing the names of the elements of this
+ JSONObject.
+ |
+
static java.lang.String |
+numberToString(java.lang.Number number)
+Produce a string from a Number.
+ |
+
java.lang.Object |
+opt(java.lang.String key)
+Get an optional value associated with a key.
+ |
+
java.math.BigDecimal |
+optBigDecimal(java.lang.String key,
+ java.math.BigDecimal defaultValue)
+Get an optional BigDecimal associated with a key, or the defaultValue if
+ there is no such key or if its value is not a number.
+ |
+
java.math.BigInteger |
+optBigInteger(java.lang.String key,
+ java.math.BigInteger defaultValue)
+Get an optional BigInteger associated with a key, or the defaultValue if
+ there is no such key or if its value is not a number.
+ |
+
boolean |
+optBoolean(java.lang.String key)
+Get an optional boolean associated with a key.
+ |
+
boolean |
+optBoolean(java.lang.String key,
+ boolean defaultValue)
+Get an optional boolean associated with a key.
+ |
+
double |
+optDouble(java.lang.String key)
+Get an optional double associated with a key, or NaN if there is no such
+ key or if its value is not a number.
+ |
+
double |
+optDouble(java.lang.String key,
+ double defaultValue)
+Get an optional double associated with a key, or the defaultValue if
+ there is no such key or if its value is not a number.
+ |
+
<E extends java.lang.Enum<E>> |
+optEnum(java.lang.Class<E> clazz,
+ java.lang.String key)
+Get the enum value associated with a key.
+ |
+
<E extends java.lang.Enum<E>> |
+optEnum(java.lang.Class<E> clazz,
+ java.lang.String key,
+ E defaultValue)
+Get the enum value associated with a key.
+ |
+
int |
+optInt(java.lang.String key)
+Get an optional int value associated with a key, or zero if there is no
+ such key or if the value is not a number.
+ |
+
int |
+optInt(java.lang.String key,
+ int defaultValue)
+Get an optional int value associated with a key, or the default if there
+ is no such key or if the value is not a number.
+ |
+
JSONArray |
+optJSONArray(java.lang.String key)
+Get an optional JSONArray associated with a key.
+ |
+
JSONObject |
+optJSONObject(java.lang.String key)
+Get an optional JSONObject associated with a key.
+ |
+
long |
+optLong(java.lang.String key)
+Get an optional long value associated with a key, or zero if there is no
+ such key or if the value is not a number.
+ |
+
long |
+optLong(java.lang.String key,
+ long defaultValue)
+Get an optional long value associated with a key, or the default if there
+ is no such key or if the value is not a number.
+ |
+
java.lang.String |
+optString(java.lang.String key)
+Get an optional string associated with a key.
+ |
+
java.lang.String |
+optString(java.lang.String key,
+ java.lang.String defaultValue)
+Get an optional string associated with a key.
+ |
+
JSONObject |
+put(java.lang.String key,
+ boolean value)
+Put a key/boolean pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.util.Collection<?> value)
+Put a key/value pair in the JSONObject, where the value will be a
+ JSONArray which is produced from a Collection.
+ |
+
JSONObject |
+put(java.lang.String key,
+ double value)
+Put a key/double pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ int value)
+Put a key/int pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ long value)
+Put a key/long pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.util.Map<?,?> value)
+Put a key/value pair in the JSONObject, where the value will be a
+ JSONObject which is produced from a Map.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.lang.Object value)
+Put a key/value pair in the JSONObject.
+ |
+
void |
+putAll(JSONObject other) |
+
JSONObject |
+putOnce(java.lang.String key,
+ java.lang.Object value)
+Put a key/value pair in the JSONObject, but only if the key and the value
+ are both non-null, and only if there is not already a member with that
+ name.
+ |
+
JSONObject |
+putOpt(java.lang.String key,
+ java.lang.Object value)
+Put a key/value pair in the JSONObject, but only if the key and the value
+ are both non-null.
+ |
+
static java.lang.String |
+quote(java.lang.String string)
+Produce a string in double quotes with backslash sequences in all the
+ right places.
+ |
+
static java.io.Writer |
+quote(java.lang.String string,
+ java.io.Writer w) |
+
java.lang.Object |
+remove(java.lang.String key)
+Remove a name and its value, if present.
+ |
+
boolean |
+similar(java.lang.Object other)
+Determine if two JSONObjects are similar.
+ |
+
static java.lang.Object |
+stringToValue(java.lang.String string)
+Try to convert a string into a number, boolean, or null.
+ |
+
static void |
+testValidity(java.lang.Object o)
+Throw an exception if the object is a NaN or infinite number.
+ |
+
JSONArray |
+toJSONArray(JSONArray names)
+Produce a JSONArray containing the values of the members of this
+ JSONObject.
+ |
+
java.util.Map<java.lang.String,java.lang.Object> |
+toMap() |
+
java.lang.String |
+toString()
+Make a JSON text of this JSONObject.
+ |
+
java.lang.String |
+toString(int indentFactor)
+Make a prettyprinted JSON text of this JSONObject.
+ |
+
static java.lang.String |
+valueToString(java.lang.Object value)
+Make a JSON text of an Object value.
+ |
+
static java.lang.Object |
+wrap(java.lang.Object object)
+Wrap an object, if necessary.
+ |
+
java.io.Writer |
+write(java.io.Writer writer)
+Write the contents of the JSONObject as JSON text to a writer.
+ |
+
java.io.Writer |
+write(java.io.Writer writer,
+ int indentFactor,
+ int indent)
+Write the contents of the JSONObject as JSON text to a writer.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final java.lang.Object NULL+
NULL
object than to use Java's null
value.
+ JSONObject.NULL.equals(null)
returns true
.
+ JSONObject.NULL.toString()
returns "null"
.public JSONObject()+
public JSONObject(boolean ordered)+
ordered
- if ordered == true, then the JSONObject keeps the original order of propertiespublic JSONObject(JSONObject jo, + java.lang.String[] names)+
jo
- A JSONObject.names
- An array of strings.public JSONObject(JSONTokener x) + throws JSONException+
x
- A JSONTokener object containing the source string.JSONException
- If there is a syntax error in the source string or a
+ duplicated key.public JSONObject(java.util.Map<?,?> map)+
map
- A map object that can be used to initialize the contents of
+ the JSONObject.public JSONObject(java.lang.Object bean)+
"get"
or
+ "is"
followed by an uppercase letter, the method is invoked,
+ and a key and the value returned from the getter method are put into the
+ new JSONObject.
+
+ The key is formed by removing the "get"
or "is"
+ prefix. If the second remaining character is not upper case, then the
+ first character is converted to lower case.
+
+ For example, if an object has a method named "getName"
, and
+ if the result of calling object.getName()
is
+ "Larry Fine"
, then the JSONObject will contain
+ "name": "Larry Fine"
.bean
- An object that has getter methods that should be used to make
+ a JSONObject.public JSONObject(java.lang.Object object, + java.lang.String[] names)+
object
- An object that has fields that should be used to make a
+ JSONObject.names
- An array of strings, the names of the fields to be obtained
+ from the object.public JSONObject(java.lang.String source) + throws JSONException+
source
- A string beginning with {
(left
+ brace) and ending with }
+ (right brace).JSONException
- If there is a syntax error in the source string or a
+ duplicated key.public JSONObject(java.lang.String baseName, + java.util.Locale locale) + throws JSONException+
baseName
- The ResourceBundle base name.locale
- The Locale to load the ResourceBundle for.JSONException
- If any JSONExceptions are detected.public void putAll(JSONObject other)+
public JSONObject accumulate(java.lang.String key, + java.lang.Object value) + throws JSONException+
key
- A key string.value
- An object to be accumulated under the key.JSONException
- If the value is an invalid number or if the key is null.public JSONObject append(java.lang.String key, + java.lang.Object value) + throws JSONException+
key
- A key string.value
- An object to be accumulated under the key.JSONException
- If the key is null or if the current value associated with
+ the key is not a JSONArray.public static java.lang.String doubleToString(double d)+
d
- A double.public java.lang.Object get(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found.public <E extends java.lang.Enum<E>> E getEnum(java.lang.Class<E> clazz, + java.lang.String key) + throws JSONException+
clazz
- The type of enum to retrieve.key
- A key string.JSONException
- if the key is not found or if the value cannot be converted
+ to an enum.public boolean getBoolean(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the value is not a Boolean or the String "true" or
+ "false".public java.math.BigInteger getBigInteger(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value cannot
+ be converted to BigInteger.public java.math.BigDecimal getBigDecimal(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value
+ cannot be converted to BigDecimal.public double getDouble(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value is not a Number
+ object and cannot be converted to a number.public int getInt(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value cannot be converted
+ to an integer.public JSONArray getJSONArray(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value is not a JSONArray.public JSONObject getJSONObject(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value is not a JSONObject.public long getLong(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if the key is not found or if the value cannot be converted
+ to a long.public static java.lang.String[] getNames(JSONObject jo)+
public static java.lang.String[] getNames(java.lang.Object object)+
public java.lang.String getString(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- if there is no string value for the key.public boolean has(java.lang.String key)+
key
- A key string.public JSONObject increment(java.lang.String key) + throws JSONException+
key
- A key string.JSONException
- If there is already a property with this name that is not an
+ Integer, Long, Double, or Float.public boolean isNull(java.lang.String key)+
key
- A key string.public java.util.Iterator<java.lang.String> keys()+
public java.util.Set<java.lang.String> keySet()+
public int length()+
public JSONArray names()+
public static java.lang.String numberToString(java.lang.Number number) + throws JSONException+
number
- A NumberJSONException
- If n is a non-finite number.public java.lang.Object opt(java.lang.String key)+
key
- A key string.public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz, + java.lang.String key)+
clazz
- The type of enum to retrieve.key
- A key string.public <E extends java.lang.Enum<E>> E optEnum(java.lang.Class<E> clazz, + java.lang.String key, + E defaultValue)+
clazz
- The type of enum to retrieve.key
- A key string.defaultValue
- The default in case the value is not foundpublic boolean optBoolean(java.lang.String key)+
key
- A key string.public boolean optBoolean(java.lang.String key, + boolean defaultValue)+
key
- A key string.defaultValue
- The default.public double optDouble(java.lang.String key)+
key
- A string which is the key.public java.math.BigInteger optBigInteger(java.lang.String key, + java.math.BigInteger defaultValue)+
key
- A key string.defaultValue
- The default.public java.math.BigDecimal optBigDecimal(java.lang.String key, + java.math.BigDecimal defaultValue)+
key
- A key string.defaultValue
- The default.public double optDouble(java.lang.String key, + double defaultValue)+
key
- A key string.defaultValue
- The default.public int optInt(java.lang.String key)+
key
- A key string.public int optInt(java.lang.String key, + int defaultValue)+
key
- A key string.defaultValue
- The default.public JSONArray optJSONArray(java.lang.String key)+
key
- A key string.public JSONObject optJSONObject(java.lang.String key)+
key
- A key string.public long optLong(java.lang.String key)+
key
- A key string.public long optLong(java.lang.String key, + long defaultValue)+
key
- A key string.defaultValue
- The default.public java.lang.String optString(java.lang.String key)+
key
- A key string.public java.lang.String optString(java.lang.String key, + java.lang.String defaultValue)+
key
- A key string.defaultValue
- The default.public JSONObject put(java.lang.String key, + boolean value) + throws JSONException+
key
- A key string.value
- A boolean which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + java.util.Collection<?> value) + throws JSONException+
key
- A key string.value
- A Collection value.JSONException
public JSONObject put(java.lang.String key, + double value) + throws JSONException+
key
- A key string.value
- A double which is the value.JSONException
- If the key is null or if the number is invalid.public JSONObject put(java.lang.String key, + int value) + throws JSONException+
key
- A key string.value
- An int which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + long value) + throws JSONException+
key
- A key string.value
- A long which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + java.util.Map<?,?> value) + throws JSONException+
key
- A key string.value
- A Map value.JSONException
public JSONObject put(java.lang.String key, + java.lang.Object value) + throws JSONException+
key
- A key string.value
- An object which is the value. It should be of one of these
+ types: Boolean, Double, Integer, JSONArray, JSONObject, Long,
+ String, or the JSONObject.NULL object.JSONException
- If the value is non-finite number or if the key is null.public JSONObject putOnce(java.lang.String key, + java.lang.Object value) + throws JSONException+
key
- stringvalue
- objectJSONException
- if the key is a duplicatepublic JSONObject putOpt(java.lang.String key, + java.lang.Object value) + throws JSONException+
key
- A key string.value
- An object which is the value. It should be of one of these
+ types: Boolean, Double, Integer, JSONArray, JSONObject, Long,
+ String, or the JSONObject.NULL object.JSONException
- If the value is a non-finite number.public static java.lang.String quote(java.lang.String string)+
string
- A Stringpublic static java.io.Writer quote(java.lang.String string, + java.io.Writer w) + throws java.io.IOException+
java.io.IOException
public java.lang.Object remove(java.lang.String key)+
key
- The name to be removed.public boolean similar(java.lang.Object other)+
other
- The other JSONObjectpublic static java.lang.Object stringToValue(java.lang.String string)+
string
- A String.public static void testValidity(java.lang.Object o) + throws JSONException+
o
- The object to test.JSONException
- If o is a non-finite number.public JSONArray toJSONArray(JSONArray names) + throws JSONException+
names
- A JSONArray containing a list of key strings. This determines
+ the sequence of the values in the result.JSONException
- If any of the values are non-finite numbers.public java.lang.String toString()+
+ Warning: This method assumes that the data structure is acyclical.
toString
in class java.lang.Object
{
(left
+ brace) and ending with }
(right
+ brace).public java.lang.String toString(int indentFactor) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
indentFactor
- The number of spaces to add to each level of indentation.{
(left
+ brace) and ending with }
(right
+ brace).JSONException
- If the object contains an invalid number.public static java.lang.String valueToString(java.lang.Object value) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
value
- The value to be serialized.{
(left
+ brace) and ending with }
(right
+ brace).JSONException
- If the value is or contains an invalid number.public static java.lang.Object wrap(java.lang.Object object)+
object
- The object to wrappublic java.io.Writer write(java.io.Writer writer) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
JSONException
public java.io.Writer write(java.io.Writer writer, + int indentFactor, + int indent) + throws JSONException+
+ Warning: This method assumes that the data structure is acyclical.
writer
- Writes the serialized JSONindentFactor
- The number of spaces to add to each level of indentation.indent
- The indention of the top level.JSONException
public java.util.Map<java.lang.String,java.lang.Object> toMap() + throws JSONException+
JSONException
public interface JSONString
+JSONString
interface allows a toJSONString()
+ method so that a class can change the behavior of
+ JSONObject.toString()
, JSONArray.toString()
,
+ and JSONWriter.value(
Object)
. The
+ toJSONString
method will be used instead of the default behavior
+ of using the Object's toString()
method and quoting the result.Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toJSONString()
+The
+toJSONString method allows a class to produce its own JSON
+ serialization. |
+
public class JSONTokener
+extends java.lang.Object
+Constructor and Description | +
---|
JSONTokener(java.io.InputStream inputStream)
+Construct a JSONTokener from an InputStream.
+ |
+
JSONTokener(java.io.Reader reader)
+Construct a JSONTokener from a Reader.
+ |
+
JSONTokener(java.lang.String s)
+Construct a JSONTokener from a string.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+back()
+Back up one character.
+ |
+
static int |
+dehexchar(char c)
+Get the hex value of a character (base16).
+ |
+
boolean |
+end() |
+
boolean |
+more()
+Determine if the source string still contains characters that next()
+ can consume.
+ |
+
char |
+next()
+Get the next character in the source string.
+ |
+
char |
+next(char c)
+Consume the next character, and check that it matches a specified
+ character.
+ |
+
java.lang.String |
+next(int n)
+Get the next n characters.
+ |
+
char |
+nextClean()
+Get the next char in the string, skipping whitespace.
+ |
+
java.lang.String |
+nextString(char quote)
+Return the characters up to the next close quote character.
+ |
+
java.lang.String |
+nextTo(char delimiter)
+Get the text up but not including the specified character or the
+ end of line, whichever comes first.
+ |
+
java.lang.String |
+nextTo(java.lang.String delimiters)
+Get the text up but not including one of the specified delimiter
+ characters or the end of line, whichever comes first.
+ |
+
java.lang.Object |
+nextValue()
+Get the next value.
+ |
+
char |
+skipTo(char to)
+Skip characters until the next character is the requested character.
+ |
+
JSONException |
+syntaxError(java.lang.String message)
+Make a JSONException to signal a syntax error.
+ |
+
java.lang.String |
+toString()
+Make a printable string of this JSONTokener.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JSONTokener(java.io.Reader reader)+
reader
- A reader.public JSONTokener(java.io.InputStream inputStream) + throws JSONException+
inputStream
- The source.JSONException
public JSONTokener(java.lang.String s)+
s
- A source string.public void back() + throws JSONException+
JSONException
public static int dehexchar(char c)+
c
- A character between '0' and '9' or between 'A' and 'F' or
+ between 'a' and 'f'.public boolean end()+
public boolean more() + throws JSONException+
JSONException
public char next() + throws JSONException+
JSONException
public char next(char c) + throws JSONException+
c
- The character to match.JSONException
- if the character does not match.public java.lang.String next(int n) + throws JSONException+
n
- The number of characters to take.JSONException
- Substring bounds error if there are not
+ n characters remaining in the source string.public char nextClean() + throws JSONException+
JSONException
public java.lang.String nextString(char quote) + throws JSONException+
quote
- The quoting character, either
+ "
(double quote) or
+ '
(single quote).JSONException
- Unterminated string.public java.lang.String nextTo(char delimiter) + throws JSONException+
delimiter
- A delimiter character.JSONException
public java.lang.String nextTo(java.lang.String delimiters) + throws JSONException+
delimiters
- A set of delimiter characters.JSONException
public java.lang.Object nextValue() + throws JSONException+
JSONException
- If syntax error.public char skipTo(char to) + throws JSONException+
to
- A character to skip to.JSONException
public JSONException syntaxError(java.lang.String message)+
message
- The error message.public java.lang.String toString()+
toString
in class java.lang.Object
public class XML
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.Character |
+AMP
+The Character '&'.
+ |
+
static java.lang.Character |
+APOS
+The Character '''.
+ |
+
static java.lang.Character |
+BANG
+The Character '!'.
+ |
+
static java.lang.Character |
+EQ
+The Character '='.
+ |
+
static java.lang.Character |
+GT
+The Character '>'.
+ |
+
static java.lang.Character |
+LT
+The Character '<'.
+ |
+
static java.lang.Character |
+QUEST
+The Character '?'.
+ |
+
static java.lang.Character |
+QUOT
+The Character '"'.
+ |
+
static java.lang.Character |
+SLASH
+The Character '/'.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static java.lang.String |
+escape(java.lang.String string)
+Replace special characters with XML escapes:
+ |
+
static void |
+noSpace(java.lang.String string)
+Throw an exception if the string contains whitespace.
+ |
+
static java.lang.Object |
+stringToValue(java.lang.String string)
+Try to convert a string into a number, boolean, or null.
+ |
+
static JSONObject |
+toJSONObject(java.lang.String string)
+Convert a well-formed (but not necessarily valid) XML string into a
+ JSONObject.
+ |
+
static java.lang.String |
+toString(java.lang.Object object)
+Convert a JSONObject into a well-formed, element-normal XML string.
+ |
+
static java.lang.String |
+toString(java.lang.Object object,
+ java.lang.String tagName)
+Convert a JSONObject into a well-formed, element-normal XML string.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.Character AMP+
public static final java.lang.Character APOS+
public static final java.lang.Character BANG+
public static final java.lang.Character EQ+
public static final java.lang.Character GT+
public static final java.lang.Character LT+
public static final java.lang.Character QUEST+
public static final java.lang.Character QUOT+
public static final java.lang.Character SLASH+
public static java.lang.String escape(java.lang.String string)+
+ & (ampersand) is replaced by & + < (less than) is replaced by < + > (greater than) is replaced by > + " (double quote) is replaced by " +
string
- The string to be escaped.public static void noSpace(java.lang.String string) + throws JSONException+
string
- JSONException
public static java.lang.Object stringToValue(java.lang.String string)+
string
- A String.public static JSONObject toJSONObject(java.lang.String string) + throws JSONException+
<[ [ ]]>
are ignored.string
- The source string.JSONException
public static java.lang.String toString(java.lang.Object object) + throws JSONException+
object
- A JSONObject.JSONException
public static java.lang.String toString(java.lang.Object object, + java.lang.String tagName) + throws JSONException+
object
- A JSONObject.tagName
- The optional name of the enclosing tag.JSONException
public class XMLTokener +extends JSONTokener+
Modifier and Type | +Field and Description | +
---|---|
static java.util.HashMap |
+entity
+The table of entity values.
+ |
+
Constructor and Description | +
---|
XMLTokener(java.lang.String s)
+Construct an XMLTokener from a string.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+nextCDATA()
+Get the text in the CDATA block.
+ |
+
java.lang.Object |
+nextContent()
+Get the next XML outer token, trimming whitespace.
+ |
+
java.lang.Object |
+nextEntity(char ampersand)
+Return the next entity.
+ |
+
java.lang.Object |
+nextMeta()
+Returns the next XML meta token.
+ |
+
java.lang.Object |
+nextToken()
+Get the next XML Token.
+ |
+
boolean |
+skipPast(java.lang.String to)
+Skip characters until past the requested string.
+ |
+
back, dehexchar, end, more, next, next, next, nextClean, nextString, nextTo, nextTo, nextValue, skipTo, syntaxError, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final java.util.HashMap entity+
public XMLTokener(java.lang.String s)+
s
- A source string.public java.lang.String nextCDATA() + throws JSONException+
]]>
.JSONException
- If the ]]>
is not found.public java.lang.Object nextContent() + throws JSONException+
JSONException
public java.lang.Object nextEntity(char ampersand) + throws JSONException+
& ' > < "
.ampersand
- An ampersand character.JSONException
- If missing ';' in XML entity.public java.lang.Object nextMeta() + throws JSONException+
< > / = ! ?
) are returned as
+ Character, and strings and names are returned as Boolean. We don't care
+ what the values actually are.JSONException
- If a string is not properly closed or if the XML
+ is badly structured.public java.lang.Object nextToken() + throws JSONException+
/ > = ! ?
or it
+ may be a string wrapped in single quotes or double quotes, or it may be a
+ name.JSONException
- If the XML is not well formed.public boolean skipPast(java.lang.String to) + throws JSONException+
to
- A string to skip past.JSONException
Interface | +Description | +
---|---|
JSONString | +
+ The
+JSONString interface allows a toJSONString()
+ method so that a class can change the behavior of
+ JSONObject.toString() , JSONArray.toString() ,
+ and JSONWriter.value( Object) . |
+
Class | +Description | +
---|---|
CDL | +
+ This provides static methods to convert comma delimited text into a
+ JSONArray, and to convert a JSONArray into comma delimited text.
+ |
+
JSONArray | +
+ A JSONArray is an ordered sequence of values.
+ |
+
JSONML | +
+ This provides static methods to convert an XML text into a JSONArray or
+ JSONObject, and to covert a JSONArray or JSONObject into an XML text using
+ the JsonML transform.
+ |
+
JSONObject | +
+ A JSONObject is an unordered collection of name/value pairs.
+ |
+
JSONTokener | +
+ A JSONTokener takes a source string and extracts characters and tokens from
+ it.
+ |
+
XML | +
+ This provides static methods to convert an XML text into a JSONObject,
+ and to covert a JSONObject into an XML text.
+ |
+
XMLTokener | +
+ The XMLTokener extends the JSONTokener to provide additional methods
+ for the parsing of XML texts.
+ |
+
Exception | +Description | +
---|---|
JSONException | +
+ The JSONException is thrown by the JSON.org classes when things are amiss.
+ |
+
public class Caretaker
+extends java.lang.Thread
+java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
Modifier and Type | +Field and Description | +
---|---|
static long |
+startupTime |
+
static long |
+upgradeTime |
+
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | +Method and Description | +
---|---|
static boolean |
+acceptQuery4Retrieval(java.lang.String q) |
+
void |
+run() |
+
void |
+shutdown()
+ask the thread to shut down
+ |
+
static void |
+upgrade()
+loklak upgrades itself if this is called
+ |
+
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final long startupTime+
public static long upgradeTime+
public void shutdown()+
public void run()+
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static boolean acceptQuery4Retrieval(java.lang.String q)+
public static void upgrade()+
public class Crawler
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static int |
+process() |
+
static boolean |
+stack(java.lang.String query,
+ int depth,
+ boolean followHashtags,
+ boolean followUsers,
+ boolean atfront) |
+
static JSONObject |
+toJSON() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean stack(java.lang.String query, + int depth, + boolean followHashtags, + boolean followUsers, + boolean atfront)+
public static int process()+
public static JSONObject toJSON()+
public class DumpImporter
+extends java.lang.Thread
+java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description | +
---|
DumpImporter(int count) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isBusy() |
+
void |
+run() |
+
void |
+shutdown()
+ask the thread to shut down
+ |
+
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public class LoklakEmailHandler
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EMAIL_PATTERN |
+
Constructor and Description | +
---|
LoklakEmailHandler() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+checkConnection(java.lang.String hostname,
+ java.lang.String username,
+ java.lang.String password,
+ java.lang.String encryption,
+ int port,
+ boolean disableCertificateChecking)
+Check SMTP login credentials
+ |
+
static void |
+sendEmail(java.lang.String addressTo,
+ java.lang.String subject,
+ java.lang.String text)
+Send an email
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String EMAIL_PATTERN+
public static void sendEmail(java.lang.String addressTo, + java.lang.String subject, + java.lang.String text) + throws java.lang.Exception+
addressTo
- Email address to send tosubject
- The email subjecttext
- The contentjava.lang.Exception
- on errorspublic static void checkConnection(java.lang.String hostname, + java.lang.String username, + java.lang.String password, + java.lang.String encryption, + int port, + boolean disableCertificateChecking) + throws MessagingException+
hostname
- the host addressusername
- the username/loginpassword
- the passwordencryption
- encryption type (must be none, starttls or tls)port
- the port numberdisableCertificateChecking
- disable certificate checking (behind a ssl-proxy or when the server has a self signed certificate)MessagingException
- on errorpublic class LoklakInstallation
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.util.Set<java.lang.String> |
+blacklistedHosts |
+
static Server |
+server |
+
Constructor and Description | +
---|
LoklakInstallation() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+main(java.lang.String[] args) |
+
static void |
+shutdown(int exitcode) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class LoklakServer
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.util.Set<java.lang.String> |
+blacklistedHosts |
+
static Harvester |
+harvester |
+
static IncomingMessageBuffer |
+queuedIndexing |
+
static java.lang.Class<? extends Servlet>[] |
+services |
+
Constructor and Description | +
---|
LoklakServer() |
+
Modifier and Type | +Method and Description | +
---|---|
static int |
+getServerThreads() |
+
static java.lang.String |
+getServerURI() |
+
static void |
+main(java.lang.String[] args) |
+
static java.util.Map<java.lang.String,java.lang.String> |
+readConfig(java.nio.file.Path data) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.util.Set<java.lang.String> blacklistedHosts+
public static IncomingMessageBuffer queuedIndexing+
public static java.lang.Class<? extends Servlet>[] services+
public static Harvester harvester+
public static java.util.Map<java.lang.String,java.lang.String> readConfig(java.nio.file.Path data) + throws java.io.IOException+
java.io.IOException
public static int getServerThreads()+
public static java.lang.String getServerURI()+
public static void main(java.lang.String[] args) + throws java.lang.Exception+
java.lang.Exception
public class AccessServlet
+extends HttpServlet
+Constructor and Description | +
---|
AccessServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class CampaignServlet
+extends HttpServlet
+Constructor and Description | +
---|
CampaignServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class CrawlerServlet
+extends HttpServlet
+Constructor and Description | +
---|
CrawlerServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class SettingsServlet
+extends HttpServlet
+Constructor and Description | +
---|
SettingsServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class StatusService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
StatusService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
static void |
+main(java.lang.String[] args) |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
static JSONObject |
+status(java.lang.String protocolhostportstub) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public static JSONObject status(java.lang.String protocolhostportstub) + throws java.io.IOException+
java.io.IOException
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public static void main(java.lang.String[] args)+
public class ThreaddumpServlet
+extends HttpServlet
+Constructor and Description | +
---|
ThreaddumpServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
Class | +Description | +
---|---|
AccessServlet | ++ |
CampaignServlet | ++ |
CrawlerServlet | ++ |
SettingsServlet | +
+ submit all setting values where the settings key starts with "client."
+ |
+
StatusService | ++ |
ThreaddumpServlet | ++ |
public class ClassifierServlet +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
ClassifierServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
static JSONObject |
+getAggregationsJsonByCountry(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> result) |
+
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
+getAllowedClassifiers() |
+
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllowedClassifiers()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public static JSONObject getAggregationsJsonByCountry(java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> result)+
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public class ClassifierServletCache
+extends java.lang.Object
+Constructor and Description | +
---|
ClassifierServletCache() |
+
Modifier and Type | +Method and Description | +
---|---|
static JSONObject |
+getOrCreate(java.lang.String index,
+ java.lang.String classifier,
+ java.lang.String sinceDate,
+ java.lang.String untilDate,
+ java.util.List<java.lang.String> classes) |
+
static JSONObject |
+getOrCreate(java.lang.String index,
+ java.lang.String classifier,
+ java.lang.String sinceDate,
+ java.lang.String untilDate,
+ java.util.List<java.lang.String> classes,
+ java.util.List<java.lang.String> countries) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ClassifierServletCache()+
public static JSONObject getOrCreate(java.lang.String index, + java.lang.String classifier, + java.lang.String sinceDate, + java.lang.String untilDate, + java.util.List<java.lang.String> classes)+
public static JSONObject getOrCreate(java.lang.String index, + java.lang.String classifier, + java.lang.String sinceDate, + java.lang.String untilDate, + java.util.List<java.lang.String> classes, + java.util.List<java.lang.String> countries)+
Class | +Description | +
---|---|
ClassifierServlet | ++ |
ClassifierServletCache | ++ |
public class AmazonProductService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
AmazonProductService() |
+
Modifier and Type | +Method and Description | +
---|---|
static JSONObject |
+fetchResults(java.lang.String requestUrl,
+ java.lang.String operation) |
+
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+itemLookup(java.lang.String asin,
+ java.lang.String responsegroup) |
+
JSONObject |
+itemSearch(java.lang.String query,
+ java.lang.String responsegroup) |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public static JSONObject fetchResults(java.lang.String requestUrl, + java.lang.String operation)+
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public JSONObject itemSearch(java.lang.String query, + java.lang.String responsegroup)+
public JSONObject itemLookup(java.lang.String asin, + java.lang.String responsegroup)+
public class SignedRequestsHelper
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static SignedRequestsHelper |
+getInstance(java.lang.String endpoint,
+ java.lang.String awsAccessKeyId,
+ java.lang.String awsSecretKey,
+ java.lang.String associatetag)
+You must provide the three values below to initialize the helper.
+ |
+
java.lang.String |
+sign(java.util.Map<java.lang.String,java.lang.String> params)
+This method signs requests in hashmap form.
+ |
+
java.lang.String |
+sign(java.lang.String queryString)
+This method signs requests in query-string form.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static SignedRequestsHelper getInstance(java.lang.String endpoint, + java.lang.String awsAccessKeyId, + java.lang.String awsSecretKey, + java.lang.String associatetag) + throws java.lang.IllegalArgumentException, + java.io.UnsupportedEncodingException, + java.security.NoSuchAlgorithmException, + java.security.InvalidKeyException+
endpoint
- Destination for the requests.awsAccessKeyId
- Your AWS Access Key IDawsSecretKey
- Your AWS Secret Keyjava.lang.IllegalArgumentException
java.io.UnsupportedEncodingException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
public java.lang.String sign(java.util.Map<java.lang.String,java.lang.String> params)+
public java.lang.String sign(java.lang.String queryString)+
Class | +Description | +
---|---|
AmazonProductService | ++ |
SignedRequestsHelper | +
+ This class contains all the logic for signing requests to the Amazon Product
+ Advertising API.
+ |
+
public class AccountService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
AccountService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class AppsService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
AppsService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query query,
+ HttpServletResponse response,
+ Authorization auth,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query query, + HttpServletResponse response, + Authorization auth, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class AssetServlet
+extends HttpServlet
+Constructor and Description | +
---|
AssetServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class AuthorizationDemoService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
AuthorizationDemoService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public AuthorizationDemoService()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class DumpDownloadServlet
+extends HttpServlet
+Constructor and Description | +
---|
DumpDownloadServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class InstallationPageService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
InstallationPageService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization authorization,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public InstallationPageService()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization authorization, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class LoginService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
LoginService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization authorization,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization authorization, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class PasswordRecoveryService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
PasswordRecoveryService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public PasswordRecoveryService()+
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class PasswordResetService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
PasswordResetService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class ProxyServlet
+extends HttpServlet
+Constructor and Description | +
---|
ProxyServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+process(HttpServletRequest request,
+ HttpServletResponse response,
+ Query post) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void process(HttpServletRequest request, + HttpServletResponse response, + Query post) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class PublicKeyRegistrationService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
PublicKeyRegistrationService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization authorization,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public PublicKeyRegistrationService()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization authorization, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class SettingsManagementService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
SettingsManagementService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public SettingsManagementService()+
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class SignUpService +extends AbstractAPIHandler +implements APIHandler+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+verificationLinkPlaceholder |
+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
SignUpService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization auth,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public static java.lang.String verificationLinkPlaceholder+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization auth, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class Sitemap
+extends HttpServlet
+Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class TopMenuService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
TopMenuService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions)+
serviceImpl
in class AbstractAPIHandler
public class TwitterAnalysisService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
TwitterAnalysisService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
static SusiThought |
+showAnalysis(java.lang.String username,
+ java.lang.String count) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public TwitterAnalysisService()+
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public static SusiThought showAnalysis(java.lang.String username, + java.lang.String count)+
public class UserAccountPermissions +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
UserAccountPermissions() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query query,
+ HttpServletResponse response,
+ Authorization authorization,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public UserAccountPermissions()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query query, + HttpServletResponse response, + Authorization authorization, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
public class UserManagementService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
UserManagementService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
JSONObject |
+serviceImpl(Query post,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public JSONObject serviceImpl(Query post, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
Class | +Description | +
---|---|
AccountService | ++ |
AppsService | ++ |
AssetServlet | ++ |
AuthorizationDemoService | ++ |
DumpDownloadServlet | ++ |
InstallationPageService | ++ |
LoginService | +
+ This service allows users to login, logout or to check their login status.
+ |
+
PasswordRecoveryService | ++ |
PasswordResetService | ++ |
ProxyServlet | ++ |
PublicKeyRegistrationService | +
+ This service allows users to register a public key for login.
+ |
+
SettingsManagementService | ++ |
SignUpService | ++ |
Sitemap | ++ |
TopMenuService | ++ |
TwitterAnalysisService | ++ |
UserAccountPermissions | ++ |
UserManagementService | ++ |
public class GeocodeServlet
+extends HttpServlet
+Constructor and Description | +
---|
GeocodeServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
Class | +Description | +
---|---|
GeocodeServlet | +
+ geocoding of places into locations
+ test:
+ http://localhost:9000/api/geocode.json?data={%22places%22:[%22Frankfurt%20am%20Main%22,%22New%20York%22,%22Singapore%22]}
+ for reverse geocoding, try
+ http://localhost:9000/api/geocode.json?data={%22places%22:[%22iPhone:%2037.313690,-122.022911%22,%22%C3%9CT:%2019.109458,72.825842%22]}
+ |
+
public abstract class AbstractPushServlet
+extends HttpServlet
+Constructor and Description | +
---|
AbstractPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected abstract void |
+customProcessing(JSONObject message) |
+
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected abstract JSONArray |
+extractMessages(JSONObject data) |
+
protected abstract JsonFieldConverter.JsonConversionSchemaEnum |
+getConversionSchema() |
+
protected abstract SourceType |
+getSourceType() |
+
protected abstract JsonValidator.JsonSchemaEnum |
+getValidatorSchema() |
+
void |
+init() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void init() + throws ServletException+
ServletException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected abstract SourceType getSourceType()+
protected abstract JsonValidator.JsonSchemaEnum getValidatorSchema()+
protected abstract JsonFieldConverter.JsonConversionSchemaEnum getConversionSchema()+
protected abstract JSONArray extractMessages(JSONObject data)+
protected abstract void customProcessing(JSONObject message)+
public class EarthquakeServlet
+extends HttpServlet
+Constructor and Description | +
---|
EarthquakeServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static JSONObject |
+readJsonFromUrl(java.lang.String url) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static JSONObject readJsonFromUrl(java.lang.String url) + throws java.io.IOException, + JSONException+
java.io.IOException
JSONException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class FossasiaPushServlet +extends AbstractPushServlet+
Constructor and Description | +
---|
FossasiaPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+customProcessing(JSONObject message) |
+
protected JSONArray |
+extractMessages(JSONObject data) |
+
protected JsonFieldConverter.JsonConversionSchemaEnum |
+getConversionSchema() |
+
protected SourceType |
+getSourceType() |
+
protected JsonValidator.JsonSchemaEnum |
+getValidatorSchema() |
+
doGet, doPost, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected SourceType getSourceType()+
getSourceType
in class AbstractPushServlet
protected JsonValidator.JsonSchemaEnum getValidatorSchema()+
getValidatorSchema
in class AbstractPushServlet
protected JsonFieldConverter.JsonConversionSchemaEnum getConversionSchema()+
getConversionSchema
in class AbstractPushServlet
protected JSONArray extractMessages(JSONObject data)+
extractMessages
in class AbstractPushServlet
protected void customProcessing(JSONObject message)+
customProcessing
in class AbstractPushServlet
public class FreifunkNodeFetchServlet
+extends HttpServlet
+Constructor and Description | +
---|
FreifunkNodeFetchServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static JSONObject |
+readJsonFromUrl(java.lang.String url) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public FreifunkNodeFetchServlet()+
public static JSONObject readJsonFromUrl(java.lang.String url) + throws java.io.IOException, + JSONException+
java.io.IOException
JSONException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class FreifunkNodePushServlet +extends AbstractPushServlet+
Constructor and Description | +
---|
FreifunkNodePushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+customProcessing(JSONObject message) |
+
protected JSONArray |
+extractMessages(JSONObject data) |
+
protected JsonFieldConverter.JsonConversionSchemaEnum |
+getConversionSchema() |
+
protected SourceType |
+getSourceType() |
+
protected JsonValidator.JsonSchemaEnum |
+getValidatorSchema() |
+
doGet, doPost, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public FreifunkNodePushServlet()+
protected SourceType getSourceType()+
getSourceType
in class AbstractPushServlet
protected JsonValidator.JsonSchemaEnum getValidatorSchema()+
getValidatorSchema
in class AbstractPushServlet
protected JsonFieldConverter.JsonConversionSchemaEnum getConversionSchema()+
getConversionSchema
in class AbstractPushServlet
protected JSONArray extractMessages(JSONObject data)+
extractMessages
in class AbstractPushServlet
protected void customProcessing(JSONObject message)+
customProcessing
in class AbstractPushServlet
public class GeoJsonPushServlet
+extends HttpServlet
+Constructor and Description | +
---|
GeoJsonPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class ImportProfileServlet
+extends HttpServlet
+Constructor and Description | +
---|
ImportProfileServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class NMEAServlet.GPSPosition
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
float |
+altitude |
+
float |
+dir |
+
boolean |
+fixed |
+
float |
+lat |
+
float |
+lon |
+
int |
+quality |
+
float |
+time |
+
float |
+velocity |
+
Constructor and Description | +
---|
GPSPosition() |
+
Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+toJSONString() |
+
java.lang.String |
+toString() |
+
void |
+updatefix() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public float time+
public float lat+
public float lon+
public boolean fixed+
public int quality+
public float dir+
public float altitude+
public float velocity+
public void updatefix()+
public JSONObject toJSONString()+
public java.lang.String toString()+
toString
in class java.lang.Object
public class NMEAServlet
+extends HttpServlet
+Modifier and Type | +Class and Description | +
---|---|
class |
+NMEAServlet.GPSPosition |
+
Constructor and Description | +
---|
NMEAServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
NMEAServlet.GPSPosition |
+parse(java.lang.String line) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public NMEAServlet.GPSPosition parse(java.lang.String line)+
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class NOAAAlertServlet
+extends HttpServlet
+Constructor and Description | +
---|
NOAAAlertServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class NetmonPushServlet
+extends HttpServlet
+Constructor and Description | +
---|
NetmonPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class NodelistPushServlet +extends AbstractPushServlet+
Constructor and Description | +
---|
NodelistPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+customProcessing(JSONObject message) |
+
protected JSONArray |
+extractMessages(JSONObject data) |
+
protected JsonFieldConverter.JsonConversionSchemaEnum |
+getConversionSchema() |
+
protected SourceType |
+getSourceType() |
+
protected JsonValidator.JsonSchemaEnum |
+getValidatorSchema() |
+
doGet, doPost, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected SourceType getSourceType()+
getSourceType
in class AbstractPushServlet
protected JsonValidator.JsonSchemaEnum getValidatorSchema()+
getValidatorSchema
in class AbstractPushServlet
protected JsonFieldConverter.JsonConversionSchemaEnum getConversionSchema()+
getConversionSchema
in class AbstractPushServlet
protected JSONArray extractMessages(JSONObject data)+
extractMessages
in class AbstractPushServlet
protected void customProcessing(JSONObject message)+
customProcessing
in class AbstractPushServlet
public class OpenWifiMapPushServlet +extends AbstractPushServlet+
Constructor and Description | +
---|
OpenWifiMapPushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+customProcessing(JSONObject message) |
+
protected JSONArray |
+extractMessages(JSONObject data) |
+
protected JsonFieldConverter.JsonConversionSchemaEnum |
+getConversionSchema() |
+
protected SourceType |
+getSourceType() |
+
protected JsonValidator.JsonSchemaEnum |
+getValidatorSchema() |
+
doGet, doPost, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public OpenWifiMapPushServlet()+
protected SourceType getSourceType()+
getSourceType
in class AbstractPushServlet
protected JsonValidator.JsonSchemaEnum getValidatorSchema()+
getValidatorSchema
in class AbstractPushServlet
protected JsonFieldConverter.JsonConversionSchemaEnum getConversionSchema()+
getConversionSchema
in class AbstractPushServlet
protected JSONArray extractMessages(JSONObject data)+
extractMessages
in class AbstractPushServlet
protected void customProcessing(JSONObject message)+
customProcessing
in class AbstractPushServlet
public class PushReport
+extends java.lang.Object
+Constructor and Description | +
---|
PushReport() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+combine(PushReport that) |
+
int |
+getErrorCount() |
+
ImportProfileEntry |
+getImportProfile() |
+
int |
+getKnownCount() |
+
java.util.List<java.lang.String> |
+getKnownMessageIds() |
+
int |
+getNewCount() |
+
int |
+getRecordCount() |
+
void |
+incrementErrorCount() |
+
void |
+incrementKnownCount(java.lang.String id) |
+
void |
+incrementNewCount() |
+
void |
+incrementRecordCount() |
+
void |
+setImportProfile(ImportProfileEntry importProfile) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int getNewCount()+
public void incrementNewCount()+
public int getKnownCount()+
public void incrementKnownCount(java.lang.String id)+
public void incrementErrorCount()+
public int getErrorCount()+
public ImportProfileEntry getImportProfile()+
public void setImportProfile(ImportProfileEntry importProfile)+
public java.util.List<java.lang.String> getKnownMessageIds()+
public int getRecordCount()+
public void incrementRecordCount()+
public void combine(PushReport that)+
public class PushServletHelper
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String[] |
+FIELDS_TO_COMPARE |
+
Constructor and Description | +
---|
PushServletHelper() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.lang.String |
+buildJSONResponse(java.lang.String callback,
+ PushReport pushReport) |
+
static java.lang.String |
+checkMessageExistence(JSONObject message) |
+
static java.lang.String |
+computeMessageId(JSONObject message,
+ SourceType sourceType) |
+
protected static ImportProfileEntry |
+saveImportProfile(int fileHash,
+ Query post,
+ SourceType sourceType,
+ java.lang.String screenName,
+ java.util.List<java.lang.String> importedMsgIds) |
+
static PushReport |
+saveMessagesAndImportProfile(JSONArray messages,
+ int fileHash,
+ Query post,
+ SourceType sourceType,
+ java.lang.String screenName) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String[] FIELDS_TO_COMPARE+
public static PushReport saveMessagesAndImportProfile(JSONArray messages, + int fileHash, + Query post, + SourceType sourceType, + java.lang.String screenName) + throws java.io.IOException+
java.io.IOException
protected static ImportProfileEntry saveImportProfile(int fileHash, + Query post, + SourceType sourceType, + java.lang.String screenName, + java.util.List<java.lang.String> importedMsgIds) + throws java.io.IOException+
java.io.IOException
public static java.lang.String buildJSONResponse(java.lang.String callback, + PushReport pushReport) + throws java.io.IOException+
java.io.IOException
public static java.lang.String checkMessageExistence(JSONObject message)+
public static java.lang.String computeMessageId(JSONObject message, + SourceType sourceType) + throws java.lang.Exception+
java.lang.Exception
public class StuffInSpaceServlet
+extends HttpServlet
+Constructor and Description | +
---|
StuffInSpaceServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static JSONArray |
+readJsonFromUrl(java.lang.String url) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static JSONArray readJsonFromUrl(java.lang.String url) + throws java.io.IOException, + JSONException+
java.io.IOException
JSONException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class ValidateServlet
+extends HttpServlet
+Constructor and Description | +
---|
ValidateServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class YahiHazeServlet
+extends HttpServlet
+Constructor and Description | +
---|
YahiHazeServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static JSONArray |
+readJsonFromUrl(java.lang.String url) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static JSONArray readJsonFromUrl(java.lang.String url) + throws java.io.IOException, + JSONException+
java.io.IOException
JSONException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
Class | +Description | +
---|---|
AbstractPushServlet | ++ |
EarthquakeServlet | ++ |
FossasiaPushServlet | ++ |
FreifunkNodeFetchServlet | ++ |
FreifunkNodePushServlet | ++ |
GeoJsonPushServlet | ++ |
ImportProfileServlet | ++ |
NetmonPushServlet | ++ |
NMEAServlet | ++ |
NOAAAlertServlet | ++ |
NodelistPushServlet | ++ |
OpenWifiMapPushServlet | ++ |
PushReport | ++ |
PushServletHelper | ++ |
StuffInSpaceServlet | ++ |
ValidateServlet | ++ |
YahiHazeServlet | ++ |
public class HelloService +extends AbstractAPIHandler +implements APIHandler+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
HelloService() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
static void |
+propagate(java.lang.String[] hoststubs) |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getServerProtocolHostStub, service
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
public java.lang.String getAPIPath()+
getAPIPath
in interface APIHandler
public static void propagate(java.lang.String[] hoststubs)+
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions)+
serviceImpl
in class AbstractAPIHandler
public class PeersServlet
+extends HttpServlet
+Constructor and Description | +
---|
PeersServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static Timeline |
+peers(java.lang.String protocolhostportstub,
+ java.lang.String query,
+ Timeline.Order order,
+ java.lang.String source,
+ int count,
+ int timezoneOffset,
+ java.lang.String provider_hash) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static Timeline peers(java.lang.String protocolhostportstub, + java.lang.String query, + Timeline.Order order, + java.lang.String source, + int count, + int timezoneOffset, + java.lang.String provider_hash) + throws java.io.IOException+
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class PushServlet
+extends HttpServlet
+Constructor and Description | +
---|
PushServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
static boolean |
+push(java.lang.String[] hoststubs,
+ Timeline timeline) |
+
static boolean |
+push(java.lang.String[] hoststubs,
+ Timeline timeline,
+ boolean peerMessage)
+transmit the timeline to several hosts
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static boolean push(java.lang.String[] hoststubs, + Timeline timeline, + boolean peerMessage)+
timeline
- hoststubs
- a list of host stubs, i.e. ["http://remoteserver.eu"]peerMessage
- if message is send to a peerpublic static boolean push(java.lang.String[] hoststubs, + Timeline timeline)+
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
Class | +Description | +
---|---|
HelloService | +
+ Servlet to span the message peer-to-peer network.
+ |
+
PeersServlet | ++ |
PushServlet | +
+ push api to send messages to the loklak index.
+ |
+
public class CSVServlet
+extends HttpServlet
+Constructor and Description | +
---|
CSVServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class XMLServlet
+extends HttpServlet
+Constructor and Description | +
---|
XMLServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
Class | +Description | +
---|---|
CSVServlet | ++ |
XMLServlet | ++ |
public class MapServlet
+extends HttpServlet
+Constructor and Description | +
---|
MapServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+process(HttpServletRequest request,
+ HttpServletResponse response,
+ Query post) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void process(HttpServletRequest request, + HttpServletResponse response, + Query post) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class MarkdownServlet
+extends HttpServlet
+Constructor and Description | +
---|
MarkdownServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+process(HttpServletRequest request,
+ HttpServletResponse response,
+ Query post) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void process(HttpServletRequest request, + HttpServletResponse response, + Query post) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public class PieChartServlet
+extends HttpServlet
+Modifier and Type | +Field and Description | +
---|---|
static long |
+serialVersionUID |
+
Constructor and Description | +
---|
PieChartServlet() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
JFreeChart |
+getChart(JSONObject jsonData,
+ boolean legendBit,
+ boolean tooltipBit) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final long serialVersionUID+
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws java.io.IOException+
java.io.IOException
public JFreeChart getChart(JSONObject jsonData, + boolean legendBit, + boolean tooltipBit)+
Class | +Description | +
---|---|
MapServlet | ++ |
MarkdownServlet | ++ |
PieChartServlet | ++ |
public abstract class AbstractIndexFactory<IndexObject extends ObjectEntry> +extends java.lang.Object +implements IndexFactory<IndexObject>+
Modifier and Type | +Field and Description | +
---|---|
protected ElasticsearchClient |
+elasticsearch_client |
+
protected java.lang.String |
+index_name |
+
protected CacheMap<java.lang.String,IndexObject> |
+objectCache |
+
Constructor and Description | +
---|
AbstractIndexFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
boolean |
+delete(java.lang.String id,
+ SourceType sourceType) |
+
boolean |
+exists(java.lang.String id) |
+
java.util.Set<java.lang.String> |
+existsBulk(java.util.Collection<java.lang.String> ids) |
+
boolean |
+existsCache(java.lang.String id) |
+
CacheStats |
+getExistStats() |
+
CacheStats |
+getObjectStats() |
+
JSONObject |
+getStats() |
+
IndexObject |
+read(java.lang.String id) |
+
JSONObject |
+readJSON(java.lang.String id) |
+
ElasticsearchClient.BulkWriteResult |
+writeEntries(java.util.Collection<IndexEntry<IndexObject>> entries) |
+
boolean |
+writeEntry(IndexEntry<IndexObject> entry) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
protected final ElasticsearchClient elasticsearch_client+
protected final CacheMap<java.lang.String,IndexObject extends ObjectEntry> objectCache+
protected final java.lang.String index_name+
public AbstractIndexFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public CacheStats getObjectStats()+
public CacheStats getExistStats()+
public JSONObject getStats()+
public IndexObject read(java.lang.String id) + throws java.io.IOException+
java.io.IOException
public boolean exists(java.lang.String id)+
exists
in interface IndexFactory<IndexObject extends ObjectEntry>
public java.util.Set<java.lang.String> existsBulk(java.util.Collection<java.lang.String> ids)+
existsBulk
in interface IndexFactory<IndexObject extends ObjectEntry>
public boolean existsCache(java.lang.String id)+
existsCache
in interface IndexFactory<IndexObject extends ObjectEntry>
public boolean delete(java.lang.String id, + SourceType sourceType)+
delete
in interface IndexFactory<IndexObject extends ObjectEntry>
public JSONObject readJSON(java.lang.String id)+
readJSON
in interface IndexFactory<IndexObject extends ObjectEntry>
public boolean writeEntry(IndexEntry<IndexObject> entry) + throws java.io.IOException+
writeEntry
in interface IndexFactory<IndexObject extends ObjectEntry>
java.io.IOException
public ElasticsearchClient.BulkWriteResult writeEntries(java.util.Collection<IndexEntry<IndexObject>> entries) + throws java.io.IOException+
writeEntries
in interface IndexFactory<IndexObject extends ObjectEntry>
java.io.IOException
public void close()+
close
in interface IndexFactory<IndexObject extends ObjectEntry>
public class AccountFactory +extends AbstractIndexFactory<AccountEntry> +implements IndexFactory<AccountEntry>+
elasticsearch_client, index_name, objectCache
Constructor and Description | +
---|
AccountFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
AccountEntry |
+init(JSONObject map) |
+
close, delete, exists, existsBulk, existsCache, getExistStats, getObjectStats, getStats, read, readJSON, writeEntries, writeEntry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, delete, exists, existsBulk, existsCache, readJSON, writeEntries, writeEntry
public AccountFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public AccountEntry init(JSONObject map) + throws java.io.IOException+
init
in interface IndexFactory<AccountEntry>
java.io.IOException
Constructor and Description | +
---|
Campaign() |
+
Campaign(JSONObject campaignMap)
+create an campaign with a dumped map
+ |
+
Campaign(java.lang.String query,
+ java.lang.String name,
+ java.util.Date creation_date,
+ java.util.Date start_date,
+ java.util.Date end_date,
+ int timezoneOffset)
+create an campaign
+ |
+
Campaign(java.lang.String query,
+ java.lang.String name,
+ java.lang.String start_date,
+ java.lang.String end_date,
+ int timezoneOffset)
+create an campaign
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(Campaign o1,
+ Campaign o2) |
+
int |
+compareTo(Campaign o) |
+
java.util.Date |
+getCreationDate() |
+
long |
+getEndTime() |
+
java.lang.String |
+getID() |
+
java.lang.String |
+getName() |
+
java.lang.String |
+getQuery() |
+
long |
+getStartTime() |
+
int |
+getTimezoneOffset() |
+
int |
+hashCode() |
+
static void |
+main(java.lang.String[] args) |
+
JSONObject |
+toJSON() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public Campaign()+
public Campaign(JSONObject campaignMap)+
campaignMap
- public Campaign(java.lang.String query, + java.lang.String name, + java.util.Date creation_date, + java.util.Date start_date, + java.util.Date end_date, + int timezoneOffset)+
query
- the query which can be used to harvest the campaignname
- the name of the campaigncreation_date
- the creation time of the campaignstart_date
- the start of the campaignend_date
- the end of the campaigntimezoneOffset
- the offset of the time zone of the creating clientpublic Campaign(java.lang.String query, + java.lang.String name, + java.lang.String start_date, + java.lang.String end_date, + int timezoneOffset) + throws java.text.ParseException+
query
- the query which can be used to harvest the campaignname
- the name of the campaignstart_date
- "YYYY-MM-dd HH:mm" the start of the campaignend_date
- "YYYY-MM-dd HH:mm" the end of the campaigntimezoneOffset
- the offset of the time zone of the creating client, used to parse the datejava.text.ParseException
public java.lang.String getName()+
public java.lang.String getQuery()+
public java.util.Date getCreationDate()+
public long getStartTime()+
public long getEndTime()+
public int getTimezoneOffset()+
public java.lang.String getID()+
public int hashCode()+
hashCode
in class java.lang.Object
public int compareTo(Campaign o)+
compareTo
in interface java.lang.Comparable<Campaign>
public int compare(Campaign o1, + Campaign o2)+
compare
in interface java.util.Comparator<Campaign>
public JSONObject toJSON()+
public java.lang.String toString()+
toString
in class java.lang.Object
public static void main(java.lang.String[] args)+
public static enum Campaigns.State +extends java.lang.Enum<Campaigns.State> +implements java.lang.Comparable<Campaigns.State>, java.util.Comparator<Campaigns.State>+
Enum Constant and Description | +
---|
FUTURE |
+
ONGOING |
+
WRAPPED |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(Campaigns.State o1,
+ Campaigns.State o2) |
+
int |
+getCard() |
+
java.lang.String |
+toFileName() |
+
static Campaigns.State |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Campaigns.State[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
compareTo
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final Campaigns.State FUTURE+
public static final Campaigns.State ONGOING+
public static final Campaigns.State WRAPPED+
public static Campaigns.State[] values()+
+for (Campaigns.State c : Campaigns.State.values()) + System.out.println(c); +
public static Campaigns.State valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getCard()+
public int compare(Campaigns.State o1, + Campaigns.State o2)+
compare
in interface java.util.Comparator<Campaigns.State>
public java.lang.String toFileName()+
public class Campaigns
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+Campaigns.State |
+
Constructor and Description | +
---|
Campaigns(java.io.File storagePath) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
void |
+processCampaigns() |
+
void |
+save() |
+
void |
+save(Campaigns.State state) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static enum Classifier.Category +extends java.lang.Enum<Classifier.Category>+
Enum Constant and Description | +
---|
anger |
+
anticipation |
+
disgust |
+
dutch |
+
english |
+
fear |
+
french |
+
german |
+
joy |
+
leet |
+
NONE |
+
sadness |
+
sex |
+
spanish |
+
surprise |
+
swear |
+
troll |
+
trust |
+
Modifier and Type | +Method and Description | +
---|---|
static Classifier.Category |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Classifier.Category[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Classifier.Category joy+
public static final Classifier.Category trust+
public static final Classifier.Category fear+
public static final Classifier.Category surprise+
public static final Classifier.Category sadness+
public static final Classifier.Category disgust+
public static final Classifier.Category anger+
public static final Classifier.Category anticipation+
public static final Classifier.Category swear+
public static final Classifier.Category sex+
public static final Classifier.Category leet+
public static final Classifier.Category troll+
public static final Classifier.Category english+
public static final Classifier.Category german+
public static final Classifier.Category french+
public static final Classifier.Category spanish+
public static final Classifier.Category dutch+
public static final Classifier.Category NONE+
public static Classifier.Category[] values()+
+for (Classifier.Category c : Classifier.Category.values()) + System.out.println(c); +
public static Classifier.Category valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum Classifier.Context +extends java.lang.Enum<Classifier.Context>+
Enum Constant and Description | +
---|
emotion |
+
language |
+
profanity |
+
Modifier and Type | +Field and Description | +
---|---|
java.util.Map<Classifier.Category,java.util.Set<java.lang.String>> |
+categories |
+
Modifier and Type | +Method and Description | +
---|---|
Classification<java.lang.String,Classifier.Category> |
+classify(java.lang.String phrase) |
+
void |
+forgetWord(java.lang.String key) |
+
void |
+init(int capacity) |
+
void |
+learnPhrase(java.lang.String phrase) |
+
static Classifier.Context |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Classifier.Context[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
java.util.Set<java.lang.String> |
+vocabulary() |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Classifier.Context emotion+
public static final Classifier.Context profanity+
public static final Classifier.Context language+
public java.util.Map<Classifier.Category,java.util.Set<java.lang.String>> categories+
public static Classifier.Context[] values()+
+for (Classifier.Context c : Classifier.Context.values()) + System.out.println(c); +
public static Classifier.Context valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void init(int capacity)+
public java.util.Set<java.lang.String> vocabulary()+
public void forgetWord(java.lang.String key)+
public void learnPhrase(java.lang.String phrase)+
public Classification<java.lang.String,Classifier.Category> classify(java.lang.String phrase)+
public class Classifier
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+Classifier.Category |
+
static class |
+Classifier.Context |
+
Modifier and Type | +Field and Description | +
---|---|
static java.util.regex.Pattern |
+NON_WORD_PATTERN |
+
static java.util.regex.Pattern |
+WHITESPACE_PATTERN |
+
Constructor and Description | +
---|
Classifier() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.util.Map<Classifier.Context,Classification<java.lang.String,Classifier.Category>> |
+classify(java.lang.String phrase) |
+
static void |
+init(int maxsize,
+ int initsize) |
+
static void |
+learnPhrase(java.lang.String message) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.util.regex.Pattern NON_WORD_PATTERN+
public static final java.util.regex.Pattern WHITESPACE_PATTERN+
public static void learnPhrase(java.lang.String message)+
public static java.util.Map<Classifier.Context,Classification<java.lang.String,Classifier.Category>> classify(java.lang.String phrase)+
public static void init(int maxsize, + int initsize)+
public static enum DAO.IndexName +extends java.lang.Enum<DAO.IndexName>+
Enum Constant and Description | +
---|
accounts |
+
import_profiles |
+
messages |
+
messages_day |
+
messages_hour |
+
messages_week |
+
queries |
+
users |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getSchemaFilename() |
+
static DAO.IndexName |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static DAO.IndexName[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final DAO.IndexName messages_hour+
public static final DAO.IndexName messages_day+
public static final DAO.IndexName messages_week+
public static final DAO.IndexName messages+
public static final DAO.IndexName queries+
public static final DAO.IndexName users+
public static final DAO.IndexName accounts+
public static final DAO.IndexName import_profiles+
public static DAO.IndexName[] values()+
+for (DAO.IndexName c : DAO.IndexName.values()) + System.out.println(c); +
public static DAO.IndexName valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getSchemaFilename()+
public static class DAO.MessageWrapper
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
boolean |
+dump |
+
TwitterScraper.TwitterTweet |
+t |
+
UserEntry |
+u |
+
Constructor and Description | +
---|
MessageWrapper(TwitterScraper.TwitterTweet t,
+ UserEntry u,
+ boolean dump) |
+
public TwitterScraper.TwitterTweet t+
public UserEntry u+
public boolean dump+
public MessageWrapper(TwitterScraper.TwitterTweet t, + UserEntry u, + boolean dump)+
public static class DAO.SearchLocalMessages
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
java.util.Map<java.lang.String,java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Long>>> |
+aggregations |
+
ElasticsearchClient.Query |
+query |
+
Timeline |
+timeline |
+
Constructor and Description | +
---|
SearchLocalMessages(java.lang.String q,
+ Timeline.Order orderField,
+ int timezoneOffset,
+ int resultCount,
+ int aggregationLimit,
+ java.util.ArrayList<java.lang.String> filterList,
+ java.lang.String... aggregationFields)
+Search the local message cache using a elasticsearch query.
+ |
+
SearchLocalMessages(java.lang.String q,
+ Timeline.Order orderField,
+ int timezoneOffset,
+ int resultCount,
+ int aggregationLimit,
+ java.lang.String... aggregationFields) |
+
Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+getAggregations() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Timeline timeline+
public java.util.Map<java.lang.String,java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Long>>> aggregations+
public ElasticsearchClient.Query query+
public SearchLocalMessages(java.lang.String q, + Timeline.Order orderField, + int timezoneOffset, + int resultCount, + int aggregationLimit, + java.util.ArrayList<java.lang.String> filterList, + java.lang.String... aggregationFields)+
q
- - the query, for aggregation this which should include a time frame in the form since:yyyy-MM-dd until:yyyy-MM-ddorder_field
- - the field to order the results, i.e. Timeline.Order.CREATED_ATtimezoneOffset
- - an offset in minutes that is applied on dates given in the query of the form since:date until:dateresultCount
- - the number of messages in the result; can be zero if only aggregations are wantedaggregationLimit
- - the maximum count of facet entities, not search resultsaggregationFields
- - names of the aggregation fields. If no aggregation is wanted, pass no (zero) field(s)filterList
- - list of filters in String datatypepublic SearchLocalMessages(java.lang.String q, + Timeline.Order orderField, + int timezoneOffset, + int resultCount, + int aggregationLimit, + java.lang.String... aggregationFields)+
public JSONObject getAggregations()+
public class DAO
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+DAO.IndexName |
+
static class |
+DAO.MessageWrapper |
+
protected class |
+DAO.parallelScrape |
+
static class |
+DAO.SearchLocalMessages |
+
Modifier and Type | +Field and Description | +
---|---|
static AccessTracker |
+access |
+
static java.lang.String |
+ACCESS_DUMP_FILE_PREFIX |
+
static java.lang.String |
+ACCOUNT_DUMP_FILE_PREFIX |
+
static JsonTray |
+accounting |
+
static java.util.Map<java.lang.String,Accounting> |
+accounting_temporary |
+
static JsonTray |
+authentication |
+
static JsonTray |
+authorization |
+
static java.io.File |
+bin_dir |
+
static int |
+CACHE_MAXSIZE |
+
static java.io.File |
+conf_dir |
+
static ElasticsearchClient |
+elasticsearch_client |
+
static int |
+EXIST_MAXSIZE |
+
static JsonDataset |
+followers_dump |
+
static java.lang.String |
+FOLLOWERS_DUMP_FILE_PREFIX |
+
static JsonDataset |
+following_dump |
+
static java.lang.String |
+FOLLOWING_DUMP_FILE_PREFIX |
+
static GeoNames |
+geoNames |
+
static java.io.File |
+html_dir |
+
static com.fasterxml.jackson.core.JsonFactory |
+jsonFactory |
+
static com.fasterxml.jackson.databind.ObjectMapper |
+jsonMapper |
+
static <any> |
+jsonTypeRef |
+
static JsonFile |
+login_keys |
+
static JsonRepository |
+message_dump |
+
static java.lang.String |
+MESSAGE_DUMP_FILE_PREFIX |
+
static MessageFactory |
+messages |
+
static MessageFactory |
+messages_day |
+
static MessageFactory |
+messages_hour |
+
static MessageFactory |
+messages_week |
+
static MQTTPublisher |
+mqttPublisher |
+
static java.util.Set<java.lang.Number> |
+newUserIds |
+
static OutgoingMessageBuffer |
+outgoingMessages |
+
static JsonTray |
+passwordreset |
+
static Peers |
+peers |
+
static Settings |
+private_settings |
+
static Settings |
+public_settings |
+
static java.nio.file.Path |
+push_cache_dir |
+
static QueryFactory |
+queries |
+
static java.util.Random |
+random |
+
static boolean |
+streamEnabled |
+
static TimelineCache |
+timelineCache |
+
static JsonDataset |
+user_dump |
+
static java.lang.String |
+USER_DUMP_FILE_PREFIX |
+
static UserRoles |
+userRoles |
+
static UserFactory |
+users |
+
static boolean |
+writeDump |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+announceNewUserId(java.lang.Number id) |
+
static void |
+announceNewUserId(Timeline tl) |
+
static void |
+close()
+close all objects in this class
+ |
+
static java.lang.String |
+clusterStats() |
+
static long |
+countLocalAccounts() |
+
static long |
+countLocalMessages() |
+
static long |
+countLocalMessages(long millis,
+ boolean created_at) |
+
static long |
+countLocalMessages(java.lang.String provider_hash) |
+
static long |
+countLocalQueries() |
+
static long |
+countLocalUsers() |
+
static void |
+debug(java.lang.Throwable e)
+For Debugging events (very noisy).
+ |
+
static boolean |
+deleteImportProfile(java.lang.String id,
+ SourceType sourceType) |
+
static int |
+deleteOld(DAO.IndexName indexName,
+ java.util.Date createDateLimit) |
+
static boolean |
+deleteQuery(java.lang.String id,
+ SourceType sourceType) |
+
static boolean |
+existMessage(java.lang.String id) |
+
static boolean |
+existQuery(java.lang.String id) |
+
static boolean |
+existUser(java.lang.String id) |
+
static java.util.LinkedHashMap<java.lang.String,java.lang.Long> |
+FullDateHistogram(int timezoneOffset) |
+
static java.io.File |
+getAssetFile(java.lang.String screen_name,
+ java.lang.String id_str,
+ java.lang.String file) |
+
static java.util.List<java.lang.String> |
+getBackendPeers() |
+
static boolean |
+getConfig(java.lang.String key,
+ boolean default_val) |
+
static double |
+getConfig(java.lang.String key,
+ double default_val) |
+
static int |
+getConfig(java.lang.String key,
+ int default_val) |
+
static long |
+getConfig(java.lang.String key,
+ long default_val) |
+
static java.lang.String |
+getConfig(java.lang.String key,
+ java.lang.String default_val)
+get values from
+ |
+
static java.lang.String[] |
+getConfig(java.lang.String key,
+ java.lang.String[] default_val,
+ java.lang.String delim) |
+
static java.util.Set<java.lang.String> |
+getConfigKeys() |
+
static JSONObject |
+getConversionSchema(java.lang.String key) |
+
static java.util.ArrayList<java.lang.String> |
+getFrontPeers()
+from all known front peers, generate a list of available peers, ordered by the peer latency
+ |
+
static java.util.Set<java.lang.Number> |
+getNewUserIdsChunk() |
+
static Timeline2.Order |
+getOrder(java.lang.String orderString) |
+
static JsonNode |
+getSchema(java.lang.String key) |
+
static java.util.List<BaseScraper> |
+getScraperObjects(java.util.List<java.lang.String> scraperList,
+ java.util.Map<java.lang.String,java.lang.String> inputMap) |
+
static java.util.Collection<java.io.File> |
+getTweetOwnDumps(int count) |
+
static void |
+healLatency(float factor) |
+
static void |
+importAccountDumps(int count) |
+
static void |
+init(java.util.Map<java.lang.String,java.lang.String> configMap,
+ java.nio.file.Path dataPath)
+initialize the DAO
+ |
+
static void |
+log(java.lang.String line)
+For logging informational events
+ |
+
static java.util.Map<java.lang.String,java.lang.String> |
+nodeSettings() |
+
static java.lang.String |
+pendingClusterTasks() |
+
static TwitterScraper.TwitterTweet |
+readMessage(java.lang.String id) |
+
static JSONArray |
+scrapeLoklak(java.util.Map<java.lang.String,java.lang.String> inputMap,
+ boolean byUserQuery,
+ boolean recordQuery) |
+
static Timeline |
+scrapeTwitter(Query post,
+ java.util.ArrayList<java.lang.String> filterList,
+ java.lang.String q,
+ Timeline.Order order,
+ int timezoneOffset,
+ boolean byUserQuery,
+ long timeout,
+ boolean recordQuery) |
+
static Timeline |
+scrapeTwitter(Query post,
+ java.lang.String q,
+ Timeline.Order order,
+ int timezoneOffset,
+ boolean byUserQuery,
+ long timeout,
+ boolean recordQuery) |
+
static Timeline |
+searchBackend(java.lang.String q,
+ java.util.ArrayList<java.lang.String> filterList,
+ Timeline.Order order,
+ int count,
+ int timezoneOffset,
+ java.lang.String where,
+ long timeout) |
+
static AccountEntry |
+searchLocalAccount(java.lang.String screen_name)
+Search the local account cache using an elasticsearch query.
+ |
+
static ImportProfileEntry |
+SearchLocalImportProfiles(java.lang.String id) |
+
static java.util.Collection<ImportProfileEntry> |
+SearchLocalImportProfilesWithConstraints(java.util.Map<java.lang.String,java.lang.String> constraints,
+ boolean latest) |
+
static ResultList<QueryEntry> |
+SearchLocalQueries(java.lang.String q,
+ int resultCount,
+ java.lang.String sort_field,
+ java.lang.String default_sort_type,
+ SortOrder sort_order,
+ java.util.Date since,
+ java.util.Date until,
+ java.lang.String range_field)
+Search the local message cache using a elasticsearch query.
+ |
+
static UserEntry |
+searchLocalUserByScreenName(java.lang.String screen_name)
+Search the local user cache using a elasticsearch query.
+ |
+
static UserEntry |
+searchLocalUserByUserId(java.lang.String user_id) |
+
static Timeline |
+searchOnOtherPeers(java.util.List<java.lang.String> remote,
+ java.lang.String q,
+ java.util.ArrayList<java.lang.String> filterList,
+ Timeline.Order order,
+ int count,
+ int timezoneOffset,
+ java.lang.String source,
+ java.lang.String provider_hash,
+ long timeout) |
+
static void |
+severe(java.lang.String line)
+For events serious enough to inform and log, but not fatal.
+ |
+
static void |
+severe(java.lang.String line,
+ java.lang.Throwable e) |
+
static void |
+severe(java.lang.Throwable e) |
+
static void |
+trace(java.lang.Throwable e)
+For Stacktracing exceptions (preferred over debug).
+ |
+
static void |
+updateFrontPeerCache(RemoteAccess remoteAccess) |
+
static boolean |
+wait_ready(long maxtimemillis) |
+
static boolean |
+writeAccount(AccountEntry a,
+ boolean dump)
+Store an account together with a user into the search index
+ This method is synchronized to prevent concurrent IO caused by this call.
+ |
+
static boolean |
+writeImportProfile(ImportProfileEntry i,
+ boolean dump)
+Store an import profile into the search index
+ This method is synchronized to prevent concurrent IO caused by this call.
+ |
+
static boolean |
+writeMessage(DAO.MessageWrapper mw)
+Store a message together with a user into the search index
+ |
+
static java.util.Set<java.lang.String> |
+writeMessageBulk(java.util.Collection<DAO.MessageWrapper> mws) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final com.fasterxml.jackson.core.JsonFactory jsonFactory+
public static final com.fasterxml.jackson.databind.ObjectMapper jsonMapper+
public static final <any> jsonTypeRef+
public static final java.lang.String MESSAGE_DUMP_FILE_PREFIX+
public static final java.lang.String ACCOUNT_DUMP_FILE_PREFIX+
public static final java.lang.String USER_DUMP_FILE_PREFIX+
public static final java.lang.String ACCESS_DUMP_FILE_PREFIX+
public static final java.lang.String FOLLOWERS_DUMP_FILE_PREFIX+
public static final java.lang.String FOLLOWING_DUMP_FILE_PREFIX+
public static boolean writeDump+
public static final int CACHE_MAXSIZE+
public static final int EXIST_MAXSIZE+
public static java.io.File conf_dir+
public static java.io.File bin_dir+
public static java.io.File html_dir+
public static Settings public_settings+
public static Settings private_settings+
public static java.nio.file.Path push_cache_dir+
public static JsonRepository message_dump+
public static JsonDataset user_dump+
public static JsonDataset followers_dump+
public static JsonDataset following_dump+
public static AccessTracker access+
public static ElasticsearchClient elasticsearch_client+
public static UserFactory users+
public static MessageFactory messages+
public static MessageFactory messages_hour+
public static MessageFactory messages_day+
public static MessageFactory messages_week+
public static QueryFactory queries+
public static GeoNames geoNames+
public static Peers peers+
public static OutgoingMessageBuffer outgoingMessages+
public static JsonTray authentication+
public static JsonTray authorization+
public static JsonTray accounting+
public static UserRoles userRoles+
public static JsonTray passwordreset+
public static java.util.Map<java.lang.String,Accounting> accounting_temporary+
public static JsonFile login_keys+
public static TimelineCache timelineCache+
public static MQTTPublisher mqttPublisher+
public static boolean streamEnabled+
public static final java.util.Random random+
public static final java.util.Set<java.lang.Number> newUserIds+
public static void init(java.util.Map<java.lang.String,java.lang.String> configMap, + java.nio.file.Path dataPath) + throws java.lang.Exception+
configMap
- dataPath
- the path to the data directoryjava.lang.Exception
public static boolean wait_ready(long maxtimemillis)+
public static java.lang.String pendingClusterTasks()+
public static java.lang.String clusterStats()+
public static java.util.Map<java.lang.String,java.lang.String> nodeSettings()+
public static java.io.File getAssetFile(java.lang.String screen_name, + java.lang.String id_str, + java.lang.String file)+
public static java.util.Collection<java.io.File> getTweetOwnDumps(int count)+
public static void importAccountDumps(int count) + throws java.io.IOException+
java.io.IOException
public static void close()+
public static java.lang.String getConfig(java.lang.String key, + java.lang.String default_val)+
key
- default_val
- public static java.lang.String[] getConfig(java.lang.String key, + java.lang.String[] default_val, + java.lang.String delim)+
public static long getConfig(java.lang.String key, + long default_val)+
public static double getConfig(java.lang.String key, + double default_val)+
public static int getConfig(java.lang.String key, + int default_val)+
public static JsonNode getSchema(java.lang.String key) + throws java.io.IOException+
java.io.IOException
public static JSONObject getConversionSchema(java.lang.String key) + throws java.io.IOException+
java.io.IOException
public static boolean getConfig(java.lang.String key, + boolean default_val)+
public static java.util.Set<java.lang.String> getConfigKeys()+
public static boolean writeMessage(DAO.MessageWrapper mw)+
mw
- a message wrapperpublic static java.util.Set<java.lang.String> writeMessageBulk(java.util.Collection<DAO.MessageWrapper> mws)+
public static boolean writeAccount(AccountEntry a, + boolean dump)+
a
- an accountdump
- public static boolean writeImportProfile(ImportProfileEntry i, + boolean dump)+
i
- an import profilepublic static long countLocalMessages(long millis, + boolean created_at)+
public static long countLocalMessages()+
public static long countLocalMessages(java.lang.String provider_hash)+
public static long countLocalUsers()+
public static long countLocalQueries()+
public static long countLocalAccounts()+
public static TwitterScraper.TwitterTweet readMessage(java.lang.String id) + throws java.io.IOException+
java.io.IOException
public static boolean existMessage(java.lang.String id)+
public static boolean existUser(java.lang.String id)+
public static boolean existQuery(java.lang.String id)+
public static boolean deleteQuery(java.lang.String id, + SourceType sourceType)+
public static boolean deleteImportProfile(java.lang.String id, + SourceType sourceType)+
public static int deleteOld(DAO.IndexName indexName, + java.util.Date createDateLimit)+
public static java.util.LinkedHashMap<java.lang.String,java.lang.Long> FullDateHistogram(int timezoneOffset)+
public static UserEntry searchLocalUserByScreenName(java.lang.String screen_name)+
screen_name
- - the user idpublic static UserEntry searchLocalUserByUserId(java.lang.String user_id)+
public static AccountEntry searchLocalAccount(java.lang.String screen_name)+
screen_name
- - the user idpublic static ResultList<QueryEntry> SearchLocalQueries(java.lang.String q, + int resultCount, + java.lang.String sort_field, + java.lang.String default_sort_type, + SortOrder sort_order, + java.util.Date since, + java.util.Date until, + java.lang.String range_field)+
q
- - the query, can be empty for a matchall-queryresultCount
- - the number of messages in the resultsort_field
- - the field name to sort the result list, i.e. "query_first"sort_order
- - the sort order (you want to use SortOrder.DESC here)public static ImportProfileEntry SearchLocalImportProfiles(java.lang.String id)+
public static java.util.Collection<ImportProfileEntry> SearchLocalImportProfilesWithConstraints(java.util.Map<java.lang.String,java.lang.String> constraints, + boolean latest) + throws java.io.IOException+
java.io.IOException
public static Timeline scrapeTwitter(Query post, + java.lang.String q, + Timeline.Order order, + int timezoneOffset, + boolean byUserQuery, + long timeout, + boolean recordQuery)+
public static Timeline scrapeTwitter(Query post, + java.util.ArrayList<java.lang.String> filterList, + java.lang.String q, + Timeline.Order order, + int timezoneOffset, + boolean byUserQuery, + long timeout, + boolean recordQuery)+
public static JSONArray scrapeLoklak(java.util.Map<java.lang.String,java.lang.String> inputMap, + boolean byUserQuery, + boolean recordQuery)+
public static java.util.List<BaseScraper> getScraperObjects(java.util.List<java.lang.String> scraperList, + java.util.Map<java.lang.String,java.lang.String> inputMap)+
public static Timeline2.Order getOrder(java.lang.String orderString)+
public static void healLatency(float factor)+
public static void updateFrontPeerCache(RemoteAccess remoteAccess)+
public static java.util.ArrayList<java.lang.String> getFrontPeers()+
public static java.util.List<java.lang.String> getBackendPeers()+
public static Timeline searchBackend(java.lang.String q, + java.util.ArrayList<java.lang.String> filterList, + Timeline.Order order, + int count, + int timezoneOffset, + java.lang.String where, + long timeout)+
public static Timeline searchOnOtherPeers(java.util.List<java.lang.String> remote, + java.lang.String q, + java.util.ArrayList<java.lang.String> filterList, + Timeline.Order order, + int count, + int timezoneOffset, + java.lang.String source, + java.lang.String provider_hash, + long timeout)+
public static void announceNewUserId(Timeline tl)+
public static void announceNewUserId(java.lang.Number id)+
public static java.util.Set<java.lang.Number> getNewUserIdsChunk()+
public static void log(java.lang.String line)+
public static void severe(java.lang.String line)+
public static void severe(java.lang.String line, + java.lang.Throwable e)+
public static void severe(java.lang.Throwable e)+
public static void debug(java.lang.Throwable e)+
public static void trace(java.lang.Throwable e)+
protected class DAO.parallelScrape
+extends java.lang.Thread
+java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description | +
---|
parallelScrape(Timeline2 _dataSet,
+ BaseScraper _scraper) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+run() |
+
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public parallelScrape(Timeline2 _dataSet, + BaseScraper _scraper)+
public static final class DAOWrapper.GenericJSONBuilder
+extends java.lang.Object
+Constructor and Description | +
---|
GenericJSONBuilder() |
+
Modifier and Type | +Method and Description | +
---|---|
DAOWrapper.GenericJSONBuilder |
+addField(java.lang.String key,
+ java.lang.String value)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+addText(java.lang.String text_)
+Required
+ This is the text field.
+ |
+
void |
+persist() |
+
DAOWrapper.GenericJSONBuilder |
+setAuthor(java.lang.String author,
+ java.lang.String domain)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setCoordinate(double longtitude,
+ double latitude)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setCoordinateRadius(int radius)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setCreatedTime(java.util.Date createdTime)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setIDstr(java.lang.String id_str_)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setImage(java.lang.String link_)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setPlaceName(java.lang.String name)
+Not required
+ |
+
DAOWrapper.GenericJSONBuilder |
+setUserid(java.lang.String user_id_)
+Not required
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public DAOWrapper.GenericJSONBuilder setAuthor(java.lang.String author, + java.lang.String domain)+
author
- domain
- public DAOWrapper.GenericJSONBuilder setUserid(java.lang.String user_id_)+
user_id_
- public DAOWrapper.GenericJSONBuilder setIDstr(java.lang.String id_str_)+
id_str_
- public DAOWrapper.GenericJSONBuilder setCreatedTime(java.util.Date createdTime)+
createdTime
- public DAOWrapper.GenericJSONBuilder addText(java.lang.String text_)+
text_
- public DAOWrapper.GenericJSONBuilder setPlaceName(java.lang.String name)+
name
- public DAOWrapper.GenericJSONBuilder setCoordinate(double longtitude, + double latitude)+
longtitude
- latitude
- public DAOWrapper.GenericJSONBuilder setCoordinateRadius(int radius)+
radius
- public DAOWrapper.GenericJSONBuilder addField(java.lang.String key, + java.lang.String value)+
key
- value
- public DAOWrapper.GenericJSONBuilder setImage(java.lang.String link_)+
link_
- public void persist()+
public class DAOWrapper
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+DAOWrapper.GenericJSONBuilder |
+
Constructor and Description | +
---|
DAOWrapper() |
+
Modifier and Type | +Method and Description | +
---|---|
static DAOWrapper.GenericJSONBuilder |
+builder() |
+
static void |
+insert(Insertable msg) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static DAOWrapper.GenericJSONBuilder builder()+
public static void insert(Insertable msg)+
public static class ElasticsearchClient.BulkEntry
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
+jsonMap |
+
Constructor and Description | +
---|
BulkEntry(java.lang.String id,
+ java.lang.String type,
+ java.lang.String timestamp_fieldname,
+ java.lang.Long version,
+ java.util.Map<java.lang.String,java.lang.Object> jsonMap)
+initialize entry for bulk writes
+ |
+
public java.util.Map<java.lang.String,java.lang.Object> jsonMap+
public BulkEntry(java.lang.String id, + java.lang.String type, + java.lang.String timestamp_fieldname, + java.lang.Long version, + java.util.Map<java.lang.String,java.lang.Object> jsonMap)+
id
- the id of the entrytype
- the type nametimestamp_fieldname
- the name of the timestamp field, null for unused. If a name is given here, then this field is filled with the current timeversion
- the version number >= 0 for external versioning or null for forced updates without versioningjsonMap
- the payload objectpublic static class ElasticsearchClient.BulkWriteResult
+extends java.lang.Object
+Constructor and Description | +
---|
BulkWriteResult() |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Set<java.lang.String> |
+getCreated() |
+
java.util.Map<java.lang.String,java.lang.String> |
+getErrors() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class ElasticsearchClient.Query
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
java.util.Map<java.lang.String,java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Long>>> |
+aggregations |
+
int |
+hitCount |
+
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
+result |
+
Constructor and Description | +
---|
Query(java.lang.String indexName,
+ QueryBuilder queryBuilder,
+ java.lang.String order_field,
+ int timezoneOffset,
+ int resultCount,
+ long histogram_interval,
+ java.lang.String histogram_timefield,
+ int aggregationLimit,
+ java.lang.String... aggregationFields)
+Search the local message cache using a elasticsearch query.
+ |
+
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> result+
public int hitCount+
public java.util.Map<java.lang.String,java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Long>>> aggregations+
public Query(java.lang.String indexName, + QueryBuilder queryBuilder, + java.lang.String order_field, + int timezoneOffset, + int resultCount, + long histogram_interval, + java.lang.String histogram_timefield, + int aggregationLimit, + java.lang.String... aggregationFields)+
q
- - the query, for aggregation this which should include a time frame in the form since:yyyy-MM-dd until:yyyy-MM-ddorder_field
- - the field to order the results, i.e. Timeline.Order.CREATED_ATtimezoneOffset
- - an offset in minutes that is applied on dates given in the query of the form since:date until:dateresultCount
- - the number of messages in the result; can be zero if only aggregations are wanteddateHistogrammInterval
- - the date aggregation interval or null, if no aggregation wantedaggregationLimit
- - the maximum count of facet entities, not search resultsaggregationFields
- - names of the aggregation fields. If no aggregation is wanted, pass no (zero) field(s)public class ElasticsearchClient
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+ElasticsearchClient.BulkEntry |
+
static class |
+ElasticsearchClient.BulkWriteResult |
+
class |
+ElasticsearchClient.Query |
+
Modifier and Type | +Field and Description | +
---|---|
static ElasticsearchClient.BulkWriteResult |
+EMPTY_BULK_RESULT |
+
Constructor and Description | +
---|
ElasticsearchClient(Settings.Builder settings)
+create a elasticsearch node client (embedded elasticsearch)
+ |
+
ElasticsearchClient(java.lang.String[] addresses,
+ java.lang.String clusterName)
+create a elasticsearch transport client (remote elasticsearch)
+ |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>> |
+classifierScore(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes)
+Get all time aggregations without any geographical constraints.
+ |
+
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>> |
+classifierScore(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes,
+ java.lang.String startDate,
+ java.lang.String endDate)
+Get limited time aggregations without any geographical constraints.
+ |
+
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> |
+classifierScoreForCountry(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes)
+Get all time aggregation by country for all available countries.
+ |
+
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> |
+classifierScoreForCountry(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes,
+ java.util.List<java.lang.String> countries)
+Get all time aggregation by country for required countries.
+ |
+
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> |
+classifierScoreForCountry(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes,
+ java.lang.String startDate,
+ java.lang.String endDate)
+Get limited time aggregation by country code for all available countries.
+ |
+
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> |
+classifierScoreForCountry(java.lang.String index,
+ java.lang.String classifierName,
+ java.util.List<java.lang.String> classes,
+ java.lang.String startDate,
+ java.lang.String endDate,
+ java.util.List<java.lang.String> countries)
+Get limited time aggregation by country code for required countries.
+ |
+
void |
+close()
+Close the connection to the remote elasticsearch client.
+ |
+
boolean |
+clusterReady() |
+
java.lang.String |
+clusterStats() |
+
long |
+count(QueryBuilder q,
+ java.lang.String indexName)
+Get the number of documents in the search index for a given search query
+ |
+
long |
+count(java.lang.String indexName)
+Get the number of documents in the search index
+ |
+
long |
+count(java.lang.String index,
+ java.lang.String histogram_timefield,
+ long millis) |
+
long |
+countLocal(java.lang.String index,
+ java.lang.String provider_hash) |
+
void |
+createIndexIfNotExists(java.lang.String indexName,
+ int shards,
+ int replicas) |
+
boolean |
+delete(java.lang.String indexName,
+ java.lang.String typeName,
+ java.lang.String id)
+Delete a document for a given id.
+ |
+
int |
+deleteBulk(java.lang.String indexName,
+ java.util.Map<java.lang.String,java.lang.String> ids)
+Delete a list of documents for a given set of ids
+ ATTENTION: read about the time-out of version number checking in the method above.
+ |
+
int |
+deleteByQuery(java.lang.String indexName,
+ QueryBuilder q)
+Delete documents using a query.
+ |
+
boolean |
+exist(java.lang.String indexName,
+ java.lang.String typeName,
+ java.lang.String id)
+Get the document for a given id.
+ |
+
java.util.Set<java.lang.String> |
+existBulk(java.lang.String indexName,
+ java.lang.String typeName,
+ java.util.Collection<java.lang.String> ids) |
+
void |
+finalize()
+A finalize method is added to ensure that close() is always called.
+ |
+
java.util.LinkedHashMap<java.lang.String,java.lang.Long> |
+fullDateHistogram(java.lang.String indexName,
+ int timezoneOffset,
+ java.lang.String histogram_timefield) |
+
ResultList<java.util.Map<java.lang.String,java.lang.Object>> |
+fuzzyquery(java.lang.String indexName,
+ java.lang.String fieldName,
+ java.lang.String q,
+ int resultCount,
+ java.lang.String sort_field,
+ java.lang.String default_sort_type,
+ SortOrder sort_order,
+ java.util.Date since,
+ java.util.Date until,
+ java.lang.String range_field)
+Search the local message cache using a elasticsearch query.
+ |
+
ClusterStatsNodes |
+getClusterStatsNodes() |
+
protected static java.util.Map<java.lang.String,java.lang.Object> |
+getMap(GetResponse response) |
+
ClusterStatsNodes |
+getStats()
+Retrieve a statistic object from the connected elasticsearch cluster
+ |
+
java.lang.String |
+getType(java.lang.String indexName,
+ java.lang.String id)
+Get the type name of a document or null if the document does not exist.
+ |
+
java.util.Map<java.lang.String,java.lang.String> |
+nodeSettings() |
+
java.lang.String |
+pendingClusterTasks() |
+
ElasticsearchClient.Query |
+query(java.lang.String indexName,
+ QueryBuilder queryBuilder,
+ java.lang.String order_field,
+ int timezoneOffset,
+ int resultCount,
+ long histogram_interval,
+ java.lang.String histogram_timefield,
+ int aggregationLimit,
+ java.lang.String... aggregationFields) |
+
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
+query(java.lang.String indexName,
+ java.lang.String q,
+ Operator operator,
+ int offset,
+ int count)
+Query with a string and boundaries.
+ |
+
java.util.Map<java.lang.String,java.lang.Object> |
+query(java.lang.String indexName,
+ java.lang.String field_name,
+ java.lang.String field_value) |
+
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
+queryWithConstraints(java.lang.String indexName,
+ java.lang.String fieldName,
+ java.lang.String fieldValue,
+ java.util.Map<java.lang.String,java.lang.String> constraints,
+ boolean latest) |
+
java.util.Map<java.lang.String,java.lang.Object> |
+readMap(java.lang.String indexName,
+ java.lang.String id)
+Read a json document from the search index for a given id.
+ |
+
byte[] |
+readSource(java.lang.String indexName,
+ java.lang.String id)
+Read a document from the search index for a given id.
+ |
+
void |
+setMapping(java.lang.String indexName,
+ XContentBuilder mapping) |
+
boolean |
+wait_ready(long maxtimemillis,
+ ClusterHealthStatus status) |
+
boolean |
+writeMap(java.lang.String indexName,
+ java.util.Map<java.lang.String,java.lang.Object> jsonMap,
+ java.lang.String typeName,
+ java.lang.String id)
+Write a json document into the search index.
+ |
+
ElasticsearchClient.BulkWriteResult |
+writeMapBulk(java.lang.String indexName,
+ java.util.List<ElasticsearchClient.BulkEntry> jsonMapList)
+bulk message write
+ |
+
IndexResponse |
+writeSource(java.lang.String indexName,
+ XContentBuilder json,
+ java.lang.String id,
+ java.lang.String typeName,
+ long version,
+ VersionType versionType)
+Write a json document into the search index.
+ |
+
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final ElasticsearchClient.BulkWriteResult EMPTY_BULK_RESULT+
public ElasticsearchClient(java.lang.String[] addresses, + java.lang.String clusterName)+
addresses
- an array of host:port addressesclusterName
- public ElasticsearchClient(Settings.Builder settings)+
settings
- public ClusterStatsNodes getClusterStatsNodes()+
public boolean clusterReady()+
public boolean wait_ready(long maxtimemillis, + ClusterHealthStatus status)+
public void createIndexIfNotExists(java.lang.String indexName, + int shards, + int replicas)+
public void setMapping(java.lang.String indexName, + XContentBuilder mapping)+
public java.lang.String pendingClusterTasks()+
public java.lang.String clusterStats()+
public java.util.Map<java.lang.String,java.lang.String> nodeSettings()+
public void close()+
public void finalize()+
finalize
in class java.lang.Object
public ClusterStatsNodes getStats()+
public long count(java.lang.String indexName)+
public long count(QueryBuilder q, + java.lang.String indexName)+
q
- the querypublic long count(java.lang.String index, + java.lang.String histogram_timefield, + long millis)+
public long countLocal(java.lang.String index, + java.lang.String provider_hash)+
public boolean exist(java.lang.String indexName, + java.lang.String typeName, + java.lang.String id)+
indexName
- the name of the indextypeName
- the type name, can be set to NULL for all types (see also: getType())id
- the unique identifier of a documentpublic java.util.Set<java.lang.String> existBulk(java.lang.String indexName, + java.lang.String typeName, + java.util.Collection<java.lang.String> ids)+
public java.lang.String getType(java.lang.String indexName, + java.lang.String id)+
indexName
- the name of the indexid
- the unique identifier of a documentpublic boolean delete(java.lang.String indexName, + java.lang.String typeName, + java.lang.String id)+
id
- the unique identifier of a documentpublic int deleteBulk(java.lang.String indexName, + java.util.Map<java.lang.String,java.lang.String> ids)+
ids
- a map from the unique identifier of a document to the document typepublic int deleteByQuery(java.lang.String indexName, + QueryBuilder q)+
q
- public byte[] readSource(java.lang.String indexName, + java.lang.String id)+
id
- the unique identifier of a documentpublic java.util.Map<java.lang.String,java.lang.Object> readMap(java.lang.String indexName, + java.lang.String id)+
id
- the unique identifier of a documentprotected static java.util.Map<java.lang.String,java.lang.Object> getMap(GetResponse response)+
public IndexResponse writeSource(java.lang.String indexName, + XContentBuilder json, + java.lang.String id, + java.lang.String typeName, + long version, + VersionType versionType)+
jsonMap
- the json document to be indexed in elasticsearchid
- the unique identifier of a documentindexName
- the name of the indextypeName
- the type of the indexpublic boolean writeMap(java.lang.String indexName, + java.util.Map<java.lang.String,java.lang.Object> jsonMap, + java.lang.String typeName, + java.lang.String id)+
indexName
- the name of the indexjsonMap
- the json document to be indexed in elasticsearchtypeName
- the type of the indexid
- the unique identifier of a documentpublic ElasticsearchClient.BulkWriteResult writeMapBulk(java.lang.String indexName, + java.util.List<ElasticsearchClient.BulkEntry> jsonMapList)+
jsonMapList
- a list of json documents to be indexedindexName
- the name of the indextypeName
- the type of the indexpublic java.util.List<java.util.Map<java.lang.String,java.lang.Object>> query(java.lang.String indexName, + java.lang.String q, + Operator operator, + int offset, + int count)+
q
- a search query stringoperator
- either AND or OR, the default operator for the query tokensoffset
- the first document number, 0 is the first onecount
- the number of documents to be returnedpublic java.util.Map<java.lang.String,java.lang.Object> query(java.lang.String indexName, + java.lang.String field_name, + java.lang.String field_value)+
public ElasticsearchClient.Query query(java.lang.String indexName, + QueryBuilder queryBuilder, + java.lang.String order_field, + int timezoneOffset, + int resultCount, + long histogram_interval, + java.lang.String histogram_timefield, + int aggregationLimit, + java.lang.String... aggregationFields)+
public ResultList<java.util.Map<java.lang.String,java.lang.Object>> fuzzyquery(java.lang.String indexName, + java.lang.String fieldName, + java.lang.String q, + int resultCount, + java.lang.String sort_field, + java.lang.String default_sort_type, + SortOrder sort_order, + java.util.Date since, + java.util.Date until, + java.lang.String range_field)+
q
- - the query, can be empty for a matchall-queryresultCount
- - the number of messages in the resultsort_field
- - the field name to sort the result list, i.e. "query_first"sort_order
- - the sort order (you want to use SortOrder.DESC here)public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> queryWithConstraints(java.lang.String indexName, + java.lang.String fieldName, + java.lang.String fieldValue, + java.util.Map<java.lang.String,java.lang.String> constraints, + boolean latest) + throws java.io.IOException+
java.io.IOException
public java.util.LinkedHashMap<java.lang.String,java.lang.Long> fullDateHistogram(java.lang.String indexName, + int timezoneOffset, + java.lang.String histogram_timefield)+
public final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>> classifierScore(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes)+
index
- Name of ES indexclassifierName
- Classifier for aggregationclasses
- Classes to considerpublic final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>> classifierScore(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes, + java.lang.String startDate, + java.lang.String endDate)+
index
- Name of ES indexclassifierName
- Classifier for aggregationclasses
- Classes to considerstartDate
- Start date for creation of rowendDate
- End date for creation of rowpublic final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> classifierScoreForCountry(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes, + java.lang.String startDate, + java.lang.String endDate)+
index
- Name of ES indexclassifierName
- Name of classifierclasses
- Classes to considerstartDate
- Start date for creation of rowendDate
- End date for creation of rowpublic final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> classifierScoreForCountry(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes, + java.lang.String startDate, + java.lang.String endDate, + java.util.List<java.lang.String> countries)+
index
- Name of ES indexclassifierName
- Name of classifierclasses
- Classes to considerstartDate
- Start date for creation of rowendDate
- End date for creation of rowcountries
- Country codes to considerpublic final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> classifierScoreForCountry(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes)+
index
- Name of ES indexclassifierName
- Name of classifierclasses
- Classes to considerpublic final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.Double>>> classifierScoreForCountry(java.lang.String index, + java.lang.String classifierName, + java.util.List<java.lang.String> classes, + java.util.List<java.lang.String> countries)+
index
- Name of ES indexclassifierName
- Name of classifierclasses
- Classes to considercountries
- Countiries to considerpublic class ImportProfileFactory +extends AbstractIndexFactory<ImportProfileEntry> +implements IndexFactory<ImportProfileEntry>+
elasticsearch_client, index_name, objectCache
Constructor and Description | +
---|
ImportProfileFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
ImportProfileEntry |
+init(JSONObject map) |
+
close, delete, exists, existsBulk, existsCache, getExistStats, getObjectStats, getStats, read, readJSON, writeEntries, writeEntry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, delete, exists, existsBulk, existsCache, readJSON, writeEntries, writeEntry
public ImportProfileFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public ImportProfileEntry init(JSONObject map) + throws java.io.IOException+
init
in interface IndexFactory<ImportProfileEntry>
java.io.IOException
public class IncomingMessageBuffer
+extends java.lang.Thread
+java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description | +
---|
IncomingMessageBuffer() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+addScheduler(Timeline tl,
+ boolean dump) |
+
static void |
+addScheduler(TwitterScraper.TwitterTweet t,
+ UserEntry u,
+ boolean dump) |
+
static boolean |
+addSchedulerAvailable() |
+
static int |
+getMessageQueueClients() |
+
static int |
+getMessageQueueMaxSize() |
+
static int |
+getMessageQueueSize() |
+
boolean |
+isBusy() |
+
TwitterScraper.TwitterTweet |
+readMessage(java.lang.String id) |
+
void |
+run() |
+
void |
+shutdown()
+ask the thread to shut down
+ |
+
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static int getMessageQueueSize()+
public static int getMessageQueueMaxSize()+
public static int getMessageQueueClients()+
public TwitterScraper.TwitterTweet readMessage(java.lang.String id)+
public void shutdown()+
public boolean isBusy()+
public void run()+
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static void addScheduler(Timeline tl, + boolean dump)+
public static void addScheduler(TwitterScraper.TwitterTweet t, + UserEntry u, + boolean dump)+
public static boolean addSchedulerAvailable()+
public class IndexEntry<IndexObject extends ObjectEntry>
+extends java.lang.Object
+Constructor and Description | +
---|
IndexEntry(java.lang.String id,
+ SourceType type,
+ IndexObject obj) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getId() |
+
IndexObject |
+getObject() |
+
SourceType |
+getType() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public IndexEntry(java.lang.String id, + SourceType type, + IndexObject obj)+
public java.lang.String getId()+
public SourceType getType()+
public IndexObject getObject()+
public interface IndexFactory<Entry extends ObjectEntry>
+Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
boolean |
+delete(java.lang.String id,
+ SourceType sourceType) |
+
boolean |
+exists(java.lang.String id) |
+
java.util.Set<java.lang.String> |
+existsBulk(java.util.Collection<java.lang.String> ids) |
+
boolean |
+existsCache(java.lang.String id) |
+
Entry |
+init(JSONObject json) |
+
JSONObject |
+readJSON(java.lang.String id) |
+
ElasticsearchClient.BulkWriteResult |
+writeEntries(java.util.Collection<IndexEntry<Entry>> entries) |
+
boolean |
+writeEntry(IndexEntry<Entry> entry) |
+
Entry init(JSONObject json) + throws java.io.IOException+
java.io.IOException
boolean exists(java.lang.String id)+
boolean existsCache(java.lang.String id)+
java.util.Set<java.lang.String> existsBulk(java.util.Collection<java.lang.String> ids)+
boolean delete(java.lang.String id, + SourceType sourceType)+
JSONObject readJSON(java.lang.String id)+
boolean writeEntry(IndexEntry<Entry> entry) + throws java.io.IOException+
java.io.IOException
ElasticsearchClient.BulkWriteResult writeEntries(java.util.Collection<IndexEntry<Entry>> entries) + throws java.io.IOException+
java.io.IOException
void close()+
public interface Insertable
+Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getDomain() |
+
java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> |
+getExtraField() |
+
java.lang.String |
+getText() |
+
java.lang.String |
+getUserID() |
+
java.lang.String |
+getUsername() |
+
java.lang.String getText()+
java.lang.String getUsername()+
java.lang.String getUserID()+
java.lang.String getDomain()+
java.util.Collection<java.util.Map.Entry<java.lang.String,java.lang.String>> getExtraField()+
public class MessageFactory +extends AbstractIndexFactory<TwitterScraper.TwitterTweet> +implements IndexFactory<TwitterScraper.TwitterTweet>+
elasticsearch_client, index_name, objectCache
Constructor and Description | +
---|
MessageFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
TwitterScraper.TwitterTweet |
+init(JSONObject json) |
+
close, delete, exists, existsBulk, existsCache, getExistStats, getObjectStats, getStats, read, readJSON, writeEntries, writeEntry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, delete, exists, existsBulk, existsCache, readJSON, writeEntries, writeEntry
public MessageFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public TwitterScraper.TwitterTweet init(JSONObject json)+
init
in interface IndexFactory<TwitterScraper.TwitterTweet>
public class OutgoingMessageBuffer
+extends java.lang.Object
+Constructor and Description | +
---|
OutgoingMessageBuffer() |
+
Modifier and Type | +Method and Description | +
---|---|
Timeline |
+takeTimelineMin(Timeline.Order order,
+ int minsize,
+ int maxsize)
+if the given list of timelines contain at least the wanted minimum size of messages, they are flushed from the queue
+ and combined into a new timeline
+ |
+
int |
+timelineSize() |
+
void |
+transmitMessage(TwitterScraper.TwitterTweet tweet,
+ UserEntry user) |
+
void |
+transmitTimelineToBackend(Timeline tl) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void transmitTimelineToBackend(Timeline tl)+
public void transmitMessage(TwitterScraper.TwitterTweet tweet, + UserEntry user)+
public Timeline takeTimelineMin(Timeline.Order order, + int minsize, + int maxsize)+
order
- minsize
- public int timelineSize()+
public class QueryFactory +extends AbstractIndexFactory<QueryEntry> +implements IndexFactory<QueryEntry>+
elasticsearch_client, index_name, objectCache
Constructor and Description | +
---|
QueryFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
QueryEntry |
+init(JSONObject json) |
+
close, delete, exists, existsBulk, existsCache, getExistStats, getObjectStats, getStats, read, readJSON, writeEntries, writeEntry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, delete, exists, existsBulk, existsCache, readJSON, writeEntries, writeEntry
public QueryFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public QueryEntry init(JSONObject json)+
init
in interface IndexFactory<QueryEntry>
public class UserFactory +extends AbstractIndexFactory<UserEntry> +implements IndexFactory<UserEntry>+
elasticsearch_client, index_name, objectCache
Constructor and Description | +
---|
UserFactory(ElasticsearchClient elasticsearch_client,
+ java.lang.String index_name,
+ int cacheSize,
+ int existSize) |
+
Modifier and Type | +Method and Description | +
---|---|
UserEntry |
+init(JSONObject json) |
+
close, delete, exists, existsBulk, existsCache, getExistStats, getObjectStats, getStats, read, readJSON, writeEntries, writeEntry
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, delete, exists, existsBulk, existsCache, readJSON, writeEntries, writeEntry
public UserFactory(ElasticsearchClient elasticsearch_client, + java.lang.String index_name, + int cacheSize, + int existSize)+
public UserEntry init(JSONObject json)+
init
in interface IndexFactory<UserEntry>
Interface | +Description | +
---|---|
IndexFactory<Entry extends ObjectEntry> | ++ |
Insertable | +
+ This is the interface that allow you to store data in elasticseach index
+ This is a lower level implemention of DAOWrapper.
+ |
+
Class | +Description | +
---|---|
AbstractIndexFactory<IndexObject extends ObjectEntry> | +
+ test calls:
+ curl "http://localhost:9000/api/account.json?screen_name=test"
+ curl -g "http://localhost:9000/api/account.json?action=update&data={\"screen_name\":\"test\",\"apps\":{\"wall\":{\"type\":\"vertical\"}}}"
+ |
+
AccountFactory | ++ |
Campaign | ++ |
Campaigns | ++ |
Classifier | ++ |
DAO | +
+ The Data Access Object for the message project.
+ |
+
DAO.MessageWrapper | ++ |
DAO.SearchLocalMessages | ++ |
DAOWrapper | +
+ The json below is the minimum json
+ {
+ "statuses": [
+ {
+ "id_str": "yourmessageid_1234",
+ "screen_name": "testuser",
+ "created_at": "2016-07-22T07:53:24.000Z",
+ "text": "The rain is spain stays always in the plain",
+ "source_type": "GENERIC",
+ "place_name": "Georgia, USA",
+ "location_point": [3.058579854228782,50.63296878274201],
+ "location_radius": 0,
+ "user": {
+ "user_id": "youruserid_5678",
+ "name": "Mr.
+ |
+
DAOWrapper.GenericJSONBuilder | ++ |
ElasticsearchClient | ++ |
ElasticsearchClient.BulkEntry | ++ |
ElasticsearchClient.BulkWriteResult | ++ |
ImportProfileFactory | ++ |
IncomingMessageBuffer | ++ |
IndexEntry<IndexObject extends ObjectEntry> | ++ |
MessageFactory | ++ |
OutgoingMessageBuffer | +
+ Buffer for outgoing messages which must be pushed to the index with a scheduler
+ |
+
QueryFactory | ++ |
UserFactory | ++ |
Enum | +Description | +
---|---|
Campaigns.State | ++ |
Classifier.Category | ++ |
Classifier.Context | ++ |
DAO.IndexName | ++ |
public abstract class AbstractGeoPoint +extends java.lang.Object +implements GeoPoint+
Constructor and Description | +
---|
AbstractGeoPoint() |
+
Modifier and Type | +Method and Description | +
---|---|
static double |
+distance(double lat1,
+ double lon1,
+ double lat2,
+ double lon2) |
+
double |
+distance(GeoPoint othr)
+compute the distance between two points using the Haversine Algorithm
+ https://en.wikipedia.org/wiki/Haversine_formula
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accuracyLat, accuracyLon, equals, hashCode, lat, lon, toString
public double distance(GeoPoint othr)+
public static double distance(double lat1, + double lon1, + double lat2, + double lon2)+
public static class GeoJsonReader.Feature
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
java.lang.String |
+feature_type |
+
java.lang.String |
+geometry_type |
+
java.lang.String |
+id |
+
java.util.Map<java.lang.String,java.lang.String> |
+properties |
+
Constructor and Description | +
---|
Feature() |
+
Feature(JsonParser parser) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public java.lang.String id+
public java.lang.String feature_type+
public java.lang.String geometry_type+
public java.util.Map<java.lang.String,java.lang.String> properties+
public class GeoJsonReader
+extends java.lang.Object
+implements java.lang.Runnable
+Modifier and Type | +Class and Description | +
---|---|
static class |
+GeoJsonReader.Feature |
+
Modifier and Type | +Field and Description | +
---|---|
static GeoJsonReader.Feature |
+POISON_FEATURE |
+
Constructor and Description | +
---|
GeoJsonReader(java.io.InputStream is,
+ int concurrency) |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+main(java.lang.String[] args) |
+
void |
+run() |
+
GeoJsonReader.Feature |
+take() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final GeoJsonReader.Feature POISON_FEATURE+
public GeoJsonReader(java.io.InputStream is, + int concurrency) + throws JsonParseException, + java.io.IOException+
JsonParseException
java.io.IOException
public void run()+
run
in interface java.lang.Runnable
public GeoJsonReader.Feature take() + throws java.lang.InterruptedException+
java.lang.InterruptedException
public static void main(java.lang.String[] args)+
public class GeoLocation +extends IntegerGeoPoint +implements java.lang.Comparable<GeoLocation>, java.util.Comparator<GeoLocation>+
Constructor and Description | +
---|
GeoLocation(double lat,
+ double lon,
+ java.util.Collection<java.lang.String> names,
+ java.lang.String iso3166cc) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(GeoLocation o1,
+ GeoLocation o2) |
+
int |
+compareTo(GeoLocation o)
+comparator that is needed to use the object inside TreeMap/TreeSet
+ a Location is smaller than another if it has a _greater_ population
+ this order is used to get sorted lists of locations where the first elements
+ have the greatest population
+ |
+
static int |
+degreeToKm(double degree) |
+
boolean |
+equals(java.lang.Object loc)
+equality test that is needed to use the class inside HashMap/HashSet
+ |
+
java.lang.String |
+getISO3166cc() |
+
java.util.Collection<java.lang.String> |
+getNames() |
+
long |
+getPopulation() |
+
void |
+setPopulation(long population2) |
+
java.lang.String |
+toString()
+printout format of the point
+ |
+
accuracyLat, accuracyLon, hashCode, lat, lon, main
distance, distance
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public GeoLocation(double lat, + double lon, + java.util.Collection<java.lang.String> names, + java.lang.String iso3166cc)+
public java.util.Collection<java.lang.String> getNames()+
public java.lang.String getISO3166cc()+
public void setPopulation(long population2)+
public long getPopulation()+
public java.lang.String toString()+
GeoPoint
toString
in interface GeoPoint
toString
in class IntegerGeoPoint
public boolean equals(java.lang.Object loc)+
IntegerGeoPoint
equals
in interface java.util.Comparator<GeoLocation>
equals
in interface GeoPoint
equals
in class IntegerGeoPoint
public int compareTo(GeoLocation o)+
compareTo
in interface java.lang.Comparable<GeoLocation>
public int compare(GeoLocation o1, + GeoLocation o2)+
compare
in interface java.util.Comparator<GeoLocation>
public static int degreeToKm(double degree)+
public class GeoMark +extends GeoLocation +implements GeoPoint+
Constructor and Description | +
---|
GeoMark(GeoLocation loc,
+ double mlat,
+ double mlon) |
+
GeoMark(GeoLocation loc,
+ java.lang.String salt) |
+
Modifier and Type | +Method and Description | +
---|---|
double |
+mlat() |
+
double |
+mlon() |
+
JSONObject |
+toJSON(boolean minified) |
+
compare, compareTo, degreeToKm, equals, getISO3166cc, getNames, getPopulation, setPopulation, toString
accuracyLat, accuracyLon, hashCode, lat, lon, main
distance, distance
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accuracyLat, accuracyLon, distance, equals, hashCode, lat, lon, toString
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public GeoMark(GeoLocation loc, + double mlat, + double mlon)+
public GeoMark(GeoLocation loc, + java.lang.String salt)+
public double mlon()+
public double mlat()+
public JSONObject toJSON(boolean minified)+
public static class GeoNames.CountryBounds
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
double |
+lat_north |
+
double |
+lat_south |
+
double |
+lon_east |
+
double |
+lon_west |
+
Constructor and Description | +
---|
CountryBounds() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+extend(GeoLocation loc) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public double lon_west+
public double lon_east+
public double lat_north+
public double lat_south+
public void extend(GeoLocation loc)+
public class GeoNames
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+GeoNames.CountryBounds |
+
Constructor and Description | +
---|
GeoNames(java.io.File cities1000_zip,
+ java.io.File iso3166json,
+ long minPopulation) |
+
Modifier and Type | +Method and Description | +
---|---|
GeoMark |
+analyse(java.lang.String text,
+ java.lang.String[] tags,
+ int maxlength,
+ java.lang.String salt)
+Analyse a text for the presence of a location name
+ |
+
java.util.List<GeoLocation> |
+citiesInBB(double lon_west,
+ double lat_south,
+ double lon_east,
+ double lat_north) |
+
GeoMark |
+cityNear(double lat,
+ double lon)
+try to find a place close to the given location
+ |
+
double[] |
+getCountryCenter(java.lang.String cc) |
+
java.lang.String |
+getCountryName(java.lang.String iso3166cc) |
+
GeoLocation |
+getLargestCity(double lon_west,
+ double lat_south,
+ double lon_east,
+ double lat_north) |
+
static void |
+main(java.lang.String[] args) |
+
static java.util.LinkedHashMap<java.lang.Integer,java.lang.String> |
+mix(java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.String>> text,
+ int maxlength)
+Create sequences of words from a word token list.
+ |
+
static java.util.LinkedHashMap<java.lang.Integer,java.lang.String> |
+nomix(java.lang.String[] tags)
+Helper function which generates the same result as the mix method using a list of single-word tags.
+ |
+
static java.lang.String |
+normalize(java.lang.String text) |
+
static java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.String>> |
+split(java.lang.String text)
+Split the text into word tokens.
+ |
+
java.util.LinkedHashSet<java.lang.String> |
+suggest(java.lang.String q,
+ int count,
+ int distance) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public GeoNames(java.io.File cities1000_zip, + java.io.File iso3166json, + long minPopulation) + throws java.io.IOException+
java.io.IOException
public java.lang.String getCountryName(java.lang.String iso3166cc)+
public GeoMark analyse(java.lang.String text, + java.lang.String[] tags, + int maxlength, + java.lang.String salt)+
text
- to be analyzedtags
- which could be location names (in favor of texts in the text string)maxlength
- the maximum number of words in the text that are tried to be combined to a location namesalt
- a salt which is used for fuzzyness of the mark locationpublic GeoMark cityNear(double lat, + double lon)+
lat
- lon
- public java.util.List<GeoLocation> citiesInBB(double lon_west, + double lat_south, + double lon_east, + double lat_north)+
public GeoLocation getLargestCity(double lon_west, + double lat_south, + double lon_east, + double lat_north)+
public static java.util.LinkedHashMap<java.lang.Integer,java.lang.String> nomix(java.lang.String[] tags)+
tags
- public static java.util.LinkedHashMap<java.lang.Integer,java.lang.String> mix(java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.String>> text, + int maxlength)+
text
- maxlength
- the maximum sequence length, counts number of wordspublic static java.util.ArrayList<java.util.Map.Entry<java.lang.String,java.lang.String>> split(java.lang.String text)+
text
- public java.util.LinkedHashSet<java.lang.String> suggest(java.lang.String q, + int count, + int distance)+
public static java.lang.String normalize(java.lang.String text)+
public double[] getCountryCenter(java.lang.String cc)+
public static void main(java.lang.String[] args)+
public interface GeoPoint
+Modifier and Type | +Field and Description | +
---|---|
static double |
+meter |
+
Modifier and Type | +Method and Description | +
---|---|
double |
+accuracyLat()
+get the implementation-dependent accuracy of the latitude
+ |
+
double |
+accuracyLon()
+get the implementation-dependent accuracy of the longitude
+ |
+
double |
+distance(GeoPoint othr)
+compute the distance between two points using the Haversine Algorithm
+ https://en.wikipedia.org/wiki/Haversine_formula
+ |
+
boolean |
+equals(java.lang.Object o)
+equality test that is needed to use the class inside HashMap/HashSet
+ |
+
int |
+hashCode()
+compute the hash code of a coordinate
+ this produces identical hash codes for locations that are close to each other
+ |
+
double |
+lat()
+get the latitude of the point
+ |
+
double |
+lon()
+get the longitude of the point
+ |
+
java.lang.String |
+toString()
+printout format of the point
+ |
+
static final double meter+
double lat()+
double lon()+
double accuracyLat()+
double accuracyLon()+
int hashCode()+
hashCode
in class java.lang.Object
boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
double distance(GeoPoint othr)+
othr
- the other pointjava.lang.String toString()+
toString
in class java.lang.Object
public class IntegerGeoPoint +extends AbstractGeoPoint +implements GeoPoint+
Constructor and Description | +
---|
IntegerGeoPoint(double lat,
+ double lon) |
+
IntegerGeoPoint(int lat,
+ int lon) |
+
Modifier and Type | +Method and Description | +
---|---|
double |
+accuracyLat()
+get the implementation-dependent accuracy of the latitude
+ |
+
double |
+accuracyLon()
+get the implementation-dependent accuracy of the longitude
+ |
+
boolean |
+equals(java.lang.Object o)
+equality test that is needed to use the class inside HashMap/HashSet
+ |
+
int |
+hashCode()
+compute the hash code of a coordinate
+ this produces identical hash codes for locations that are close to each other
+ |
+
double |
+lat()
+get the latitude of the point
+ |
+
double |
+lon()
+get the longitude of the point
+ |
+
static void |
+main(java.lang.String[] args) |
+
java.lang.String |
+toString()
+printout format of the point
+ |
+
distance, distance
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public IntegerGeoPoint(double lat, + double lon)+
public IntegerGeoPoint(int lat, + int lon)+
public double lat()+
GeoPoint
public double lon()+
GeoPoint
public double accuracyLat()+
accuracyLat
in interface GeoPoint
public double accuracyLon()+
accuracyLon
in interface GeoPoint
public int hashCode()+
public boolean equals(java.lang.Object o)+
public java.lang.String toString()+
GeoPoint
public static void main(java.lang.String[] args)+
public enum LocationSource +extends java.lang.Enum<LocationSource>+
Enum Constant and Description | +
---|
ANNOTATION |
+
PLACE |
+
REPORT |
+
USER |
+
Modifier and Type | +Method and Description | +
---|---|
static LocationSource |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static LocationSource[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final LocationSource USER+
public static final LocationSource REPORT+
public static final LocationSource PLACE+
public static final LocationSource ANNOTATION+
public static LocationSource[] values()+
+for (LocationSource c : LocationSource.values()) + System.out.println(c); +
public static LocationSource valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static class OSMTile.TileCoordinates
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
double |
+east_lon |
+
int |
+n |
+
double |
+north_lat |
+
double |
+south_lat |
+
double |
+west_lon |
+
int |
+xtile |
+
int |
+ytile |
+
int |
+zoom |
+
Constructor and Description | +
---|
TileCoordinates(double lat_deg,
+ double lon_deg,
+ int zoom) |
+
TileCoordinates(int xtile,
+ int ytile,
+ int zoom) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+url(int retry) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public int xtile+
public int ytile+
public int zoom+
public int n+
public double north_lat+
public double south_lat+
public double east_lon+
public double west_lon+
public class OSMTile
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+OSMTile.TileCoordinates |
+
Modifier and Type | +Method and Description | +
---|---|
static RasterPlotter |
+getCombinedTiles(OSMTile.TileCoordinates t,
+ int width,
+ int height)
+generate a image according to a given coordinate of a middle tile
+ and a width and height of tile numbers.
+ |
+
static java.awt.image.BufferedImage |
+getSingleTile(OSMTile.TileCoordinates tile,
+ int retry) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static RasterPlotter getCombinedTiles(OSMTile.TileCoordinates t, + int width, + int height)+
t
- the middle tilewidth
- number of tilesheight
- number of tilespublic static java.awt.image.BufferedImage getSingleTile(OSMTile.TileCoordinates tile, + int retry)+
Interface | +Description | +
---|---|
GeoPoint | +
+ Geolocation storage may vary using different data structures for the points.
+ |
+
Class | +Description | +
---|---|
AbstractGeoPoint | ++ |
GeoJsonReader | +
+ High-efficient GeoJson parser (high-efficient because it is able to handle very large input files, much larger than
+ the main memory can hold (i.e.
+ |
+
GeoJsonReader.Feature | ++ |
GeoLocation | ++ |
GeoMark | ++ |
GeoNames | ++ |
GeoNames.CountryBounds | ++ |
IntegerGeoPoint | +
+ GeoPoint implementation with Integer accuracy
+ |
+
OSMTile | ++ |
OSMTile.TileCoordinates | ++ |
Enum | +Description | +
---|---|
LocationSource | ++ |
public class AnimationGIF
+extends java.lang.Object
+Constructor and Description | +
---|
AnimationGIF(int loops)
+create a gif animation producer
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addImage(java.awt.image.RenderedImage image,
+ int delayMillis,
+ int transparencyColorIndex)
+add an image to the animation
+ |
+
byte[] |
+get()
+produce the gif image as byte array
+ |
+
static void |
+main(java.lang.String[] args) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AnimationGIF(int loops)+
loops
- - number of loops for the animated images. -1 = no loops; 0 = indefinitely loops; else: number of loopspublic void addImage(java.awt.image.RenderedImage image, + int delayMillis, + int transparencyColorIndex) + throws java.io.IOException+
image
- the imagedelayMillis
- the frame time of the image in millisecondstransparencyColorIndex
- the index of the transparent color, -1 if not usedjava.io.IOException
public byte[] get()+
public static void main(java.lang.String[] args)+
public static class AnimationPlotter.Frame
+extends java.lang.Object
+public class AnimationPlotter
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+AnimationPlotter.Frame |
+
Constructor and Description | +
---|
AnimationPlotter() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addFrame(java.awt.image.BufferedImage image,
+ int delayMillis) |
+
void |
+save(java.io.File path,
+ java.lang.String filestub,
+ java.lang.String type) |
+
void |
+show()
+show the images as stream of JFrame on desktop
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void addFrame(java.awt.image.BufferedImage image, + int delayMillis)+
public void save(java.io.File path, + java.lang.String filestub, + java.lang.String type) + throws java.io.IOException+
java.io.IOException
public void show()+
public class ChartPlotter +extends RasterPlotter+
RasterPlotter.DrawMode, RasterPlotter.FilterMode
Modifier and Type | +Field and Description | +
---|---|
static int |
+DIMENSION_ANOT0 |
+
static int |
+DIMENSION_ANOT1 |
+
static int |
+DIMENSION_ANOT2 |
+
static int |
+DIMENSION_ANOT3 |
+
static int |
+DIMENSION_BOTTOM |
+
static int |
+DIMENSION_LEFT |
+
static int |
+DIMENSION_RIGHT |
+
static int |
+DIMENSION_TOP |
+
Constructor and Description | +
---|
ChartPlotter(int width,
+ int height,
+ java.lang.Long backgroundColor,
+ java.lang.Long foregroundColor,
+ java.lang.Long lightColor,
+ int leftborder,
+ int rightborder,
+ int topborder,
+ int bottomborder,
+ java.lang.String name,
+ java.lang.String subline) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+chartDot(int dimension_x,
+ int dimension_y,
+ float coord_x,
+ int coord_y,
+ int dotsize,
+ java.lang.String anot,
+ int anotAngle) |
+
void |
+chartLine(int dimension_x,
+ int dimension_y,
+ float coord_x1,
+ int coord_y1,
+ float coord_x2,
+ int coord_y2) |
+
void |
+declareDimension(int dimensionType,
+ int scale,
+ int pixelperscale,
+ int offset,
+ java.lang.Long colorNaming,
+ java.lang.Long colorScale,
+ java.lang.String name)
+assign a metric to a graph.
+ |
+
static void |
+main(java.lang.String[] args) |
+
antialiasing, arc, arc, arcArc, arcArc, arcConnect, arcDot, arcLine, blur, clear, convertToIndexed, darkColor, darkColor, demoPaint, dot, exportImage, exportPng, getHeight, getImage, getPixel, getPixel, getWidth, insertBitmap, insertBitmap, insertBitmap, insertBitmap, insertBitmap, insertBitmap, invert, invertColor, line, line, lineArrow, lineDot, plot, plot, pngEncode, save, setColor, setDrawMode, setPixel, show, toIndexed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int DIMENSION_RIGHT+
public static final int DIMENSION_TOP+
public static final int DIMENSION_LEFT+
public static final int DIMENSION_BOTTOM+
public static final int DIMENSION_ANOT0+
public static final int DIMENSION_ANOT1+
public static final int DIMENSION_ANOT2+
public static final int DIMENSION_ANOT3+
public ChartPlotter(int width, + int height, + java.lang.Long backgroundColor, + java.lang.Long foregroundColor, + java.lang.Long lightColor, + int leftborder, + int rightborder, + int topborder, + int bottomborder, + java.lang.String name, + java.lang.String subline)+
public void declareDimension(int dimensionType, + int scale, + int pixelperscale, + int offset, + java.lang.Long colorNaming, + java.lang.Long colorScale, + java.lang.String name)+
dimensionType
- scale
- is the measure (the number) to be printed on the border per pixelscalepixelperscale
- is the number of pixel points per scaleoffset
- is an offset on the 'scale' numbercolorNaming
- the colour of the legend for the scalecolorScale
- the colour of the line drawing for the vertical scalename
- printed on the vertical barpublic void chartDot(int dimension_x, + int dimension_y, + float coord_x, + int coord_y, + int dotsize, + java.lang.String anot, + int anotAngle)+
public void chartLine(int dimension_x, + int dimension_y, + float coord_x1, + int coord_y1, + float coord_x2, + int coord_y2)+
public static void main(java.lang.String[] args)+
public class CircleTool
+extends java.lang.Object
+Constructor and Description | +
---|
CircleTool() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+circle(RasterPlotter matrix,
+ int xc,
+ int yc,
+ int radius,
+ int intensity) |
+
static void |
+circle(RasterPlotter matrix,
+ int xc,
+ int yc,
+ int radius,
+ int fromArc,
+ int toArc) |
+
static void |
+clearcache() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void clearcache()+
public static void circle(RasterPlotter matrix, + int xc, + int yc, + int radius, + int intensity)+
public static void circle(RasterPlotter matrix, + int xc, + int yc, + int radius, + int fromArc, + int toArc)+
public static class GraphPlotter.Point
+extends java.lang.Object
+implements java.lang.Cloneable
+Modifier and Type | +Field and Description | +
---|---|
int |
+layer |
+
double |
+x |
+
double |
+y |
+
Constructor and Description | +
---|
Point(double x,
+ double y,
+ int layer) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Object |
+clone() |
+
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static class GraphPlotter.Ribbon
+extends java.lang.Object
+public class GraphPlotter
+extends java.lang.Object
+implements java.lang.Cloneable
+Modifier and Type | +Class and Description | +
---|---|
static class |
+GraphPlotter.Point |
+
static class |
+GraphPlotter.Ribbon |
+
Constructor and Description | +
---|
GraphPlotter() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addNode(java.lang.String node,
+ double x,
+ double y,
+ int layer) |
+
void |
+addNode(java.lang.String node,
+ GraphPlotter.Point p) |
+
java.lang.Object |
+clone() |
+
RasterPlotter |
+draw(int width,
+ int height,
+ int leftborder,
+ int rightborder,
+ int topborder,
+ int bottomborder,
+ int xraster,
+ int yraster,
+ java.lang.String color_back,
+ java.lang.String color_dot0,
+ java.lang.String color_dota,
+ java.lang.String color_line,
+ java.lang.String color_lineend,
+ java.lang.String color_text) |
+
static void |
+force(GraphPlotter.Point calcPoint,
+ GraphPlotter.Point currentPoint,
+ GraphPlotter.Point otherPoint,
+ GraphPlotter.Ribbon r) |
+
java.util.Collection<java.lang.String> |
+getEdges(java.lang.String node,
+ boolean start) |
+
GraphPlotter.Point |
+getNode(java.lang.String node) |
+
boolean |
+hasEdge(java.lang.String fromNode,
+ java.lang.String toNode) |
+
void |
+normalize() |
+
int |
+normalizeHorizontal() |
+
int |
+normalizeVertical() |
+
GraphPlotter |
+physics(GraphPlotter.Ribbon all,
+ GraphPlotter.Ribbon edges) |
+
void |
+print() |
+
void |
+setEdge(java.lang.String fromNode,
+ java.lang.String toNode) |
+
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public java.lang.Object clone()+
clone
in class java.lang.Object
public static void force(GraphPlotter.Point calcPoint, + GraphPlotter.Point currentPoint, + GraphPlotter.Point otherPoint, + GraphPlotter.Ribbon r)+
public GraphPlotter physics(GraphPlotter.Ribbon all, + GraphPlotter.Ribbon edges)+
public GraphPlotter.Point getNode(java.lang.String node)+
public int normalizeVertical()+
public int normalizeHorizontal()+
public void normalize()+
public void addNode(java.lang.String node, + GraphPlotter.Point p)+
public void addNode(java.lang.String node, + double x, + double y, + int layer)+
public boolean hasEdge(java.lang.String fromNode, + java.lang.String toNode)+
public void setEdge(java.lang.String fromNode, + java.lang.String toNode)+
public java.util.Collection<java.lang.String> getEdges(java.lang.String node, + boolean start)+
public void print()+
public RasterPlotter draw(int width, + int height, + int leftborder, + int rightborder, + int topborder, + int bottomborder, + int xraster, + int yraster, + java.lang.String color_back, + java.lang.String color_dot0, + java.lang.String color_dota, + java.lang.String color_line, + java.lang.String color_lineend, + java.lang.String color_text)+
public class HexGridPlotter +extends RasterPlotter+
RasterPlotter.DrawMode, RasterPlotter.FilterMode
Constructor and Description | +
---|
HexGridPlotter(int width,
+ int height,
+ RasterPlotter.DrawMode drawMode,
+ java.lang.String backgroundColor,
+ int cellwidth) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+drawGrid(java.lang.String colorNaming) |
+
void |
+gridDot(int x,
+ int y,
+ int radius,
+ boolean filled,
+ int intensity) |
+
void |
+gridDot(int x,
+ int y,
+ int radius,
+ int fromArc,
+ int toArc) |
+
int |
+gridHeight() |
+
void |
+gridLine(int Ax,
+ int Ay,
+ int Bx,
+ int By) |
+
void |
+gridLine(int Ax,
+ int Ay,
+ int Bx,
+ int By,
+ java.lang.String colorLine,
+ int intensityLine,
+ java.lang.String colorDot,
+ int intensityDot,
+ int dotDist,
+ int dotPos,
+ int dotRadius,
+ boolean dotFilled) |
+
void |
+gridPrint(int x,
+ int y,
+ int radius,
+ java.lang.String messageHigh,
+ java.lang.String messageLow,
+ int align,
+ int intensity) |
+
void |
+gridPrint315(int x,
+ int y,
+ int radius,
+ java.lang.String message315,
+ int intensity) |
+
int |
+gridWidth() |
+
static void |
+main(java.lang.String[] args) |
+
antialiasing, arc, arc, arcArc, arcArc, arcConnect, arcDot, arcLine, blur, clear, convertToIndexed, darkColor, darkColor, demoPaint, dot, exportImage, exportPng, getHeight, getImage, getPixel, getPixel, getWidth, insertBitmap, insertBitmap, insertBitmap, insertBitmap, insertBitmap, insertBitmap, invert, invertColor, line, line, lineArrow, lineDot, plot, plot, pngEncode, save, setColor, setDrawMode, setPixel, show, toIndexed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public HexGridPlotter(int width, + int height, + RasterPlotter.DrawMode drawMode, + java.lang.String backgroundColor, + int cellwidth)+
public int gridWidth()+
public int gridHeight()+
public void drawGrid(java.lang.String colorNaming)+
public void gridDot(int x, + int y, + int radius, + boolean filled, + int intensity)+
public void gridDot(int x, + int y, + int radius, + int fromArc, + int toArc)+
public void gridPrint(int x, + int y, + int radius, + java.lang.String messageHigh, + java.lang.String messageLow, + int align, + int intensity)+
public void gridPrint315(int x, + int y, + int radius, + java.lang.String message315, + int intensity)+
public void gridLine(int Ax, + int Ay, + int Bx, + int By)+
public void gridLine(int Ax, + int Ay, + int Bx, + int By, + java.lang.String colorLine, + int intensityLine, + java.lang.String colorDot, + int intensityDot, + int dotDist, + int dotPos, + int dotRadius, + boolean dotFilled)+
public static void main(java.lang.String[] args)+
public class PrintTool
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static void |
+arcPrint(RasterPlotter matrix,
+ int cx,
+ int cy,
+ int radius,
+ double angle,
+ java.lang.String message,
+ int intensity)
+print a string at the distance of a circle
+ |
+
static void |
+print(RasterPlotter matrix,
+ int x,
+ int y,
+ int angle,
+ char letter,
+ boolean tilt,
+ int intensity) |
+
static void |
+print(RasterPlotter matrix,
+ int x,
+ int y,
+ int angle,
+ java.lang.String message,
+ int align,
+ boolean tilt,
+ int intensity) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void print(RasterPlotter matrix, + int x, + int y, + int angle, + char letter, + boolean tilt, + int intensity)+
public static void print(RasterPlotter matrix, + int x, + int y, + int angle, + java.lang.String message, + int align, + boolean tilt, + int intensity)+
public static void arcPrint(RasterPlotter matrix, + int cx, + int cy, + int radius, + double angle, + java.lang.String message, + int intensity)+
matrix
- the RasterPlottercx
- center of circle, xcy
- center of circle, yradius
- radius == distance of text from circle centerangle
- angle == position of text on a circle in distance of radiusmessage
- the message to be printedpublic static enum RasterPlotter.DrawMode +extends java.lang.Enum<RasterPlotter.DrawMode>+
Enum Constant and Description | +
---|
MODE_ADD |
+
MODE_REPLACE |
+
MODE_SUB |
+
Modifier and Type | +Method and Description | +
---|---|
static RasterPlotter.DrawMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RasterPlotter.DrawMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RasterPlotter.DrawMode MODE_REPLACE+
public static final RasterPlotter.DrawMode MODE_ADD+
public static final RasterPlotter.DrawMode MODE_SUB+
public static RasterPlotter.DrawMode[] values()+
+for (RasterPlotter.DrawMode c : RasterPlotter.DrawMode.values()) + System.out.println(c); +
public static RasterPlotter.DrawMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum RasterPlotter.FilterMode +extends java.lang.Enum<RasterPlotter.FilterMode>+
Enum Constant and Description | +
---|
FILTER_ANTIALIASING |
+
FILTER_BLUR |
+
FILTER_INVERT |
+
Modifier and Type | +Method and Description | +
---|---|
static RasterPlotter.FilterMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RasterPlotter.FilterMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RasterPlotter.FilterMode FILTER_ANTIALIASING+
public static final RasterPlotter.FilterMode FILTER_BLUR+
public static final RasterPlotter.FilterMode FILTER_INVERT+
public static RasterPlotter.FilterMode[] values()+
+for (RasterPlotter.FilterMode c : RasterPlotter.FilterMode.values()) + System.out.println(c); +
public static RasterPlotter.FilterMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class RasterPlotter
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+RasterPlotter.DrawMode |
+
static class |
+RasterPlotter.FilterMode |
+
Modifier and Type | +Field and Description | +
---|---|
static long |
+BLUE |
+
static long |
+GREEN |
+
static long |
+GREY |
+
protected int |
+height |
+
static double |
+PI180 |
+
static double |
+PI2 |
+
static double |
+PI32 |
+
static double |
+PI4 |
+
static long |
+RED |
+
static double |
+TL |
+
protected int |
+width |
+
Constructor and Description | +
---|
RasterPlotter(int width,
+ int height,
+ RasterPlotter.DrawMode drawMode,
+ long backgroundColor) |
+
RasterPlotter(int width,
+ int height,
+ RasterPlotter.DrawMode drawMode,
+ java.lang.String backgroundColor) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+antialiasing(int ulx,
+ int uly,
+ int lrx,
+ int lry,
+ int bgcolor)
+antialiasing filter for a square part of the image
+ |
+
void |
+arc(int x,
+ int y,
+ int innerRadius,
+ int outerRadius,
+ int intensity) |
+
void |
+arc(int x,
+ int y,
+ int innerRadius,
+ int outerRadius,
+ int fromArc,
+ int toArc) |
+
void |
+arcArc(int cx,
+ int cy,
+ int arcRadius,
+ double angle,
+ int innerRadius,
+ int outerRadius,
+ int intensity) |
+
void |
+arcArc(int cx,
+ int cy,
+ int arcRadius,
+ double angle,
+ int innerRadius,
+ int outerRadius,
+ int fromArc,
+ int toArc) |
+
void |
+arcConnect(int cx,
+ int cy,
+ int arcRadius,
+ double angle1,
+ double angle2,
+ boolean in,
+ java.lang.Long colorLine,
+ int intensityLine,
+ java.lang.Long colorDot,
+ int intensityDot,
+ int dotDist,
+ int dotPos,
+ int dotRadius,
+ boolean dotFilled,
+ java.lang.String message,
+ java.lang.Long colorMessage,
+ int intensityMessage)
+draw a connecting line between two points on a circle
+ |
+
void |
+arcDot(int cx,
+ int cy,
+ int arcRadius,
+ double angle,
+ int dotRadius) |
+
void |
+arcLine(int cx,
+ int cy,
+ int innerRadius,
+ int outerRadius,
+ double angle,
+ boolean in,
+ java.lang.Long colorLine,
+ java.lang.Long colorDot,
+ int dotDist,
+ int dotPos,
+ int dotRadius,
+ boolean dotFilled)
+draw a portion of a line from the center of a circle
+ |
+
void |
+blur(int ulx,
+ int uly,
+ int lrx,
+ int lry)
+blur filter for a square part of the image
+ |
+
void |
+clear()
+Deletes all pixels of image and sets them to previously defined
+ background color.
+ |
+
static java.awt.image.BufferedImage |
+convertToIndexed(java.awt.image.BufferedImage src) |
+
static boolean |
+darkColor(long c) |
+
static boolean |
+darkColor(java.lang.String s) |
+
static void |
+demoPaint(RasterPlotter m) |
+
void |
+dot(int x,
+ int y,
+ int radius,
+ boolean filled,
+ int intensity) |
+
static java.io.ByteArrayOutputStream |
+exportImage(java.awt.image.BufferedImage image,
+ java.lang.String targetExt) |
+
java.io.ByteArrayOutputStream |
+exportPng() |
+
int |
+getHeight() |
+
java.awt.image.BufferedImage |
+getImage() |
+
int[] |
+getPixel(int x,
+ int y) |
+
int[] |
+getPixel(int x,
+ int y,
+ int[] c) |
+
int |
+getWidth() |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y)
+inserts image
+ |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y,
+ int transRGB)
+inserts image where all pixels that have the same RGB value as the
+ pixel at (xx, yy) are transparent
+ |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y,
+ int xx,
+ int yy)
+inserts image where all pixels which have the same RGB value as the
+ pixel at (xx, yy) are transparent
+ |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y,
+ int xx,
+ int yy,
+ RasterPlotter.FilterMode filter)
+inserts image where all pixels that have the same RGB value as the
+ pixel at (xx, yy) are transparent
+ |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y,
+ int transRGB,
+ RasterPlotter.FilterMode filter)
+inserts image where all pixels that have a special RGB value
+ pixel at (xx, yy) are transparent
+ |
+
void |
+insertBitmap(java.awt.image.BufferedImage bitmap,
+ int x,
+ int y,
+ RasterPlotter.FilterMode filter)
+inserts image
+ |
+
void |
+invert(int ulx,
+ int uly,
+ int lrx,
+ int lry)
+invert filter for a square part of the image
+ |
+
static long |
+invertColor(long color) |
+
void |
+line(int Ax,
+ int Ay,
+ int Bx,
+ int By,
+ int intensity) |
+
void |
+line(int Ax,
+ int Ay,
+ int Bx,
+ int By,
+ java.lang.Long colorLine,
+ int intensityLine,
+ java.lang.Long colorDot,
+ int intensityDot,
+ int dotDist,
+ int dotPos,
+ int dotRadius,
+ boolean dotFilled)
+draw a line using Bresenham's line drawing algorithm.
+ |
+
void |
+lineArrow(int x0,
+ int y0,
+ int x1,
+ int y1,
+ int sidelength,
+ int padding,
+ long lineColor,
+ long arrowColor)
+draw a line with an arrow at the end
+ |
+
void |
+lineDot(int x0,
+ int y0,
+ int x1,
+ int y1,
+ int radius,
+ int padding,
+ long lineColor,
+ long dotColor)
+draw a line with a dot at the end
+ |
+
static void |
+main(java.lang.String[] args) |
+
void |
+plot(int x,
+ int y) |
+
void |
+plot(int x,
+ int y,
+ int intensity) |
+
byte[] |
+pngEncode(int compressionLevel) |
+
void |
+save(java.io.File file,
+ java.lang.String type)
+save the image to a file
+ |
+
void |
+setColor(long c) |
+
void |
+setDrawMode(RasterPlotter.DrawMode drawMode) |
+
void |
+setPixel(int x,
+ int y,
+ int[] c) |
+
void |
+show()
+show the image as JFrame on desktop
+ |
+
java.awt.image.BufferedImage |
+toIndexed() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final double PI180+
public static final double PI4+
public static final double PI2+
public static final double PI32+
public static final double TL+
public static final long RED+
public static final long GREEN+
public static final long BLUE+
public static final long GREY+
protected final int width+
protected final int height+
public RasterPlotter(int width, + int height, + RasterPlotter.DrawMode drawMode, + java.lang.String backgroundColor)+
public RasterPlotter(int width, + int height, + RasterPlotter.DrawMode drawMode, + long backgroundColor)+
public final void clear()+
public static long invertColor(long color)+
public void setDrawMode(RasterPlotter.DrawMode drawMode)+
public java.awt.image.BufferedImage getImage()+
public int getWidth()+
public int getHeight()+
public static boolean darkColor(java.lang.String s)+
public static boolean darkColor(long c)+
public int[] getPixel(int x, + int y)+
public int[] getPixel(int x, + int y, + int[] c)+
public void setPixel(int x, + int y, + int[] c)+
public void setColor(long c)+
public void plot(int x, + int y)+
public void plot(int x, + int y, + int intensity)+
public void line(int Ax, + int Ay, + int Bx, + int By, + int intensity)+
public void line(int Ax, + int Ay, + int Bx, + int By, + java.lang.Long colorLine, + int intensityLine, + java.lang.Long colorDot, + int intensityDot, + int dotDist, + int dotPos, + int dotRadius, + boolean dotFilled)+
Ax
- Ay
- Bx
- By
- colorLine
- intensityLine
- colorDot
- intensityDot
- dotDist
- dotPos
- dotRadius
- dotFilled
- public void lineDot(int x0, + int y0, + int x1, + int y1, + int radius, + int padding, + long lineColor, + long dotColor)+
x0
- start pointy0
- start pointx1
- end pointy1
- end pointradius
- radius of the dotpadding
- the distance of the dot border to the end pointlineColor
- the color of the linedotColor
- the color of the dotpublic void lineArrow(int x0, + int y0, + int x1, + int y1, + int sidelength, + int padding, + long lineColor, + long arrowColor)+
x0
- start pointy0
- start pointx1
- end pointy1
- end pointsidelength
- the side length of the arrow tip (all 3 sides are equal)padding
- the distance of the arrow tip to the end pointlineColor
- the color of the linearrowColor
- the color of the arrow tippublic void dot(int x, + int y, + int radius, + boolean filled, + int intensity)+
public void arc(int x, + int y, + int innerRadius, + int outerRadius, + int intensity)+
public void arc(int x, + int y, + int innerRadius, + int outerRadius, + int fromArc, + int toArc)+
public void arcLine(int cx, + int cy, + int innerRadius, + int outerRadius, + double angle, + boolean in, + java.lang.Long colorLine, + java.lang.Long colorDot, + int dotDist, + int dotPos, + int dotRadius, + boolean dotFilled)+
cx
- center of circle, xcy
- center of circle, yinnerRadius
- inner radius of lineouterRadius
- outer radius of lineangle
- angle within the circle for the linein
- direction, if true: inward. This is the moving direction of dots, if dotRadius is alternated from 0 to 360colorLine
- the color of the linecolorDot
- the color of the dotdotDist
- the distance of two dotsdotPos
- the start position of the first dotdotRadius
- the radius of the dotdotFilled
- if true: dot is filled.public void arcDot(int cx, + int cy, + int arcRadius, + double angle, + int dotRadius)+
public void arcConnect(int cx, + int cy, + int arcRadius, + double angle1, + double angle2, + boolean in, + java.lang.Long colorLine, + int intensityLine, + java.lang.Long colorDot, + int intensityDot, + int dotDist, + int dotPos, + int dotRadius, + boolean dotFilled, + java.lang.String message, + java.lang.Long colorMessage, + int intensityMessage)+
cx
- center of circle, xcy
- center of circle, yarcRadius
- radius of circleangle1
- position of dot 1 on circleangle2
- position of dot 2 on circlein
- direction of dots on line; in=true means: inwardscolorLine
- intensityLine
- colorDot
- intensityDot
- dotDist
- dotPos
- dotRadius
- dotFilled
- public void arcArc(int cx, + int cy, + int arcRadius, + double angle, + int innerRadius, + int outerRadius, + int intensity)+
public void arcArc(int cx, + int cy, + int arcRadius, + double angle, + int innerRadius, + int outerRadius, + int fromArc, + int toArc)+
public void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedpublic void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y, + RasterPlotter.FilterMode filter)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedfilter
- chooses filterpublic void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y, + int xx, + int yy)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedxx
- x-value of pixel that determines which color is transparentyy
- y-value of pixel that determines which color is transparentpublic void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y, + int xx, + int yy, + RasterPlotter.FilterMode filter)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedxx
- x-value of pixel that determines which color is transparentyy
- y-value of pixel that determines which color is transparentfilter
- filter to be appliedpublic void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y, + int transRGB)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedrgb
- RGB value which will be transparentpublic void insertBitmap(java.awt.image.BufferedImage bitmap, + int x, + int y, + int transRGB, + RasterPlotter.FilterMode filter)+
bitmap
- bitmap to be insertedx
- x-value of upper left coordinate where bitmap will be placedy
- y-value of upper left coordinate where bitmap will be placedrgb
- RGB value which will be transparentfilter
- filter to be appliedpublic void antialiasing(int ulx, + int uly, + int lrx, + int lry, + int bgcolor)+
ulx
- x-value for upper left coordinateuly
- y-value for upper left coordinatelrx
- x-value for lower right coordinatelry
- y-value for lower right coordinatergb
- color of backgroundpublic void blur(int ulx, + int uly, + int lrx, + int lry)+
ulx
- x-value for upper left coordinateuly
- y-value for upper left coordinatelrx
- x-value for lower right coordinatelry
- y-value for lower right coordinatepublic void invert(int ulx, + int uly, + int lrx, + int lry)+
ulx
- x-value for upper left coordinateuly
- y-value for upper left coordinatelrx
- x-value for lower right coordinatelry
- y-value for lower right coordinatepublic static void demoPaint(RasterPlotter m)+
public java.awt.image.BufferedImage toIndexed()+
public static java.awt.image.BufferedImage convertToIndexed(java.awt.image.BufferedImage src)+
public static java.io.ByteArrayOutputStream exportImage(java.awt.image.BufferedImage image, + java.lang.String targetExt)+
public java.io.ByteArrayOutputStream exportPng()+
public void save(java.io.File file, + java.lang.String type) + throws java.io.IOException+
file
- the storage filetype
- the file type, may be i.e. 'png' or 'gif'java.io.IOException
public void show()+
public final byte[] pngEncode(int compressionLevel) + throws java.io.IOException+
java.io.IOException
public static void main(java.lang.String[] args)+
Class | +Description | +
---|---|
AnimationGIF | ++ |
AnimationPlotter | ++ |
AnimationPlotter.Frame | ++ |
ChartPlotter | ++ |
CircleTool | ++ |
GraphPlotter | ++ |
GraphPlotter.Point | ++ |
GraphPlotter.Ribbon | ++ |
HexGridPlotter | ++ |
PrintTool | ++ |
RasterPlotter | +
+ This Class implements some convenience-methods to support drawing of statistical Data
+ It is not intended to replace existing awt-funktions even if it looks so
+ This class provides some drawing methods that creates transparency effects that
+ are not available in awt.
+ |
+
Enum | +Description | +
---|---|
RasterPlotter.DrawMode | ++ |
RasterPlotter.FilterMode | ++ |
public abstract class BaseScraper +extends AbstractAPIHandler+
Modifier and Type | +Field and Description | +
---|---|
protected java.lang.String |
+baseUrl |
+
protected java.util.Map<java.lang.String,java.lang.String> |
+extra |
+
protected java.lang.String |
+html |
+
protected java.lang.String |
+midUrl |
+
protected Timeline2.Order |
+order |
+
protected ProviderType |
+provider_type |
+
protected java.lang.String |
+query |
+
protected java.lang.String |
+scraperName |
+
protected SourceType |
+source_type |
+
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
BaseScraper() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+bufferedReaderToString(java.io.BufferedReader br) |
+
Timeline2 |
+getData() |
+
Post |
+getDataFromConnection() |
+
Post |
+getDataFromConnection(java.lang.String url) |
+
Post |
+getDataFromConnection(java.lang.String url,
+ java.lang.String type) |
+
java.lang.String |
+getExtraValue(java.lang.String key) |
+
java.io.BufferedReader |
+getHtml(ClientConnection connection) |
+
protected abstract java.lang.String |
+prepareSearchUrl(java.lang.String type) |
+
protected abstract Post |
+scrape(java.io.BufferedReader br,
+ java.lang.String type,
+ java.lang.String url) |
+
JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
protected void |
+setExtra(java.util.Map<java.lang.String,java.lang.String> _extra) |
+
protected void |
+setExtra(Query call) |
+
protected void |
+setExtraValue(java.lang.String key,
+ java.lang.String value) |
+
protected abstract void |
+setParam() |
+
createRandomString, deleteLoginCookie, doGet, doPost, getDefaultPermissions, getHash, getIdentity, getMinimalBaseUserRole, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAPIPath
protected java.lang.String scraperName+
protected java.lang.String html+
protected java.lang.String baseUrl+
protected java.lang.String midUrl+
protected java.lang.String query+
protected SourceType source_type+
protected ProviderType provider_type+
protected java.util.Map<java.lang.String,java.lang.String> extra+
protected final Timeline2.Order order+
public JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
serviceImpl
in class AbstractAPIHandler
APIException
protected void setExtra(Query call)+
protected void setExtra(java.util.Map<java.lang.String,java.lang.String> _extra)+
public java.lang.String getExtraValue(java.lang.String key)+
protected void setExtraValue(java.lang.String key, + java.lang.String value)+
protected abstract void setParam()+
protected abstract java.lang.String prepareSearchUrl(java.lang.String type)+
public Timeline2 getData()+
public Post getDataFromConnection(java.lang.String url, + java.lang.String type) + throws java.io.IOException+
java.io.IOException
public Post getDataFromConnection(java.lang.String url) + throws java.io.IOException+
java.io.IOException
public Post getDataFromConnection() + throws java.io.IOException+
java.io.IOException
public java.io.BufferedReader getHtml(ClientConnection connection)+
protected abstract Post scrape(java.io.BufferedReader br, + java.lang.String type, + java.lang.String url)+
public java.lang.String bufferedReaderToString(java.io.BufferedReader br) + throws java.io.IOException+
java.io.IOException
public enum HarvestingFrequency +extends java.lang.Enum<HarvestingFrequency>+
Enum Constant and Description | +
---|
A_DAY |
+
AN_HOUR |
+
NEVER |
+
SIX_HOURS |
+
THIRTY_MIN |
+
THREE_HOURS |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getFrequency() |
+
static HarvestingFrequency |
+valueOf(int frequency) |
+
static HarvestingFrequency |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static HarvestingFrequency[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final HarvestingFrequency THIRTY_MIN+
public static final HarvestingFrequency AN_HOUR+
public static final HarvestingFrequency THREE_HOURS+
public static final HarvestingFrequency SIX_HOURS+
public static final HarvestingFrequency A_DAY+
public static final HarvestingFrequency NEVER+
public static HarvestingFrequency[] values()+
+for (HarvestingFrequency c : HarvestingFrequency.values()) + System.out.println(c); +
public static HarvestingFrequency valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getFrequency()+
public static HarvestingFrequency valueOf(int frequency)+
java.lang.IllegalArgumentException
- when frequency value is not permitted (not declared as an enum)public static enum JsonFieldConverter.JsonConversionSchemaEnum +extends java.lang.Enum<JsonFieldConverter.JsonConversionSchemaEnum>+
Enum Constant and Description | +
---|
FOSSASIA |
+
FREIFUNK_NODE |
+
NETMON_NODE |
+
NODELIST_NODE |
+
OPENWIFIMAP |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getFilename() |
+
static JsonFieldConverter.JsonConversionSchemaEnum |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static JsonFieldConverter.JsonConversionSchemaEnum[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final JsonFieldConverter.JsonConversionSchemaEnum FOSSASIA+
public static final JsonFieldConverter.JsonConversionSchemaEnum OPENWIFIMAP+
public static final JsonFieldConverter.JsonConversionSchemaEnum NODELIST_NODE+
public static final JsonFieldConverter.JsonConversionSchemaEnum FREIFUNK_NODE+
public static final JsonFieldConverter.JsonConversionSchemaEnum NETMON_NODE+
public static JsonFieldConverter.JsonConversionSchemaEnum[] values()+
+for (JsonFieldConverter.JsonConversionSchemaEnum c : JsonFieldConverter.JsonConversionSchemaEnum.values()) + System.out.println(c); +
public static JsonFieldConverter.JsonConversionSchemaEnum valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getFilename()+
public class JsonFieldConverter
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonFieldConverter.JsonConversionSchemaEnum |
+
Constructor and Description | +
---|
JsonFieldConverter(JsonFieldConverter.JsonConversionSchemaEnum conversionSchema) |
+
Modifier and Type | +Method and Description | +
---|---|
JSONArray |
+convert(JSONArray initialJson) |
+
JSONObject |
+convert(JSONObject initialJson) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonFieldConverter(JsonFieldConverter.JsonConversionSchemaEnum conversionSchema) + throws java.io.IOException+
java.io.IOException
public JSONArray convert(JSONArray initialJson) + throws java.io.IOException+
java.io.IOException
public JSONObject convert(JSONObject initialJson) + throws java.io.IOException+
java.io.IOException
public static enum JsonValidator.JsonSchemaEnum +extends java.lang.Enum<JsonValidator.JsonSchemaEnum>+
Enum Constant and Description | +
---|
FOSSASIA |
+
FREIFUNK_NODE |
+
NODELIST |
+
OPENWIFIMAP |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getFilename() |
+
SourceType |
+getSourceType() |
+
static JsonValidator.JsonSchemaEnum |
+valueOf(SourceType sourceType) |
+
static JsonValidator.JsonSchemaEnum |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static JsonValidator.JsonSchemaEnum[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final JsonValidator.JsonSchemaEnum FOSSASIA+
public static final JsonValidator.JsonSchemaEnum OPENWIFIMAP+
public static final JsonValidator.JsonSchemaEnum NODELIST+
public static final JsonValidator.JsonSchemaEnum FREIFUNK_NODE+
public static JsonValidator.JsonSchemaEnum[] values()+
+for (JsonValidator.JsonSchemaEnum c : JsonValidator.JsonSchemaEnum.values()) + System.out.println(c); +
public static JsonValidator.JsonSchemaEnum valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getFilename()+
public SourceType getSourceType()+
public static JsonValidator.JsonSchemaEnum valueOf(SourceType sourceType)+
public class JsonValidator
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonValidator.JsonSchemaEnum |
+
Constructor and Description | +
---|
JsonValidator(JsonValidator.JsonSchemaEnum schemaEnum) |
+
Modifier and Type | +Method and Description | +
---|---|
ProcessingReport |
+validate(java.lang.String jsonText) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonValidator(JsonValidator.JsonSchemaEnum schemaEnum) + throws java.io.IOException+
java.io.IOException
public class Post +extends JSONObject+
Modifier and Type | +Field and Description | +
---|---|
protected java.lang.String |
+postId |
+
protected long |
+timestamp |
+
NULL
Modifier | +Constructor and Description | +
---|---|
|
+Post() |
+
|
+Post(boolean wrapper) |
+
|
+Post(JSONObject json) |
+
protected |
+Post(long timestamp) |
+
|
+Post(java.lang.String data,
+ java.lang.String query) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getPostId() |
+
long |
+getTimestamp() |
+
java.util.Date |
+getTimestampDate() |
+
boolean |
+isWrapper() |
+
void |
+setPostId(java.lang.String postId) |
+
void |
+setTimestamp() |
+
void |
+setTimestamp(long timestamp) |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected long timestamp+
protected java.lang.String postId+
public Post()+
public Post(boolean wrapper)+
public Post(JSONObject json)+
public Post(java.lang.String data, + java.lang.String query)+
protected Post(long timestamp)+
public long getTimestamp()+
public void setTimestamp(long timestamp)+
public void setTimestamp()+
public java.util.Date getTimestampDate()+
public void setPostId(java.lang.String postId)+
public java.lang.String getPostId()+
public boolean isWrapper()+
public class PushThread
+extends java.lang.Object
+implements java.lang.Runnable
+Constructor and Description | +
---|
PushThread(java.lang.String peer,
+ Timeline tl) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+run() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class RedirectUnshortener
+extends java.lang.Object
+Constructor and Description | +
---|
RedirectUnshortener() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+main(java.lang.String[] args) |
+
static java.lang.String |
+unShorten(java.lang.String urlstring) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class TwitterAPI
+extends java.lang.Object
+Constructor and Description | +
---|
TwitterAPI() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+correctLocation(JSONObject map)
+beautify given location information.
+ |
+
static void |
+enrichLocation(JSONObject map)
+enrich the user data with geocoding information
+ |
+
static TwitterFactory |
+getAppTwitterFactory() |
+
static int |
+getFollowerIdRemaining() |
+
static JSONObject |
+getFollowersNames(java.lang.String screen_name,
+ int max_count) |
+
static int |
+getFollowingIdRemaining() |
+
static JSONObject |
+getFollowingNames(java.lang.String screen_name,
+ int max_count) |
+
static JSONObject |
+getNetwork(java.lang.String screen_name,
+ int maxFollowers,
+ int maxFollowing) |
+
static JSONObject |
+getNetworkerNames(java.lang.String screen_name,
+ int max_count,
+ org.loklak.harvester.TwitterAPI.Networker networkRelation) |
+
static RateLimitStatus |
+getRateLimitStatus(java.lang.String rate_type) |
+
static java.util.Map<java.lang.String,java.lang.Number> |
+getScreenName(java.util.Set<java.lang.Number> id_strs,
+ int maxFollowers,
+ boolean lookupLocalUsersByUserId)
+search for twitter user names by a given set of user id's
+ |
+
static JSONObject |
+getUser(java.lang.String screen_name,
+ boolean forceReload) |
+
static int |
+getUserRemaining() |
+
static TwitterFactory |
+getUserTwitterFactory(java.lang.String screen_name) |
+
static void |
+main(java.lang.String[] args) |
+
static JSONObject |
+user2json(User user) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static TwitterFactory getAppTwitterFactory()+
public static TwitterFactory getUserTwitterFactory(java.lang.String screen_name)+
public static RateLimitStatus getRateLimitStatus(java.lang.String rate_type) + throws TwitterException+
TwitterException
public static int getUserRemaining()+
public static JSONObject getUser(java.lang.String screen_name, + boolean forceReload) + throws TwitterException, + java.io.IOException+
TwitterException
java.io.IOException
public static JSONObject user2json(User user) + throws java.io.IOException+
java.io.IOException
public static void enrichLocation(JSONObject map)+
map
- the user jsonpublic static void correctLocation(JSONObject map)+
map
- public static JSONObject getNetwork(java.lang.String screen_name, + int maxFollowers, + int maxFollowing) + throws java.io.IOException, + TwitterException+
java.io.IOException
TwitterException
public static int getFollowerIdRemaining()+
public static int getFollowingIdRemaining()+
public static JSONObject getFollowersNames(java.lang.String screen_name, + int max_count) + throws java.io.IOException, + TwitterException+
java.io.IOException
TwitterException
public static JSONObject getFollowingNames(java.lang.String screen_name, + int max_count) + throws java.io.IOException, + TwitterException+
java.io.IOException
TwitterException
public static JSONObject getNetworkerNames(java.lang.String screen_name, + int max_count, + org.loklak.harvester.TwitterAPI.Networker networkRelation) + throws java.io.IOException, + TwitterException+
java.io.IOException
TwitterException
public static java.util.Map<java.lang.String,java.lang.Number> getScreenName(java.util.Set<java.lang.Number> id_strs, + int maxFollowers, + boolean lookupLocalUsersByUserId) + throws java.io.IOException, + TwitterException+
id_strs
- lookupLocalUsersByUserId
- if this is true and successful, the resulting names may contain users without user info in the user dumpjava.io.IOException
TwitterException
public static void main(java.lang.String[] args)+
public static class TwitterScraper.TwitterTweet +extends MessageEntry +implements java.lang.Runnable+
MessageEntry.TextLinkMap
audio, canonical_id, created_at, favourites_count, images, location_mark, location_point, location_radius, location_source, on, parent, place_context, place_country, place_id, place_name, postId, provider_hash, provider_type, retweet_count, retweet_from, RICH_TEXT_SEPARATOR, screen_name, source_type, status_id_url, text, timestampDate, to, videos
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
TwitterTweet() |
+
TwitterTweet(JSONObject json) |
+
TwitterTweet(java.lang.String user_screen_name_raw,
+ long created_at_raw,
+ java.lang.String created_at_name_raw,
+ java.lang.String status_id_url_raw,
+ java.lang.String text_raw,
+ long retweets,
+ long favourites,
+ java.util.Collection<java.lang.String> images,
+ java.util.Collection<java.lang.String> videos,
+ java.lang.String place_name,
+ java.lang.String place_id,
+ UserEntry user,
+ boolean writeToIndex,
+ boolean writeToBackend) |
+
Modifier and Type | +Method and Description | +
---|---|
UserEntry |
+getUser() |
+
boolean |
+isReady() |
+
void |
+run() |
+
boolean |
+waitReady(long millis) |
+
boolean |
+willBeTimeConsuming() |
+
enrich, getAudio, getClassifier, getClassifierProbability, getCreatedAt, getFavouritesCount, getHashtags, getHosts, getId, getImages, getLinks, getLocationMark, getLocationPoint, getLocationRadius, getLocationSource, getMentions, getOn, getPlaceContext, getPlaceId, getPlaceName, getPostId, getProviderHash, getProviderType, getRetweetCount, getRetweetFrom, getScreenName, getSourceType, getStatusIdUrl, getText, getText, getTextLength, getTimestampDate, getTo, getVideos, html2utf8, html2utf8Custom, setCreatedAt, setFavouritesCount, setImages, setImages, setImages, setLocationMark, setLocationPoint, setLocationRadius, setLocationSource, setOn, setPlaceId, setPlaceName, setProviderHash, setProviderType, setRetweetCount, setRetweetFrom, setScreenName, setSourceType, setStatusIdUrl, setText, setTo, toJSON, toJSON
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, toString, writeArray, writeArray, writeArray, writeDate
getTimestamp, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public TwitterTweet(java.lang.String user_screen_name_raw, + long created_at_raw, + java.lang.String created_at_name_raw, + java.lang.String status_id_url_raw, + java.lang.String text_raw, + long retweets, + long favourites, + java.util.Collection<java.lang.String> images, + java.util.Collection<java.lang.String> videos, + java.lang.String place_name, + java.lang.String place_id, + UserEntry user, + boolean writeToIndex, + boolean writeToBackend) + throws java.net.MalformedURLException+
java.net.MalformedURLException
public TwitterTweet(JSONObject json)+
public TwitterTweet() + throws java.net.MalformedURLException+
java.net.MalformedURLException
public UserEntry getUser()+
public boolean willBeTimeConsuming()+
public void run()+
run
in interface java.lang.Runnable
public boolean isReady()+
public boolean waitReady(long millis)+
public class TwitterScraper
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+TwitterScraper.TwitterTweet |
+
Modifier and Type | +Field and Description | +
---|---|
static java.util.regex.Pattern |
+emoji_pattern_span |
+
static java.util.concurrent.ExecutorService |
+executor |
+
Constructor and Description | +
---|
TwitterScraper() |
+
Modifier and Type | +Method and Description | +
---|---|
static java.lang.String[] |
+fetchTwitterVideos(java.lang.String tweetUrl) |
+
static void |
+main(java.lang.String[] args)
+Usage: java twitter4j.examples.search.SearchTweets [query]
+ |
+
static Timeline |
+search(java.lang.String query,
+ java.util.ArrayList<java.lang.String> filterList,
+ Timeline.Order order,
+ boolean writeToIndex,
+ boolean writeToBackend,
+ int jointime) |
+
static Timeline |
+search(java.lang.String query,
+ Timeline.Order order,
+ boolean writeToIndex,
+ boolean writeToBackend,
+ int jointime) |
+
static java.lang.String |
+unshorten(java.lang.String text) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.util.concurrent.ExecutorService executor+
public static final java.util.regex.Pattern emoji_pattern_span+
public static Timeline search(java.lang.String query, + java.util.ArrayList<java.lang.String> filterList, + Timeline.Order order, + boolean writeToIndex, + boolean writeToBackend, + int jointime)+
public static Timeline search(java.lang.String query, + Timeline.Order order, + boolean writeToIndex, + boolean writeToBackend, + int jointime)+
public static java.lang.String[] fetchTwitterVideos(java.lang.String tweetUrl)+
public static java.lang.String unshorten(java.lang.String text)+
public static void main(java.lang.String[] args)+
args
- search querypublic class WeiboInfoScraper
+extends java.lang.Object
+Constructor and Description | +
---|
WeiboInfoScraper() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addCookie(java.lang.String cookie) |
+
java.lang.String |
+get(java.lang.String url) |
+
static void |
+main(java.lang.String[] args) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public class YoutubeScraper +extends BaseScraper+
baseUrl, extra, html, midUrl, order, provider_type, query, scraperName, source_type
defaultAnonymousTime, defaultCookieTime
Constructor and Description | +
---|
YoutubeScraper() |
+
YoutubeScraper(java.util.Map<java.lang.String,java.lang.String> _extra) |
+
YoutubeScraper(java.lang.String _query) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
Post |
+getDataFromConnection() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
Post |
+parseVideo(java.io.BufferedReader br,
+ java.lang.String type,
+ java.lang.String url) |
+
Post |
+parseVideo(java.io.File file,
+ java.lang.String type,
+ java.lang.String url) |
+
Post |
+parseVideo(java.io.InputStream is,
+ java.lang.String type,
+ java.lang.String url) |
+
protected java.lang.String |
+prepareSearchUrl(java.lang.String type) |
+
protected Post |
+scrape(java.io.BufferedReader br,
+ java.lang.String type,
+ java.lang.String url) |
+
protected void |
+setParam() |
+
bufferedReaderToString, getData, getDataFromConnection, getDataFromConnection, getExtraValue, getHtml, serviceImpl, setExtra, setExtra, setExtraValue
createRandomString, deleteLoginCookie, doGet, doPost, getHash, getIdentity, getServerProtocolHostStub, service
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public YoutubeScraper()+
public YoutubeScraper(java.util.Map<java.lang.String,java.lang.String> _extra)+
public YoutubeScraper(java.lang.String _query)+
public java.lang.String getAPIPath()+
public BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
getMinimalBaseUserRole
in class AbstractAPIHandler
public JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
getDefaultPermissions
in class AbstractAPIHandler
protected java.lang.String prepareSearchUrl(java.lang.String type)+
prepareSearchUrl
in class BaseScraper
public Post getDataFromConnection() + throws java.io.IOException+
getDataFromConnection
in class BaseScraper
java.io.IOException
protected void setParam()+
setParam
in class BaseScraper
protected Post scrape(java.io.BufferedReader br, + java.lang.String type, + java.lang.String url)+
scrape
in class BaseScraper
public Post parseVideo(java.io.File file, + java.lang.String type, + java.lang.String url)+
public Post parseVideo(java.io.InputStream is, + java.lang.String type, + java.lang.String url)+
public Post parseVideo(java.io.BufferedReader br, + java.lang.String type, + java.lang.String url)+
Class | +Description | +
---|---|
BaseScraper | ++ |
JsonFieldConverter | ++ |
JsonValidator | +
+ Validate json file against json schema
+ |
+
Post | ++ |
PushThread | ++ |
RedirectUnshortener | ++ |
TwitterAPI | ++ |
TwitterScraper | ++ |
TwitterScraper.TwitterTweet | ++ |
WeiboInfoScraper | ++ |
YoutubeScraper | ++ |
Enum | +Description | +
---|---|
HarvestingFrequency | ++ |
JsonFieldConverter.JsonConversionSchemaEnum | ++ |
JsonValidator.JsonSchemaEnum | ++ |
Modifier and Type | +Field and Description | +
---|---|
java.util.concurrent.ExecutorService |
+executor |
+
Constructor and Description | +
---|
ClassicHarvester() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+checkContext(java.lang.String s,
+ boolean front) |
+
void |
+checkContext(Timeline tl,
+ boolean front) |
+
int |
+harvest()
+This method is in-charge of harvesting and scraping messages
+ |
+
void |
+stop()
+This method is executed when Loklak is shutting down
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public final java.util.concurrent.ExecutorService executor+
public void checkContext(Timeline tl, + boolean front)+
public void checkContext(java.lang.String s, + boolean front)+
public int harvest()+
Harvester
public interface Harvester
+Modifier and Type | +Method and Description | +
---|---|
int |
+harvest()
+This method is in-charge of harvesting and scraping messages
+ |
+
void |
+stop()
+This method is executed when Loklak is shutting down
+ |
+
public class KaizenHarvester +extends java.lang.Object +implements Harvester+
Constructor and Description | +
---|
KaizenHarvester() |
+
KaizenHarvester(KaizenQueries queries) |
+
Modifier and Type | +Method and Description | +
---|---|
protected double |
+getScore(TwitterScraper.TwitterTweet message) |
+
int |
+harvest()
+This method is in-charge of harvesting and scraping messages
+ |
+
protected boolean |
+shallHarvest() |
+
void |
+stop()
+This method is executed when Loklak is shutting down
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public KaizenHarvester(KaizenQueries queries)+
public KaizenHarvester()+
protected boolean shallHarvest()+
protected double getScore(TwitterScraper.TwitterTweet message)+
public int harvest()+
Harvester
public abstract class KaizenQueries
+extends java.lang.Object
+Constructor and Description | +
---|
KaizenQueries() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+addQuery(java.lang.String query) |
+
abstract boolean |
+addQuery(java.lang.String query,
+ double score) |
+
static KaizenQueries |
+getDefaultKaizenQueries(int qLimit) |
+
abstract int |
+getMaxSize() |
+
abstract java.lang.String |
+getQuery() |
+
abstract int |
+getSize() |
+
boolean |
+isEmpty() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean addQuery(java.lang.String query)+
public abstract boolean addQuery(java.lang.String query, + double score)+
public abstract java.lang.String getQuery()+
public abstract int getSize()+
public abstract int getMaxSize()+
public boolean isEmpty()+
public static KaizenQueries getDefaultKaizenQueries(int qLimit)+
public static class PriorityKaizenHarvester.PriorityKaizenQueries +extends KaizenQueries+
Constructor and Description | +
---|
PriorityKaizenQueries(int size) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+addQuery(java.lang.String query,
+ double score) |
+
int |
+getMaxSize() |
+
java.lang.String |
+getQuery() |
+
int |
+getSize() |
+
addQuery, getDefaultKaizenQueries, isEmpty
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public PriorityKaizenQueries(int size)+
public boolean addQuery(java.lang.String query, + double score)+
addQuery
in class KaizenQueries
public java.lang.String getQuery()+
getQuery
in class KaizenQueries
public int getSize()+
getSize
in class KaizenQueries
public int getMaxSize()+
getMaxSize
in class KaizenQueries
public class PriorityKaizenHarvester +extends KaizenHarvester+
Modifier and Type | +Class and Description | +
---|---|
static class |
+PriorityKaizenHarvester.PriorityKaizenQueries |
+
Constructor and Description | +
---|
PriorityKaizenHarvester() |
+
getScore, harvest, shallHarvest, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Interface | +Description | +
---|---|
Harvester | ++ |
Class | +Description | +
---|---|
ClassicHarvester | ++ |
KaizenHarvester | +
+ KaizenHarvester
+
+ Kaizen is targeted to do more information and query grabbing, whether it
+ uses the official Twitter API, meta-data from collected tweets, or the
+ analysis of tweets.
+ |
+
KaizenQueries | +
+ KaizenQueries are objects that holds the query strings for KaizenHarvester.
+ |
+
PriorityKaizenHarvester | ++ |
PriorityKaizenHarvester.PriorityKaizenQueries | ++ |
public class AccessTracker.Track +extends JSONObject+
NULL
Constructor and Description | +
---|
Track(java.lang.String serialized) |
+
Track(java.lang.String servlet,
+ java.lang.String clientHost,
+ java.lang.String referrer) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+finalize() |
+
java.lang.String |
+getClientHost() |
+
java.util.Date |
+getDate() |
+
long |
+getTimeSinceLastAccess() |
+
boolean |
+isDoSBlackout() |
+
boolean |
+isDoSServicereduction() |
+
boolean |
+isLocalhostAccess() |
+
void |
+setDoSBlackout(boolean doS_blackout) |
+
void |
+setDoSServicereduction(boolean doS_servicereduction) |
+
void |
+setQuery(java.util.Map<java.lang.String,java.lang.String> qm) |
+
void |
+setTimeSinceLastAccess(long time_since_last_access) |
+
java.lang.String |
+toString()
+Make a JSON text of this JSONObject.
+ |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Track(java.lang.String servlet, + java.lang.String clientHost, + java.lang.String referrer)+
public Track(java.lang.String serialized)+
public java.lang.String getClientHost()+
public java.util.Date getDate()+
public long getTimeSinceLastAccess()+
public void setTimeSinceLastAccess(long time_since_last_access)+
public boolean isDoSBlackout()+
public void setDoSBlackout(boolean doS_blackout)+
public boolean isDoSServicereduction()+
public void setDoSServicereduction(boolean doS_servicereduction)+
public boolean isLocalhostAccess()+
public void setQuery(java.util.Map<java.lang.String,java.lang.String> qm)+
public java.lang.String toString()+
JSONObject
+ Warning: This method assumes that the data structure is acyclical.
toString
in class JSONObject
{
(left
+ brace) and ending with }
(right
+ brace).public void finalize()+
finalize
in class java.lang.Object
public class AccessTracker
+extends java.lang.Thread
+Modifier and Type | +Class and Description | +
---|---|
class |
+AccessTracker.Track |
+
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EVENT_PREFIX |
+
static int |
+MAX_FINISHED |
+
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description | +
---|
AccessTracker(java.io.File dump_dir,
+ java.lang.String dump_file_prefix,
+ long track_timeout,
+ long schedule_period) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
java.util.Collection<AccessTracker.Track> |
+getTracks() |
+
void |
+run() |
+
AccessTracker.Track |
+startTracking(java.lang.String servlet,
+ java.lang.String clientHost,
+ java.lang.String referrer) |
+
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final java.lang.String EVENT_PREFIX+
public static final int MAX_FINISHED+
public AccessTracker(java.io.File dump_dir, + java.lang.String dump_file_prefix, + long track_timeout, + long schedule_period) + throws java.io.IOException+
java.io.IOException
public java.util.Collection<AccessTracker.Track> getTracks()+
public void run()+
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void close()+
public AccessTracker.Track startTracking(java.lang.String servlet, + java.lang.String clientHost, + java.lang.String referrer)+
public class ClientConnection
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+CHARSET |
+
static PoolingHttpClientConnectionManager |
+cm |
+
static byte[] |
+CRLF |
+
java.io.BufferedInputStream |
+inputStream |
+
static java.lang.String |
+USER_AGENT |
+
Constructor and Description | +
---|
ClientConnection(java.lang.String urlstring)
+GET request
+ |
+
ClientConnection(java.lang.String urlstring,
+ boolean useAuthentication)
+GET request
+ |
+
ClientConnection(java.lang.String urlstring,
+ java.util.Map<java.lang.String,byte[]> map)
+POST request
+ |
+
ClientConnection(java.lang.String urlstring,
+ java.util.Map<java.lang.String,byte[]> map,
+ boolean useAuthentication)
+POST request
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
static byte[] |
+download(java.lang.String source_url) |
+
static byte[] |
+download(java.lang.String source_url,
+ boolean useAuthentication) |
+
static void |
+download(java.lang.String source_url,
+ java.io.File target_file) |
+
static void |
+download(java.lang.String source_url,
+ java.io.File target_file,
+ boolean useAuthentication) |
+
static byte[] |
+downloadPeer(java.lang.String source_url) |
+
static void |
+downloadPeer(java.lang.String source_url,
+ java.io.File target_file) |
+
static CloseableHttpClient |
+getCustomClosableHttpClient(boolean useAuthentication) |
+
static java.lang.String |
+getHTML(HttpEntity httpEntity)
+Get body of HttpEntity as String
+ |
+
static java.lang.String |
+getLocationHeader(HttpResponse httpResponse)
+Find value of location header from the given HttpResponse
+ |
+
static java.lang.String |
+getMetaRedirectURL(HttpEntity httpEntity)
+Get redirect URL from Meta tag in response body
+ |
+
static java.lang.String |
+getRedirect(java.lang.String urlstring)
+get a redirect for an url: this method shall be called if it is expected that a url
+ is redirected to another url.
+ |
+
static java.lang.String |
+getRedirect(java.lang.String urlstring,
+ boolean useAuthentication) |
+
static java.lang.String |
+getRedirect(java.lang.String urlstring,
+ boolean useAuthentication,
+ boolean isGet)
+get a redirect for an url: this method shall be called if it is expected that a url
+ is redirected to another url.
+ |
+
int |
+getStatusCode() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String USER_AGENT+
public static final java.lang.String CHARSET+
public static final byte[] CRLF+
public static PoolingHttpClientConnectionManager cm+
public java.io.BufferedInputStream inputStream+
public ClientConnection(java.lang.String urlstring, + boolean useAuthentication) + throws java.io.IOException+
urlstring
- useAuthentication
- java.io.IOException
public ClientConnection(java.lang.String urlstring) + throws java.io.IOException+
urlstring
- java.io.IOException
public ClientConnection(java.lang.String urlstring, + java.util.Map<java.lang.String,byte[]> map, + boolean useAuthentication) + throws ClientProtocolException, + java.io.IOException+
urlstring
- map
- useAuthentication
- ClientProtocolException
java.io.IOException
public ClientConnection(java.lang.String urlstring, + java.util.Map<java.lang.String,byte[]> map) + throws ClientProtocolException, + java.io.IOException+
urlstring
- map
- ClientProtocolException
java.io.IOException
public static CloseableHttpClient getCustomClosableHttpClient(boolean useAuthentication)+
public static java.lang.String getHTML(HttpEntity httpEntity) + throws java.io.IOException+
httpREntity
- java.io.IOException
- when readLine failspublic static java.lang.String getMetaRedirectURL(HttpEntity httpEntity) + throws java.io.IOException+
httpEntity
- java.io.IOException
- when getHTML() failspublic static java.lang.String getLocationHeader(HttpResponse httpResponse)+
httpResponse
- public static java.lang.String getRedirect(java.lang.String urlstring, + boolean useAuthentication, + boolean isGet) + throws java.io.IOException+
urlstring
- useAuthentication
- isGet
- java.io.IOException
- if there is some error with the linkpublic static java.lang.String getRedirect(java.lang.String urlstring) + throws java.io.IOException+
urlstring
- java.io.IOException
public static java.lang.String getRedirect(java.lang.String urlstring, + boolean useAuthentication) + throws java.io.IOException+
java.io.IOException
public void close()+
public static void download(java.lang.String source_url, + java.io.File target_file, + boolean useAuthentication)+
public static void download(java.lang.String source_url, + java.io.File target_file)+
public static void downloadPeer(java.lang.String source_url, + java.io.File target_file)+
public static byte[] download(java.lang.String source_url, + boolean useAuthentication) + throws java.io.IOException+
java.io.IOException
public int getStatusCode()+
public static byte[] download(java.lang.String source_url) + throws java.io.IOException+
java.io.IOException
public static byte[] downloadPeer(java.lang.String source_url) + throws java.io.IOException+
java.io.IOException
public interface CookieRequest
+Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+body() |
+
java.lang.String |
+cookie() |
+
CookieRequest |
+makeRequest() |
+
CookieRequest makeRequest()+
java.lang.String body()+
java.lang.String cookie()+
public class CookieRequestManager
+extends java.lang.Object
+Constructor and Description | +
---|
CookieRequestManager() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addCookie(java.lang.String cookie) |
+
CookieRequest |
+buildRequest(java.lang.String url) |
+
int |
+cookieCount() |
+
boolean |
+delCookie(java.lang.String cookie) |
+
static java.lang.String |
+inputStream2String(java.io.InputStream is) |
+
static void |
+main(java.lang.String[] args) |
+
java.lang.String |
+randGetCookie() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void addCookie(java.lang.String cookie)+
public boolean delCookie(java.lang.String cookie)+
public int cookieCount()+
public java.lang.String randGetCookie()+
public static java.lang.String inputStream2String(java.io.InputStream is) + throws java.io.IOException+
java.io.IOException
public CookieRequest buildRequest(java.lang.String url)+
public static void main(java.lang.String[] args)+
public static enum RemoteAccess.FileType +extends java.lang.Enum<RemoteAccess.FileType>+
Enum Constant and Description | +
---|
GIF |
+
JPG |
+
JSON |
+
PNG |
+
RSS |
+
UNKNOWN |
+
Modifier and Type | +Method and Description | +
---|---|
static RemoteAccess.FileType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RemoteAccess.FileType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RemoteAccess.FileType UNKNOWN+
public static final RemoteAccess.FileType PNG+
public static final RemoteAccess.FileType JPG+
public static final RemoteAccess.FileType GIF+
public static final RemoteAccess.FileType JSON+
public static final RemoteAccess.FileType RSS+
public static RemoteAccess.FileType[] values()+
+for (RemoteAccess.FileType c : RemoteAccess.FileType.values()) + System.out.println(c); +
public static RemoteAccess.FileType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static class RemoteAccess.FileTypeEncoding
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
boolean |
+base64 |
+
RemoteAccess.FileType |
+fileType |
+
public final RemoteAccess.FileType fileType+
public final boolean base64+
public class RemoteAccess
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+RemoteAccess.FileType |
+
static class |
+RemoteAccess.FileTypeEncoding |
+
Modifier and Type | +Field and Description | +
---|---|
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,RemoteAccess>> |
+history |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+addLocalhost(java.lang.String h) |
+
static void |
+addReferrer(java.util.regex.Pattern p) |
+
static Query |
+evaluate(HttpServletRequest request) |
+
long |
+getAccessTime() |
+
static RemoteAccess.FileTypeEncoding |
+getFileType(HttpServletRequest request) |
+
int |
+getLocalHTTPPort() |
+
int |
+getLocalHTTPSPort() |
+
java.lang.String |
+getLocalPath() |
+
java.lang.String |
+getPeername() |
+
static java.util.Map<java.lang.String,byte[]> |
+getPostMap(HttpServletRequest request) |
+
static java.util.Map<java.lang.String,java.lang.String> |
+getQueryMap(java.lang.String query) |
+
java.lang.String |
+getRemoteHost() |
+
static java.lang.String |
+hostHash(java.lang.String remoteHost) |
+
static boolean |
+isLocalhost(java.lang.String host,
+ java.lang.String referrer) |
+
static long |
+latestVisit(java.lang.String servlet,
+ java.lang.String remoteHost) |
+
static void |
+writeImage(RemoteAccess.FileTypeEncoding fileType,
+ HttpServletResponse response,
+ Query post,
+ RasterPlotter matrix) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,RemoteAccess>> history+
public static Query evaluate(HttpServletRequest request)+
public static long latestVisit(java.lang.String servlet, + java.lang.String remoteHost)+
public static java.lang.String hostHash(java.lang.String remoteHost)+
public java.lang.String getRemoteHost()+
public java.lang.String getLocalPath()+
public long getAccessTime()+
public int getLocalHTTPPort()+
public int getLocalHTTPSPort()+
public java.lang.String getPeername()+
public static void addLocalhost(java.lang.String h)+
public static void addReferrer(java.util.regex.Pattern p)+
public static boolean isLocalhost(java.lang.String host, + java.lang.String referrer)+
public static java.util.Map<java.lang.String,java.lang.String> getQueryMap(java.lang.String query)+
public static java.util.Map<java.lang.String,byte[]> getPostMap(HttpServletRequest request)+
public static RemoteAccess.FileTypeEncoding getFileType(HttpServletRequest request)+
public static void writeImage(RemoteAccess.FileTypeEncoding fileType, + HttpServletResponse response, + Query post, + RasterPlotter matrix) + throws java.io.IOException+
java.io.IOException
Interface | +Description | +
---|---|
CookieRequest | ++ |
Class | +Description | +
---|---|
AccessTracker | ++ |
ClientConnection | +
+ Helper class to provide BufferedReader Objects for get and post connections
+ |
+
CookieRequestManager | ++ |
RemoteAccess | +
+ Storage of a peer list which can be used for peer-to-peer communication.
+ |
+
RemoteAccess.FileTypeEncoding | ++ |
Enum | +Description | +
---|---|
RemoteAccess.FileType | ++ |
public abstract class AbstractObjectEntry +extends Post +implements ObjectEntry+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+CREATED_AT_FIELDNAME |
+
static java.lang.String |
+TIMESTAMP_FIELDNAME |
+
static DateTimeFormatter |
+utcFormatter |
+
NULL
Constructor and Description | +
---|
AbstractObjectEntry() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Object |
+lazyGet(JSONObject json,
+ java.lang.String key) |
+
static java.util.LinkedHashSet<java.lang.String> |
+parseArrayList(java.lang.Object l) |
+
static java.util.Date |
+parseDate(java.lang.Object d) |
+
static java.util.Date |
+parseDate(java.lang.Object d,
+ java.util.Date dflt) |
+
static long |
+parseLong(java.lang.Object n) |
+
static java.lang.String |
+parseString(java.lang.Object s) |
+
byte[] |
+toJSONBytes() |
+
java.lang.String |
+toString()
+Make a JSON text of this JSONObject.
+ |
+
static void |
+writeArray(JsonGenerator json,
+ java.lang.String fieldName,
+ java.util.Collection<java.lang.String> array) |
+
static void |
+writeArray(JsonGenerator json,
+ java.lang.String fieldName,
+ double[] array) |
+
static void |
+writeArray(JsonGenerator json,
+ java.lang.String fieldName,
+ java.lang.String[] array) |
+
static void |
+writeDate(JsonGenerator json,
+ java.lang.String fieldName,
+ long time) |
+
getPostId, getTimestamp, getTimestampDate, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toJSON
public static final java.lang.String TIMESTAMP_FIELDNAME+
public static final java.lang.String CREATED_AT_FIELDNAME+
public static final DateTimeFormatter utcFormatter+
public java.lang.String toString()+
JSONObject
+ Warning: This method assumes that the data structure is acyclical.
toString
in interface ObjectEntry
toString
in class JSONObject
{
(left
+ brace) and ending with }
(right
+ brace).public byte[] toJSONBytes()+
public static void writeDate(JsonGenerator json, + java.lang.String fieldName, + long time) + throws java.io.IOException+
java.io.IOException
public static void writeArray(JsonGenerator json, + java.lang.String fieldName, + java.util.Collection<java.lang.String> array) + throws java.io.IOException+
java.io.IOException
public static void writeArray(JsonGenerator json, + java.lang.String fieldName, + java.lang.String[] array) + throws java.io.IOException+
java.io.IOException
public static void writeArray(JsonGenerator json, + java.lang.String fieldName, + double[] array) + throws java.io.IOException+
java.io.IOException
public static java.util.Date parseDate(java.lang.Object d)+
public static java.util.Date parseDate(java.lang.Object d, + java.util.Date dflt)+
public static java.lang.String parseString(java.lang.Object s)+
public static long parseLong(java.lang.Object n)+
public static java.util.LinkedHashSet<java.lang.String> parseArrayList(java.lang.Object l)+
public java.lang.Object lazyGet(JSONObject json, + java.lang.String key)+
public static enum AccountEntry.Field +extends java.lang.Enum<AccountEntry.Field>+
Enum Constant and Description | +
---|
apps |
+
authentication_first |
+
authentication_latest |
+
oauth_token |
+
oauth_token_secret |
+
screen_name |
+
source_type |
+
Modifier and Type | +Method and Description | +
---|---|
static AccountEntry.Field |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static AccountEntry.Field[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final AccountEntry.Field screen_name+
public static final AccountEntry.Field source_type+
public static final AccountEntry.Field oauth_token+
public static final AccountEntry.Field oauth_token_secret+
public static final AccountEntry.Field authentication_first+
public static final AccountEntry.Field authentication_latest+
public static final AccountEntry.Field apps+
public static AccountEntry.Field[] values()+
+for (AccountEntry.Field c : AccountEntry.Field.values()) + System.out.println(c); +
public static AccountEntry.Field valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class AccountEntry +extends AbstractObjectEntry +implements ObjectEntry+
Modifier and Type | +Class and Description | +
---|---|
static class |
+AccountEntry.Field |
+
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
AccountEntry(JSONObject map) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getApps() |
+
java.util.Date |
+getAuthenticationFirst() |
+
java.util.Date |
+getAuthenticationLatest() |
+
java.lang.String |
+getOauthToken() |
+
java.lang.String |
+getOauthTokenSecret() |
+
java.lang.String |
+getScreenName() |
+
SourceType |
+getSourceType() |
+
void |
+init(JSONObject extmap) |
+
static JSONObject |
+toEmptyAccountJson(UserEntry user) |
+
JSONObject |
+toJSON() |
+
JSONObject |
+toJSON(UserEntry user) |
+
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, toString, writeArray, writeArray, writeArray, writeDate
getPostId, getTimestamp, getTimestampDate, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toString
public AccountEntry(JSONObject map) + throws java.io.IOException+
java.io.IOException
public void init(JSONObject extmap) + throws java.io.IOException+
java.io.IOException
public java.lang.String getScreenName()+
public java.util.Date getAuthenticationFirst()+
public java.util.Date getAuthenticationLatest()+
public SourceType getSourceType()+
public java.lang.String getOauthToken()+
public java.lang.String getOauthTokenSecret()+
public java.lang.String getApps()+
public JSONObject toJSON()+
toJSON
in interface ObjectEntry
public JSONObject toJSON(UserEntry user)+
public static JSONObject toEmptyAccountJson(UserEntry user)+
public static enum ImportProfileEntry.EntryStatus +extends java.lang.Enum<ImportProfileEntry.EntryStatus>+
Enum Constant and Description | +
---|
ACTIVE |
+
DELETED |
+
Modifier and Type | +Method and Description | +
---|---|
static ImportProfileEntry.EntryStatus |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ImportProfileEntry.EntryStatus[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ImportProfileEntry.EntryStatus ACTIVE+
public static final ImportProfileEntry.EntryStatus DELETED+
public static ImportProfileEntry.EntryStatus[] values()+
+for (ImportProfileEntry.EntryStatus c : ImportProfileEntry.EntryStatus.values()) + System.out.println(c); +
public static ImportProfileEntry.EntryStatus valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum ImportProfileEntry.PrivacyStatus +extends java.lang.Enum<ImportProfileEntry.PrivacyStatus>+
Enum Constant and Description | +
---|
PRIVATE |
+
PUBLIC |
+
Modifier and Type | +Method and Description | +
---|---|
static ImportProfileEntry.PrivacyStatus |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ImportProfileEntry.PrivacyStatus[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ImportProfileEntry.PrivacyStatus PRIVATE+
public static final ImportProfileEntry.PrivacyStatus PUBLIC+
public static ImportProfileEntry.PrivacyStatus[] values()+
+for (ImportProfileEntry.PrivacyStatus c : ImportProfileEntry.PrivacyStatus.values()) + System.out.println(c); +
public static ImportProfileEntry.PrivacyStatus valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class ImportProfileEntry +extends AbstractObjectEntry +implements ObjectEntry+
Modifier and Type | +Class and Description | +
---|---|
static class |
+ImportProfileEntry.EntryStatus |
+
static class |
+ImportProfileEntry.PrivacyStatus |
+
Modifier and Type | +Field and Description | +
---|---|
protected ImportProfileEntry.EntryStatus |
+activeStatus |
+
protected java.lang.String |
+client_host |
+
protected java.util.Date |
+created_at |
+
protected HarvestingFrequency |
+harvesting_freq |
+
protected java.lang.String |
+id |
+
protected java.util.List<java.lang.String> |
+imported |
+
protected java.lang.String |
+importer |
+
protected java.util.Date |
+last_harvested |
+
protected java.util.Date |
+last_modified |
+
protected long |
+lifetime |
+
protected ImportProfileEntry.PrivacyStatus |
+privacyStatus |
+
protected java.util.List<java.lang.String> |
+sharers |
+
protected long |
+source_hash |
+
protected SourceType |
+source_type |
+
protected java.net.URL |
+source_url |
+
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
ImportProfileEntry(JSONObject json) |
+
Modifier and Type | +Method and Description | +
---|---|
ImportProfileEntry.EntryStatus |
+getActiveStatus() |
+
java.lang.String |
+getClientHost() |
+
java.util.Date |
+getCreatedAt() |
+
HarvestingFrequency |
+getHarvestingFreq() |
+
java.lang.String |
+getId() |
+
java.util.List<java.lang.String> |
+getImported() |
+
java.lang.String |
+getImporter() |
+
java.util.Date |
+getLastHarvested() |
+
java.util.Date |
+getLastModified() |
+
long |
+getLifetime() |
+
ImportProfileEntry.PrivacyStatus |
+getPrivacyStatus() |
+
java.util.List<java.lang.String> |
+getSharers() |
+
long |
+getSourceHash() |
+
SourceType |
+getSourceType() |
+
java.net.URL |
+getSourceUrl() |
+
void |
+setActiveStatus(ImportProfileEntry.EntryStatus status) |
+
void |
+setClientHost(java.lang.String client_host) |
+
void |
+setCreatedAt(java.util.Date created_at) |
+
void |
+setHarvestingFreq(HarvestingFrequency harvesting_freq) |
+
void |
+setId(java.lang.String id) |
+
void |
+setImported(java.util.List<java.lang.String> imported) |
+
void |
+setImporter(java.lang.String importer) |
+
void |
+setLastHarvested(java.util.Date last_harvested) |
+
void |
+setLastModified(java.util.Date last_modified) |
+
void |
+setLifetime(long lifetime) |
+
void |
+setPrivacyStatus(ImportProfileEntry.PrivacyStatus privacyStatus) |
+
void |
+setSharers(java.util.List<java.lang.String> sharers) |
+
void |
+setSourceHash(long source_hash) |
+
void |
+setSourceType(SourceType source_type) |
+
void |
+setSourceUrl(java.net.URL source_url) |
+
JSONObject |
+toJSON() |
+
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, toString, writeArray, writeArray, writeArray, writeDate
getPostId, getTimestamp, getTimestampDate, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toString
protected java.lang.String id+
protected java.util.Date created_at+
protected java.util.Date last_modified+
protected java.util.Date last_harvested+
protected java.lang.String importer+
protected java.lang.String client_host+
protected java.net.URL source_url+
protected long source_hash+
protected SourceType source_type+
protected HarvestingFrequency harvesting_freq+
protected long lifetime+
protected java.util.List<java.lang.String> imported+
protected java.util.List<java.lang.String> sharers+
protected ImportProfileEntry.EntryStatus activeStatus+
protected ImportProfileEntry.PrivacyStatus privacyStatus+
public ImportProfileEntry(JSONObject json)+
public java.lang.String getId()+
public void setId(java.lang.String id)+
public java.util.Date getCreatedAt()+
public void setCreatedAt(java.util.Date created_at)+
public java.util.Date getLastModified()+
public void setLastModified(java.util.Date last_modified)+
public java.util.Date getLastHarvested()+
public void setLastHarvested(java.util.Date last_harvested)+
public java.lang.String getImporter()+
public void setImporter(java.lang.String importer)+
public java.lang.String getClientHost()+
public void setClientHost(java.lang.String client_host)+
public java.net.URL getSourceUrl()+
public void setSourceUrl(java.net.URL source_url)+
public long getSourceHash()+
public void setSourceHash(long source_hash)+
public SourceType getSourceType()+
public void setSourceType(SourceType source_type)+
public HarvestingFrequency getHarvestingFreq()+
public void setHarvestingFreq(HarvestingFrequency harvesting_freq)+
public long getLifetime()+
public void setLifetime(long lifetime)+
public java.util.List<java.lang.String> getImported()+
public void setImported(java.util.List<java.lang.String> imported)+
public java.util.List<java.lang.String> getSharers()+
public void setSharers(java.util.List<java.lang.String> sharers)+
public ImportProfileEntry.EntryStatus getActiveStatus()+
public void setActiveStatus(ImportProfileEntry.EntryStatus status)+
public ImportProfileEntry.PrivacyStatus getPrivacyStatus()+
public void setPrivacyStatus(ImportProfileEntry.PrivacyStatus privacyStatus)+
public JSONObject toJSON()+
toJSON
in interface ObjectEntry
public static class MessageEntry.TextLinkMap
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
JSONObject |
+short2long |
+
java.lang.String |
+text |
+
Constructor and Description | +
---|
TextLinkMap() |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public java.lang.String text+
public JSONObject short2long+
public class MessageEntry +extends AbstractObjectEntry+
Modifier and Type | +Class and Description | +
---|---|
static class |
+MessageEntry.TextLinkMap |
+
Modifier and Type | +Field and Description | +
---|---|
protected java.util.LinkedHashSet<java.lang.String> |
+audio |
+
protected java.lang.String |
+canonical_id |
+
protected java.util.Date |
+created_at |
+
protected long |
+favourites_count |
+
protected java.util.LinkedHashSet<java.lang.String> |
+images |
+
protected double[] |
+location_mark |
+
protected double[] |
+location_point |
+
protected int |
+location_radius |
+
protected LocationSource |
+location_source |
+
protected java.util.Date |
+on |
+
protected java.lang.String |
+parent |
+
protected QueryEntry.PlaceContext |
+place_context |
+
protected java.lang.String |
+place_country |
+
protected java.lang.String |
+place_id |
+
protected java.lang.String |
+place_name |
+
protected java.lang.String |
+postId |
+
protected java.lang.String |
+provider_hash |
+
protected ProviderType |
+provider_type |
+
protected long |
+retweet_count |
+
protected java.lang.String |
+retweet_from |
+
static java.lang.String |
+RICH_TEXT_SEPARATOR |
+
protected java.lang.String |
+screen_name |
+
protected SourceType |
+source_type |
+
protected java.net.URL |
+status_id_url |
+
protected java.lang.String |
+text |
+
protected java.util.Date |
+timestampDate |
+
protected java.util.Date |
+to |
+
protected java.util.LinkedHashSet<java.lang.String> |
+videos |
+
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
MessageEntry() |
+
MessageEntry(JSONObject json) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+enrich()
+create enriched data, useful for analytics and ranking:
+ - identify all mentioned users, hashtags and links
+ - count message size without links
+ - count message size without links and without users
+ |
+
java.util.Collection<java.lang.String> |
+getAudio() |
+
Classifier.Category |
+getClassifier(Classifier.Context context) |
+
double |
+getClassifierProbability(Classifier.Context context) |
+
java.util.Date |
+getCreatedAt() |
+
long |
+getFavouritesCount() |
+
java.lang.String[] |
+getHashtags() |
+
java.lang.String[] |
+getHosts() |
+
long |
+getId() |
+
java.util.Collection<java.lang.String> |
+getImages() |
+
java.lang.String[] |
+getLinks() |
+
double[] |
+getLocationMark() |
+
double[] |
+getLocationPoint() |
+
int |
+getLocationRadius()
+get the radius in meter
+ |
+
LocationSource |
+getLocationSource() |
+
java.lang.String[] |
+getMentions() |
+
java.util.Date |
+getOn() |
+
QueryEntry.PlaceContext |
+getPlaceContext() |
+
java.lang.String |
+getPlaceId() |
+
java.lang.String |
+getPlaceName() |
+
java.lang.String |
+getPostId() |
+
java.lang.String |
+getProviderHash() |
+
ProviderType |
+getProviderType() |
+
long |
+getRetweetCount() |
+
java.lang.String |
+getRetweetFrom() |
+
java.lang.String |
+getScreenName() |
+
SourceType |
+getSourceType() |
+
java.net.URL |
+getStatusIdUrl() |
+
java.lang.String |
+getText() |
+
MessageEntry.TextLinkMap |
+getText(int iflinkexceedslength,
+ java.lang.String urlstub) |
+
int |
+getTextLength() |
+
java.util.Date |
+getTimestampDate() |
+
java.util.Date |
+getTo() |
+
java.util.Collection<java.lang.String> |
+getVideos() |
+
static java.lang.String |
+html2utf8(java.lang.String s) |
+
static java.lang.String |
+html2utf8Custom(java.lang.String str) |
+
void |
+setCreatedAt(java.util.Date created_at) |
+
void |
+setFavouritesCount(long favourites_count) |
+
void |
+setImages(java.util.ArrayList<java.lang.String> images) |
+
void |
+setImages(java.lang.String image) |
+
void |
+setImages(java.lang.String[] images) |
+
void |
+setLocationMark(double[] location_mark)
+set the location
+ |
+
void |
+setLocationPoint(double[] location_point)
+set the location
+ |
+
void |
+setLocationRadius(int location_radius) |
+
void |
+setLocationSource(LocationSource location_source) |
+
void |
+setOn(java.util.Date on) |
+
void |
+setPlaceId(java.lang.String place_id) |
+
void |
+setPlaceName(java.lang.String place_name,
+ QueryEntry.PlaceContext place_context) |
+
void |
+setProviderHash(java.lang.String provider_hash) |
+
void |
+setProviderType(ProviderType provider_type) |
+
void |
+setRetweetCount(long retweet_count) |
+
void |
+setRetweetFrom(java.lang.String retweet_from) |
+
void |
+setScreenName(java.lang.String user_screen_name) |
+
void |
+setSourceType(SourceType source_type) |
+
void |
+setStatusIdUrl(java.net.URL status_id_url) |
+
void |
+setText(java.lang.String text) |
+
void |
+setTo(java.util.Date to) |
+
JSONObject |
+toJSON() |
+
Post |
+toJSON(UserEntry user,
+ boolean calculatedData,
+ int iflinkexceedslength,
+ java.lang.String urlstub) |
+
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, toString, writeArray, writeArray, writeArray, writeDate
getTimestamp, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final java.lang.String RICH_TEXT_SEPARATOR+
protected java.util.Date timestampDate+
protected java.util.Date created_at+
protected java.util.Date on+
protected java.util.Date to+
protected SourceType source_type+
protected ProviderType provider_type+
protected java.lang.String provider_hash+
protected java.lang.String screen_name+
protected java.lang.String retweet_from+
protected java.lang.String postId+
protected java.lang.String canonical_id+
protected java.lang.String parent+
protected java.lang.String text+
protected java.net.URL status_id_url+
protected long retweet_count+
protected long favourites_count+
protected java.util.LinkedHashSet<java.lang.String> images+
protected java.util.LinkedHashSet<java.lang.String> audio+
protected java.util.LinkedHashSet<java.lang.String> videos+
protected java.lang.String place_name+
protected java.lang.String place_id+
protected double[] location_point+
protected double[] location_mark+
protected int location_radius+
protected LocationSource location_source+
protected QueryEntry.PlaceContext place_context+
protected java.lang.String place_country+
public MessageEntry() + throws java.net.MalformedURLException+
java.net.MalformedURLException
public MessageEntry(JSONObject json)+
public java.util.Date getTimestampDate()+
getTimestampDate
in class Post
public java.util.Date getCreatedAt()+
public void setCreatedAt(java.util.Date created_at)+
public java.util.Date getOn()+
public void setOn(java.util.Date on)+
public java.util.Date getTo()+
public void setTo(java.util.Date to)+
public SourceType getSourceType()+
public void setSourceType(SourceType source_type)+
public ProviderType getProviderType()+
public void setProviderType(ProviderType provider_type)+
public java.lang.String getProviderHash()+
public void setProviderHash(java.lang.String provider_hash)+
public java.lang.String getScreenName()+
public void setScreenName(java.lang.String user_screen_name)+
public java.lang.String getRetweetFrom()+
public void setRetweetFrom(java.lang.String retweet_from)+
public java.net.URL getStatusIdUrl()+
public void setStatusIdUrl(java.net.URL status_id_url)+
public long getRetweetCount()+
public void setRetweetCount(long retweet_count)+
public long getFavouritesCount()+
public void setFavouritesCount(long favourites_count)+
public java.lang.String getPlaceName()+
public QueryEntry.PlaceContext getPlaceContext()+
public void setPlaceName(java.lang.String place_name, + QueryEntry.PlaceContext place_context)+
public java.lang.String getPlaceId()+
public void setPlaceId(java.lang.String place_id)+
public double[] getLocationPoint()+
public void setLocationPoint(double[] location_point)+
location_point
- in the form [longitude, latitude]public double[] getLocationMark()+
public void setLocationMark(double[] location_mark)+
location_point
- in the form [longitude, latitude]public int getLocationRadius()+
public void setLocationRadius(int location_radius)+
public LocationSource getLocationSource()+
public void setLocationSource(LocationSource location_source)+
public void setText(java.lang.String text)+
public void setImages(java.util.ArrayList<java.lang.String> images)+
public void setImages(java.lang.String[] images)+
public void setImages(java.lang.String image)+
public long getId()+
public java.lang.String[] getHosts()+
public java.lang.String getText()+
public MessageEntry.TextLinkMap getText(int iflinkexceedslength, + java.lang.String urlstub)+
public int getTextLength()+
public java.lang.String[] getMentions()+
public java.lang.String[] getHashtags()+
public java.lang.String[] getLinks()+
public java.util.Collection<java.lang.String> getImages()+
public Classifier.Category getClassifier(Classifier.Context context)+
public double getClassifierProbability(Classifier.Context context)+
public void enrich()+
public JSONObject toJSON()+
public Post toJSON(UserEntry user, + boolean calculatedData, + int iflinkexceedslength, + java.lang.String urlstub)+
public static java.lang.String html2utf8(java.lang.String s)+
public static java.lang.String html2utf8Custom(java.lang.String str)+
public java.util.Collection<java.lang.String> getVideos()+
public java.util.Collection<java.lang.String> getAudio()+
public interface ObjectEntry
+Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+toJSON() |
+
java.lang.String |
+toString() |
+
java.lang.String toString()+
toString
in class java.lang.Object
JSONObject toJSON()+
public static enum Peer.Status +extends java.lang.Enum<Peer.Status>+
Enum Constant and Description | +
---|
CANDIDATE |
+
JUNIOR |
+
SENIOR |
+
Modifier and Type | +Method and Description | +
---|---|
static Peer.Status |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Peer.Status[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Peer.Status CANDIDATE+
public static final Peer.Status JUNIOR+
public static final Peer.Status SENIOR+
public static Peer.Status[] values()+
+for (Peer.Status c : Peer.Status.values()) + System.out.println(c); +
public static Peer.Status valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class Peer +extends JSONObject+
Modifier and Type | +Class and Description | +
---|---|
static class |
+Peer.Status |
+
NULL
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public class Peers +extends java.util.HashMap<java.lang.String,Peer>+
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
java.util.Map.Entry<K,V>
Modifier and Type | +Method and Description | +
---|---|
void |
+update(Peer peer) |
+
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
equals, hashCode
public enum ProviderType +extends java.lang.Enum<ProviderType>+
Enum Constant and Description | +
---|
IMPORT |
+
NOONE |
+
REMOTE |
+
SCRAPED |
+
USER |
+
Modifier and Type | +Method and Description | +
---|---|
static ProviderType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ProviderType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ProviderType NOONE+
public static final ProviderType USER+
public static final ProviderType SCRAPED+
public static final ProviderType IMPORT+
public static final ProviderType REMOTE+
public static ProviderType[] values()+
+for (ProviderType c : ProviderType.values()) + System.out.println(c); +
public static ProviderType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static class QueryEntry.ElasticsearchQuery
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
QueryBuilder |
+queryBuilder |
+
java.util.Date |
+since |
+
java.util.Date |
+until |
+
Constructor and Description | +
---|
ElasticsearchQuery(java.lang.String q,
+ int timezoneOffset) |
+
ElasticsearchQuery(java.lang.String q,
+ int timezoneOffset,
+ java.util.ArrayList<java.lang.String> filterList) |
+
public static enum QueryEntry.PlaceContext +extends java.lang.Enum<QueryEntry.PlaceContext>+
Enum Constant and Description | +
---|
ABOUT |
+
FROM |
+
Modifier and Type | +Method and Description | +
---|---|
static QueryEntry.PlaceContext |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static QueryEntry.PlaceContext[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final QueryEntry.PlaceContext FROM+
public static final QueryEntry.PlaceContext ABOUT+
public static QueryEntry.PlaceContext[] values()+
+for (QueryEntry.PlaceContext c : QueryEntry.PlaceContext.values()) + System.out.println(c); +
public static QueryEntry.PlaceContext valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static class QueryEntry.Tokens
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
double[] |
+bbox |
+
java.util.HashSet<java.lang.String> |
+constraints_negative |
+
java.util.HashSet<java.lang.String> |
+constraints_positive |
+
<any> |
+modifier |
+
java.lang.String |
+original |
+
QueryEntry.PlaceContext |
+place_context |
+
java.lang.String |
+raw |
+
Constructor and Description | +
---|
Tokens(java.lang.String q) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+translate4scraper() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public final java.lang.String original+
public java.lang.String raw+
public final java.util.HashSet<java.lang.String> constraints_positive+
public final java.util.HashSet<java.lang.String> constraints_negative+
public <any> modifier+
public QueryEntry.PlaceContext place_context+
public double[] bbox+
public class QueryEntry +extends AbstractObjectEntry +implements ObjectEntry+
Modifier and Type | +Class and Description | +
---|---|
static class |
+QueryEntry.ElasticsearchQuery |
+
static class |
+QueryEntry.PlaceContext |
+
static class |
+QueryEntry.Tokens |
+
Modifier and Type | +Field and Description | +
---|---|
protected java.util.Date |
+expected_next |
+
protected long |
+message_period |
+
protected int |
+messages_per_day |
+
protected java.lang.String |
+query |
+
protected int |
+query_count |
+
protected java.util.Date |
+query_first |
+
protected java.util.Date |
+query_last |
+
protected int |
+query_length |
+
protected int |
+retrieval_count |
+
protected java.util.Date |
+retrieval_last |
+
protected java.util.Date |
+retrieval_next |
+
protected long |
+score_retrieval |
+
protected long |
+score_suggest |
+
SourceType |
+source_type |
+
protected int |
+timezoneOffset |
+
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
QueryEntry(JSONObject json) |
+
QueryEntry(java.lang.String query,
+ int timezoneOffset,
+ long message_period,
+ SourceType source_type,
+ boolean byUserQuery)
+This initializer can only be used for first-time creation of a query track.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Timeline |
+applyConstraint(Timeline tl0,
+ QueryEntry.Tokens tokens,
+ boolean applyLocationConstraint) |
+
static java.lang.String |
+fixQueryMistakes(java.lang.String q)
+fixing a query mistake covers most common wrong queries from the user
+ |
+
java.util.Date |
+getExpectedNext() |
+
int |
+getMessagesPerDay() |
+
java.lang.String |
+getQuery() |
+
int |
+getQueryCount() |
+
java.util.Date |
+getQueryFirst() |
+
java.util.Date |
+getQueryLast() |
+
int |
+getQueryLength() |
+
int |
+getRetrievalCount() |
+
java.util.Date |
+getRetrievalLast() |
+
java.util.Date |
+getRetrievalNext() |
+
SourceType |
+getSourceType() |
+
int |
+getTimezoneOffset() |
+
void |
+init(JSONObject json) |
+
static void |
+main(java.lang.String[] args) |
+
JSONObject |
+toJSON() |
+
void |
+update()
+A 'blind' update can be done if the user submits a query but there are rules which prevent that the target system is queried
+ as well.
+ |
+
void |
+update(long message_period,
+ boolean byUserQuery)
+update the query entry
+ |
+
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, toString, writeArray, writeArray, writeArray, writeDate
getPostId, getTimestamp, getTimestampDate, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
toString
protected java.lang.String query+
protected int query_length+
public SourceType source_type+
protected int timezoneOffset+
protected java.util.Date query_first+
protected java.util.Date query_last+
protected java.util.Date retrieval_last+
protected java.util.Date retrieval_next+
protected java.util.Date expected_next+
protected int query_count+
protected int retrieval_count+
protected long message_period+
protected int messages_per_day+
protected long score_retrieval+
protected long score_suggest+
public QueryEntry(java.lang.String query, + int timezoneOffset, + long message_period, + SourceType source_type, + boolean byUserQuery)+
query
- timezoneOffset
- message_period
- source_type
- java.net.MalformedURLException
public QueryEntry(JSONObject json) + throws java.lang.IllegalArgumentException, + JSONException+
java.lang.IllegalArgumentException
JSONException
public void init(JSONObject json) + throws java.lang.IllegalArgumentException, + JSONException+
java.lang.IllegalArgumentException
JSONException
public void update(long message_period, + boolean byUserQuery)+
message_period
- byUserQuery
- is true, if the query was submitted by the user; false if the query was submitted by an automatic systempublic void update()+
public java.lang.String getQuery()+
public int getQueryLength()+
public SourceType getSourceType()+
public java.util.Date getQueryFirst()+
public java.util.Date getQueryLast()+
public java.util.Date getRetrievalLast()+
public java.util.Date getRetrievalNext()+
public java.util.Date getExpectedNext()+
public int getTimezoneOffset()+
public int getQueryCount()+
public int getRetrievalCount()+
public int getMessagesPerDay()+
public JSONObject toJSON()+
toJSON
in interface ObjectEntry
public static Timeline applyConstraint(Timeline tl0, + QueryEntry.Tokens tokens, + boolean applyLocationConstraint)+
public static void main(java.lang.String[] args)+
public static java.lang.String fixQueryMistakes(java.lang.String q)+
q
- public class ResultList<E>
+extends java.util.ArrayList<E>
+Constructor and Description | +
---|
ResultList() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+clear() |
+
long |
+getHits()
+get the number of total hits
+ |
+
void |
+setHits(long totalHits)
+set the number of total hits this list has
+ |
+
SusiThought |
+toSusi() |
+
add, add, addAll, addAll, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public void setHits(long totalHits)+
totalHits
- public long getHits()+
public void clear()+ +
public SusiThought toSusi() + throws JSONException+
JSONException
public enum SourceType +extends java.lang.Enum<SourceType>+
Enum Constant and Description | +
---|
FOSSASIA_API |
+
FREIFUNK_NODE |
+
GENERIC |
+
GEOJSON |
+
GITHUB |
+
NETMON |
+
NINUX |
+
NODELIST |
+
OPENWIFIMAP |
+
QUORA |
+
TWITTER |
+
Modifier and Type | +Method and Description | +
---|---|
static SourceType |
+byName(java.lang.String typeName) |
+
static boolean |
+isValid(java.lang.String typeName)
+we want type names to be in uppercase.
+ |
+
boolean |
+propagate() |
+
static SourceType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static SourceType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final SourceType TWITTER+
public static final SourceType QUORA+
public static final SourceType GITHUB+
public static final SourceType FOSSASIA_API+
public static final SourceType OPENWIFIMAP+
public static final SourceType NODELIST+
public static final SourceType NETMON+
public static final SourceType FREIFUNK_NODE+
public static final SourceType NINUX+
public static final SourceType GEOJSON+
public static final SourceType GENERIC+
public static SourceType[] values()+
+for (SourceType c : SourceType.values()) + System.out.println(c); +
public static SourceType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static boolean isValid(java.lang.String typeName)+
typeName
- public static SourceType byName(java.lang.String typeName)+
public boolean propagate()+
public static enum Timeline.Order +extends java.lang.Enum<Timeline.Order>+
Enum Constant and Description | +
---|
CREATED_AT |
+
FAVOURITES_COUNT |
+
RETWEET_COUNT |
+
TIMESTAMP |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getMessageFieldName() |
+
java.lang.String |
+getMessageFieldType() |
+
static Timeline.Order |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Timeline.Order[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Timeline.Order CREATED_AT+
public static final Timeline.Order TIMESTAMP+
public static final Timeline.Order RETWEET_COUNT+
public static final Timeline.Order FAVOURITES_COUNT+
public static Timeline.Order[] values()+
+for (Timeline.Order c : Timeline.Order.values()) + System.out.println(c); +
public static Timeline.Order valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getMessageFieldName()+
public java.lang.String getMessageFieldType()+
public class Timeline +extends java.lang.Object +implements java.lang.Iterable<TwitterScraper.TwitterTweet>+
Modifier and Type | +Class and Description | +
---|---|
static class |
+Timeline.Order |
+
Constructor and Description | +
---|
Timeline(Timeline.Order order) |
+
Timeline(Timeline.Order order,
+ java.lang.String scraperInfo) |
+
Modifier and Type | +Method and Description | +
---|---|
Timeline |
+add(TwitterScraper.TwitterTweet tweet,
+ UserEntry user) |
+
void |
+clear() |
+
long |
+getAccessTime() |
+
TwitterScraper.TwitterTweet |
+getBottomTweet() |
+
int |
+getCursor()
+gets the outer bound of the tweets returned to the user so far
+ |
+
int |
+getHits() |
+
java.util.List<TwitterScraper.TwitterTweet> |
+getNextTweets(int start,
+ int maxCount) |
+
Timeline.Order |
+getOrder() |
+
java.lang.String |
+getQuery() |
+
DAO.IndexName |
+getResultIndex() |
+
java.lang.String |
+getScraperInfo() |
+
TwitterScraper.TwitterTweet |
+getTopTweet() |
+
protected UserEntry |
+getUser(java.lang.String user_screen_name) |
+
UserEntry |
+getUser(TwitterScraper.TwitterTweet fromTweet) |
+
java.util.Iterator<TwitterScraper.TwitterTweet> |
+iterator()
+the tweet iterator returns tweets in descending appearance order (top first)
+ |
+
static Timeline.Order |
+parseOrder(java.lang.String order) |
+
long |
+period()
+compute the average time between any two consecutive tweets
+ |
+
void |
+putAll(Timeline other) |
+
Timeline |
+reduceToMaxsize(int maxsize) |
+
Timeline |
+setCursor(int newCursor)
+sets the cursor to the outer bound of the visible tweet number.
+ |
+
Timeline |
+setHits(int hits) |
+
Timeline |
+setQuery(java.lang.String query) |
+
Timeline |
+setResultIndex(DAO.IndexName index) |
+
Timeline |
+setScraperInfo(java.lang.String info) |
+
int |
+size() |
+
JSONObject |
+toJSON(boolean withEnrichedData,
+ java.lang.String metadata_field_name,
+ java.lang.String statuses_field_name) |
+
Timeline2 |
+toPostTimeline() |
+
java.lang.String |
+toString() |
+
SusiThought |
+toSusi(boolean withEnrichedData) |
+
Timeline |
+updateAccessTime() |
+
void |
+writeToIndex() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Timeline(Timeline.Order order)+
public Timeline(Timeline.Order order, + java.lang.String scraperInfo)+
public static Timeline.Order parseOrder(java.lang.String order)+
public void clear()+
public Timeline setResultIndex(DAO.IndexName index)+
public DAO.IndexName getResultIndex()+
public Timeline setScraperInfo(java.lang.String info)+
public java.lang.String getScraperInfo()+
public long getAccessTime()+
public Timeline updateAccessTime()+
public Timeline.Order getOrder()+
public java.lang.String getQuery()+
public Timeline setQuery(java.lang.String query)+
public int getCursor()+
public Timeline setCursor(int newCursor)+
newCursor
- the new cursor position which must be higher than the previous one.public int size()+
public Timeline reduceToMaxsize(int maxsize)+
public Timeline add(TwitterScraper.TwitterTweet tweet, + UserEntry user)+
protected UserEntry getUser(java.lang.String user_screen_name)+
public UserEntry getUser(TwitterScraper.TwitterTweet fromTweet)+
public void putAll(Timeline other)+
public TwitterScraper.TwitterTweet getBottomTweet()+
public TwitterScraper.TwitterTweet getTopTweet()+
public java.util.List<TwitterScraper.TwitterTweet> getNextTweets(int start, + int maxCount)+
public java.lang.String toString()+
toString
in class java.lang.Object
public JSONObject toJSON(boolean withEnrichedData, + java.lang.String metadata_field_name, + java.lang.String statuses_field_name) + throws JSONException+
JSONException
public SusiThought toSusi(boolean withEnrichedData) + throws JSONException+
JSONException
public java.util.Iterator<TwitterScraper.TwitterTweet> iterator()+
iterator
in interface java.lang.Iterable<TwitterScraper.TwitterTweet>
public long period()+
public void writeToIndex()+
public Timeline setHits(int hits)+
public int getHits()+
public Timeline2 toPostTimeline()+
public static enum Timeline2.Order +extends java.lang.Enum<Timeline2.Order>+
Enum Constant and Description | +
---|
CREATED_AT |
+
FAVOURITES_COUNT |
+
RETWEET_COUNT |
+
TIMESTAMP |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getMessageFieldName() |
+
java.lang.String |
+getMessageFieldType() |
+
static Timeline2.Order |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Timeline2.Order[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Timeline2.Order CREATED_AT+
public static final Timeline2.Order TIMESTAMP+
public static final Timeline2.Order RETWEET_COUNT+
public static final Timeline2.Order FAVOURITES_COUNT+
public static Timeline2.Order[] values()+
+for (Timeline2.Order c : Timeline2.Order.values()) + System.out.println(c); +
public static Timeline2.Order valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getMessageFieldName()+
public java.lang.String getMessageFieldType()+
public class Timeline2 +extends java.lang.Object +implements java.lang.Iterable<Post>+
Modifier and Type | +Class and Description | +
---|---|
static class |
+Timeline2.Order |
+
Constructor and Description | +
---|
Timeline2(Timeline2.Order order) |
+
Timeline2(Timeline2.Order order,
+ java.lang.String scraperInfo) |
+
Modifier and Type | +Method and Description | +
---|---|
Timeline2 |
+add(Post post) |
+
Timeline2 |
+add(Post post,
+ UserEntry user) |
+
Timeline2 |
+addPost(Post post) |
+
void |
+clear() |
+
long |
+getAccessTime() |
+
Post |
+getBottomTweet() |
+
int |
+getCursor()
+gets the outer bound of the tweets returned to the user so far
+ |
+
int |
+getHits() |
+
java.util.List<Post> |
+getNextTweets(int start,
+ int maxCount) |
+
Timeline2.Order |
+getOrder() |
+
java.lang.String |
+getQuery() |
+
DAO.IndexName |
+getResultIndex() |
+
java.lang.String |
+getScraperInfo() |
+
Post |
+getTopTweet() |
+
UserEntry |
+getUser(Post fromPost) |
+
protected UserEntry |
+getUser(java.lang.String user_screen_name) |
+
boolean |
+isEmpty() |
+
java.util.Iterator<Post> |
+iterator()
+the tweet iterator returns tweets in descending appearance order (top first)
+ |
+
void |
+mergePost(Timeline2 list) |
+
void |
+mergePost(Timeline2[] lists) |
+
static Timeline2.Order |
+parseOrder(java.lang.String order) |
+
long |
+period()
+compute the average time between any two consecutive tweets
+ |
+
void |
+putAll(Timeline2 other) |
+
Timeline2 |
+reduceToMaxsize(int maxsize) |
+
Timeline2 |
+setCursor(int newCursor)
+sets the cursor to the outer bound of the visible tweet number.
+ |
+
Timeline2 |
+setHits(int hits) |
+
Timeline2 |
+setQuery(java.lang.String query) |
+
Timeline2 |
+setResultIndex(DAO.IndexName index) |
+
Timeline2 |
+setScraperInfo(java.lang.String info) |
+
int |
+size() |
+
JSONArray |
+toArray() |
+
JSONObject |
+toJSON() |
+
JSONObject |
+toJSON(boolean withEnrichedData,
+ java.lang.String metadata_field_name,
+ java.lang.String statuses_field_name) |
+
java.lang.String |
+toString() |
+
SusiThought |
+toSusi(boolean withEnrichedData) |
+
Timeline |
+toTimeline() |
+
Timeline2 |
+updateAccessTime() |
+
void |
+writeToIndex() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public Timeline2(Timeline2.Order order)+
public Timeline2(Timeline2.Order order, + java.lang.String scraperInfo)+
public static Timeline2.Order parseOrder(java.lang.String order)+
public void clear()+
public Timeline2 setResultIndex(DAO.IndexName index)+
public DAO.IndexName getResultIndex()+
public Timeline2 setScraperInfo(java.lang.String info)+
public java.lang.String getScraperInfo()+
public long getAccessTime()+
public Timeline2 updateAccessTime()+
public Timeline2.Order getOrder()+
public java.lang.String getQuery()+
public Timeline2 setQuery(java.lang.String query)+
public int getCursor()+
public Timeline2 setCursor(int newCursor)+
newCursor
- the new cursor position which must be higher than the previous one.public int size()+
public Timeline2 reduceToMaxsize(int maxsize)+
public void mergePost(Timeline2 list)+
public void mergePost(Timeline2[] lists)+
protected UserEntry getUser(java.lang.String user_screen_name)+
public void putAll(Timeline2 other)+
public Post getBottomTweet()+
public Post getTopTweet()+
public java.util.List<Post> getNextTweets(int start, + int maxCount)+
public java.lang.String toString()+
toString
in class java.lang.Object
public JSONObject toJSON(boolean withEnrichedData, + java.lang.String metadata_field_name, + java.lang.String statuses_field_name) + throws JSONException+
JSONException
public JSONObject toJSON() + throws JSONException+
JSONException
public SusiThought toSusi(boolean withEnrichedData) + throws JSONException+
JSONException
public java.util.Iterator<Post> iterator()+
iterator
in interface java.lang.Iterable<Post>
public long period()+
public JSONArray toArray()+
public void writeToIndex()+
public Timeline2 setHits(int hits)+
public int getHits()+
public Timeline toTimeline()+
public boolean isEmpty()+
public class TimelineCache
+extends java.lang.Object
+Constructor and Description | +
---|
TimelineCache(long ttl) |
+
Modifier and Type | +Method and Description | +
---|---|
TimelineCache |
+clean() |
+
Timeline |
+getOrCreate(ClientIdentity identity,
+ java.lang.String query,
+ boolean head,
+ Timeline.Order order) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public TimelineCache clean()+
public Timeline getOrCreate(ClientIdentity identity, + java.lang.String query, + boolean head, + Timeline.Order order)+
public class UserEntry +extends AbstractObjectEntry +implements ObjectEntry+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+field_appearance_first |
+
static java.lang.String |
+field_appearance_latest |
+
static java.lang.String |
+field_name |
+
static java.lang.String |
+field_profile_image |
+
static java.lang.String |
+field_profile_image_url_http |
+
static java.lang.String |
+field_profile_image_url_https |
+
static java.lang.String |
+field_screen_name |
+
static java.lang.String |
+field_user_id |
+
CREATED_AT_FIELDNAME, TIMESTAMP_FIELDNAME, utcFormatter
NULL
Constructor and Description | +
---|
UserEntry(JSONObject json) |
+
UserEntry(java.lang.String user_id,
+ java.lang.String screen_name_raw,
+ java.lang.String profile_image_url,
+ java.lang.String name_raw) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+containsProfileImage() |
+
boolean |
+equals(java.lang.Object o) |
+
java.util.Date |
+getAppearanceFirst() |
+
java.util.Date |
+getAppearanceLatest() |
+
java.lang.String |
+getName() |
+
byte[] |
+getProfileImage() |
+
java.lang.String |
+getProfileImageUrl() |
+
java.lang.String |
+getScreenName() |
+
SourceType |
+getType() |
+
java.lang.Number |
+getUser() |
+
java.lang.String |
+getUserId() |
+
static void |
+main(java.lang.String[] args) |
+
void |
+setName(java.lang.String Name) |
+
void |
+setProfileImage(byte[] image) |
+
void |
+setProfileImageUrl(java.lang.String url) |
+
JSONObject |
+toJSON() |
+
void |
+toJSON(JsonGenerator json) |
+
java.lang.String |
+toString()
+Make a JSON text of this JSONObject.
+ |
+
lazyGet, parseArrayList, parseDate, parseDate, parseLong, parseString, toJSONBytes, writeArray, writeArray, writeArray, writeDate
getPostId, getTimestamp, getTimestampDate, isWrapper, setPostId, setTimestamp, setTimestamp
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, valueToString, wrap, write, write
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final java.lang.String field_screen_name+
public static final java.lang.String field_user_id+
public static final java.lang.String field_name+
public static final java.lang.String field_profile_image_url_http+
public static final java.lang.String field_profile_image_url_https+
public static final java.lang.String field_profile_image+
public static final java.lang.String field_appearance_first+
public static final java.lang.String field_appearance_latest+
public UserEntry(java.lang.String user_id, + java.lang.String screen_name_raw, + java.lang.String profile_image_url, + java.lang.String name_raw)+
public UserEntry(JSONObject json)+
public SourceType getType()+
public java.lang.Number getUser()+
public java.lang.String getUserId()+
public java.lang.String getScreenName()+
public java.lang.String getName()+
public java.lang.String getProfileImageUrl()+
public boolean containsProfileImage()+
public byte[] getProfileImage()+
public void setProfileImageUrl(java.lang.String url)+
public void setName(java.lang.String Name)+
public void setProfileImage(byte[] image)+
public java.util.Date getAppearanceFirst()+
public java.util.Date getAppearanceLatest()+
public void toJSON(JsonGenerator json)+
public JSONObject toJSON() + throws JSONException+
toJSON
in interface ObjectEntry
JSONException
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public static void main(java.lang.String[] args)+
public java.lang.String toString()+
JSONObject
+ Warning: This method assumes that the data structure is acyclical.
toString
in interface ObjectEntry
toString
in class AbstractObjectEntry
{
(left
+ brace) and ending with }
(right
+ brace).Interface | +Description | +
---|---|
ObjectEntry | ++ |
Class | +Description | +
---|---|
AbstractObjectEntry | ++ |
AccountEntry | ++ |
ImportProfileEntry | ++ |
MessageEntry | ++ |
MessageEntry.TextLinkMap | ++ |
Peer | ++ |
Peers | ++ |
QueryEntry | +
+ A Query is a recording of a search result based on the query.
+ |
+
QueryEntry.ElasticsearchQuery | ++ |
QueryEntry.Tokens | ++ |
ResultList<E> | ++ |
Timeline | +
+ A timeline is a structure which holds tweet for the purpose of presentation
+ There is no tweet retrieval method here, just an iterator which returns the tweets in reverse appearing order
+ |
+
Timeline2 | +
+ A timeline2 is a structure which holds tweet for the purpose of presentation
+ There is no tweet retrieval method here, just an iterator which returns the tweets in reverse appearing order
+ |
+
TimelineCache | +
+ The purpose of the timeline cache is, to provide a storage for paginated search
+ |
+
UserEntry | ++ |
Enum | +Description | +
---|---|
AccountEntry.Field | ++ |
ImportProfileEntry.EntryStatus | ++ |
ImportProfileEntry.PrivacyStatus | ++ |
Peer.Status | ++ |
ProviderType | +
+ The ProviderType objects answers on the question "who provided that content".
+ |
+
QueryEntry.PlaceContext | ++ |
SourceType | +
+ The SourceType objects answers on the question "what kind of data format".
+ |
+
Timeline.Order | ++ |
Timeline2.Order | ++ |
Class | +Description | +
---|---|
Caretaker | +
+ The caretaker class is a concurrent thread which does peer-to-peer operations
+ and data transmission asynchronously.
+ |
+
Crawler | ++ |
DumpImporter | ++ |
LoklakEmailHandler | ++ |
LoklakInstallation | ++ |
LoklakServer | ++ |
public class RSSFeed +extends java.lang.Object +implements java.lang.Iterable<RSSMessage>+
Modifier and Type | +Class and Description | +
---|---|
class |
+RSSFeed.messageIterator |
+
Constructor and Description | +
---|
RSSFeed(int maxsize) |
+
RSSFeed(java.util.Set<java.net.URL> links,
+ java.lang.String source)
+make a RSS feed using a set of urls
+ the source string is assigned to all messages as author to mark the messages' origin
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+addMessage(RSSMessage item) |
+
RSSMessage |
+getChannel() |
+
java.lang.String |
+getImage() |
+
java.util.Set<java.net.URL> |
+getLinks() |
+
RSSMessage |
+getMessage(java.lang.String guid) |
+
boolean |
+isEmpty() |
+
java.util.Iterator<RSSMessage> |
+iterator() |
+
RSSMessage |
+pollMessage() |
+
void |
+setChannel(RSSMessage channelItem) |
+
void |
+setImage(java.lang.String imageURL) |
+
int |
+size() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public RSSFeed(int maxsize)+
public RSSFeed(java.util.Set<java.net.URL> links, + java.lang.String source)+
links
- source
- public java.lang.String toString()+
toString
in class java.lang.Object
public void setChannel(RSSMessage channelItem)+
public RSSMessage getChannel()+
public void setImage(java.lang.String imageURL)+
public java.lang.String getImage()+
public java.util.Set<java.net.URL> getLinks()+
public void addMessage(RSSMessage item)+
public RSSMessage getMessage(java.lang.String guid)+
public boolean isEmpty()+
public int size()+
public java.util.Iterator<RSSMessage> iterator()+
iterator
in interface java.lang.Iterable<RSSMessage>
public RSSMessage pollMessage()+
public class RSSFeed.messageIterator +extends java.lang.Object +implements java.util.Iterator<RSSMessage>+
Constructor and Description | +
---|
messageIterator() |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+hasNext() |
+
RSSMessage |
+next() |
+
void |
+remove() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public boolean hasNext()+
hasNext
in interface java.util.Iterator<RSSMessage>
public RSSMessage next()+
next
in interface java.util.Iterator<RSSMessage>
public void remove()+
remove
in interface java.util.Iterator<RSSMessage>
public static enum RSSMessage.Token +extends java.lang.Enum<RSSMessage.Token>+
Enum Constant and Description | +
---|
author |
+
category |
+
copyright |
+
description |
+
docs |
+
guid |
+
language |
+
lat |
+
link |
+
lon |
+
pubDate |
+
referrer |
+
size |
+
subject |
+
title |
+
ttl |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Set<java.lang.String> |
+keys() |
+
java.lang.String |
+toString() |
+
java.lang.String |
+valueFrom(java.util.Map<java.lang.String,java.lang.String> map,
+ java.lang.String dflt) |
+
static RSSMessage.Token |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static RSSMessage.Token[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final RSSMessage.Token title+
public static final RSSMessage.Token link+
public static final RSSMessage.Token description+
public static final RSSMessage.Token pubDate+
public static final RSSMessage.Token copyright+
public static final RSSMessage.Token author+
public static final RSSMessage.Token subject+
public static final RSSMessage.Token category+
public static final RSSMessage.Token referrer+
public static final RSSMessage.Token language+
public static final RSSMessage.Token guid+
public static final RSSMessage.Token ttl+
public static final RSSMessage.Token docs+
public static final RSSMessage.Token size+
public static final RSSMessage.Token lon+
public static final RSSMessage.Token lat+
public static RSSMessage.Token[] values()+
+for (RSSMessage.Token c : RSSMessage.Token.values()) + System.out.println(c); +
public static RSSMessage.Token valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String valueFrom(java.util.Map<java.lang.String,java.lang.String> map, + java.lang.String dflt)+
public java.util.Set<java.lang.String> keys()+
public java.lang.String toString()+
toString
in class java.lang.Enum<RSSMessage.Token>
public class RSSMessage
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+RSSMessage.Token |
+
Modifier and Type | +Field and Description | +
---|---|
static java.text.SimpleDateFormat |
+FORMAT_ANSIC |
+
static java.text.SimpleDateFormat |
+FORMAT_RFC1036 |
+
static java.text.SimpleDateFormat |
+FORMAT_RFC1123 |
+
static RSSMessage |
+POISON |
+
static java.util.HashSet<java.lang.String> |
+tags |
+
protected static java.util.TimeZone |
+TZ_GMT
+pattern for a W3C datetime variant of a non-localized ISO8601 date
+ |
+
Constructor and Description | +
---|
RSSMessage() |
+
RSSMessage(java.lang.String title,
+ java.lang.String description,
+ java.lang.String link) |
+
RSSMessage(java.lang.String title,
+ java.lang.String description,
+ java.net.URL link,
+ java.lang.String guid) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(RSSMessage o1,
+ RSSMessage o2) |
+
int |
+compareTo(RSSMessage o) |
+
boolean |
+equals(java.lang.Object o) |
+
java.lang.String |
+getAuthor() |
+
java.lang.String |
+getCategory() |
+
java.lang.String |
+getCopyright() |
+
java.util.List<java.lang.String> |
+getDescriptions() |
+
java.lang.String |
+getDocs() |
+
java.lang.String |
+getFulltext() |
+
java.lang.String |
+getGuid() |
+
java.lang.String |
+getLanguage() |
+
float |
+getLat() |
+
java.lang.String |
+getLink() |
+
float |
+getLon() |
+
java.util.Date |
+getPubDate() |
+
java.lang.String |
+getReferrer() |
+
long |
+getSize() |
+
java.lang.String[] |
+getSubject() |
+
java.lang.String |
+getTitle() |
+
java.lang.String |
+getTTL() |
+
int |
+hashCode() |
+
static java.util.Date |
+parseHTTPDate(java.lang.String s) |
+
void |
+setAuthor(java.lang.String author) |
+
void |
+setCategory(java.lang.String category) |
+
void |
+setCopyright(java.lang.String copyright) |
+
void |
+setDescription(java.lang.String description) |
+
void |
+setDocs(java.lang.String docs) |
+
void |
+setGuid(java.lang.String guid) |
+
void |
+setLanguage(java.lang.String language) |
+
void |
+setLink(java.lang.String link) |
+
void |
+setPubDate(java.util.Date pubdate) |
+
void |
+setReferrer(java.lang.String referrer) |
+
void |
+setSize(long size) |
+
void |
+setSubject(java.lang.String[] tags) |
+
void |
+setTitle(java.lang.String title) |
+
void |
+setValue(RSSMessage.Token token,
+ java.lang.String value) |
+
static java.lang.String |
+sizename(int size) |
+
java.lang.String |
+toString() |
+
java.lang.String |
+toString(boolean withItemTag) |
+
static RSSMessage.Token |
+valueOfNick(java.lang.String nick) |
+
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected static final java.util.TimeZone TZ_GMT+
public static final java.text.SimpleDateFormat FORMAT_RFC1123+
public static final java.text.SimpleDateFormat FORMAT_RFC1036+
public static final java.text.SimpleDateFormat FORMAT_ANSIC+
public static final RSSMessage POISON+
public static final java.util.HashSet<java.lang.String> tags+
public RSSMessage(java.lang.String title, + java.lang.String description, + java.lang.String link)+
public RSSMessage(java.lang.String title, + java.lang.String description, + java.net.URL link, + java.lang.String guid)+
public RSSMessage()+
public static RSSMessage.Token valueOfNick(java.lang.String nick)+
public void setValue(RSSMessage.Token token, + java.lang.String value)+
public java.lang.String getTitle()+
public java.lang.String getLink()+
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public int hashCode()+
hashCode
in class java.lang.Object
public int compareTo(RSSMessage o)+
public int compare(RSSMessage o1, + RSSMessage o2)+
public java.util.List<java.lang.String> getDescriptions()+
public java.lang.String getAuthor()+
public java.lang.String getCopyright()+
public java.lang.String getCategory()+
public java.lang.String[] getSubject()+
public java.lang.String getReferrer()+
public java.lang.String getLanguage()+
public java.util.Date getPubDate()+
public static java.util.Date parseHTTPDate(java.lang.String s)+
public java.lang.String getGuid()+
public java.lang.String getTTL()+
public java.lang.String getDocs()+
public long getSize()+
public java.lang.String getFulltext()+
public float getLon()+
public float getLat()+
public java.lang.String toString()+
toString
in class java.lang.Object
public java.lang.String toString(boolean withItemTag)+
public void setAuthor(java.lang.String author)+
public void setCategory(java.lang.String category)+
public void setCopyright(java.lang.String copyright)+
public void setSubject(java.lang.String[] tags)+
public void setDescription(java.lang.String description)+
public void setDocs(java.lang.String docs)+
public void setGuid(java.lang.String guid)+
public void setLanguage(java.lang.String language)+
public void setLink(java.lang.String link)+
public void setPubDate(java.util.Date pubdate)+
public void setReferrer(java.lang.String referrer)+
public void setSize(long size)+
public void setTitle(java.lang.String title)+
public static java.lang.String sizename(int size)+
Class | +Description | +
---|---|
RSSFeed | ++ |
RSSMessage | ++ |
Enum | +Description | +
---|---|
RSSMessage.Token | ++ |
public class APIException
+extends java.lang.Exception
+Constructor and Description | +
---|
APIException(int statusCode,
+ java.lang.String message) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getStatusCode() |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public interface APIHandler
+Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getAPIPath() |
+
JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
BaseUserRole |
+getMinimalBaseUserRole() |
+
java.lang.String[] |
+getServerProtocolHostStub() |
+
JSONObject[] |
+service(Query call,
+ Authorization rights) |
+
java.lang.String[] getServerProtocolHostStub()+
BaseUserRole getMinimalBaseUserRole()+
JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
java.lang.String getAPIPath()+
JSONObject[] service(Query call, + Authorization rights) + throws APIException+
APIException
public abstract class AbstractAPIHandler +extends HttpServlet +implements APIHandler+
Modifier and Type | +Field and Description | +
---|---|
static java.lang.Long |
+defaultAnonymousTime |
+
static java.lang.Long |
+defaultCookieTime |
+
Constructor and Description | +
---|
AbstractAPIHandler() |
+
AbstractAPIHandler(java.lang.String[] serverProtocolHostStub) |
+
Modifier and Type | +Method and Description | +
---|---|
static java.lang.String |
+createRandomString(java.lang.Integer length)
+Creates a random alphanumeric string
+ |
+
protected static void |
+deleteLoginCookie(HttpServletResponse response)
+Delete the login cookie if present
+ |
+
protected void |
+doGet(HttpServletRequest request,
+ HttpServletResponse response) |
+
protected void |
+doPost(HttpServletRequest request,
+ HttpServletResponse response) |
+
abstract JSONObject |
+getDefaultPermissions(BaseUserRole baseUserRole) |
+
static java.lang.String |
+getHash(java.lang.String input,
+ java.lang.String salt)
+Create a hash for an input an salt
+ |
+
static ClientIdentity |
+getIdentity(HttpServletRequest request,
+ HttpServletResponse response,
+ Query query)
+Checks a request for valid login data, either a existing session, a cookie or an access token
+ |
+
abstract BaseUserRole |
+getMinimalBaseUserRole() |
+
java.lang.String[] |
+getServerProtocolHostStub() |
+
JSONObject[] |
+service(Query call,
+ Authorization rights) |
+
abstract JSONObject |
+serviceImpl(Query call,
+ HttpServletResponse response,
+ Authorization rights,
+ JSONObjectWithDefault permissions) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAPIPath
public static final java.lang.Long defaultCookieTime+
public static final java.lang.Long defaultAnonymousTime+
public AbstractAPIHandler()+
public AbstractAPIHandler(java.lang.String[] serverProtocolHostStub)+
public java.lang.String[] getServerProtocolHostStub()+
getServerProtocolHostStub
in interface APIHandler
public abstract BaseUserRole getMinimalBaseUserRole()+
getMinimalBaseUserRole
in interface APIHandler
public abstract JSONObject getDefaultPermissions(BaseUserRole baseUserRole)+
getDefaultPermissions
in interface APIHandler
public JSONObject[] service(Query call, + Authorization rights) + throws APIException+
service
in interface APIHandler
APIException
public abstract JSONObject serviceImpl(Query call, + HttpServletResponse response, + Authorization rights, + JSONObjectWithDefault permissions) + throws APIException+
APIException
protected void doGet(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, + HttpServletResponse response) + throws ServletException, + java.io.IOException+
ServletException
java.io.IOException
public static ClientIdentity getIdentity(HttpServletRequest request, + HttpServletResponse response, + Query query)+
public static java.lang.String getHash(java.lang.String input, + java.lang.String salt)+
input
- salt
- public static java.lang.String createRandomString(java.lang.Integer length)+
length
- protected static void deleteLoginCookie(HttpServletResponse response)+
response
- public class Accounting +extends JSONObject+
NULL
Constructor and Description | +
---|
Accounting() |
+
Modifier and Type | +Method and Description | +
---|---|
Accounting |
+addRequest(java.lang.String path,
+ java.lang.String query) |
+
Accounting |
+cleanup()
+cleanup deletes all old entries and frees up the memory.
+ |
+
JSONObject |
+getRequests(java.lang.String path) |
+
static void |
+main(java.lang.String[] args) |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Accounting cleanup()+
public Accounting addRequest(java.lang.String path, + java.lang.String query)+
public JSONObject getRequests(java.lang.String path)+
public static void main(java.lang.String[] args)+
public class Authentication
+extends java.lang.Object
+Constructor and Description | +
---|
Authentication(ClientCredential credential,
+ JsonTray parent)
+create a new authentication object.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+checkExpireTime()
+Check if the authentication is still valid
+ |
+
void |
+delete()
+Delete the authentication.
+ |
+
java.lang.Object |
+get(java.lang.String key)
+Get a value from the internal JSONObject
+ |
+
boolean |
+getBoolean(java.lang.String key)
+Get a boolean form the internal JSONObject
+ |
+
boolean |
+getBoolean(java.lang.String key,
+ boolean defVal)
+Get a boolean form the internal JSONObject
+ |
+
ClientIdentity |
+getIdentity()
+Get the associated ClientIdentity
+ |
+
java.lang.String |
+getString(java.lang.String key)
+Get a String form the internal JSONObject
+ |
+
java.lang.String |
+getString(java.lang.String key,
+ java.lang.String defVal)
+Get a String form the internal JSONObject.
+ |
+
boolean |
+has(java.lang.String key)
+Check the internal JSONObject for a key
+ |
+
void |
+put(java.lang.String key,
+ java.lang.Object value)
+Put data into the internal JSONObject
+ |
+
void |
+remove(java.lang.String key)
+Remove an object from the internal JSONObject
+ |
+
void |
+setExpireTime(long time)
+Set an expire time.
+ |
+
Authentication |
+setIdentity(ClientIdentity id)
+Associate a ClientIdentity with this Authentication
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Authentication(ClientCredential credential, + JsonTray parent)+
credential
- a ClientCredential for which the Authentication should created forparent
- the storage object or null if there is no parent file (no persistency)public Authentication setIdentity(ClientIdentity id)+
id
- the ClientIdentity to associate withpublic ClientIdentity getIdentity()+
public void setExpireTime(long time)+
time
- seconds from now when the Authentication expirespublic boolean checkExpireTime()+
public java.lang.Object get(java.lang.String key)+
key
- the key for the objectpublic java.lang.String getString(java.lang.String key)+
key
- the key for the objectpublic java.lang.String getString(java.lang.String key, + java.lang.String defVal)+
key
- the key for the objectdefVal
- a default value in case the key does not exist or is not a Stringpublic boolean getBoolean(java.lang.String key)+
key
- the key for the objectpublic boolean getBoolean(java.lang.String key, + boolean defVal)+
key
- the key for the objectdefVal
- a default value in case the key does not exist or is not a booleanpublic boolean has(java.lang.String key)+
key
- the key to be looked forpublic void put(java.lang.String key, + java.lang.Object value)+
key
- the keyvalue
- the datapublic void remove(java.lang.String key)+
key
- the key of the objectpublic void delete()+
public class Authorization
+extends java.lang.Object
+Constructor and Description | +
---|
Authorization(ClientIdentity identity,
+ JsonTray parent,
+ UserRoles urs)
+create a new authorization object.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
Authorization |
+addService(ClientService service) |
+
Accounting |
+getAccounting() |
+
BaseUserRole |
+getBaseUserRole() |
+
ClientIdentity |
+getIdentity() |
+
JSONObject |
+getPermissionOverrides() |
+
JSONObjectWithDefault |
+getPermissions(APIHandler servlet) |
+
int |
+getRequestFrequency(java.lang.String path) |
+
ClientService |
+getService(java.lang.String serviceId) |
+
UserRole |
+getUserRole() |
+
boolean |
+isAdmin() |
+
Accounting |
+setAccounting(Accounting accounting) |
+
Authorization |
+setAdmin() |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ boolean value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ java.util.Collection<?> value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ double value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ int value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ JSONObject value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ long value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ java.util.Map<?,?> value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ java.lang.Object value) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ java.lang.String value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ boolean value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ java.util.Collection<?> value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ double value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ int value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ JSONObject value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ long value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ java.util.Map<?,?> value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ java.lang.Object value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ java.lang.String value) |
+
Authorization |
+setRequestFrequency(java.lang.String path,
+ int reqPerHour) |
+
Authorization |
+setUserRole(UserRole ur) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Authorization(ClientIdentity identity, + JsonTray parent, + UserRoles urs)+
identity
- parent
- the parent file or null if there is no parent file (no persistency)public Accounting setAccounting(Accounting accounting)+
public Accounting getAccounting()+
public Authorization setAdmin()+
public boolean isAdmin()+
public Authorization setRequestFrequency(java.lang.String path, + int reqPerHour)+
public int getRequestFrequency(java.lang.String path)+
public Authorization addService(ClientService service)+
public ClientService getService(java.lang.String serviceId)+
public ClientIdentity getIdentity()+
public BaseUserRole getBaseUserRole()+
public UserRole getUserRole()+
public Authorization setUserRole(UserRole ur)+
public JSONObjectWithDefault getPermissions(APIHandler servlet)+
public JSONObject getPermissionOverrides()+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + JSONObject value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + JSONObject value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + java.lang.String value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + java.lang.String value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + int value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + int value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + long value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + long value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + double value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + double value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + java.lang.Object value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + java.lang.Object value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + boolean value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + boolean value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + java.util.Map<?,?> value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + java.util.Map<?,?> value)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + java.util.Collection<?> value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + java.util.Collection<?> value)+
public enum BaseUserRole +extends java.lang.Enum<BaseUserRole>+
Enum Constant and Description | +
---|
ADMIN |
+
ANONYMOUS |
+
PRIVILEGED |
+
USER |
+
Modifier and Type | +Method and Description | +
---|---|
static BaseUserRole |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static BaseUserRole[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final BaseUserRole ANONYMOUS+
public static final BaseUserRole USER+
public static final BaseUserRole PRIVILEGED+
public static final BaseUserRole ADMIN+
public static BaseUserRole[] values()+
+for (BaseUserRole c : BaseUserRole.values()) + System.out.println(c); +
public static BaseUserRole valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class Client
+extends java.lang.Object
+Modifier | +Constructor and Description | +
---|---|
protected |
+Client(java.lang.String rawIdString) |
+
protected |
+Client(java.lang.String typeName,
+ java.lang.String untypedId) |
+
Modifier and Type | +Method and Description | +
---|---|
protected java.lang.String |
+getKey() |
+
java.lang.String |
+getName() |
+
JSONObject |
+toJSON() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
protected Client(java.lang.String rawIdString)+
protected Client(java.lang.String typeName, + java.lang.String untypedId)+
protected java.lang.String getKey()+
public java.lang.String getName()+
public java.lang.String toString()+
toString
in class java.lang.Object
public JSONObject toJSON()+
public static enum ClientCredential.Type +extends java.lang.Enum<ClientCredential.Type>+
Enum Constant and Description | +
---|
access_token |
+
cookie |
+
host |
+
passwd_login |
+
pubkey_challange |
+
resetpass_token |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isPersistent() |
+
static ClientCredential.Type |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ClientCredential.Type[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ClientCredential.Type passwd_login+
public static final ClientCredential.Type cookie+
public static final ClientCredential.Type access_token+
public static final ClientCredential.Type resetpass_token+
public static final ClientCredential.Type pubkey_challange+
public static final ClientCredential.Type host+
public static ClientCredential.Type[] values()+
+for (ClientCredential.Type c : ClientCredential.Type.values()) + System.out.println(c); +
public static ClientCredential.Type valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isPersistent()+
public class ClientCredential +extends Client+
Modifier and Type | +Class and Description | +
---|---|
static class |
+ClientCredential.Type |
+
Constructor and Description | +
---|
ClientCredential(ClientCredential.Type type,
+ java.lang.String untypedId) |
+
ClientCredential(java.lang.String rawIdString) |
+
Modifier and Type | +Method and Description | +
---|---|
ClientCredential.Type |
+getType() |
+
boolean |
+isAnonymous() |
+
boolean |
+isCookie() |
+
boolean |
+isPasswdLogin() |
+
boolean |
+isPersistent() |
+
boolean |
+isPubkeyChallange() |
+
boolean |
+isResetToken() |
+
boolean |
+isToken() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ClientCredential(java.lang.String rawIdString)+
public ClientCredential(ClientCredential.Type type, + java.lang.String untypedId)+
public boolean isPersistent()+
public boolean isPasswdLogin()+
public boolean isCookie()+
public boolean isToken()+
public boolean isResetToken()+
public boolean isPubkeyChallange()+
public boolean isAnonymous()+
public ClientCredential.Type getType()+
public static enum ClientIdentity.Type +extends java.lang.Enum<ClientIdentity.Type>+
Enum Constant and Description | +
---|
email |
+
host |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+isPersistent() |
+
static ClientIdentity.Type |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ClientIdentity.Type[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ClientIdentity.Type email+
public static final ClientIdentity.Type host+
public static ClientIdentity.Type[] values()+
+for (ClientIdentity.Type c : ClientIdentity.Type.values()) + System.out.println(c); +
public static ClientIdentity.Type valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isPersistent()+
public class ClientIdentity +extends Client+
Modifier and Type | +Class and Description | +
---|---|
static class |
+ClientIdentity.Type |
+
Constructor and Description | +
---|
ClientIdentity(ClientIdentity.Type type,
+ java.lang.String untypedId) |
+
ClientIdentity(java.lang.String rawIdString) |
+
Modifier and Type | +Method and Description | +
---|---|
ClientIdentity.Type |
+getType() |
+
boolean |
+isAnonymous() |
+
boolean |
+isEmail() |
+
boolean |
+isPersistent() |
+
JSONObject |
+toJSON() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ClientIdentity(java.lang.String rawIdString)+
public ClientIdentity(ClientIdentity.Type type, + java.lang.String untypedId)+
public boolean isPersistent()+
public boolean isEmail()+
public boolean isAnonymous()+
public ClientIdentity.Type getType()+
public JSONObject toJSON()+ +
public static enum ClientService.Type +extends java.lang.Enum<ClientService.Type>+
Enum Constant and Description | +
---|
apiAccess |
+
Modifier and Type | +Method and Description | +
---|---|
static ClientService.Type |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ClientService.Type[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ClientService.Type apiAccess+
public static ClientService.Type[] values()+
+for (ClientService.Type c : ClientService.Type.values()) + System.out.println(c); +
public static ClientService.Type valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class ClientService +extends Client+
Modifier and Type | +Class and Description | +
---|---|
static class |
+ClientService.Type |
+
Constructor and Description | +
---|
ClientService(ClientService.Type type,
+ java.lang.String untypedId) |
+
ClientService(java.lang.String rawIdString) |
+
Modifier and Type | +Method and Description | +
---|---|
java.util.Date |
+getAccessFrom() |
+
java.util.Date |
+getAccessUntil() |
+
ClientService.Type |
+getType() |
+
ClientService |
+setAccessFrom(java.util.Date date) |
+
ClientService |
+setAccessUntil(java.util.Date date) |
+
ClientService |
+setMetadata(JSONObject json) |
+
JSONObject |
+toJSON() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ClientService(java.lang.String rawIdString)+
public ClientService(ClientService.Type type, + java.lang.String untypedId)+
public ClientService setMetadata(JSONObject json)+
public ClientService setAccessFrom(java.util.Date date)+
public ClientService setAccessUntil(java.util.Date date)+
public java.util.Date getAccessFrom()+
public java.util.Date getAccessUntil()+
public ClientService.Type getType()+
public JSONObject toJSON()+ +
public class FileHandler
+extends ResourceHandler
+Constructor and Description | +
---|
FileHandler(int expiresSeconds)
+cerate a custom ResourceHandler with more caching
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+doResponseHeaders(HttpServletResponse response,
+ Resource resource,
+ java.lang.String mimeType) |
+
Resource |
+getResource(java.lang.String path) |
+
void |
+handle(java.lang.String target,
+ Request baseRequest,
+ HttpServletRequest request,
+ HttpServletResponse response) |
+
static void |
+setCaching(HttpServletResponse response,
+ int expiresSeconds) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public FileHandler(int expiresSeconds)+
expiresSeconds
- the time each file shall stay in the cachepublic void handle(java.lang.String target, + Request baseRequest, + HttpServletRequest request, + HttpServletResponse response) + throws java.io.IOException, + ServletException+
java.io.IOException
ServletException
protected void doResponseHeaders(HttpServletResponse response, + Resource resource, + java.lang.String mimeType)+
public static void setCaching(HttpServletResponse response, + int expiresSeconds)+
public Resource getResource(java.lang.String path)+
Enum Constant and Description | +
---|
OFF |
+
ON |
+
ONLY |
+
REDIRECT |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+equals(HttpsMode other) |
+
boolean |
+isGreaterOrEqualTo(HttpsMode other) |
+
boolean |
+isGreaterThan(HttpsMode other) |
+
boolean |
+isSmallerOrEqualTo(HttpsMode other) |
+
boolean |
+isSmallerThan(HttpsMode other) |
+
static HttpsMode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static HttpsMode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final HttpsMode OFF+
public static final HttpsMode ON+
public static final HttpsMode REDIRECT+
public static final HttpsMode ONLY+
public static HttpsMode[] values()+
+for (HttpsMode c : HttpsMode.values()) + System.out.println(c); +
public static HttpsMode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean equals(HttpsMode other)+
public boolean isSmallerThan(HttpsMode other)+
public boolean isSmallerOrEqualTo(HttpsMode other)+
public boolean isGreaterThan(HttpsMode other)+
public boolean isGreaterOrEqualTo(HttpsMode other)+
public class Query
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
AccessTracker.Track |
+track |
+
Constructor and Description | +
---|
Query(HttpServletRequest request) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+finalize() |
+
boolean |
+get(java.lang.String key,
+ boolean dflt) |
+
java.util.Date |
+get(java.lang.String key,
+ java.util.Date dflt,
+ int timezoneOffset) |
+
double |
+get(java.lang.String key,
+ double dflt) |
+
int |
+get(java.lang.String key,
+ int dflt) |
+
long |
+get(java.lang.String key,
+ long dflt) |
+
java.lang.String |
+get(java.lang.String key,
+ java.lang.String dflt) |
+
java.lang.String[] |
+get(java.lang.String key,
+ java.lang.String[] dflt,
+ java.lang.String delim) |
+
long |
+getAccessTime() |
+
java.lang.String |
+getClientHost() |
+
java.util.Set<java.lang.String> |
+getKeys() |
+
java.util.Map<java.lang.String,java.lang.String> |
+getMap() |
+
HttpServletRequest |
+getRequest() |
+
long |
+getTimeSinceLastAccess() |
+
int |
+hashCode() |
+
void |
+initGET(java.util.Map<java.lang.String,java.lang.String> q) |
+
void |
+initPOST(java.util.Map<java.lang.String,byte[]> map)
+Deprecated.
+ |
+
boolean |
+isDoS_blackout() |
+
boolean |
+isDoS_servicereduction() |
+
boolean |
+isLocalhostAccess() |
+
void |
+recordEvent(java.lang.String eventName,
+ java.lang.Object eventValue) |
+
void |
+setResponse(HttpServletResponse response,
+ java.lang.String mime) |
+
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait
public AccessTracker.Track track+
public void finalize()+
finalize
in class java.lang.Object
public void initGET(java.util.Map<java.lang.String,java.lang.String> q)+
@Deprecated +public void initPOST(java.util.Map<java.lang.String,byte[]> map)+
public java.lang.String getClientHost()+
public boolean isLocalhostAccess()+
public long getAccessTime()+
public long getTimeSinceLastAccess()+
public boolean isDoS_blackout()+
public boolean isDoS_servicereduction()+
public void recordEvent(java.lang.String eventName, + java.lang.Object eventValue)+
public java.lang.String get(java.lang.String key, + java.lang.String dflt)+
public java.lang.String[] get(java.lang.String key, + java.lang.String[] dflt, + java.lang.String delim)+
public int get(java.lang.String key, + int dflt)+
public long get(java.lang.String key, + long dflt)+
public double get(java.lang.String key, + double dflt)+
public boolean get(java.lang.String key, + boolean dflt)+
public java.util.Date get(java.lang.String key, + java.util.Date dflt, + int timezoneOffset)+
public java.util.Map<java.lang.String,java.lang.String> getMap()+
public java.util.Set<java.lang.String> getKeys()+
public void setResponse(HttpServletResponse response, + java.lang.String mime)+
public int hashCode()+
hashCode
in class java.lang.Object
public HttpServletRequest getRequest()+
public class Settings +extends JsonFile+
NULL
Constructor and Description | +
---|
Settings(java.io.File file) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+getKeyAlgorithm()
+Get the key algorithm e.g.
+ |
+
java.lang.String |
+getPeerHash()
+Get the hash of the public key
+ |
+
java.lang.String |
+getPeerHashAlgorithm()
+Get the hash algorithm for the public key
+ |
+
java.security.PrivateKey |
+getPrivateKey()
+Get the private key as PrivateKey
+ |
+
java.lang.String |
+getPrivateKeyAsString()
+Get the private key as String
+ |
+
java.security.PublicKey |
+getPublicKey()
+Get the public key as PublicKey
+ |
+
java.lang.String |
+getPublicKeyAsString()
+Get the public key as String
+ |
+
boolean |
+loadPrivateKey()
+Load private key from file
+ |
+
boolean |
+loadPublicKey()
+Load public key from file
+ |
+
void |
+setPrivateKey(java.security.PrivateKey key,
+ java.lang.String algorithm)
+Set the private key
+ |
+
void |
+setPublicKey(java.security.PublicKey key,
+ java.lang.String algorithm)
+Set the public key
+ |
+
commit, getFile, put, put, put, put, put, put, put, put, putAll, remove, toJSONObject
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, putOnce, putOpt, quote, quote, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Settings(java.io.File file) + throws java.io.IOException+
java.io.IOException
public java.security.PrivateKey getPrivateKey()+
public java.lang.String getPrivateKeyAsString()+
public java.security.PublicKey getPublicKey()+
public java.lang.String getPublicKeyAsString()+
public java.lang.String getKeyAlgorithm()+
public java.lang.String getPeerHash()+
public java.lang.String getPeerHashAlgorithm()+
public boolean loadPrivateKey()+
public boolean loadPublicKey()+
public void setPrivateKey(java.security.PrivateKey key, + java.lang.String algorithm)+
key
- algorithm
- public void setPublicKey(java.security.PublicKey key, + java.lang.String algorithm)+
key
- algorithm
- public class UserRole
+extends java.lang.Object
+Constructor and Description | +
---|
UserRole(java.lang.String name,
+ BaseUserRole baseUserRole,
+ UserRole parent,
+ JSONObject sourceObject) |
+
Modifier and Type | +Method and Description | +
---|---|
BaseUserRole |
+getBaseUserRole() |
+
java.lang.String |
+getDisplayName() |
+
java.lang.String |
+getName() |
+
UserRole |
+getParent() |
+
JSONObject |
+getPermissionOverrides() |
+
JSONObject |
+getPermissionOverrides(APIHandler servlet) |
+
JSONObject |
+getPermissionOverrides(java.lang.String servletCanonicalName) |
+
JSONObjectWithDefault |
+getPermissions(APIHandler servlet) |
+
void |
+setDisplayName(java.lang.String name) |
+
void |
+setParent(UserRole parent) |
+
void |
+setPermission(APIHandler servlet,
+ java.lang.String key,
+ JSONObject value) |
+
void |
+setPermission(java.lang.String servletCanonicalName,
+ java.lang.String key,
+ JSONObject value) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public UserRole(java.lang.String name, + BaseUserRole baseUserRole, + UserRole parent, + JSONObject sourceObject)+
name
- the key in the sourceObjectbaseUserRole
- parent
- if a parent user role existssourceObject
- JSONObject in some storage file. Write changes here if existpublic BaseUserRole getBaseUserRole()+
public java.lang.String getName()+
public java.lang.String getDisplayName()+
public void setDisplayName(java.lang.String name)+
public UserRole getParent()+
public void setParent(UserRole parent)+
public JSONObjectWithDefault getPermissions(APIHandler servlet)+
public JSONObject getPermissionOverrides()+
public JSONObject getPermissionOverrides(java.lang.String servletCanonicalName)+
public JSONObject getPermissionOverrides(APIHandler servlet)+
public void setPermission(java.lang.String servletCanonicalName, + java.lang.String key, + JSONObject value)+
public void setPermission(APIHandler servlet, + java.lang.String key, + JSONObject value)+
public class UserRoles
+extends java.lang.Object
+Constructor and Description | +
---|
UserRoles(JSONObject obj) |
+
Modifier and Type | +Method and Description | +
---|---|
UserRole |
+getDefaultUserRole(BaseUserRole bur) |
+
UserRole |
+getUserRoleFromString(java.lang.String ur) |
+
java.util.Map<java.lang.String,UserRole> |
+getUserRoles() |
+
boolean |
+has(java.lang.String ur) |
+
void |
+loadDefaultUserRoles()
+Create default user roles, use names of the BaseUserRoles
+ |
+
void |
+loadUserRolesFromObject() |
+
void |
+setDefaultUserRole(BaseUserRole bur,
+ UserRole ur) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public UserRoles(JSONObject obj) + throws java.lang.Exception+
java.lang.Exception
public void loadDefaultUserRoles()+
public void loadUserRolesFromObject() + throws java.lang.IllegalArgumentException+
java.lang.IllegalArgumentException
public UserRole getDefaultUserRole(BaseUserRole bur)+
public void setDefaultUserRole(BaseUserRole bur, + UserRole ur)+
public boolean has(java.lang.String ur)+
public UserRole getUserRoleFromString(java.lang.String ur)+
public java.util.Map<java.lang.String,UserRole> getUserRoles()+
Interface | +Description | +
---|---|
APIHandler | ++ |
Class | +Description | +
---|---|
AbstractAPIHandler | ++ |
Accounting | +
+ Accounting asks: what has the user done.
+ |
+
Authentication | +
+ Authentication asks: who is the user.
+ |
+
Authorization | +
+ Authorization asks: what is the user allowed to do? This class holds user rights.
+ |
+
Client | ++ |
ClientCredential | +
+ A credential is used as key in DAO.authentication
+ |
+
ClientIdentity | +
+ an identity is only a string which contains details sufficient enough to
+ identify a user and to send data to that user
+ |
+
ClientService | ++ |
FileHandler | ++ |
Query | ++ |
Settings | ++ |
UserRole | ++ |
UserRoles | ++ |
Enum | +Description | +
---|---|
BaseUserRole | ++ |
ClientCredential.Type | ++ |
ClientIdentity.Type | ++ |
ClientService.Type | ++ |
HttpsMode | ++ |
Exception | +Description | +
---|---|
APIException | ++ |
public class MQTTPublisher
+extends java.lang.Object
+Constructor and Description | +
---|
MQTTPublisher(java.lang.String address) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+publish(java.lang.String channel,
+ java.lang.String message) |
+
void |
+publish(java.lang.String channel,
+ java.lang.String[] messages) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Class | +Description | +
---|---|
MQTTPublisher | ++ |
public class SusiProcedures +extends java.util.LinkedHashMap<java.util.regex.Pattern,java.util.function.Function<java.util.regex.Matcher,SusiThought>> +implements java.util.Map<java.util.regex.Pattern,java.util.function.Function<java.util.regex.Matcher,SusiThought>>+
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
java.util.Map.Entry<K,V>
Constructor and Description | +
---|
SusiProcedures() |
+
Modifier and Type | +Method and Description | +
---|---|
SusiThought |
+deduce(java.lang.String q)
+Deduction is the application of an intent on perception and a world model.
+ |
+
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public SusiThought deduce(java.lang.String q)+
q
- the perceptionpublic class SusiThought +extends JSONObject+
Modifier and Type | +Field and Description | +
---|---|
java.lang.String |
+data_name |
+
java.lang.String |
+metadata_name |
+
static java.util.regex.Pattern |
+variable_pattern |
+
NULL
Constructor and Description | +
---|
SusiThought()
+create an empty thought, to be filled with single data entities.
+ |
+
SusiThought(JSONObject json)
+create a clone of a json object as a SusiThought object
+ |
+
SusiThought(java.util.regex.Matcher matcher)
+Create an initial thought using the matcher on an expression.
+ |
+
SusiThought(java.lang.String metadata_name,
+ java.lang.String data_name)
+Deprecated.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
SusiThought |
+addObservation(java.lang.String featureName,
+ java.lang.String observation)
+If during thinking we observe something that we want to memorize, we can memorize this here
+ |
+
boolean |
+equals(java.lang.Object o) |
+
int |
+getCount()
+The number of information pieces in a set of informations may have a count.
+ |
+
JSONArray |
+getData()
+Information contained in this thought can get returned as a table, a set of information pieces.
+ |
+
int |
+getHits() |
+
int |
+getOffset() |
+
java.lang.String |
+getQuery() |
+
static void |
+main(java.lang.String[] args) |
+
SusiThought |
+mergeData(JSONArray table1)
+Merging of data is required during an mind-meld.
+ |
+
SusiThought |
+setData(JSONArray table)
+Information contained in this thought has the form of a result set table, organized in rows and columns.
+ |
+
SusiThought |
+setHits(int hits)
+While the number of information pieces in a whole has a count, the number of relevant
+ information pieces may have been extracted.
+ |
+
SusiThought |
+setOffset(int offset)
+In a series of information pieces the first information piece has number 0.
+ |
+
SusiThought |
+setProcess(java.lang.String processName)
+The process which created this thought may have a name or description string.
+ |
+
SusiThought |
+setQuery(java.lang.String query)
+If this thought was the result of a retrieval using a specific expression, that expression is
+ called the query.
+ |
+
SusiThought |
+setScraperInfo(java.lang.String scraperInfo)
+If the expression to create this thought had an agent that expressed the result set of the
+ information contained in this thought, it is called the scraper.
+ |
+
java.lang.String |
+unify(java.lang.String statement)
+Unification applies a piece of memory within the current argument to a statement
+ which creates an instantiated statement
+ |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public final java.lang.String metadata_name+
public final java.lang.String data_name+
public static final java.util.regex.Pattern variable_pattern+
public SusiThought()+
public SusiThought(JSONObject json)+
json
- the 'other' thought, probably an exported and re-imported thoughtpublic SusiThought(java.util.regex.Matcher matcher)+
matcher
- @Deprecated +public SusiThought(java.lang.String metadata_name, + java.lang.String data_name)+
public boolean equals(java.lang.Object o)+
equals
in class java.lang.Object
public SusiThought setOffset(int offset)+
offset
- the offset to a previous set of information pieces.public int getOffset()+
public int getCount()+
public SusiThought setHits(int hits)+
hits
- number of information piecespublic int getHits()+
public SusiThought setProcess(java.lang.String processName)+
query
- the process which formed this thoughtpublic SusiThought setQuery(java.lang.String query)+
query
- the expression which caused that this thought was formedpublic java.lang.String getQuery()+
public SusiThought setScraperInfo(java.lang.String scraperInfo)+
scraperInfo
- the scraper that created this thoughtpublic SusiThought setData(JSONArray table)+
table
- the information for this thought.public JSONArray getData()+
public SusiThought mergeData(JSONArray table1)+
table
- the information to be melted into our existing table.public SusiThought addObservation(java.lang.String featureName, + java.lang.String observation)+
featureName
- the object keyobservation
- the object valuepublic java.lang.String unify(java.lang.String statement)+
statement
- public static void main(java.lang.String[] args)+
public class SusiTransfer
+extends java.lang.Object
+Constructor and Description | +
---|
SusiTransfer(java.lang.String mappingExpression)
+Create a new transfer.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
JSONArray |
+conclude(JSONArray choices)
+A conclusion from choices is done by the application of a function on the choice set.
+ |
+
JSONObject |
+extract(JSONObject choice)
+transfer mappings can be used to extract specific information from a json object to
+ create a new json object.
+ |
+
java.util.Set<java.lang.String> |
+keys()
+get the set of transfer keys
+ |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public SusiTransfer(java.lang.String mappingExpression)+
mapping
- public java.util.Set<java.lang.String> keys()+
public JSONObject extract(JSONObject choice)+
choice
- one 'row' of a SusiThought data arraypublic JSONArray conclude(JSONArray choices)+
choices
- the given set of json objects from the data object of a SusiThoughtpublic java.lang.String toString()+
toString
in class java.lang.Object
Class | +Description | +
---|---|
SusiProcedures | ++ |
SusiThought | +
+ A thought is a piece of data that can be remembered.
+ |
+
SusiTransfer | +
+ Transfer is the ability to perceive a given thought in a different representation
+ in such a way that it applies on an intent or an intent set.
+ |
+
public class ASCII
+extends java.lang.Object
+implements java.util.Comparator<java.lang.String>
+Modifier and Type | +Field and Description | +
---|---|
static ASCII |
+identityASCIIComparator |
+
boolean |
+insensitive |
+
static ASCII |
+insensitiveASCIIComparator |
+
Constructor and Description | +
---|
ASCII(boolean insensitive) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.Object |
+clone() |
+
int |
+compare(java.lang.String s0,
+ java.lang.String s1) |
+
boolean |
+equals(java.lang.Object obj) |
+
boolean |
+equals(java.lang.String s0,
+ java.lang.String s1) |
+
static byte[] |
+getBytes(java.lang.String s) |
+
static byte[] |
+getBytes(java.lang.String s,
+ int beginIndex,
+ int endIndex) |
+
int |
+hashCode() |
+
static java.lang.String |
+String(byte[] bytes) |
+
static java.lang.String |
+String(byte[] bytes,
+ int offset,
+ int length) |
+
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final ASCII insensitiveASCIIComparator+
public static final ASCII identityASCIIComparator+
public boolean insensitive+
public java.lang.Object clone()+
clone
in class java.lang.Object
public int compare(java.lang.String s0, + java.lang.String s1)+
compare
in interface java.util.Comparator<java.lang.String>
public boolean equals(java.lang.String s0, + java.lang.String s1)+
public boolean equals(java.lang.Object obj)+
equals
in interface java.util.Comparator<java.lang.String>
equals
in class java.lang.Object
public int hashCode()+
hashCode
in class java.lang.Object
public static final java.lang.String String(byte[] bytes)+
public static final java.lang.String String(byte[] bytes, + int offset, + int length)+
public static final byte[] getBytes(java.lang.String s)+
public static final byte[] getBytes(java.lang.String s, + int beginIndex, + int endIndex)+
public class Browser
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+blankTypeString |
+
static boolean |
+canExecUnix |
+
static boolean |
+isMacArchitecture |
+
static boolean |
+isUnixFS |
+
static boolean |
+isWin32 |
+
static boolean |
+isWindows |
+
static int |
+maxPathLength |
+
static int |
+systemMacOSC |
+
static int |
+systemMacOSX |
+
static int |
+systemOS |
+
static int |
+systemUnix |
+
static int |
+systemUnknown |
+
static int |
+systemWindows |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+main(java.lang.String[] args) |
+
static void |
+openBrowser(java.lang.String url) |
+
static void |
+openBrowserClassic(java.lang.String url) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int systemMacOSC+
public static final int systemMacOSX+
public static final int systemUnix+
public static final int systemWindows+
public static final int systemUnknown+
public static final java.lang.String blankTypeString+
public static final int systemOS+
public static final boolean isMacArchitecture+
public static final boolean isUnixFS+
public static final boolean canExecUnix+
public static final boolean isWindows+
public static final boolean isWin32+
public static int maxPathLength+
public static class BufferedRandomAccessFile.IndexedLine
+extends java.lang.Object
+Constructor and Description | +
---|
IndexedLine(long pos,
+ byte[] text) |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+getPos() |
+
byte[] |
+getText() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static class BufferedRandomAccessFile.Test
+extends TestCase
+Modifier and Type | +Method and Description | +
---|---|
static java.io.File |
+getTestFile() |
+
static java.lang.String[] |
+getTestLines(int count) |
+
void |
+setUp() |
+
void |
+tearDown() |
+
void |
+testSequentialWriteThenRead() |
+
void |
+testSimultanousWriteAndRead() |
+
static void |
+writeLines(java.io.File f,
+ java.lang.String[] l) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.io.File getTestFile()+
public static java.lang.String[] getTestLines(int count)+
public static void writeLines(java.io.File f, + java.lang.String[] l) + throws java.io.IOException+
java.io.IOException
public void setUp() + throws java.lang.Exception+
java.lang.Exception
public void tearDown() + throws java.lang.Exception+
java.lang.Exception
public void testSimultanousWriteAndRead() + throws java.io.IOException+
java.io.IOException
public void testSequentialWriteThenRead() + throws java.io.IOException+
java.io.IOException
public class BufferedRandomAccessFile
+extends java.io.RandomAccessFile
+Modifier and Type | +Class and Description | +
---|---|
static class |
+BufferedRandomAccessFile.IndexedLine |
+
static class |
+BufferedRandomAccessFile.Test |
+
Constructor and Description | +
---|
BufferedRandomAccessFile(java.io.File file,
+ java.lang.String mode) |
+
BufferedRandomAccessFile(java.io.File file,
+ java.lang.String mode,
+ int bufsize) |
+
BufferedRandomAccessFile(java.lang.String filename,
+ java.lang.String mode,
+ int bufsize)
+Creates a new instance of the BufferedRandomAccessFile.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+appendLine(byte[] b)
+add a line at the end of the file
+ |
+
long |
+getFilePointer()
+Returns the current position of the pointer in the file.
+ |
+
static void |
+main(java.lang.String[] args) |
+
int |
+read()
+Reads one byte form the current position
+ |
+
int |
+read(byte[] b,
+ int off,
+ int len)
+Reads the set number of bytes into the passed buffer.
+ |
+
void |
+read(byte[] b,
+ long pos) |
+
BufferedRandomAccessFile.IndexedLine |
+readIndexedLine()
+Reading of text lines will produce index information along with the parsed text.
+ |
+
void |
+seek(long pos)
+Overridden seek method always throws exception: this would not work in concurrent environments.
+ |
+
close, getChannel, getFD, length, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public BufferedRandomAccessFile(java.lang.String filename, + java.lang.String mode, + int bufsize) + throws java.io.IOException+
filename
- The path of the file to open.mode
- Specifies the mode to use ("r", "rw", etc.) See the
+ BufferedLineReader documentation for more information.bufsize
- The buffer size (in bytes) to use.java.io.IOException
public BufferedRandomAccessFile(java.io.File file, + java.lang.String mode, + int bufsize) + throws java.io.IOException+
java.io.IOException
public BufferedRandomAccessFile(java.io.File file, + java.lang.String mode) + throws java.io.IOException+
java.io.IOException
public final int read() + throws java.io.IOException+
read
in class java.io.RandomAccessFile
java.io.IOException
public int read(byte[] b, + int off, + int len) + throws java.io.IOException+
read
in class java.io.RandomAccessFile
b
- The buffer to read the bytes into.off
- Byte offset within the file to start reading fromlen
- Number of bytes to read into the buffer.java.io.IOException
public long getFilePointer() + throws java.io.IOException+
getFilePointer
in class java.io.RandomAccessFile
java.io.IOException
public void seek(long pos) + throws java.io.IOException+
seek
in class java.io.RandomAccessFile
java.io.IOException
public void read(byte[] b, + long pos) + throws java.io.IOException+
java.io.IOException
public long appendLine(byte[] b) + throws java.io.IOException+
b
- java.io.IOException
public BufferedRandomAccessFile.IndexedLine readIndexedLine() + throws java.io.IOException+
java.io.IOException
public static void main(java.lang.String[] args)+
public final class ByteBuffer
+extends java.io.OutputStream
+Constructor and Description | +
---|
ByteBuffer() |
+
ByteBuffer(byte[] bb) |
+
ByteBuffer(int initLength) |
+
ByteBuffer(java.lang.String s) |
+
Modifier and Type | +Method and Description | +
---|---|
ByteBuffer |
+append(byte b) |
+
ByteBuffer |
+append(byte[] bb) |
+
ByteBuffer |
+append(byte[] bb,
+ int of,
+ int le) |
+
ByteBuffer |
+append(char b) |
+
ByteBuffer |
+append(int i) |
+
ByteBuffer |
+append(java.lang.String s) |
+
byte |
+byteAt(int pos) |
+
void |
+clear() |
+
static boolean |
+contains(java.util.Collection<byte[]> collection,
+ byte[] key) |
+
void |
+copyTo(byte[] otherArray,
+ int offset) |
+
static boolean |
+equals(byte[] buffer,
+ byte[] pattern) |
+
static boolean |
+equals(byte[] b0,
+ int off0,
+ byte[] b1,
+ int off1,
+ int length) |
+
byte[] |
+getBytes() |
+
byte[] |
+getBytes(int start,
+ int len) |
+
static int |
+indexOf(byte[] b,
+ byte[] pattern,
+ int start) |
+
int |
+indexOf(byte[] bs,
+ int start) |
+
boolean |
+isEmpty() |
+
int |
+length() |
+
static int |
+remove(java.util.Collection<byte[]> collection,
+ byte[] key) |
+
static java.util.List<byte[]> |
+split(byte[] b,
+ byte s) |
+
boolean |
+startsWith(byte[] bs,
+ int start) |
+
java.lang.String |
+toString() |
+
java.lang.String |
+toString(int left,
+ int length) |
+
java.lang.StringBuilder |
+toStringBuilder(int left,
+ int length,
+ int sblength) |
+
ByteBuffer |
+trim(int start) |
+
ByteBuffer |
+trim(int start,
+ int len) |
+
void |
+write(byte[] bb) |
+
void |
+write(byte[] bb,
+ int of,
+ int le) |
+
void |
+write(char b) |
+
void |
+write(int b) |
+
void |
+writeTo(java.io.OutputStream dest) |
+
close, flush
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ByteBuffer()+
public ByteBuffer(int initLength)+
public ByteBuffer(byte[] bb)+
public ByteBuffer(java.lang.String s)+
public void clear()+
public int length()+
public boolean isEmpty()+
public void write(int b)+
write
in class java.io.OutputStream
public void write(char b)+
public void write(byte[] bb)+
write
in class java.io.OutputStream
public void write(byte[] bb, + int of, + int le)+
write
in class java.io.OutputStream
public ByteBuffer append(byte b)+
public ByteBuffer append(char b)+
public ByteBuffer append(int i)+
public ByteBuffer append(byte[] bb)+
public ByteBuffer append(byte[] bb, + int of, + int le)+
public ByteBuffer append(java.lang.String s)+
public byte byteAt(int pos)+
public int indexOf(byte[] bs, + int start)+
public static int indexOf(byte[] b, + byte[] pattern, + int start)+
public boolean startsWith(byte[] bs, + int start)+
public byte[] getBytes()+
public byte[] getBytes(int start, + int len)+
public void copyTo(byte[] otherArray, + int offset)+
public ByteBuffer trim(int start)+
public ByteBuffer trim(int start, + int len)+
public java.lang.String toString()+
toString
in class java.lang.Object
public java.lang.String toString(int left, + int length)+
public java.lang.StringBuilder toStringBuilder(int left, + int length, + int sblength)+
public static boolean equals(byte[] buffer, + byte[] pattern)+
public static boolean equals(byte[] b0, + int off0, + byte[] b1, + int off1, + int length)+
public void writeTo(java.io.OutputStream dest) + throws java.io.IOException+
java.io.IOException
public static boolean contains(java.util.Collection<byte[]> collection, + byte[] key)+
public static int remove(java.util.Collection<byte[]> collection, + byte[] key)+
public static java.util.List<byte[]> split(byte[] b, + byte s)+
public class CacheMap<K,V>
+extends java.lang.Object
+Constructor and Description | +
---|
CacheMap(int maxSize) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+clear() |
+
boolean |
+exist(K key) |
+
boolean |
+full() |
+
V |
+get(K key) |
+
java.util.LinkedHashMap<K,V> |
+getMap() |
+
CacheStats |
+getStats() |
+
JSONObject |
+getStatsJson() |
+
V |
+put(K key,
+ V value) |
+
V |
+remove(K key) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void clear()+
public CacheStats getStats()+
public JSONObject getStatsJson()+
public boolean full()+
public boolean exist(K key)+
public class CacheSet<K>
+extends java.lang.Object
+Constructor and Description | +
---|
CacheSet(int maxSize) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+add(K key) |
+
void |
+clear() |
+
boolean |
+contains(K key) |
+
boolean |
+full() |
+
CacheStats |
+getStats() |
+
JSONObject |
+getStatsJson() |
+
boolean |
+remove(K key) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void clear()+
public CacheStats getStats()+
public JSONObject getStatsJson()+
public boolean full()+
public boolean add(K key)+
public boolean contains(K key)+
public boolean remove(K key)+
public class CacheStats
+extends java.lang.Object
+Constructor and Description | +
---|
CacheStats() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+clear() |
+
long |
+getHit() |
+
JSONObject |
+getJSON() |
+
long |
+getMiss() |
+
long |
+getUpdate() |
+
void |
+hit() |
+
void |
+miss() |
+
void |
+update() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void clear()+
public void update()+
public void hit()+
public void miss()+
public long getUpdate()+
public long getHit()+
public long getMiss()+
public JSONObject getJSON()+
public final class CharacterCoding
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static java.lang.String |
+html2unicode(java.lang.String text)
+Replaces HTML-encoded characters with unicode representation.
+ |
+
static java.lang.String |
+unicode2html(java.lang.String text,
+ boolean amp)
+Replaces characters which have special representation in HTML.
+ |
+
static java.lang.String |
+unicode2xml(java.lang.String text,
+ boolean amp)
+Replaces characters which have special representation in XML.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String unicode2xml(java.lang.String text, + boolean amp)+
text
- text with character to replaceamp
- true if ampersands shall be replaced, else falseMAPPING4XML
public static java.lang.String unicode2html(java.lang.String text, + boolean amp)+
text
- text with character to replaceamp
- true if ampersands shall be replaced, else falseMAPPING4HTML
public static java.lang.String html2unicode(java.lang.String text)+
text
- text with character to replacepublic static enum Classification.ContentDomain +extends java.lang.Enum<Classification.ContentDomain>+
Enum Constant and Description | +
---|
ALL |
+
APP |
+
AUDIO |
+
CTRL |
+
IMAGE |
+
TEXT |
+
VIDEO |
+
Modifier and Type | +Method and Description | +
---|---|
static Classification.ContentDomain |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Classification.ContentDomain[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Classification.ContentDomain ALL+
public static final Classification.ContentDomain TEXT+
public static final Classification.ContentDomain IMAGE+
public static final Classification.ContentDomain AUDIO+
public static final Classification.ContentDomain VIDEO+
public static final Classification.ContentDomain APP+
public static final Classification.ContentDomain CTRL+
public static Classification.ContentDomain[] values()+
+for (Classification.ContentDomain c : Classification.ContentDomain.values()) + System.out.println(c); +
public static Classification.ContentDomain valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class Classification
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+Classification.ContentDomain |
+
Constructor and Description | +
---|
Classification() |
+
Modifier and Type | +Method and Description | +
---|---|
static int |
+countMimes() |
+
static java.lang.String |
+ext2mime(java.lang.String ext) |
+
static java.lang.String |
+ext2mime(java.lang.String ext,
+ java.lang.String dfltMime) |
+
static Classification.ContentDomain |
+getContentDomainFromExt(java.lang.String ext)
+Get the content domain of a document according to the file extension.
+ |
+
static Classification.ContentDomain |
+getContentDomainFromMime(java.lang.String mime)
+Get the content domain of a document according to the mime type.
+ |
+
static void |
+init(java.io.File mimeFile) |
+
static boolean |
+isAnyKnownExtension(java.lang.String ext) |
+
static boolean |
+isApplicationExtension(java.lang.String appsExt) |
+
static boolean |
+isAudioExtension(java.lang.String audioExt) |
+
static boolean |
+isControlExtension(java.lang.String ctrlExt) |
+
static boolean |
+isImageExtension(java.lang.String imageExt) |
+
static boolean |
+isMediaExtension(java.lang.String mediaExt) |
+
static boolean |
+isPictureMime(java.lang.String mimeType) |
+
static boolean |
+isTextExtension(java.lang.String textExt) |
+
static boolean |
+isVideoExtension(java.lang.String videoExt) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void init(java.io.File mimeFile)+
public static boolean isTextExtension(java.lang.String textExt)+
public static boolean isMediaExtension(java.lang.String mediaExt)+
public static boolean isImageExtension(java.lang.String imageExt)+
public static boolean isAudioExtension(java.lang.String audioExt)+
public static boolean isVideoExtension(java.lang.String videoExt)+
public static boolean isApplicationExtension(java.lang.String appsExt)+
public static boolean isControlExtension(java.lang.String ctrlExt)+
public static boolean isAnyKnownExtension(java.lang.String ext)+
public static Classification.ContentDomain getContentDomainFromExt(java.lang.String ext)+
public static Classification.ContentDomain getContentDomainFromMime(java.lang.String mime)+
public static boolean isPictureMime(java.lang.String mimeType)+
public static int countMimes()+
public static java.lang.String ext2mime(java.lang.String ext)+
public static java.lang.String ext2mime(java.lang.String ext, + java.lang.String dfltMime)+
public class CommonPattern
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.util.regex.Pattern |
+AMP |
+
static java.util.regex.Pattern |
+AMP_HTML |
+
static java.util.regex.Pattern |
+BACKSLASH |
+
static java.util.regex.Pattern |
+COMMA |
+
static java.util.regex.Pattern |
+DOT |
+
static java.util.regex.Pattern |
+DOUBLEPOINT |
+
static java.util.regex.Pattern |
+NEWLINE |
+
static java.util.regex.Pattern |
+PIPE |
+
static java.util.regex.Pattern |
+PLUS |
+
static java.util.regex.Pattern |
+QUESTION |
+
static java.util.regex.Pattern |
+SEMICOLON |
+
static java.util.regex.Pattern |
+SLASH |
+
static java.util.regex.Pattern |
+SPACE |
+
static java.util.regex.Pattern |
+TAB |
+
static java.util.regex.Pattern |
+UNDERSCORE |
+
static java.util.regex.Pattern |
+VERTICALBAR |
+
Constructor and Description | +
---|
CommonPattern() |
+
public static final java.util.regex.Pattern SPACE+
public static final java.util.regex.Pattern COMMA+
public static final java.util.regex.Pattern SEMICOLON+
public static final java.util.regex.Pattern DOUBLEPOINT+
public static final java.util.regex.Pattern SLASH+
public static final java.util.regex.Pattern PIPE+
public static final java.util.regex.Pattern BACKSLASH+
public static final java.util.regex.Pattern QUESTION+
public static final java.util.regex.Pattern AMP+
public static final java.util.regex.Pattern AMP_HTML+
public static final java.util.regex.Pattern PLUS+
public static final java.util.regex.Pattern DOT+
public static final java.util.regex.Pattern NEWLINE+
public static final java.util.regex.Pattern VERTICALBAR+
public static final java.util.regex.Pattern UNDERSCORE+
public static final java.util.regex.Pattern TAB+
public class Compression
+extends java.lang.Object
+Constructor and Description | +
---|
Compression() |
+
Modifier and Type | +Method and Description | +
---|---|
static byte[] |
+gunzip(byte[] b) |
+
static void |
+gunzip(java.io.File source,
+ java.io.File dest,
+ boolean deleteSource) |
+
static byte[] |
+gzip(byte[] b) |
+
static void |
+gzip(java.io.File source,
+ java.io.File dest,
+ boolean deleteSource) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static void gzip(java.io.File source, + java.io.File dest, + boolean deleteSource) + throws java.io.IOException+
java.io.IOException
public static byte[] gzip(byte[] b)+
public static void gunzip(java.io.File source, + java.io.File dest, + boolean deleteSource) + throws java.io.IOException+
java.io.IOException
public static byte[] gunzip(byte[] b)+
public class DateParser
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static long |
+DAY_MILLIS |
+
static java.text.DateFormat |
+dayDateFormat |
+
static long |
+HOUR_MILLIS |
+
static java.text.SimpleDateFormat |
+iso8601Format
+Date formatter/non-sloppy parser for W3C datetime (ISO8601) in GMT/UTC
+ |
+
static java.text.SimpleDateFormat |
+iso8601MillisFormat |
+
static java.text.DateFormat |
+minuteDateFormat |
+
static long |
+MONTH_MILLIS |
+
static java.lang.String |
+PATTERN_ISO8601 |
+
static java.lang.String |
+PATTERN_ISO8601MILLIS |
+
static java.lang.String |
+PATTERN_MONTHDAY |
+
static java.lang.String |
+PATTERN_MONTHDAYHOURMINUTE |
+
static java.text.DateFormat |
+secondDateFormat |
+
static java.util.Calendar |
+UTCCalendar |
+
static java.util.TimeZone |
+UTCtimeZone |
+
static long |
+WEEK_MILLIS |
+
Constructor and Description | +
---|
DateParser() |
+
Modifier and Type | +Method and Description | +
---|---|
static int |
+getTimezoneOffset() |
+
static void |
+main(java.lang.String[] args) |
+
static java.util.Date |
+oneDayAgo() |
+
static java.util.Date |
+oneHourAgo() |
+
static java.util.Date |
+oneMonthAgo() |
+
static java.util.Date |
+oneWeekAgo() |
+
static java.util.Calendar |
+parse(java.lang.String dateString,
+ int timezoneOffset)
+parse a date string for a given time zone
+ |
+
static java.lang.String |
+toPostDate(java.util.Date d) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final long HOUR_MILLIS+
public static final long DAY_MILLIS+
public static final long WEEK_MILLIS+
public static final long MONTH_MILLIS+
public static final java.lang.String PATTERN_ISO8601+
public static final java.lang.String PATTERN_ISO8601MILLIS+
public static final java.lang.String PATTERN_MONTHDAY+
public static final java.lang.String PATTERN_MONTHDAYHOURMINUTE+
public static final java.text.SimpleDateFormat iso8601Format+
public static final java.text.SimpleDateFormat iso8601MillisFormat+
public static final java.text.DateFormat dayDateFormat+
public static final java.text.DateFormat minuteDateFormat+
public static final java.text.DateFormat secondDateFormat+
public static final java.util.Calendar UTCCalendar+
public static final java.util.TimeZone UTCtimeZone+
public static java.util.Calendar parse(java.lang.String dateString, + int timezoneOffset) + throws java.text.ParseException+
dateString
- in format "yyyy-MM-dd", "yyyy-MM-dd HH:mm" or "yyyy-MM-dd_HH:mm"timezoneOffset
- number of minutes, must be negative for locations east of UTC and positive for locations west of UTCjava.text.ParseException
- if the format of the date string is not well-formedpublic static java.lang.String toPostDate(java.util.Date d)+
public static int getTimezoneOffset()+
public static java.util.Date oneHourAgo()+
public static java.util.Date oneDayAgo()+
public static java.util.Date oneWeekAgo()+
public static java.util.Date oneMonthAgo()+
public static void main(java.lang.String[] args)+
public class Digest
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.util.Queue<java.security.MessageDigest> |
+digestPool |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+cleanup()
+clean the md5 cache
+ |
+
static byte[] |
+decodeHex(java.lang.String hex) |
+
static java.lang.String |
+encodeHex(byte[] in) |
+
static java.lang.String |
+encodeHex(long in,
+ int length) |
+
static java.lang.String |
+encodeMD5Hex(byte[] b) |
+
static java.lang.String |
+encodeMD5Hex(java.io.File file) |
+
static java.lang.String |
+encodeMD5Hex(java.lang.String key) |
+
static byte[] |
+encodeMD5Raw(java.io.File file) |
+
static byte[] |
+encodeMD5Raw(java.lang.String key) |
+
static java.lang.String |
+encodeOctal(byte[] in) |
+
static java.lang.String |
+fastFingerprintHex(java.io.File file,
+ boolean includeDate) |
+
static byte[] |
+fastFingerprintRaw(java.io.File file,
+ boolean includeDate)
+the fast fingerprint computes a md5-like hash from a given file,
+ which is different from a md5 because it does not read the complete file
+ but reads only the first and last megabyte of it.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.util.Queue<java.security.MessageDigest> digestPool+
public static void cleanup()+
public static java.lang.String encodeHex(long in, + int length)+
public static java.lang.String encodeOctal(byte[] in)+
public static java.lang.String encodeHex(byte[] in)+
public static byte[] decodeHex(java.lang.String hex)+
public static java.lang.String encodeMD5Hex(java.lang.String key)+
public static java.lang.String encodeMD5Hex(java.io.File file) + throws java.io.IOException+
java.io.IOException
public static java.lang.String encodeMD5Hex(byte[] b)+
public static byte[] encodeMD5Raw(java.lang.String key)+
public static byte[] encodeMD5Raw(java.io.File file) + throws java.io.IOException+
java.io.IOException
public static java.lang.String fastFingerprintHex(java.io.File file, + boolean includeDate)+
public static byte[] fastFingerprintRaw(java.io.File file, + boolean includeDate) + throws java.io.IOException+
file
- java.io.IOException
public final class IO
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static java.security.PublicKey |
+decodePublicKey(java.lang.String encodedKey,
+ java.lang.String algorithm)
+Create PublicKey from String representation
+ |
+
static java.lang.String |
+getKeyAsString(java.security.Key key)
+Get String representation of a key
+ |
+
static java.lang.String |
+getKeyHash(java.security.PublicKey pubkey)
+Create hash for a key, use default algorithm SHA-256
+ |
+
static java.lang.String |
+getKeyHash(java.security.PublicKey pubkey,
+ java.lang.String algorithm)
+Create hash for a key
+ |
+
static java.lang.String |
+readFile(java.nio.file.Path path) |
+
static java.lang.String |
+readFileCached(java.nio.file.Path path) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String readFile(java.nio.file.Path path) + throws java.io.IOException+
java.io.IOException
public static java.lang.String readFileCached(java.nio.file.Path path) + throws java.io.IOException+
java.io.IOException
public static java.lang.String getKeyHash(java.security.PublicKey pubkey, + java.lang.String algorithm)+
pubkey
- algorithm
- public static java.lang.String getKeyHash(java.security.PublicKey pubkey)+
pubkey
- public static java.lang.String getKeyAsString(java.security.Key key)+
key
- public static java.security.PublicKey decodePublicKey(java.lang.String encodedKey, + java.lang.String algorithm)+
encodedKey
- algorithm
- public class JsonSignature
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+signatureString |
+
Constructor and Description | +
---|
JsonSignature() |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+addSignature(JSONObject obj,
+ java.security.PrivateKey key)
+Create and add a signature to a JSONObject
+ |
+
static void |
+addSignature(java.util.Map<java.lang.String,byte[]> obj,
+ java.security.PrivateKey key) |
+
static boolean |
+hasSignature(JSONObject obj) |
+
static boolean |
+hasSignature(java.util.Map<java.lang.String,byte[]> obj) |
+
static void |
+main(java.lang.String[] args) |
+
static void |
+removeSignature(JSONObject obj)
+Remove the signature
+ |
+
static void |
+removeSignature(java.util.Map<java.lang.String,byte[]> obj) |
+
static boolean |
+verify(JSONObject obj,
+ java.security.PublicKey key)
+Verfies if the signature of a JSONObject is valid
+ |
+
static boolean |
+verify(java.util.Map<java.lang.String,byte[]> obj,
+ java.security.PublicKey key) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static java.lang.String signatureString+
public static void addSignature(JSONObject obj, + java.security.PrivateKey key) + throws java.security.InvalidKeyException, + java.security.SignatureException+
obj
- the JSONObjectkey
- the private key to usejava.security.InvalidKeyException
- if the key is not valid (for example not RSA)java.security.SignatureException
- if something with the JSONObject is boguspublic static void addSignature(java.util.Map<java.lang.String,byte[]> obj, + java.security.PrivateKey key) + throws java.security.InvalidKeyException, + java.security.SignatureException+
java.security.InvalidKeyException
java.security.SignatureException
public static void removeSignature(JSONObject obj)+
obj
- the JSONObjectpublic static void removeSignature(java.util.Map<java.lang.String,byte[]> obj)+
public static boolean verify(JSONObject obj, + java.security.PublicKey key) + throws java.security.SignatureException, + java.security.InvalidKeyException+
obj
- the JSONObjectkey
- the public key of the signature issuerjava.security.SignatureException
- if the JSONObject does not have a signature or something with the JSONObject is bogusjava.security.InvalidKeyException
- if the key is not valid (for example not RSA)public static boolean verify(java.util.Map<java.lang.String,byte[]> obj, + java.security.PublicKey key) + throws java.security.SignatureException, + java.security.InvalidKeyException+
java.security.SignatureException
java.security.InvalidKeyException
public static boolean hasSignature(JSONObject obj)+
public static boolean hasSignature(java.util.Map<java.lang.String,byte[]> obj)+
public static void main(java.lang.String[] args) + throws java.lang.Exception+
java.lang.Exception
Enum Constant and Description | +
---|
MacOSX |
+
Unix |
+
Unknown |
+
Windows |
+
Modifier and Type | +Method and Description | +
---|---|
static OS.System |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static OS.System[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final OS.System MacOSX+
public static final OS.System Unix+
public static final OS.System Windows+
public static final OS.System Unknown+
public static OS.System[] values()+
+for (OS.System c : OS.System.values()) + System.out.println(c); +
public static OS.System valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic final class OS
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+OS.System |
+
Modifier and Type | +Field and Description | +
---|---|
static boolean |
+canExecUnix |
+
static boolean |
+isMacArchitecture |
+
static boolean |
+isUnixFS |
+
static boolean |
+isWin32 |
+
static boolean |
+isWindows |
+
static java.util.Map<java.lang.String,java.lang.String> |
+macFSCreatorCache |
+
static java.util.Map<java.lang.String,java.lang.String> |
+macFSTypeCache |
+
static int |
+maxPathLength |
+
static OS.System |
+systemOS |
+
Modifier and Type | +Method and Description | +
---|---|
static void |
+execAsynchronous(java.io.File scriptFile) |
+
static java.util.List<java.lang.String> |
+execSynchronous(java.lang.String command) |
+
static int |
+getPID()
+use a hack to get the current process PID
+ |
+
static double |
+getProcessCpuLoad() |
+
static double |
+getSystemCpuLoad() |
+
static double |
+getSystemLoadAverage() |
+
static void |
+protectPath(java.nio.file.Path path) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final OS.System systemOS+
public static final boolean isMacArchitecture+
public static final boolean isUnixFS+
public static final boolean canExecUnix+
public static final boolean isWindows+
public static final boolean isWin32+
public static int maxPathLength+
public static final java.util.Map<java.lang.String,java.lang.String> macFSTypeCache+
public static final java.util.Map<java.lang.String,java.lang.String> macFSCreatorCache+
public static final void protectPath(java.nio.file.Path path)+
public static int getPID()+
public static void execAsynchronous(java.io.File scriptFile) + throws java.io.IOException+
java.io.IOException
public static java.util.List<java.lang.String> execSynchronous(java.lang.String command) + throws java.io.IOException+
java.io.IOException
public static double getSystemLoadAverage()+
public static double getSystemCpuLoad()+
public static double getProcessCpuLoad()+
public class StringBuilderComparator
+extends java.lang.Object
+implements java.util.Comparator<java.lang.StringBuilder>
+Modifier and Type | +Field and Description | +
---|---|
static StringBuilderComparator |
+CASE_INSENSITIVE_ORDER |
+
static StringBuilderComparator |
+CASE_SENSITIVE_ORDER |
+
Constructor and Description | +
---|
StringBuilderComparator(boolean caseInsensitive) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+compare(java.lang.StringBuilder sb0,
+ java.lang.StringBuilder sb1) |
+
boolean |
+endsWith(java.lang.StringBuilder sb0,
+ java.lang.StringBuilder sb1) |
+
boolean |
+equals(java.lang.StringBuilder sb0,
+ java.lang.StringBuilder sb1) |
+
int |
+indexOf(java.lang.StringBuilder sb,
+ char ch) |
+
int |
+indexOf(java.lang.StringBuilder sb,
+ int off,
+ char ch) |
+
static void |
+main(java.lang.String[] args) |
+
java.lang.StringBuilder[] |
+split(java.lang.StringBuilder sb,
+ char c) |
+
static java.lang.StringBuilder[] |
+split(java.lang.StringBuilder sb,
+ java.util.regex.Pattern pattern) |
+
boolean |
+startsWith(java.lang.StringBuilder sb0,
+ java.lang.StringBuilder sb1) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final StringBuilderComparator CASE_SENSITIVE_ORDER+
public static final StringBuilderComparator CASE_INSENSITIVE_ORDER+
public StringBuilderComparator(boolean caseInsensitive)+
public int compare(java.lang.StringBuilder sb0, + java.lang.StringBuilder sb1)+
compare
in interface java.util.Comparator<java.lang.StringBuilder>
public boolean equals(java.lang.StringBuilder sb0, + java.lang.StringBuilder sb1)+
public boolean startsWith(java.lang.StringBuilder sb0, + java.lang.StringBuilder sb1)+
public boolean endsWith(java.lang.StringBuilder sb0, + java.lang.StringBuilder sb1)+
public int indexOf(java.lang.StringBuilder sb, + char ch)+
public int indexOf(java.lang.StringBuilder sb, + int off, + char ch)+
public java.lang.StringBuilder[] split(java.lang.StringBuilder sb, + char c)+
public static java.lang.StringBuilder[] split(java.lang.StringBuilder sb, + java.util.regex.Pattern pattern)+
public static void main(java.lang.String[] args)+
public class UTF8
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
boolean |
+insensitive |
+
Modifier and Type | +Method and Description | +
---|---|
static byte[] |
+getBytes(java.lang.String s)
+getBytes() as method for String synchronizes during the look-up for the
+ Charset object for the default charset as given with a default charset name.
+ |
+
static byte[] |
+getBytes(java.lang.StringBuilder s) |
+
static java.lang.String |
+String(byte[] bytes)
+using the string method with the default charset given as argument should prevent using the charset cache
+ in FastCharsetProvider.java:118 which locks all concurrent threads using a UTF8.String() method
+ |
+
static java.lang.String |
+String(byte[] bytes,
+ int offset,
+ int length) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String String(byte[] bytes)+
bytes
- public static final java.lang.String String(byte[] bytes, + int offset, + int length)+
public static final byte[] getBytes(java.lang.String s)+
s
- public static final byte[] getBytes(java.lang.StringBuilder s)+
T
- The feature class.K
- The category class.public class BayesClassifier<T,K> +extends Classifier<T,K>+
http://en.wikipedia.org/wiki/Naive_Bayes_classifier
Constructor and Description | +
---|
BayesClassifier() |
+
Modifier and Type | +Method and Description | +
---|---|
Classification<T,K> |
+classify(java.util.Collection<T> features)
+Classifies the given set of features.
+ |
+
java.util.Collection<Classification<T,K>> |
+classifyDetailed(java.util.Collection<T> features)
+Classifies the given set of features.
+ |
+
categoryCount, decrementCategory, decrementFeature, featureCount, featureProbability, featureWeighedAverage, featureWeighedAverage, featureWeighedAverage, featureWeighedAverage, getCategories, getCategoriesTotal, getFeatures, getMemoryCapacity, incrementCategory, incrementFeature, learn, learn, reset, setMemoryCapacity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Classification<T,K> classify(java.util.Collection<T> features)+
classify
in class Classifier<T,K>
features
- The features to classify.public java.util.Collection<Classification<T,K>> classifyDetailed(java.util.Collection<T> features)+
T
- The feature class.K
- The category class.public class Classification<T,K>
+extends java.lang.Object
+Constructor and Description | +
---|
Classification(java.util.Collection<T> featureset,
+ K category)
+Constructs a new Classification with the parameters given and a default
+ probability of 1.
+ |
+
Classification(java.util.Collection<T> featureset,
+ K category,
+ float probability)
+Constructs a new Classification with the parameters given.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
K |
+getCategory()
+Retrieves the category the featureset was classified as.
+ |
+
java.util.Collection<T> |
+getFeatureset()
+Retrieves the featureset classified.
+ |
+
float |
+getProbability()
+Retrieves the classification's probability.
+ |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public Classification(java.util.Collection<T> featureset, + K category)+
featureset
- The featureset.category
- The category.public java.util.Collection<T> getFeatureset()+
public float getProbability()+
public K getCategory()+
public java.lang.String toString()+
toString
in class java.lang.Object
T
- A feature classK
- A category classpublic abstract class Classifier<T,K>
+extends java.lang.Object
+Constructor and Description | +
---|
Classifier()
+Constructs a new classifier without any trained knowledge.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+categoryCount(K category)
+Retrieves the number of occurrences of the given category.
+ |
+
abstract Classification<T,K> |
+classify(java.util.Collection<T> features)
+The classify method.
+ |
+
void |
+decrementCategory(K category)
+Decrements the count of a given category.
+ |
+
void |
+decrementFeature(T feature,
+ K category)
+Decrements the count of a given feature in the given category.
+ |
+
int |
+featureCount(T feature,
+ K category)
+Retrieves the number of occurrences of the given feature in the given
+ category.
+ |
+
float |
+featureProbability(T feature,
+ K category) |
+
float |
+featureWeighedAverage(T feature,
+ K category)
+Retrieves the weighed average
+P(feature|category) with
+ overall weight of 1.0 and an assumed probability of
+ 0.5 . |
+
float |
+featureWeighedAverage(T feature,
+ K category,
+ Classifier<T,K> calculator)
+Retrieves the weighed average
+P(feature|category) with
+ overall weight of 1.0 , an assumed probability of
+ 0.5 and the given object to use for probability calculation. |
+
float |
+featureWeighedAverage(T feature,
+ K category,
+ Classifier<T,K> calculator,
+ float weight)
+Retrieves the weighed average
+P(feature|category) with
+ the given weight and an assumed probability of 0.5 and the
+ given object to use for probability calculation. |
+
float |
+featureWeighedAverage(T feature,
+ K category,
+ Classifier<T,K> calculator,
+ float weight,
+ float assumedProbability)
+Retrieves the weighed average
+P(feature|category) with
+ the given weight, the given assumed probability and the given object to
+ use for probability calculation. |
+
java.util.Set<K> |
+getCategories()
+Returns a
+Set of categories the classifier knows about. |
+
int |
+getCategoriesTotal()
+Retrieves the total number of categories the classifier knows about.
+ |
+
java.util.Set<T> |
+getFeatures()
+Returns a
+Set of features the classifier knows about. |
+
int |
+getMemoryCapacity()
+Retrieves the memory's capacity.
+ |
+
void |
+incrementCategory(K category)
+Increments the count of a given category.
+ |
+
void |
+incrementFeature(T feature,
+ K category)
+Increments the count of a given feature in the given category.
+ |
+
void |
+learn(Classification<T,K> classification)
+Train the classifier by telling it that the given features resulted in
+ the given category.
+ |
+
void |
+learn(K category,
+ java.util.Collection<T> features)
+Train the classifier by telling it that the given features resulted in
+ the given category.
+ |
+
void |
+reset()
+Resets the learned feature and category counts.
+ |
+
void |
+setMemoryCapacity(int memoryCapacity)
+Sets the memory's capacity.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Classifier()+
public void reset()+
public java.util.Set<T> getFeatures()+
Set
of features the classifier knows about.Set
of features the classifier knows about.public java.util.Set<K> getCategories()+
Set
of categories the classifier knows about.Set
of categories the classifier knows about.public int getCategoriesTotal()+
public int getMemoryCapacity()+
public void setMemoryCapacity(int memoryCapacity)+
memoryCapacity
- The new memory capacity.public void incrementFeature(T feature, + K category)+
feature
- The feature, which count to increase.category
- The category the feature occurred in.public void incrementCategory(K category)+
category
- The category, which count to increase.public void decrementFeature(T feature, + K category)+
feature
- The feature to decrement the count for.category
- The category.public void decrementCategory(K category)+
category
- The category, which count to increase.public int featureCount(T feature, + K category)+
feature
- The feature, which count to retrieve.category
- The category, which the feature occurred in.public int categoryCount(K category)+
category
- The category, which count should be retrieved.public float featureWeighedAverage(T feature, + K category)+
P(feature|category)
with
+ overall weight of 1.0
and an assumed probability of
+ 0.5
. The probability defaults to the overall feature
+ probability.feature
- The feature, which probability to calculate.category
- The category.de.daslaboratorium.machinelearning.classifier.Classifier#featureProbability(Object, Object)
,
+de.daslaboratorium.machinelearning.classifier.Classifier#featureWeighedAverage(Object, Object, IFeatureProbability, float, float)
public float featureWeighedAverage(T feature, + K category, + Classifier<T,K> calculator)+
P(feature|category)
with
+ overall weight of 1.0
, an assumed probability of
+ 0.5
and the given object to use for probability calculation.feature
- The feature, which probability to calculate.category
- The category.calculator
- The calculating object.de.daslaboratorium.machinelearning.classifier.Classifier#featureWeighedAverage(Object, Object, IFeatureProbability, float, float)
public float featureWeighedAverage(T feature, + K category, + Classifier<T,K> calculator, + float weight)+
P(feature|category)
with
+ the given weight and an assumed probability of 0.5
and the
+ given object to use for probability calculation.feature
- The feature, which probability to calculate.category
- The category.calculator
- The calculating object.weight
- The feature weight.de.daslaboratorium.machinelearning.classifier.Classifier#featureWeighedAverage(Object, Object, IFeatureProbability, float, float)
public float featureWeighedAverage(T feature, + K category, + Classifier<T,K> calculator, + float weight, + float assumedProbability)+
P(feature|category)
with
+ the given weight, the given assumed probability and the given object to
+ use for probability calculation.feature
- The feature, which probability to calculate.category
- The category.calculator
- The calculating object.weight
- The feature weight.assumedProbability
- The assumed probability.public void learn(K category, + java.util.Collection<T> features)+
category
- The category the features belong to.features
- The features that resulted in the given category.public void learn(Classification<T,K> classification)+
classification
- The classification to learn.public abstract Classification<T,K> classify(java.util.Collection<T> features)+
features
- The features to classify.Class | +Description | +
---|---|
BayesClassifier<T,K> | +
+ A concrete implementation of the abstract Classifier class.
+ |
+
Classification<T,K> | +
+ A basic wrapper reflecting a classification.
+ |
+
Classifier<T,K> | +
+ Abstract base extended by any concrete classifier.
+ |
+
Class | +Description | +
---|---|
ASCII | +
+ this is a replacement of an insensitive collator object, produced by a RuleBasedCollator Class
+ The RuleBasedCollator is a very inefficient class if it is used only for insensitive ASCII comparisments
+ This class is a very simple comparator for Strings which can be used to compare also Strings with upper/lowercase
+ Strings without applying .toUpperCase or .toLowerCase
+ Strings must contain no other than ASCII code.
+ |
+
Browser | ++ |
BufferedRandomAccessFile | +
+ This class is inspired by https://code.google.com/p/jmzreader/source/browse/tools/braf/trunk/src/main/java/uk/ac/ebi/pride/tools/braf/BufferedRandomAccessFile.java
+ which is in turn an optimized version of the RandomAccessFile class as described by Nick Zhang on JavaWorld.com.
+ |
+
BufferedRandomAccessFile.IndexedLine | ++ |
BufferedRandomAccessFile.Test | ++ |
ByteBuffer | ++ |
CacheMap<K,V> | ++ |
CacheSet<K> | ++ |
CacheStats | ++ |
CharacterCoding | +
+ Contains methods to convert between Unicode and XML/HTML encoding.
+ |
+
Classification | ++ |
CommonPattern | +
+ This class provides Pattern constants to be used
+ to replace a regex in s.split(regex) method calls.
+ |
+
Compression | ++ |
DateParser | ++ |
Digest | ++ |
IO | ++ |
JsonSignature | +
+ This class offers functions to add and verify signatures of JSONObjects
+ |
+
OS | ++ |
StringBuilderComparator | +
+ case-insensitive compare of two StringBuilder objects
+ this shall replace the corresponding method in class String when StringBuilder objects are not transformed into string
+ |
+
UTF8 | ++ |
Enum | +Description | +
---|---|
Classification.ContentDomain | ++ |
OS.System | ++ |
public class JSONObjectWithDefault +extends JSONObject+
NULL
Constructor and Description | +
---|
JSONObjectWithDefault() |
+
JSONObjectWithDefault(JSONObject src) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+getBoolean(java.lang.String key,
+ boolean dftval) |
+
double |
+getDouble(java.lang.String key,
+ double dftval) |
+
int |
+getInt(java.lang.String key,
+ int dftval) |
+
JSONArray |
+getJSONArray(java.lang.String key,
+ JSONArray dftval) |
+
JSONObject |
+getJSONObject(java.lang.String key,
+ JSONObject dftval) |
+
JSONObjectWithDefault |
+getJSONObjectWithDefault(java.lang.String key,
+ JSONObjectWithDefault dftval) |
+
long |
+getLong(java.lang.String key,
+ long dftval) |
+
java.lang.String |
+getString(java.lang.String key,
+ java.lang.String dftval) |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putAll, putOnce, putOpt, quote, quote, remove, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JSONObjectWithDefault()+
public JSONObjectWithDefault(JSONObject src)+
public boolean getBoolean(java.lang.String key, + boolean dftval)+
public double getDouble(java.lang.String key, + double dftval)+
public int getInt(java.lang.String key, + int dftval)+
public JSONObject getJSONObject(java.lang.String key, + JSONObject dftval)+
public JSONObjectWithDefault getJSONObjectWithDefault(java.lang.String key, + JSONObjectWithDefault dftval)+
public long getLong(java.lang.String key, + long dftval)+
public java.lang.String getString(java.lang.String key, + java.lang.String dftval)+
public static class JsonDataset.Column
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
boolean |
+caseInsensitive |
+
java.lang.String |
+key |
+
public static class JsonDataset.JsonFactoryIndex +extends java.util.concurrent.ConcurrentHashMap<java.lang.Object,JsonFactory> +implements java.util.Map<java.lang.Object,JsonFactory>+
java.util.concurrent.ConcurrentHashMap.KeySetView<K,V>
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
java.util.Map.Entry<K,V>
Constructor and Description | +
---|
JsonFactoryIndex() |
+
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, values
clone
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public class JsonDataset
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonDataset.Column |
+
static class |
+JsonDataset.JsonFactoryIndex |
+
Constructor and Description | +
---|
JsonDataset(java.io.File dump_dir,
+ java.lang.String dump_file_prefix,
+ JsonDataset.Column[] columns,
+ java.lang.String dateFieldName,
+ java.lang.String dateFieldFormat,
+ JsonRepository.Mode mode,
+ boolean dailyDump,
+ int count)
+define a data set: an indexed JsonDump where the index is held in RAM
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
JsonFactory |
+get(java.lang.String column,
+ java.lang.String value) |
+
java.util.Date |
+parseDate(JSONObject json) |
+
JsonFactory |
+putUnique(JSONObject obj)
+put an object into the index, but do not overwrite existing pairs
+ |
+
int |
+size() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonDataset(java.io.File dump_dir, + java.lang.String dump_file_prefix, + JsonDataset.Column[] columns, + java.lang.String dateFieldName, + java.lang.String dateFieldFormat, + JsonRepository.Mode mode, + boolean dailyDump, + int count) + throws java.io.IOException+
dump_dir
- the path where the subdirectories for this data set shall be storeddump_file_prefix
- a prefix for the file namesindex_keys
- the names of the json property keys where their content shall be indexed by this fieldmode
- the indexing mode, either completely in RAM with Mode.COMPRESSED or with file handles with Mode.REWRITABLEjava.io.IOException
public JsonFactory putUnique(JSONObject obj) + throws java.io.IOException+
key
- value
- java.io.IOException
public JsonFactory get(java.lang.String column, + java.lang.String value)+
public java.util.Date parseDate(JSONObject json) + throws java.text.ParseException+
java.text.ParseException
public void close()+
public int size()+
public interface JsonFactory
+Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+getJSON() |
+
JSONObject getJSON() + throws java.io.IOException+
java.io.IOException
public class JsonFile +extends JSONObject+
NULL
Constructor and Description | +
---|
JsonFile(java.io.File file) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+commit()
+Write changes to file.
+ |
+
java.io.File |
+getFile() |
+
JSONObject |
+put(java.lang.String key,
+ boolean value)
+Put a key/boolean pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.util.Collection<?> value)
+Put a key/value pair in the JSONObject, where the value will be a
+ JSONArray which is produced from a Collection.
+ |
+
JSONObject |
+put(java.lang.String key,
+ double value)
+Put a key/double pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ int value)
+Put a key/int pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ JSONObject value) |
+
JSONObject |
+put(java.lang.String key,
+ long value)
+Put a key/long pair in the JSONObject.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.util.Map<?,?> value)
+Put a key/value pair in the JSONObject, where the value will be a
+ JSONObject which is produced from a Map.
+ |
+
JSONObject |
+put(java.lang.String key,
+ java.lang.Object value)
+Put a key/value pair in the JSONObject.
+ |
+
void |
+putAll(JSONObject other) |
+
java.lang.Object |
+remove(java.lang.String key)
+Remove a name and its value, if present.
+ |
+
JSONObject |
+toJSONObject()
+Return a copy of the JSON content
+ |
+
accumulate, append, doubleToString, get, getBigDecimal, getBigInteger, getBoolean, getDouble, getEnum, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isNull, keys, keySet, length, names, numberToString, opt, optBigDecimal, optBigInteger, optBoolean, optBoolean, optDouble, optDouble, optEnum, optEnum, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, putOnce, putOpt, quote, quote, similar, stringToValue, testValidity, toJSONArray, toMap, toString, toString, valueToString, wrap, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JsonFile(java.io.File file) + throws java.io.IOException+
java.io.IOException
public java.io.File getFile()+
public void commit() + throws JSONException+
JSONException
public JSONObject toJSONObject()+
public JSONObject put(java.lang.String key, + boolean value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- A boolean which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + double value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- A double which is the value.JSONException
- If the key is null or if the number is invalid.public JSONObject put(java.lang.String key, + java.util.Collection<?> value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- A Collection value.JSONException
public JSONObject put(java.lang.String key, + int value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- An int which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + long value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- A long which is the value.JSONException
- If the key is null.public JSONObject put(java.lang.String key, + java.util.Map<?,?> value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- A Map value.JSONException
public JSONObject put(java.lang.String key, + java.lang.Object value) + throws JSONException+
JSONObject
put
in class JSONObject
key
- A key string.value
- An object which is the value. It should be of one of these
+ types: Boolean, Double, Integer, JSONArray, JSONObject, Long,
+ String, or the JSONObject.NULL object.JSONException
- If the value is non-finite number or if the key is null.public JSONObject put(java.lang.String key, + JSONObject value) + throws JSONException+
JSONException
public void putAll(JSONObject other)+
putAll
in class JSONObject
public java.lang.Object remove(java.lang.String key)+
JSONObject
remove
in class JSONObject
key
- The name to be removed.public class JsonMinifier.JsonCapsuleFactory +extends java.lang.Object +implements JsonFactory+
Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+getJSON() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JSONObject getJSON()+
getJSON
in interface JsonFactory
public class JsonMinifier
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
class |
+JsonMinifier.JsonCapsuleFactory |
+
Constructor and Description | +
---|
JsonMinifier() |
+
Modifier and Type | +Method and Description | +
---|---|
JsonMinifier.JsonCapsuleFactory |
+minify(JSONObject json) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonMinifier.JsonCapsuleFactory minify(JSONObject json)+
public static class JsonRandomAccessFile.JsonHandle +extends java.lang.Object +implements JsonFactory+
Constructor and Description | +
---|
JsonHandle(JSONObject json,
+ long index,
+ int length) |
+
Modifier and Type | +Method and Description | +
---|---|
long |
+getIndex() |
+
JSONObject |
+getJSON() |
+
int |
+getLength() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public JsonHandle(JSONObject json, + long index, + int length)+
public JSONObject getJSON()+
getJSON
in interface JsonFactory
public long getIndex()+
public int getLength()+
public java.lang.String toString()+
toString
in class java.lang.Object
public class JsonRandomAccessFile.ReaderJsonFactory +extends java.lang.Object +implements JsonFactory+
Constructor and Description | +
---|
ReaderJsonFactory(long index,
+ int length) |
+
Modifier and Type | +Method and Description | +
---|---|
java.io.File |
+getFile() |
+
long |
+getIndex() |
+
JSONObject |
+getJSON() |
+
int |
+getLength() |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ReaderJsonFactory(long index, + int length)+
public JSONObject getJSON() + throws java.io.IOException+
getJSON
in interface JsonFactory
java.io.IOException
public long getIndex()+
public int getLength()+
public java.io.File getFile()+
public java.lang.String toString()+
toString
in class java.lang.Object
public class JsonRandomAccessFile +extends BufferedRandomAccessFile +implements JsonReader+
Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonRandomAccessFile.JsonHandle
+The JsonHandle class is a bundle of a json with the information about the
+ seek location in the file and the length of bytes of the original json string
+ |
+
class |
+JsonRandomAccessFile.ReaderJsonFactory |
+
BufferedRandomAccessFile.IndexedLine, BufferedRandomAccessFile.Test
POISON_JSON_MAP
Constructor and Description | +
---|
JsonRandomAccessFile(java.io.File dumpFile,
+ int concurrency)
+if a JsonRandomAccessFile object in initiated, it must be wrapped with a Thread object and started.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close() |
+
int |
+getConcurrency() |
+
JsonFactory |
+getJsonFactory(long index,
+ int length) |
+
java.lang.String |
+getName() |
+
void |
+run() |
+
JsonFactory |
+take() |
+
appendLine, getFilePointer, main, read, read, read, readIndexedLine, seek
getChannel, getFD, length, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonRandomAccessFile(java.io.File dumpFile, + int concurrency) + throws java.io.IOException+
dumpFile
- concurrency
- java.io.IOException
public java.lang.String getName()+
getName
in interface JsonReader
public int getConcurrency()+
getConcurrency
in interface JsonReader
public JsonFactory take() + throws java.lang.InterruptedException+
take
in interface JsonReader
java.lang.InterruptedException
public void run()+
run
in interface java.lang.Runnable
public JsonFactory getJsonFactory(long index, + int length)+
public void close() + throws java.io.IOException+
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.RandomAccessFile
java.io.IOException
public interface JsonReader
+extends java.lang.Runnable
+Modifier and Type | +Field and Description | +
---|---|
static JsonFactory |
+POISON_JSON_MAP |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getConcurrency() |
+
java.lang.String |
+getName() |
+
JsonFactory |
+take() |
+
run
static final JsonFactory POISON_JSON_MAP+
int getConcurrency()+
JsonFactory take() + throws java.lang.InterruptedException+
java.lang.InterruptedException
java.lang.String getName()+
public static enum JsonRepository.Mode +extends java.lang.Enum<JsonRepository.Mode>+
Enum Constant and Description | +
---|
COMPRESSED |
+
REWRITABLE |
+
Modifier and Type | +Method and Description | +
---|---|
static JsonRepository.Mode |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static JsonRepository.Mode[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final JsonRepository.Mode COMPRESSED+
public static final JsonRepository.Mode REWRITABLE+
public static JsonRepository.Mode[] values()+
+for (JsonRepository.Mode c : JsonRepository.Mode.values()) + System.out.println(c); +
public static JsonRepository.Mode valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class JsonRepository
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonRepository.Mode |
+
Modifier and Type | +Field and Description | +
---|---|
static JsonRepository.Mode |
+COMPRESSED_MODE |
+
static java.lang.String[] |
+META_KEYS_STRINGS |
+
static java.lang.String |
+MOD_DATE_KEY_STRING |
+
static java.lang.String |
+OPERATION_KEY_STRING |
+
static java.lang.String |
+REFERRER_KEY_STRING |
+
static JsonRepository.Mode |
+REWRITABLE_MODE |
+
Constructor and Description | +
---|
JsonRepository(java.io.File dump_dir,
+ java.lang.String dump_file_prefix,
+ java.lang.String readme,
+ JsonRepository.Mode mode,
+ boolean dailyDump,
+ int concurrency) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+buffer(java.util.Date created_at,
+ java.util.Map<java.lang.String,java.lang.Object> map) |
+
void |
+close() |
+
JSONArray |
+getBufferShard() |
+
int |
+getBufferShardCount() |
+
java.io.File |
+getDumpDir() |
+
JsonReader |
+getDumpReader(java.io.File dump)
+create a concurrent dump reader for the given file.
+ |
+
java.util.SortedSet<java.io.File> |
+getImportDumps(int count) |
+
java.util.SortedSet<java.io.File> |
+getImportedDumps(int count) |
+
JsonRepository.Mode |
+getMode() |
+
java.util.SortedSet<java.io.File> |
+getOwnDumps(int count) |
+
boolean |
+shiftProcessedDump(java.lang.String dumpName)
+move a file from the import directory to the imported directory.
+ |
+
JsonFactory |
+write(JSONObject json) |
+
JsonFactory |
+write(JSONObject json,
+ char opkey) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String OPERATION_KEY_STRING+
public static final java.lang.String MOD_DATE_KEY_STRING+
public static final java.lang.String REFERRER_KEY_STRING+
public static final java.lang.String[] META_KEYS_STRINGS+
public static final JsonRepository.Mode COMPRESSED_MODE+
public static final JsonRepository.Mode REWRITABLE_MODE+
public JsonRepository(java.io.File dump_dir, + java.lang.String dump_file_prefix, + java.lang.String readme, + JsonRepository.Mode mode, + boolean dailyDump, + int concurrency) + throws java.io.IOException+
java.io.IOException
public java.io.File getDumpDir()+
public JsonRepository.Mode getMode()+
public JsonFactory write(JSONObject json) + throws java.io.IOException+
java.io.IOException
public JsonFactory write(JSONObject json, + char opkey) + throws java.io.IOException+
java.io.IOException
public void buffer(java.util.Date created_at, + java.util.Map<java.lang.String,java.lang.Object> map) + throws java.io.IOException+
java.io.IOException
public JSONArray getBufferShard()+
public int getBufferShardCount()+
public void close()+
public java.util.SortedSet<java.io.File> getOwnDumps(int count)+
public java.util.SortedSet<java.io.File> getImportDumps(int count)+
public java.util.SortedSet<java.io.File> getImportedDumps(int count)+
public boolean shiftProcessedDump(java.lang.String dumpName)+
dumpName
- only the name, not the full path. The file must be in the import file pathpublic JsonReader getDumpReader(java.io.File dump) + throws java.io.IOException+
dump
- filejava.io.IOException
public static class JsonStreamReader.WrapperJsonFactory +extends java.lang.Object +implements JsonFactory+
Constructor and Description | +
---|
WrapperJsonFactory(JSONObject json) |
+
Modifier and Type | +Method and Description | +
---|---|
JSONObject |
+getJSON() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public WrapperJsonFactory(JSONObject json)+
public JSONObject getJSON() + throws java.io.IOException+
getJSON
in interface JsonFactory
java.io.IOException
public class JsonStreamReader +extends java.lang.Object +implements JsonReader+
Modifier and Type | +Class and Description | +
---|---|
static class |
+JsonStreamReader.WrapperJsonFactory |
+
POISON_JSON_MAP
Constructor and Description | +
---|
JsonStreamReader(java.io.InputStream inputStream,
+ java.lang.String name,
+ int concurrency) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getConcurrency() |
+
java.lang.String |
+getName() |
+
void |
+run() |
+
JsonFactory |
+take() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonStreamReader(java.io.InputStream inputStream, + java.lang.String name, + int concurrency)+
public java.lang.String getName()+
getName
in interface JsonReader
public int getConcurrency()+
getConcurrency
in interface JsonReader
public JsonFactory take() + throws java.lang.InterruptedException+
take
in interface JsonReader
java.lang.InterruptedException
public void run()+
run
in interface java.lang.Runnable
public class JsonTray
+extends java.lang.Object
+Constructor and Description | +
---|
JsonTray(java.io.File file,
+ int cachesize) |
+
Modifier and Type | +Method and Description | +
---|---|
JsonTray |
+commit() |
+
JSONObject |
+getJSONObject(java.lang.String key) |
+
JSONObject |
+getPersistent() |
+
JSONObject |
+getVolatile() |
+
boolean |
+has(java.lang.String key) |
+
JsonTray |
+put(java.lang.String key,
+ JSONObject value,
+ boolean persistent) |
+
JsonTray |
+putPersistent(java.lang.String key,
+ JSONObject value) |
+
JsonTray |
+putVolatile(java.lang.String key,
+ JSONObject value) |
+
JsonTray |
+remove(java.lang.String key) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public JsonTray(java.io.File file, + int cachesize) + throws java.io.IOException+
java.io.IOException
public boolean has(java.lang.String key)+
public JsonTray put(java.lang.String key, + JSONObject value, + boolean persistent)+
public JsonTray putPersistent(java.lang.String key, + JSONObject value)+
public JsonTray putVolatile(java.lang.String key, + JSONObject value)+
public JsonTray remove(java.lang.String key)+
public JsonTray commit()+
public JSONObject getJSONObject(java.lang.String key)+
public JSONObject getPersistent()+
public JSONObject getVolatile()+
Interface | +Description | +
---|---|
JsonFactory | ++ |
JsonReader | ++ |
Class | +Description | +
---|---|
JsonDataset | ++ |
JsonDataset.Column | ++ |
JsonDataset.JsonFactoryIndex | ++ |
JsonFile | +
+ This extends JSONObject to be a file which gets loaded and written to disk
+ It also offers some key management tools
+ |
+
JsonMinifier | ++ |
JSONObjectWithDefault | +
+ This class extends JSONObjects with additional get-methods that accept default values.
+ |
+
JsonRandomAccessFile | ++ |
JsonRandomAccessFile.JsonHandle | +
+ The JsonHandle class is a bundle of a json with the information about the
+ seek location in the file and the length of bytes of the original json string
+ |
+
JsonRepository | ++ |
JsonStreamReader | ++ |
JsonStreamReader.WrapperJsonFactory | ++ |
JsonTray | ++ |
Enum | +Description | +
---|---|
JsonRepository.Mode | ++ |
+ + diff --git a/javadoc/overview-summary.html b/javadoc/overview-summary.html new file mode 100644 index 0000000..5c1c978 --- /dev/null +++ b/javadoc/overview-summary.html @@ -0,0 +1,233 @@ + + + + + +
Package | +Description | +
---|---|
org.json | ++ |
org.loklak | ++ |
org.loklak.api | ++ |
org.loklak.api.admin | ++ |
org.loklak.api.aggregation | ++ |
org.loklak.api.amazon | ++ |
org.loklak.api.cms | ++ |
org.loklak.api.geo | ++ |
org.loklak.api.iot | ++ |
org.loklak.api.p2p | ++ |
org.loklak.api.tools | ++ |
org.loklak.api.vis | ++ |
org.loklak.data | ++ |
org.loklak.geo | ++ |
org.loklak.graphics | ++ |
org.loklak.harvester | ++ |
org.loklak.harvester.strategy | ++ |
org.loklak.http | ++ |
org.loklak.objects | ++ |
org.loklak.rss | ++ |
org.loklak.server | ++ |
org.loklak.stream | ++ |
org.loklak.susi | ++ |
org.loklak.tools | ++ |
org.loklak.tools.bayes | ++ |
org.loklak.tools.storage | ++ |
long hits+
int statusCode+
At http://dev.loklak.org/javadoc or by building them via ‘ant javadoc’.
+At http://dev.loklak.org/javadoc or by building them via ‘ant javadoc’.