text stringlengths 3 1.18M |
|---|
package com.bible.test.bean;
public class Person {
public int id;
public String name;
public String address;
public int photo;
public Person(int id, String name, String address,int photo) {
super();
this.id = id;
this.name = name;
this.address = address;
this.photo = photo;
}
} |
package com.bible.test.bean;
/**
* 定义菜单实体结构.
* @author stephen
*
*/
public class MenuEntity{
/**
* 生成菜单.
* @param groupId
* @param itemId
* @param order
* @param title
*/
public MenuEntity(int groupId, int itemId, int order, CharSequence title) {
super();
this.groupId = g... |
package com.bible.test.common.activity.webview;
import java.io.File;
import com.bible.fire.R;
import com.bible.fire.api.wps.DocSaveReceiver;
import com.bible.fire.api.wps.WPSAssistant;
import com.bible.fire.util.PackageUtil;
import com.bible.fire.util.SystemConstant;
import com.bible.fire.util.file.DownloadA... |
/**
* @author zhangyp
* @created 2013-9-17 下午5:19:38
* @email zviolet@163.com
* TODO 设置百度地图事件监听
*/
package com.bible.fire.api.baidumap;
import android.graphics.Bitmap;
import com.baidu.mapapi.map.MKMapViewListener;
import com.baidu.mapapi.map.MapPoi;
import com.bible.fire.local.AppContext;... |
/**
* @author zhangyp
* @created 2013-9-13 下午4:08:49
* @email zviolet@163.com
* TODO 百度地图点击事件监听
*/
package com.bible.fire.api.baidumap;
import com.baidu.mapapi.map.MKMapTouchListener;
import com.baidu.platform.comapi.basestruct.GeoPoint;
import com.bible.fire.local.AppContext;
import com.bib... |
package com.bible.fire.api.baidumap;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.drawable.Drawable;
import com.baidu.... |
package com.bible.fire.api.baidumap;
import android.widget.Toast;
import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.mapapi.map.LocationData;
import com.bible.fire.local.AppContext;
import com.bible.fire.util.AndroidUtil;
public class LocationListenerFromBa... |
/**
* @author zhangyp
* @created 2013-10-11 下午3:28:31
* @email zviolet@163.com
* TODO
*/
package com.bible.fire.api.baidumap;
import android.util.Log;
import com.baidu.mapapi.map.MKOLUpdateElement;
import com.baidu.mapapi.map.MKOfflineMap;
import com.baidu.mapapi.map.MKOfflineMapListener;
pu... |
/**
* @author zhangyp
* @created 2013-8-27 下午2:31:21
* @email zviolet@163.com
* TODO 响应文档保存的操作
*/
package com.bible.fire.api.wps;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class DocSaveReceiver ... |
/**
* @author zhangyp
* @created 2013-8-27 下午2:13:53
* @email zviolet@163.com
* TODO wps助手(用于打开wps程序)
*/
package com.bible.fire.api.wps;
import java.io.File;
import com.bible.fire.util.PackageUtil;
import com.bible.fire.util.TimeUtil;
import com.bible.fire.util.ToastUtil;
import android... |
package com.bible.fire.api;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.text.forma... |
/**
* @author zhangyp
* @created 2013-10-14 下午12:05:41
* @email zviolet@163.com
* TODO 开机启动的service
*/
package com.bible.fire.service;
import com.bible.fire.MainActivity;
import com.bible.fire.R;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.P... |
package com.bible.fire.service;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.bible.fire.api.baidumap.LocationListenerFromBaidu;
import com.bible.fire.util.SystemConstant;
import android.app.Service;
import a... |
package com.bible.fire.service;
import com.bible.fire.R;
import com.bible.fire.local.AppContext;
import com.bible.fire.local.RuntimeContext;
import com.bible.fire.pad.activity.surface.DesktopActivity;
import android.app.AlarmManager;
import android.app.AlertDialog;
import android.app.PendingIntent;
import a... |
package com.bible.fire.pad.activity.surface;
/**
* 主界面
*/
import java.util.ArrayList;
import java.util.HashMap;
import com.bible.fire.R;
import com.bible.fire.local.NetworkManager;
import com.bible.fire.pad.activity.BaseActivity;
import com.bible.fire.pad.activity.aspect.BDGPSLocateActivity;
import com.... |
package com.bible.fire.pad.activity.surface;
import com.bible.fire.pad.activity.BaseActivity;
public class AboutActivity extends BaseActivity {
}
|
package com.bible.fire.pad.activity;
import com.bible.fire.R;
import com.bible.fire.local.RuntimeContext;
import com.bible.fire.ui.SimpleProgressDialog;
import com.bible.fire.util.ImageUtil;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDi... |
/**
* @author zhangyp
* @created 2013-11-1 下午5:31:44
* @email zviolet@163.com
* TODO 文件目录选择
*/
package com.bible.fire.pad.activity.aspect;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import android.app.AlertDialog;
import android.content.DialogInterfa... |
/**
* @author zhangyp
* @created 2013-8-19 上午9:18:24
* @email zviolet@163.com
* TODO 利用gps定位或wifi定位当前所在位置(百度地图)
*/
package com.bible.fire.pad.activity.aspect;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import andro... |
/**
* @author zhangyp
* @created 2013-10-11 下午3:07:50
* @email zviolet@163.com
* TODO 在百度地图上画几何图形
*/
package com.bible.fire.pad.activity.aspect;
import java.util.ArrayList;
import java.util.List;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;... |
package com.bible.fire.pad.activity.aspect;
import java.util.ArrayList;
import java.util.List;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.provider.Settings;
import android.view.Gravity;
import android.view.Menu;
... |
/**
* @author zhangyp
* @created 2013-8-20 上午11:30:30
* @email zviolet@163.com
* TODO 根据文件名获取相应的mime type
*/
package com.bible.fire.util;
import java.io.File;
public class MIMETypeUtil {
//根据文件获得其对应的mime类型
public static String getMIMEType(File file){
String type="*/*";
String... |
package com.bible.fire.util;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.graphics.Color;
import android.graphics.PixelFormat;
import androi... |
package com.bible.fire.util.webservice;
public class ServiceConnectParam {
private String url;
private String nameSpace;
private String methodName;
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getNameSpace() {
return na... |
package com.bible.fire.util.webservice;
import java.util.LinkedHashMap;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.util.Log;
public class WebServiceHelpe... |
/**
* @author zhangyp
* @created 2013-8-14 下午1:18:54
* @email zviolet@163.com
* TODO 文件异步下载
*/
package com.bible.fire.util.file;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.FileNameMap;
import java.ne... |
/**
* @author zhangyp
* @created 2013-11-7 下午4:26:11
* @email zviolet@163.com
* TODO
*/
package com.bible.fire.util.file;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.content.Context;
impo... |
/**
* @author zhangyp
* @created 2013-11-10 上午11:25:04
* @email zviolet@163.com
* TODO
*/
package com.bible.fire.util.file;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.bible.fire.R;
import com.bible.fire.util.SystemConstant;
import com.bible.fire.util.To... |
/**
* @author zhangyp
* @created 2013-8-19 下午5:07:09
* @email zviolet@163.com
* TODO 对设备中已安装程序包的访问
*/
package com.bible.fire.util;
import java.io.File;
import java.util.List;
import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.Compon... |
package com.bible.fire.util;
import android.content.Context;
import android.graphics.Color;
import android.view.Gravity;
import android.widget.TextView;
import android.widget.Toast;
public class ToastUtil {
/**
* 自定义样式来设置toast的显示
* @param context
* @param msg
*/
public static void showMsg(C... |
/**
*
*/
package com.bible.fire.util;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.util.Enumeration;
import com.baidu.mapapi.map.LocationData;
import com.bible.fire.local.AppContext;
import android.content.Context;
import android.content... |
/**
* @author zhangyp
* @created 2013-9-6 下午9:33:33
* @email zviolet@163.com
* TODO
*/
package com.bible.fire.util.http;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.URI;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import... |
package com.bible.fire.util.http;
import java.io.File;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost... |
package com.bible.fire.util.http;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.URI;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.apache.http.HttpResponse... |
package com.bible.fire.util;
import com.bible.fire.R;
import com.bible.fire.local.AppContext;
import com.bible.fire.local.RuntimeContext;
import com.bible.fire.pad.activity.surface.DesktopActivity;
import com.bible.fire.service.RestartAppService;
import android.app.AlarmManager;
import android.app.PendingInt... |
/**
* @author zhangyp
* @created 2013-10-22 上午11:35:55
* @email zviolet@163.com
* TODO 校验工具类
*/
package com.bible.fire.util;
import org.apache.commons.lang.math.DoubleRange;
public class ValidateUtil {
//中国的纬度坐标范围
private static final DoubleRange latitudeRange = new DoubleRange(3.0, 5... |
/**
* @author zhangyp
* @created 2013-8-12 下午3:53:56
* @email zviolet@163.com
* TODO xml工具类
*/
package com.bible.fire.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.dom4j.Document;
import org... |
package com.bible.fire.util;
import java.io.File;
import java.io.FileOutputStream;
import com.bible.fire.local.AppContext;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.Bitmap.Config;
i... |
package com.bible.fire.util;
import android.os.Environment;
public class SystemConstant {
//sd卡路径
public static final String SDCARD_ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();
//sd卡上图片存放路径
public static final String IMG_PATH_IN_SDCARD = SDCARD_ROOT_PATH + "/hoyi/img/";
... |
package com.bible.fire.util;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import android.text.format.DateFormat;
import android.util.Log;
public class TimeUtil {
private static final String TAG = TimeUtil.class.getSimpleNam... |
/**
* @author zhangyp
* @created 2013-8-12 下午3:21:28
* @email zviolet@163.com
* TODO
*/
package com.bible.fire.bean.system;
public class AppConfig {
private String serverIp;
private int serverPort;
private String basePath;
private String versionPath;
public AppConfig(String serverIp... |
/**
*
*/
package com.bible.fire.bean.common;
/**
* @author zhangyp
*
*/
public class UploadFile {
//上传的参数名称
String paramName;
//上传文件的绝对路径
String filepath;
public String getParamName() {
return paramName;
}
public void setParamName(String paramName) {
this.paramName ... |
package com.bible.fire.local;
import java.lang.ref.WeakReference;
import com.bible.fire.pad.activity.BaseActivity;
import com.bible.fire.util.AndroidUtil;
import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import andro... |
/**
* @author zhangyp
* @created 2013-8-12 下午1:18:44
* @email zviolet@163.com
* TODO app 版本自动更新
*/
package com.bible.fire.local;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import j... |
/**
* @author zhangyp
* @created 2013-10-14 上午9:45:48
* @email zviolet@163.com
* TODO 接收开机启动广播
*/
package com.bible.fire.local;
import com.bible.fire.service.BootService;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import androi... |
/**
* @author zhangyp
* @created 2013-9-22 下午5:01:22
* @email zviolet@163.com
* TODO 检查网络状态并进行设置
*/
package com.bible.fire.local;
import com.bible.fire.util.AndroidUtil;
import com.bible.fire.util.WindowUtil;
import android.content.ComponentName;
import android.content.Context;
import and... |
/**
* @author zhangyp
* @created 2013-10-15 下午5:36:39
* @email zviolet@163.com
* TODO 设置管理
*/
package com.bible.fire.local;
import com.bible.fire.util.AndroidUtil;
import com.bible.fire.util.WindowUtil;
import android.content.Context;
import android.content.Intent;
import android.provider... |
/**
*
*/
package com.bible.fire.local;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import com.baidu.mapapi.BMapManager;
import com.baidu.mapapi.MKGeneralListener;
import com.baidu.mapapi.map.MKEvent;
import com.bible.fire.service.BDLocationService;
import com.bible.fire.util... |
package com.bible.fire.local;
import java.lang.Thread.UncaughtExceptionHandler;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import com.bible.fire.pad.activity.surface.DesktopActivity;
import com.bible.fire.service.RestartAppService;
import com.bible.fire.util.ViewUt... |
/**
* @author zhangyp
* @created 2013-9-6 下午6:08:54
* @email zviolet@163.com
* TODO 线程管理,对于任务队列中的任务采用栈的方式(后进先出)进行处理
*/
package com.bible.fire.local;
import java.util.LinkedList;
import java.util.List;
/**
* 线程池类,线程管理器:创建线程,执行任务,销毁线程,获取线程基本信息
*/
public final class ThreadPool { ... |
package com.bible.fire.local;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.Locale;
import com.bible.fire.api.TwoDimensionCode;
import com.bible.fire.util.AndroidUtil;
import com.bible.fire.util.ImageUtil;
import com.bible.fire... |
/**
* @author zhangyp
* @created 2013-8-12 下午3:15:26
* @email zviolet@163.com
* TODO 初始化APP配置
*/
package com.bible.fire.local;
import java.io.InputStream;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import android.content.Context;
import androi... |
package com.bible.fire.local;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
public class RuntimeContext {
private static List<WeakReference<Activity>> activityList = new ArrayList<WeakReference<Activity>>();
private static Thread... |
package com.bible.fire;
import java.util.ArrayList;
import java.util.List;
import com.bible.fire.local.AppContext;
import com.bible.test.pad.activity.AutoLocateBMapActivity;
import com.bible.test.pad.activity.CameraActivity;
import com.bible.test.pad.activity.GPSLocateActivity;
import com.bible.test.pad.acti... |
package com.bible.fire.ui;
import android.app.ProgressDialog;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
public class SimpleProgressDialog extends ProgressDialog {
public SimpleProgressDialog(Context context){
super(conte... |
/**
* @author zhangyp
* @created 2013-9-23 上午9:55:21
* @email zviolet@163.com
* TODO 类似微博,上下拉动视图可进行刷新(将listview或gridview放在其中间即可)
*/
package com.bible.fire.ui;
import com.bible.fire.R;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
i... |
package ernest;
import java.util.List;
import java.util.ArrayList;
/**
* A very simple maze environment used to test Ernest.
* @author mcohen
* @author ogeorgeon
*/
public class SimpleMaze implements IEnvironment
{
private static final int WIDTH = 9;
private static final int HEIGHT = 8;
... |
package ernest;
/**
* An Icon is a state of Ernest's distal sensory system
* @author ogeorgeon
*/
public interface IIcon {
public int[][] getMatrix();
}
|
package ernest;
import java.util.ArrayList;
import java.util.List;
/**
* Ernest's internal representation of its situation at a given point in time.
* A context stores all the data that must be passed from one step to the next
* and from one decision cycle to the next.
* @author ogeorgeon
*/
public class Conte... |
package ernest;
/**
* An act is the association of a schema with the feedback the agent receives
* when trying to enact that schema. Concretely, an act associates a schema
* with a binary feedback status: succeed (S) or fail (F).
* @author mcohen
* @author ogeorgeon
*/
public interface IAct
{
/*... |
package ernest;
/**
* A pattern of interaction between Ernest and its environment.
* Specifically, schemas can either succeed of fail when Ernest tries to enact
* them in the environment.
* @author mcohen
*
*/
public interface ISchema
{
public IAct getSucceedingAct();
public IAct getFailingAct()... |
package ernest;
/**
* An act is the association of a schema with the feedback the agent receives
* when trying to enact that schema. Concretely, an act associates a schema
* with a binary feedback status: succeed (S) or fail (F). This class
* represents a default implementation for an Act.
* @author m... |
package ernest;
import java.io.ObjectInputStream.GetField;
/**
* A Schema is a pattern of interaction between Ernest and its environment.
* Specifically, schemas can either succeed of fail when Ernest tries to enact
* them in the environment.
* @author mcohen
* @author ogeorgeon
*/
public class S... |
package ernest;
/**
* A state of Ernest's distal sensory system
* @author ogeorgeon
*/
public class Icon implements IIcon
{
/** The icon's width (first coordinate: x) */
public static final int WIDTH = 2;
/** The icon's height (second coordinate: y) */
public static final int HEIGHT = 1;
/** T... |
package ernest;
/**
* A proposal that Ernest enacts a schema. A proposal consists of
* the proposed schema and a weight that determines the strength of the proposal.
* Schemas that receive the highest summarized proposal weight are selected for enaction.
* @author mcohen
* @author ogeorgeon
*
*/
pu... |
package ernest;
import java.util.List;
/**
* Interface for an Environment suitable to Ernest.
* @author mcohen
* @author ogeorgeon
*/
public interface IEnvironment
{
public boolean enact(String s);
}
|
package ernest;
/**
* The generator of Ernest's activity traces.
* @author ogeorgeon
*/
public interface ITracer {
public boolean writeLine(String line);
public boolean writeHeader();
public boolean writeFooter();
}
|
package ernest;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import java.util.TreeMap;
/**
* This tracer logs the trace into an xml file.
* @author ogeorg... |
package ernest;
import java.util.List;
/**
* The interface for dealing with an Ernest agent.
* @author ogeorgeon
*/
public interface IErnest
{
public void clear();
public void setTracer(ITracer tracer);
public void setParameters(Integer RegularityThreshold, Integer ActivationThreshold, Integer s... |
package ernest;
/**
* Represents a proposal for enacting a Schema.
* A proposal consists of the proposed schema,
* a weight that determines the strength of the proposal,
* and an expectation that determines the prediction that the schema will succeed
* @author mcohen
* @author ogeorgeon
*/
public cl... |
package ernest;
import java.util.ArrayList;
import java.util.List;
/**
* A context is Ernest's internal representation of its situation at a given point in time.
* @author ogeorgeon
*/
public interface IContext
{
public List<IAct> getContextList();
public List<IAct> getFocusList();
public IAct getCoreAct(... |
package ernest;
/**
* The main program.
* Constitutes an example code to run Ernest in a simulated environment.
* @author ogeorgeon
*/
public class Main
{
public static void main(String[] args)
{
// Create the environment
IEnvironment environment = new SimpleMaze();
// Create a tr... |
package ernest;
import java.util.List;
import java.util.ArrayList;
import java.util.Random;
import java.util.Collections;
/**
* The main Ernest class used to create an Ernest agent.
* @author ogeorgeon
*/
public class Ernest implements IErnest
{
/** A big value that can represent infinite for divers... |
package ernest;
import java.util.List;
import java.util.ArrayList;
/**
* A very simple maze environment used to test Ernest.
* @author mcohen
* @author ogeorgeon
*/
public class SimpleMaze implements IEnvironment
{
private static final int WIDTH = 9;
private static final int HEIGHT = 8;
... |
package ernest;
/**
* An Icon is a state of Ernest's distal sensory system
* @author ogeorgeon
*/
public interface IIcon {
public int[][] getMatrix();
}
|
package ernest;
import java.util.ArrayList;
import java.util.List;
/**
* Ernest's internal representation of its situation at a given point in time.
* A context stores all the data that must be passed from one step to the next
* and from one decision cycle to the next.
* @author ogeorgeon
*/
public class Conte... |
package ernest;
/**
* An act is the association of a schema with the feedback the agent receives
* when trying to enact that schema. Concretely, an act associates a schema
* with a binary feedback status: succeed (S) or fail (F).
* @author mcohen
* @author ogeorgeon
*/
public interface IAct
{
/*... |
package ernest;
/**
* A pattern of interaction between Ernest and its environment.
* Specifically, schemas can either succeed of fail when Ernest tries to enact
* them in the environment.
* @author mcohen
*
*/
public interface ISchema
{
public IAct getSucceedingAct();
public IAct getFailingAct()... |
package ernest;
/**
* An act is the association of a schema with the feedback the agent receives
* when trying to enact that schema. Concretely, an act associates a schema
* with a binary feedback status: succeed (S) or fail (F). This class
* represents a default implementation for an Act.
* @author m... |
package ernest;
import java.io.ObjectInputStream.GetField;
/**
* A Schema is a pattern of interaction between Ernest and its environment.
* Specifically, schemas can either succeed of fail when Ernest tries to enact
* them in the environment.
* @author mcohen
* @author ogeorgeon
*/
public class S... |
package ernest;
/**
* A state of Ernest's distal sensory system
* @author ogeorgeon
*/
public class Icon implements IIcon
{
/** The icon's width (first coordinate: x) */
public static final int WIDTH = 2;
/** The icon's height (second coordinate: y) */
public static final int HEIGHT = 1;
/** T... |
package ernest;
/**
* A proposal that Ernest enacts a schema. A proposal consists of
* the proposed schema and a weight that determines the strength of the proposal.
* Schemas that receive the highest summarized proposal weight are selected for enaction.
* @author mcohen
* @author ogeorgeon
*
*/
pu... |
package ernest;
import java.util.List;
/**
* Interface for an Environment suitable to Ernest.
* @author mcohen
* @author ogeorgeon
*/
public interface IEnvironment
{
public boolean enact(String s);
}
|
package ernest;
/**
* The generator of Ernest's activity traces.
* @author ogeorgeon
*/
public interface ITracer {
public boolean writeLine(String line);
public boolean writeHeader();
public boolean writeFooter();
}
|
package ernest;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import java.util.TreeMap;
/**
* This tracer logs the trace into an xml file.
* @author ogeorg... |
package ernest;
import java.util.List;
/**
* The interface for dealing with an Ernest agent.
* @author ogeorgeon
*/
public interface IErnest
{
public void clear();
public void setTracer(ITracer tracer);
public void setParameters(Integer RegularityThreshold, Integer ActivationThreshold, Integer s... |
package ernest;
/**
* Represents a proposal for enacting a Schema.
* A proposal consists of the proposed schema,
* a weight that determines the strength of the proposal,
* and an expectation that determines the prediction that the schema will succeed
* @author mcohen
* @author ogeorgeon
*/
public cl... |
package ernest;
import java.util.ArrayList;
import java.util.List;
/**
* A context is Ernest's internal representation of its situation at a given point in time.
* @author ogeorgeon
*/
public interface IContext
{
public List<IAct> getContextList();
public List<IAct> getFocusList();
public IAct getCoreAct(... |
package ernest;
/**
* The main program.
* Constitutes an example code to run Ernest in a simulated environment.
* @author ogeorgeon
*/
public class Main
{
public static void main(String[] args)
{
// Create the environment
IEnvironment environment = new SimpleMaze();
// Create a tr... |
package ernest;
import java.util.List;
import java.util.ArrayList;
import java.util.Random;
import java.util.Collections;
/**
* The main Ernest class used to create an Ernest agent.
* @author ogeorgeon
*/
public class Ernest implements IErnest
{
/** A big value that can represent infinite for divers... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.service.rest;
import java.util.List;
/**
*
* @author hectdx
*/
public class WrapperResults {
private Integer cantidadTotal;
private List listaResultados;
public Integer getCantidadTotal() ... |
package tesis.service.rest;
import tesis.dto.base.BaseRemoteOutBean;
import tesis.dto.in.ObjetoParametro;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import tesis.d... |
package tesis.dto.base;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class BaseRemoteOutBean implements Serializable{
private boolean error;
private String mensaje;
public boolean isError() {
return error;
}
public void setError(b... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
import tesis.dto.base.BaseRemoteOutBean;
/**
*
* @author hugo
*/
@XmlRootElement
public class AplicacionClienteDTO ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import tesis.dto.base.BaseRemoteOutBean;
/**
*
* @author hectdx
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import tesis.dto.base.BaseRemoteOutBean;
/**
*
* @author hugo
*/... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
import java.util.*;
import javax.xml.bind.annotation.XmlRootElement;
import tesis.dto.base.BaseRemoteOutBean;
/**
*
* @author hugo
*/
@XmlRootElement
public class E... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
/**
*
* @author hugo
*/
public class TipoDatoDTO implements Serializable{
private Integer idtipodato;
private String nombretipodato;
p... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package tesis.dto.in;
import java.io.Serializable;
/**
*
* @author hugo
*/
public class EstadoDocumentoDTO implements Serializable{
private Integer idestadodocumento;
private String nombre;
private... |
package tesis.dto.in;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author imilla
*/
@XmlRootElement
public class ObjetoParametro implements Serializable{
private Integer id;
private String nombre;
public Integer getId() {
return id;
}
public v... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.