repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import com.teocci.ytinbg.utils.LogHelper; import java.io.Serializable;
package com.teocci.ytinbg.model; /** * YouTube video class * Created by Teocci * * @author teocci@yandex.com on 2016-Aug-18 */ public class YouTubeVideo implements Serializable {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/receivers/MediaButtonIntentReceiver.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.teocci.ytinbg.utils.LogHelper;
package com.teocci.ytinbg.receivers; /** * Created by teocci. * * @author teocci@yandex.com on 2016-Mar-23 */ public class MediaButtonIntentReceiver extends BroadcastReceiver {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static final String TAG = LogHelper.makeLogTag(MediaButtonIntentReceiver.class);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/interfaces/YouTubeVideoUpdateListener.java
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
import com.teocci.ytinbg.model.YouTubeVideo; import java.util.List;
package com.teocci.ytinbg.interfaces; /** * Created by teocci. * * @author teocci@yandex.com on 2017-Jun-13 */ public interface YouTubeVideoUpdateListener {
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
void onYouTubeVideoChanged(YouTubeVideo youTubeVideo);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/interfaces/YouTubeVideoReceiver.java
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
import com.teocci.ytinbg.model.YouTubeVideo; import java.util.List;
package com.teocci.ytinbg.interfaces; /** * Interface which enables passing videos to the fragments * Created by Teocci on 10.3.16.. */ public interface YouTubeVideoReceiver {
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
void onVideosReceived(List<YouTubeVideo> youTubeVideos, String currentPageToken, String nextPageToken);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/utils/QueueHelper.java
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
import android.content.Context; import android.support.v4.media.session.MediaControllerCompat; import android.text.TextUtils; import com.teocci.ytinbg.model.YouTubeVideo; import java.util.List;
package com.teocci.ytinbg.utils; /** * Created by teocci. * * @author teocci@yandex.com on 2017-Jun-10 */ public class QueueHelper { private static final String TAG = QueueHelper.class.getSimpleName();
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubeVideo.java // public class YouTubeVideo implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubeVideo.class); // private static final long serialVersionUID = 1L; // private String id; // private String title;...
public static int getYouTubeVideoIndexOnQueue(Iterable<YouTubeVideo> queue,
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/notification/NotificationBuilder.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.os.Build; import android.os.RemoteException; import android.support.v4.media.MediaDescriptionCompat; import android.support.v4...
package com.teocci.ytinbg.notification; /** * Created by teocci. * * @author teocci@yandex.com on 2019-Jun-28 */ public class NotificationBuilder {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static final String TAG = LogHelper.makeLogTag(NotificationBuilder.class);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/notification/NotificationBuilder.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.os.Build; import android.os.RemoteException; import android.support.v4.media.MediaDescriptionCompat; import android.support.v4...
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC) .build(); } /** * Creates Notification Channel. This is required in Android O+ to display notifications. */ @RequiresApi(Build.VERSION_CODES.O) private void createNotificationChannel() { if (notif...
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
return minAPI26() && !nowRunningChannelExist();
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/youtube/YouTubeSingleton.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.content.Context; import com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.client.util.ExponentialBackOff; import com.google.api....
package com.teocci.ytinbg.youtube; /** * Created by teocci. * * @author teocci@yandex.com on 2017-Jun-09 */ public class YouTubeSingleton {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static String TAG = LogHelper.makeLogTag(YouTubeSingleton.class);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/youtube/YouTubeSingleton.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.content.Context; import com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.client.util.ExponentialBackOff; import com.google.api....
package com.teocci.ytinbg.youtube; /** * Created by teocci. * * @author teocci@yandex.com on 2017-Jun-09 */ public class YouTubeSingleton { private static String TAG = LogHelper.makeLogTag(YouTubeSingleton.class); private static YouTube youTube; private static YouTube youTubeWithCredentials; ...
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
.usingOAuth2(context, Arrays.asList(SCOPES))
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/interfaces/YouTubePlaylistReceiver.java
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubePlaylist.java // public class YouTubePlaylist implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubePlaylist.class); // private String title; // private String thumbnailURL; // private String id; // pri...
import com.teocci.ytinbg.model.YouTubePlaylist; import com.teocci.ytinbg.model.YouTubeVideo; import java.util.List;
package com.teocci.ytinbg.interfaces; /** * Interface which enables passing playlist to the fragments * Created by Teocci on 15.3.16.. */ public interface YouTubePlaylistReceiver {
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubePlaylist.java // public class YouTubePlaylist implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubePlaylist.class); // private String title; // private String thumbnailURL; // private String id; // pri...
void onPlaylistReceived(List<YouTubePlaylist> youTubePlaylistList);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/interfaces/YouTubePlaylistReceiver.java
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubePlaylist.java // public class YouTubePlaylist implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubePlaylist.class); // private String title; // private String thumbnailURL; // private String id; // pri...
import com.teocci.ytinbg.model.YouTubePlaylist; import com.teocci.ytinbg.model.YouTubeVideo; import java.util.List;
package com.teocci.ytinbg.interfaces; /** * Interface which enables passing playlist to the fragments * Created by Teocci on 15.3.16.. */ public interface YouTubePlaylistReceiver { void onPlaylistReceived(List<YouTubePlaylist> youTubePlaylistList); void onPlaylistNotFound(String playlistId, int errorCode...
// Path: app/src/main/java/com/teocci/ytinbg/model/YouTubePlaylist.java // public class YouTubePlaylist implements Serializable // { // private static final String TAG = LogHelper.makeLogTag(YouTubePlaylist.class); // private String title; // private String thumbnailURL; // private String id; // pri...
void onPlaylistVideoReceived(List<YouTubeVideo> youTubeVideos);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/Config.java // public static final String LOG_PREFIX = "[" + APP_NAME + "]";
import android.util.Log; import com.teocci.ytinbg.BuildConfig; import static com.teocci.ytinbg.utils.Config.LOG_PREFIX;
package com.teocci.ytinbg.utils; /** * Created by teocci. * * @author teocci@yandex.com on 2016-Dec-23 */ public class LogHelper {
// Path: app/src/main/java/com/teocci/ytinbg/utils/Config.java // public static final String LOG_PREFIX = "[" + APP_NAME + "]"; // Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java import android.util.Log; import com.teocci.ytinbg.BuildConfig; import static com.teocci.ytinbg.utils.Config.LOG_PREFIX; pac...
private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length();
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/ui/fragments/PlaybackControlsFragment.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.os.SystemClock; import android.support.v4.media.MediaBrowserCompat; import android.support.v4.media.MediaDescriptionCompat; import android.sup...
package com.teocci.ytinbg.ui.fragments; /** * Created by teocci. * <p> * This fragment shows the current playing youtube video with. Also has controls to seek/pause/play the audio. * * @author teocci@yandex.com on 2017-Jul-03 */ public class PlaybackControlsFragment extends Fragment {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static final String TAG = LogHelper.makeLogTag(PlaybackControlsFragment.class);
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/callbacks/SimpleItemTouchCallback.java
// Path: app/src/main/java/com/teocci/ytinbg/interfaces/ItemTouchListener.java // public interface ItemTouchListener // { // /** // * Called when an item has been dragged far enough to trigger a move. This is called every time // * an item is shifted, and <strong>not</strong> at the end of a "drop" event....
import android.graphics.Canvas; import com.teocci.ytinbg.interfaces.ItemTouchListener; import com.teocci.ytinbg.interfaces.ItemTouchViewListener; import androidx.annotation.NonNull; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.w...
package com.teocci.ytinbg.callbacks; /** * Created by teocci. * * @author teocci@yandex.com on 2017-May-15 */ public class SimpleItemTouchCallback extends ItemTouchHelper.Callback { public static final float ALPHA_FULL = 1.0f;
// Path: app/src/main/java/com/teocci/ytinbg/interfaces/ItemTouchListener.java // public interface ItemTouchListener // { // /** // * Called when an item has been dragged far enough to trigger a move. This is called every time // * an item is shifted, and <strong>not</strong> at the end of a "drop" event....
private final ItemTouchListener itemTouchListener;
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/callbacks/SimpleItemTouchCallback.java
// Path: app/src/main/java/com/teocci/ytinbg/interfaces/ItemTouchListener.java // public interface ItemTouchListener // { // /** // * Called when an item has been dragged far enough to trigger a move. This is called every time // * an item is shifted, and <strong>not</strong> at the end of a "drop" event....
import android.graphics.Canvas; import com.teocci.ytinbg.interfaces.ItemTouchListener; import com.teocci.ytinbg.interfaces.ItemTouchViewListener; import androidx.annotation.NonNull; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.w...
{ // Notify the adapter of the dismissal itemTouchListener.onItemDismiss(viewHolder.getAdapterPosition()); } @Override public void onChildDraw( @NonNull Canvas c, @NonNull RecyclerView recyclerView, @NonNull RecyclerView.ViewHolder viewHolder, ...
// Path: app/src/main/java/com/teocci/ytinbg/interfaces/ItemTouchListener.java // public interface ItemTouchListener // { // /** // * Called when an item has been dragged far enough to trigger a move. This is called every time // * an item is shifted, and <strong>not</strong> at the end of a "drop" event....
if (viewHolder instanceof ItemTouchViewListener) {
teocci/YouTube-In-Background
app/src/main/java/com/teocci/ytinbg/model/YouTubePlaylist.java
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
import com.teocci.ytinbg.utils.LogHelper; import java.io.Serializable;
package com.teocci.ytinbg.model; /** * YouTube playlist class * Created by Teocci * * @author teocci@yandex.com on 2016-Aug-18 */ public class YouTubePlaylist implements Serializable {
// Path: app/src/main/java/com/teocci/ytinbg/utils/LogHelper.java // public class LogHelper // { // private static final int LOG_PREFIX_LENGTH = LOG_PREFIX.length(); // private static final int MAX_LOG_TAG_LENGTH = 23; // private static final int RESERVED_LENGTH = MAX_LOG_TAG_LENGTH - LOG_PREFIX_LENGTH - 2;...
private static final String TAG = LogHelper.makeLogTag(YouTubePlaylist.class);
mahadirz/UnitenInfo
app/src/main/java/my/madet/adapter/NavDrawerListAdapter.java
// Path: app/src/main/java/my/madet/model/NavDrawerItem.java // public class NavDrawerItem { // // private String title; // private int icon; // private String count = "0"; // // boolean to set visiblity of the counter // private boolean isCounterVisible = false; // // public NavDrawe...
import java.util.ArrayList; import my.madet.model.NavDrawerItem; import my.madet.uniteninfo.R; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; imp...
/* * The MIT License (MIT) * Copyright (c) 2014 Mahadir Ahmad * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, ...
// Path: app/src/main/java/my/madet/model/NavDrawerItem.java // public class NavDrawerItem { // // private String title; // private int icon; // private String count = "0"; // // boolean to set visiblity of the counter // private boolean isCounterVisible = false; // // public NavDrawe...
private ArrayList<NavDrawerItem> navDrawerItems;
mahadirz/UnitenInfo
app/src/main/java/my/madet/function/HttpParser.java
// Path: app/src/main/java/my/madet/ntlm/NTLMSchemeFactory.java // public class NTLMSchemeFactory implements AuthSchemeFactory // { // @Override // public AuthScheme newInstance(HttpParams params) // { // return new NTLMScheme(new JCIFSEngine()); // } // }
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.reg...
/* * FileWriter fw = new FileWriter(file.getAbsoluteFile()); * BufferedWriter bw = new BufferedWriter(fw); */ byte[] data = str.getBytes(); try { if (!file.exists()) { file.createNewFile(); } fos = new FileOutputStream(file); fos.write(data); fos.flush(); fos.close(); } catch (F...
// Path: app/src/main/java/my/madet/ntlm/NTLMSchemeFactory.java // public class NTLMSchemeFactory implements AuthSchemeFactory // { // @Override // public AuthScheme newInstance(HttpParams params) // { // return new NTLMScheme(new JCIFSEngine()); // } // } // Path: app/src/main/java/my/madet/f...
new NTLMSchemeFactory());
mahadirz/UnitenInfo
app/src/main/java/my/madet/uniteninfo/CheckUpdateDialog.java
// Path: app/src/main/java/my/madet/function/HttpsClient.java // public class HttpsClient { // // private String contents = ""; // public static String TAG = "HttpsClient"; // private boolean debug = false; // // /** // * Get the contents after the url was opened // * @return // */ // ...
import my.madet.function.HttpsClient; import my.madet.function.MyPreferences; import org.json.JSONException; import org.json.JSONObject; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager.NameNot...
package my.madet.uniteninfo; public class CheckUpdateDialog { private Context ourContext;
// Path: app/src/main/java/my/madet/function/HttpsClient.java // public class HttpsClient { // // private String contents = ""; // public static String TAG = "HttpsClient"; // private boolean debug = false; // // /** // * Get the contents after the url was opened // * @return // */ // ...
private MyPreferences myPreferences;
mahadirz/UnitenInfo
app/src/main/java/my/madet/uniteninfo/CheckUpdateDialog.java
// Path: app/src/main/java/my/madet/function/HttpsClient.java // public class HttpsClient { // // private String contents = ""; // public static String TAG = "HttpsClient"; // private boolean debug = false; // // /** // * Get the contents after the url was opened // * @return // */ // ...
import my.madet.function.HttpsClient; import my.madet.function.MyPreferences; import org.json.JSONException; import org.json.JSONObject; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager.NameNot...
package my.madet.uniteninfo; public class CheckUpdateDialog { private Context ourContext; private MyPreferences myPreferences; public CheckUpdateDialog(Context c){ ourContext = c; myPreferences = new MyPreferences(c); } private class VersionHttpRequest extends AsyncTask<Void,Void,String> { protected ...
// Path: app/src/main/java/my/madet/function/HttpsClient.java // public class HttpsClient { // // private String contents = ""; // public static String TAG = "HttpsClient"; // private boolean debug = false; // // /** // * Get the contents after the url was opened // * @return // */ // ...
HttpsClient client = new HttpsClient();
jwzhangjie/AndJie
AndJie/src/com/jwzhangjie/andbase/doc/adapter/AccountAdapter.java
// Path: AndJie/src/com/jwzhangjie/andbase/doc/bean/GsonBean.java // public class GsonBean implements IParcelable{ // // @Override // public int describeContents() { // return 0; // } // // public GsonBean(){ // // } // // public GsonBean(Parcel source){ // readFromParcel(source); // } // // //用户登...
import java.util.List; import com.jwzhangjie.andbase.R; import com.jwzhangjie.andbase.doc.bean.GsonBean; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView;
package com.jwzhangjie.andbase.doc.adapter; /** * title: AccountAdapter.java * @author jwzhangjie * Date: 2014-12-6 下午4:50:10 * version 1.0 * {@link http://blog.csdn.net/jwzhangjie} * Description:RecyclerView的适配器 */ public class AccountAdapter extends RecyclerView.Adapter<AccountAdapter.ViewHolder> {
// Path: AndJie/src/com/jwzhangjie/andbase/doc/bean/GsonBean.java // public class GsonBean implements IParcelable{ // // @Override // public int describeContents() { // return 0; // } // // public GsonBean(){ // // } // // public GsonBean(Parcel source){ // readFromParcel(source); // } // // //用户登...
private List<GsonBean> listDatas;
jwzhangjie/AndJie
AndJie/src/com/jwzhangjie/andbase/ui/base/JieBasePopup.java
// Path: AndJie/src/com/jwzhangjie/andbase/JieApp.java // public class JieApp extends Application { // // public static JieApp instance = null; // private BaseActivity currentRunningActivity = null; // private LayoutInflater mInflater; // // @Override // public void onCreate() { // super.onCreate(); // insta...
import com.jwzhangjie.andbase.JieApp; import com.jwzhangjie.andbase.R; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.view.View; import android.widget.PopupWindow;
package com.jwzhangjie.andbase.ui.base; /** * title: JieBasePopup.java * @author jwzhangjie * Date: 2014-12-7 下午9:09:10 * version 1.0 * {@link http://blog.csdn.net/jwzhangjie} * Description:封装基础的弹出框 */ public abstract class JieBasePopup extends BaseView { protected PopupWindow mPopupWindow; private View p...
// Path: AndJie/src/com/jwzhangjie/andbase/JieApp.java // public class JieApp extends Application { // // public static JieApp instance = null; // private BaseActivity currentRunningActivity = null; // private LayoutInflater mInflater; // // @Override // public void onCreate() { // super.onCreate(); // insta...
mPopupWindow.setBackgroundDrawable(JieApp.instance
jwzhangjie/AndJie
AndJie/src/com/jwzhangjie/andbase/doc/DBUsed.java
// Path: AndJie/src/com/jwzhangjie/andbase/doc/db/Users.java // @DatabaseTable(tableName = "users") // public class Users implements Serializable{ // // private static final long serialVersionUID = 1L; // // @DatabaseField(generatedId = true) // private int id; // // @DatabaseField(unique = true) // private Str...
import java.util.ArrayList; import java.util.List; import android.content.Context; import com.jwzhangjie.andbase.doc.db.DBUtils; import com.jwzhangjie.andbase.doc.db.Users;
package com.jwzhangjie.andbase.doc; /** * title: DBUsed.java * @author jwzhangjie * Date: 2014年12月8日 下午12:48:21 * version 1.0 * {@link http://blog.csdn.net/jwzhangjie} * Description:关于ormlite的具体使用实例 */ public class DBUsed { private DBUtils mDbUtils; public DBUsed(Context context){ mDbUtils = new DBUtil...
// Path: AndJie/src/com/jwzhangjie/andbase/doc/db/Users.java // @DatabaseTable(tableName = "users") // public class Users implements Serializable{ // // private static final long serialVersionUID = 1L; // // @DatabaseField(generatedId = true) // private int id; // // @DatabaseField(unique = true) // private Str...
List<Users> users = new ArrayList<Users>();
jwzhangjie/AndJie
AndJie/src/com/jwzhangjie/andbase/JieApp.java
// Path: AndJie/src/com/jwzhangjie/andbase/ui/base/BaseActivity.java // public class BaseActivity extends FragmentActivity implements IActivity { // // protected Intent startIntent; // private Toast mToast; // protected int PULL_FINISH = 0; // public String ISREFRESH = "isReFresh"; // // @SuppressLint("HandlerLe...
import com.jwzhangjie.andbase.ui.base.BaseActivity; import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.ImageLoaderConfiguration; import com.nostra13.universalimageloader.core.assist.Que...
package com.jwzhangjie.andbase; public class JieApp extends Application { public static JieApp instance = null;
// Path: AndJie/src/com/jwzhangjie/andbase/ui/base/BaseActivity.java // public class BaseActivity extends FragmentActivity implements IActivity { // // protected Intent startIntent; // private Toast mToast; // protected int PULL_FINISH = 0; // public String ISREFRESH = "isReFresh"; // // @SuppressLint("HandlerLe...
private BaseActivity currentRunningActivity = null;
jwzhangjie/AndJie
AndJie/src/com/jwzhangjie/andbase/doc/HttpRequestUsed.java
// Path: AndJie/src/com/jwzhangjie/andbase/net/JieHttpClient.java // public class JieHttpClient { // // private static final String BASE_URL = JieContant.URL_Base; // private static AsyncHttpClient client = new AsyncHttpClient(); // // static { // client.setTimeout(30000); // } // // public static void get(St...
import org.apache.http.Header; import com.jwzhangjie.andbase.net.DefaultJsonResponseHandler; import com.jwzhangjie.andbase.net.JieHttpClient; import com.loopj.android.http.RequestParams;
package com.jwzhangjie.andbase.doc; /** * title: HttpRequestUsed.java * @author jwzhangjie * Date: 2014-12-6 下午3:16:10 * version 1.0 * {@link http://blog.csdn.net/jwzhangjie} * Description: 网络请求实例 */ public class HttpRequestUsed { public HttpRequestUsed(){ RequestParams params = new RequestParams(); p...
// Path: AndJie/src/com/jwzhangjie/andbase/net/JieHttpClient.java // public class JieHttpClient { // // private static final String BASE_URL = JieContant.URL_Base; // private static AsyncHttpClient client = new AsyncHttpClient(); // // static { // client.setTimeout(30000); // } // // public static void get(St...
JieHttpClient.postBase(url, params, new DefaultJsonResponseHandler(){
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/executor/SaveCheckerImpl.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/common/ChunkCheckpoint.java // @AutoValue // public abstract class ChunkCheckpoint { // // public abstract Integer lastSavedChunkNumber(); // // public abstract Instant lastSavedInstant(); // // public static Builder builder() { // re...
import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.groupingBy; import static java.util.stream.Collectors.mapping; import static java.util.stream.Collectors.collectingAndThen; import com.google.cloud.bigquery.dwhassessment.extractiontool.common.ChunkCheckpoint; import com.google....
.filter(Files::isRegularFile) .map(oneFile -> INPUT_CHUNK_PATTERN.matcher(oneFile.getFileName().toString())) .filter(Matcher::matches) .collect( groupingBy( (Matcher matcher) -> matcher.group("scriptName"), mapping( ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/common/ChunkCheckpoint.java // @AutoValue // public abstract class ChunkCheckpoint { // // public abstract Integer lastSavedChunkNumber(); // // public abstract Instant lastSavedInstant(); // // public static Builder builder() { // re...
public ImmutableMap<String, ChunkCheckpoint> getScriptCheckPoints(Path path) {
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelperTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.dumpResults; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import static com.google.co...
Statement baseStmt = connection.createStatement(); baseStmt.execute( "CREATE TABLE T0 (" + "INT_COL INTEGER, " + "VARCHAR_COL VARCHAR(100), " + "CHAR_COL CHAR(100), " + "LONGVARCHAR_COL LONGVARCHAR(100), " + "SMALLINT_COL SMALLINT, " ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
Schema schema = getAvroSchema("schemaName", "namespace", metaData);
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelperTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.dumpResults; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import static com.google.co...
"CREATE TABLE SIMPLE_TABLE (ID INTEGER, NAME VARCHAR(100), CHAR_COL CHAR(20))"); baseStmt.execute("INSERT INTO SIMPLE_TABLE VALUES (0, 'name_0', ' two words')"); baseStmt.close(); connection.commit(); metaData = connection.createStatement().executeQuery("SELECT * FROM T0").getMetaData(); } ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
GenericRecord result = parseRowToAvro(resultSet, testSchema);
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelperTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.dumpResults; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import static com.google.co...
} @Test public void parseRowToAvroTest() throws Exception { Schema testSchema = new Schema.Parser().parse(SIMPLE_TEST_SCHEMA); ResultSet resultSet = connection.createStatement().executeQuery("SELECT * FROM SIMPLE_TABLE"); while (resultSet.next()) { GenericRecord result = parseRowToAvro(resultS...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static void dumpResults( // ImmutableList<GenericRecord> records, OutputStream outputStream, Schema schema) // throws IOException { // GenericDatumWriter<GenericRecord> writer = new GenericDatumWriter<>(schem...
dumpResults(records.build(), outputStream, schema);
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static GenericRecord parseRowToAvro(ResultSet row, Schema schema) throws SQLException { // GenericRecordBuilder recordBuilder = new GenericRecordBuilder(schema); // ResultSetMetaData metaData = row.getMetaData(); /...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import static java.nio.file.StandardCopyOption.ATOMIC_MOVE; import com.google.cloud.bigquery.dwhassessment.extractiontool.dumper.DataEntityManager; import com.google.common.annotations.VisibleForTesting; import com.google...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static GenericRecord parseRowToAvro(ResultSet row, Schema schema) throws SQLException { // GenericRecordBuilder recordBuilder = new GenericRecordBuilder(schema); // ResultSetMetaData metaData = row.getMetaData(); /...
DataEntityManager dataEntityManager,
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static GenericRecord parseRowToAvro(ResultSet row, Schema schema) throws SQLException { // GenericRecordBuilder recordBuilder = new GenericRecordBuilder(schema); // ResultSetMetaData metaData = row.getMetaData(); /...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import static java.nio.file.StandardCopyOption.ATOMIC_MOVE; import com.google.cloud.bigquery.dwhassessment.extractiontool.dumper.DataEntityManager; import com.google.common.annotations.VisibleForTesting; import com.google...
while (!resultSet.isAfterLast()) { executeScriptChunk( resultSet, schema, dataEntityManager, chunkRows, labelColumn, scriptName, chunkNumber); chunkNumber++; } return; } executeScriptOneSwoop(connection, scriptName, script, schema, dataEntityManager); } private...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static GenericRecord parseRowToAvro(ResultSet row, Schema schema) throws SQLException { // GenericRecordBuilder recordBuilder = new GenericRecordBuilder(schema); // ResultSetMetaData metaData = row.getMetaData(); /...
dumper.add(parseRowToAvro(resultSet, schema));
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SqlTemplateRendererTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SqlScriptVariables.java // @AutoValue // public abstract class SqlScriptVariables { // // public static Builder builder() { // return new AutoValue_SqlScriptVariables.Builder() // .setBaseDatabase("DBC") // .setVars(Immut...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.SqlScriptVariables.*; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import com.google.common.collect.ImmutableList; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWi...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SqlScriptVariables.java // @AutoValue // public abstract class SqlScriptVariables { // // public static Builder builder() { // return new AutoValue_SqlScriptVariables.Builder() // .setBaseDatabase("DBC") // .setVars(Immut...
private SqlScriptVariables.Builder baseVariablesBuilder;
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SchemaManagerImplTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.common.truth.Truth.assertThat; import com.google.cloud.bigquery.dwhassessment.extractiontool.db.SchemaManage...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
ImmutableSet<SchemaKey> results = schemaManager.getSchemaKeys(connection, ImmutableList.of());
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SchemaManagerImplTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.common.truth.Truth.assertThat; import com.google.cloud.bigquery.dwhassessment.extractiontool.db.SchemaManage...
SchemaFilter.builder().setTableName(Pattern.compile("FOO.*")).build())); assertThat(results) .containsAtLeastElementsIn( ImmutableSet.of( SchemaKey.create("HSQL Database Engine", "FOO"), SchemaKey.create("HSQL Database Engine", "FOOBAR"))); } ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
getAvroSchema(
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptRunnerImpl.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; imp...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
recordConsumer.accept(parseRowToAvro(resultSet, schema));
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptRunnerImpl.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.getAvroSchema; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.AvroHelper.parseRowToAvro; import java.sql.Connection; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; imp...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/AvroHelper.java // public static Schema getAvroSchema( // String schemaName, String namespace, ResultSetMetaData metaData) throws SQLException { // Preconditions.checkArgument(!schemaName.isEmpty(), "Schema name cannot be empty."); // P...
return getAvroSchema(schemaName, namespace, metaData);
google/dwh-assessment-extraction-tool
src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManager.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/dumper/DataEntityManager.java // public interface DataEntityManager extends Closeable { // // /** // * Get the output stream for an entity. // * // * @param name The name of the output entity. // */ // OutputStream getEntityOutput...
import com.google.cloud.bigquery.dwhassessment.extractiontool.dumper.DataEntityManager; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.sql.Connection; import java.sql.SQLException;
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/dumper/DataEntityManager.java // public interface DataEntityManager extends Closeable { // // /** // * Get the output stream for an entity. // * // * @param name The name of the output entity. // */ // OutputStream getEntityOutput...
DataEntityManager dataEntityManager,
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImplTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java // @VisibleForTesting // static String getUtcTimeStringFromTimestamp(Timestamp timestamp) { // Instant instant = timestamp.toInstant(); // // Remove the "Z" (that signifies UTC timezone) and the separators that are no...
import static com.google.common.truth.Truth.assertThat; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.ScriptManagerImpl.getUtcTimeStringFromTimestamp; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import com.google.cloud.bigquery.dwhassessment.extract...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java // @VisibleForTesting // static String getUtcTimeStringFromTimestamp(Timestamp timestamp) { // Instant instant = timestamp.toInstant(); // // Remove the "Z" (that signifies UTC timezone) and the separators that are no...
private DataEntityManager dataEntityManager;
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImplTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java // @VisibleForTesting // static String getUtcTimeStringFromTimestamp(Timestamp timestamp) { // Instant instant = timestamp.toInstant(); // // Remove the "Z" (that signifies UTC timezone) and the separators that are no...
import static com.google.common.truth.Truth.assertThat; import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.ScriptManagerImpl.getUtcTimeStringFromTimestamp; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import com.google.cloud.bigquery.dwhassessment.extract...
"CREATE Table TestTable (" + "ID INTEGER," + "TIMESTAMPS TIMESTAMP(6) WITH TIME ZONE" + ")"); baseStmt.execute( "INSERT INTO TestTable VALUES (4, TIMESTAMP '2007-07-07 20:07:07.007000' AT TIME ZONE" + " INTERVAL '0:00' HOUR TO MINUTE)"); baseStmt.c...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/ScriptManagerImpl.java // @VisibleForTesting // static String getUtcTimeStringFromTimestamp(Timestamp timestamp) { // Instant instant = timestamp.toInstant(); // // Remove the "Z" (that signifies UTC timezone) and the separators that are no...
assertThat(getUtcTimeStringFromTimestamp(Timestamp.from(Instant.parse("2022-01-24T14:52:00Z"))))
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SchemaFiltersTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SchemaFilters.java // public static SchemaFilter parse(String input) { // Map<String, String> filterMap = // "".equals(input) // ? ImmutableMap.of() // : Splitter.onPattern(",\\s*").withKeyValueSeparator(':').split(i...
import static com.google.cloud.bigquery.dwhassessment.extractiontool.db.SchemaFilters.parse; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import com.google.re2j.Pattern; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4;
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/db/SchemaFilters.java // public static SchemaFilter parse(String input) { // Map<String, String> filterMap = // "".equals(input) // ? ImmutableMap.of() // : Splitter.onPattern(",\\s*").withKeyValueSeparator(':').split(i...
assertThat(parse("")).isEqualTo(SchemaFilter.builder().build());
google/dwh-assessment-extraction-tool
src/javatests/com/google/cloud/bigquery/dwhassessment/extractiontool/executor/SaveCheckerImplTest.java
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/common/ChunkCheckpoint.java // @AutoValue // public abstract class ChunkCheckpoint { // // public abstract Integer lastSavedChunkNumber(); // // public abstract Instant lastSavedInstant(); // // public static Builder builder() { // re...
import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertThrows; import com.google.cloud.bigquery.dwhassessment.extractiontool.common.ChunkCheckpoint; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.io.IOException; import jav...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
// Path: src/java/com/google/cloud/bigquery/dwhassessment/extractiontool/common/ChunkCheckpoint.java // @AutoValue // public abstract class ChunkCheckpoint { // // public abstract Integer lastSavedChunkNumber(); // // public abstract Instant lastSavedInstant(); // // public static Builder builder() { // re...
ImmutableMap<String, ChunkCheckpoint> checkpoints = saveChecker.getScriptCheckPoints(tmpDir);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
import net.fortytwo.rdfagents.messaging.Commitment; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.AgentId; import net.fortytwo.rdfagents.model.RDFAgent;
package net.fortytwo.rdfagents.messaging.query; /** * The agent role of answering queries posed by other agents. * Query answering in RDFAgents follows FIPA's * <a href="http://www.fipa.org/specs/fipa00027/index.html">Query Interaction Protocol</a>. * For more details, see <a href="http://fortytwo.net/2011/rdfage...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
public abstract Commitment considerQueryRequest(String conversationId,
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
import net.fortytwo.rdfagents.messaging.Commitment; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.AgentId; import net.fortytwo.rdfagents.model.RDFAgent;
package net.fortytwo.rdfagents.messaging.query; /** * The agent role of answering queries posed by other agents. * Query answering in RDFAgents follows FIPA's * <a href="http://www.fipa.org/specs/fipa00027/index.html">Query Interaction Protocol</a>. * For more details, see <a href="http://fortytwo.net/2011/rdfage...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
AgentId initiator);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
import net.fortytwo.rdfagents.messaging.Commitment; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.AgentId; import net.fortytwo.rdfagents.model.RDFAgent;
package net.fortytwo.rdfagents.messaging.query; /** * The agent role of answering queries posed by other agents. * Query answering in RDFAgents follows FIPA's * <a href="http://www.fipa.org/specs/fipa00027/index.html">Query Interaction Protocol</a>. * For more details, see <a href="http://fortytwo.net/2011/rdfage...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
public abstract A answer(Q query) throws LocalFailure;
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/subscribe/old/SubscriberOld.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Role.java // public abstract class Role { // protected final RDFAgent agent; // // public Role(final RDFAgent agent) { // this.agent = agent; // } // } // // Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/Error...
import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.ErrorExplanation; import net.fortytwo.rdfagents.model.RDFAgent;
package net.fortytwo.rdfagents.messaging.subscribe.old; /** * An agent role for subscribing to streams of updates from other agents. * Subscriptions in RDFAgents follow FIPA's * <a href="http://www.fipa.org/specs/fipa00035/SC00035H.html">Subscribe Interaction Protocol</a>. * For more details, see <a href="http://...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Role.java // public abstract class Role { // protected final RDFAgent agent; // // public Role(final RDFAgent agent) { // this.agent = agent; // } // } // // Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/Error...
void refused(ErrorExplanation explanation);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/ConsumerCallback.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
import net.fortytwo.rdfagents.model.ErrorExplanation;
package net.fortytwo.rdfagents.messaging; /** * A handler for all possible outcomes of a query request. * * @param <A> a class of query answers * * @author Joshua Shinavier (http://fortytwo.net) */ public interface ConsumerCallback<A> { /** * Indicates success of the query request and provides the quer...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
void refused(ErrorExplanation explanation);
joshsh/rdfagents
rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/RDFAgents.java // public class RDFAgents { // private static final Logger logger = Logger.getLogger(RDFAgents.class.getName()); // // // Agent profile properties // public static final String // QUERY_ANSWERING_SUPPORTED = "behavior.q...
import jade.content.lang.sl.SLOntology; import jade.content.onto.BasicOntology; import jade.content.onto.Ontology; import jade.content.onto.OntologyException; import jade.content.schema.ConceptSchema; import jade.content.schema.ObjectSchema; import jade.content.schema.PredicateSchema; import jade.content.schema.Primiti...
package net.fortytwo.rdfagents.jade; /** * @author Joshua Shinavier (http://fortytwo.net) */ public class RDFAgentsOntology extends Ontology { private static final RDFAgentsOntology INSTANCE; static { try { INSTANCE = new RDFAgentsOntology(); } catch (OntologyException e) { ...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/RDFAgents.java // public class RDFAgents { // private static final Logger logger = Logger.getLogger(RDFAgents.class.getName()); // // // Agent profile properties // public static final String // QUERY_ANSWERING_SUPPORTED = "behavior.q...
super(RDFAgents.RDFAGENTS_ONTOLOGY_NAME, SLOntology.getInstance());
joshsh/rdfagents
rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/RDFAgents.java // public class RDFAgents { // private static final Logger logger = Logger.getLogger(RDFAgents.class.getName()); // // // Agent profile properties // public static final String // QUERY_ANSWERING_SUPPORTED = "behavior.q...
import jade.content.lang.sl.SLOntology; import jade.content.onto.BasicOntology; import jade.content.onto.Ontology; import jade.content.onto.OntologyException; import jade.content.schema.ConceptSchema; import jade.content.schema.ObjectSchema; import jade.content.schema.PredicateSchema; import jade.content.schema.Primiti...
throw new ExceptionInInitializerError(e); } } public static final String DATASET = "dataset", // implicit (used only as a variable) DESCRIBES = "describes", DESCRIBES_DATASET = "dataset", // implicit (unnamed parameter) DESCRIBES...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/RDFAgents.java // public class RDFAgents { // private static final Logger logger = Logger.getLogger(RDFAgents.class.getName()); // // // Agent profile properties // public static final String // QUERY_ANSWERING_SUPPORTED = "behavior.q...
for (ErrorExplanation.Type x : ErrorExplanation.Type.values()) {
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/subscribe/PubsubProvider.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
import net.fortytwo.rdfagents.messaging.Commitment; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.AgentId; import net.fortytwo.rdfagents.model.RDFAgent; import java.util.HashMap; import java.util.HashSet; import java.util.Map; imp...
package net.fortytwo.rdfagents.messaging.subscribe; /** * The agent role of producing streams of updates based on topic-based subscriptions from other agents. * Subscriptions in RDFAgents follow FIPA's * <a href="http://www.fipa.org/specs/fipa00035/SC00035H.html">Subscribe Interaction Protocol</a>. * For more de...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
public final AgentId subscriber;
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/subscribe/PubsubProvider.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
import net.fortytwo.rdfagents.messaging.Commitment; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.messaging.Role; import net.fortytwo.rdfagents.model.AgentId; import net.fortytwo.rdfagents.model.RDFAgent; import java.util.HashMap; import java.util.HashSet; import java.util.Map; imp...
package net.fortytwo.rdfagents.messaging.subscribe; /** * The agent role of producing streams of updates based on topic-based subscriptions from other agents. * Subscriptions in RDFAgents follow FIPA's * <a href="http://www.fipa.org/specs/fipa00035/SC00035H.html">Subscribe Interaction Protocol</a>. * For more de...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java // public class Commitment { // // public enum Decision { // AGREE_AND_NOTIFY, // Query and Subscribe // AGREE_SILENTLY, // Query only // REFUSE // Query and Subscribe // } // // ...
public PubsubProvider(final RDFAgent agent) {
joshsh/rdfagents
rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/testing/ExampleMessages.java
// Path: rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java // public class RDFAgentsOntology extends Ontology { // private static final RDFAgentsOntology INSTANCE; // // static { // try { // INSTANCE = new RDFAgentsOntology(); // } catch (OntologyExcept...
import jade.content.ContentManager; import jade.content.lang.Codec; import jade.content.lang.sl.SLCodec; import jade.content.onto.BasicOntology; import jade.core.AID; import jade.domain.FIPANames; import jade.lang.acl.ACLMessage; import jade.lang.acl.StringACLCodec; import net.fortytwo.rdfagents.jade.RDFAgentsOntology;...
client.setName("http://fortytwo.net/agents/smith"); client.addAddresses("xmpp:smith@fortytwo.net"); AID server = new AID(); server.setName("http://example.org/rdfnews"); server.addAddresses("xmpp:rdfnews@example.org"); ContentManager manager = new ContentManager(); ...
// Path: rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java // public class RDFAgentsOntology extends Ontology { // private static final RDFAgentsOntology INSTANCE; // // static { // try { // INSTANCE = new RDFAgentsOntology(); // } catch (OntologyExcept...
m.setOntology(RDFAgentsOntology.getInstance().getName());
joshsh/rdfagents
rdfagents-csparql/src/main/java/net/fortytwo/rdfagents/CSPARQLConsumer.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/ConsumerCallback.java // public interface ConsumerCallback<A> { // /** // * Indicates success of the query request and provides the query answer. // * // * @param answer the answer to the submitted query // */ // void suc...
import eu.larkc.csparql.cep.api.RdfQuadruple; import eu.larkc.csparql.cep.api.RdfStream; import net.fortytwo.rdfagents.messaging.ConsumerCallback; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.model.Dataset; import net.fortytwo.rdfagents.model.ErrorExplanation; import org.openrdf.m...
package net.fortytwo.rdfagents; /** * @author Joshua Shinavier (http://fortytwo.net) */ public class CSPARQLConsumer extends RdfStream implements ConsumerCallback<Dataset> { public CSPARQLConsumer(String iri) { super(iri); // TODO Auto-generated constructor stub } @Override public ...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/ConsumerCallback.java // public interface ConsumerCallback<A> { // /** // * Indicates success of the query request and provides the query answer. // * // * @param answer the answer to the submitted query // */ // void suc...
public void localFailure(LocalFailure arg0) {
joshsh/rdfagents
rdfagents-csparql/src/main/java/net/fortytwo/rdfagents/CSPARQLConsumer.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/ConsumerCallback.java // public interface ConsumerCallback<A> { // /** // * Indicates success of the query request and provides the query answer. // * // * @param answer the answer to the submitted query // */ // void suc...
import eu.larkc.csparql.cep.api.RdfQuadruple; import eu.larkc.csparql.cep.api.RdfStream; import net.fortytwo.rdfagents.messaging.ConsumerCallback; import net.fortytwo.rdfagents.messaging.LocalFailure; import net.fortytwo.rdfagents.model.Dataset; import net.fortytwo.rdfagents.model.ErrorExplanation; import org.openrdf.m...
package net.fortytwo.rdfagents; /** * @author Joshua Shinavier (http://fortytwo.net) */ public class CSPARQLConsumer extends RdfStream implements ConsumerCallback<Dataset> { public CSPARQLConsumer(String iri) { super(iri); // TODO Auto-generated constructor stub } @Override public ...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/ConsumerCallback.java // public interface ConsumerCallback<A> { // /** // * Indicates success of the query request and provides the query answer. // * // * @param answer the answer to the submitted query // */ // void suc...
public void refused(ErrorExplanation arg0) {
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/RDFAgent.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java // public abstract class QueryProvider<Q, A> extends Role { // // public QueryProvider(final RDFAgent agent) { // super(agent); // } // // /** // * @param conversationId the conversation of the que...
import net.fortytwo.rdfagents.messaging.query.QueryProvider; import net.fortytwo.rdfagents.messaging.subscribe.PubsubProvider; import org.openrdf.model.Value;
package net.fortytwo.rdfagents.model; /** * @author Joshua Shinavier (http://fortytwo.net) */ public abstract class RDFAgent { protected final AgentId identity; public RDFAgent(final RDFAgentsPlatform platform, final AgentId id) throws RDFAgentException { if (0 == id.getTranspo...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java // public abstract class QueryProvider<Q, A> extends Role { // // public QueryProvider(final RDFAgent agent) { // super(agent); // } // // /** // * @param conversationId the conversation of the que...
public abstract void setQueryProvider(QueryProvider<Value, Dataset> queryProvider);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/RDFAgent.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java // public abstract class QueryProvider<Q, A> extends Role { // // public QueryProvider(final RDFAgent agent) { // super(agent); // } // // /** // * @param conversationId the conversation of the que...
import net.fortytwo.rdfagents.messaging.query.QueryProvider; import net.fortytwo.rdfagents.messaging.subscribe.PubsubProvider; import org.openrdf.model.Value;
package net.fortytwo.rdfagents.model; /** * @author Joshua Shinavier (http://fortytwo.net) */ public abstract class RDFAgent { protected final AgentId identity; public RDFAgent(final RDFAgentsPlatform platform, final AgentId id) throws RDFAgentException { if (0 == id.getTranspo...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/query/QueryProvider.java // public abstract class QueryProvider<Q, A> extends Role { // // public QueryProvider(final RDFAgent agent) { // super(agent); // } // // /** // * @param conversationId the conversation of the que...
public abstract void setPubsubProvider(PubsubProvider<Value, Dataset> pubsubProvider);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/CancellationCallback.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
import net.fortytwo.rdfagents.model.ErrorExplanation;
package net.fortytwo.rdfagents.messaging; /** * A handler for all possible outcomes of a query cancellation request. * * @author Joshua Shinavier (http://fortytwo.net) */ public interface CancellationCallback { /** * Indicates success of the cancellation request. */ void success(); /** ...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
void remoteFailure(ErrorExplanation explanation);
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/data/RecursiveDescribeQuery.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/Dataset.java // public class Dataset { // public static final String UUID_URN_PREFIX = "urn:uuid:"; // // private final Collection<Statement> statements; // // public Dataset(Collection<Statement> statements) { // this.statements =...
import info.aduna.iteration.CloseableIteration; import net.fortytwo.rdfagents.model.Dataset; import org.openrdf.model.Resource; import org.openrdf.model.Statement; import org.openrdf.model.Value; import org.openrdf.sail.Sail; import org.openrdf.sail.SailConnection; import org.openrdf.sail.SailException; import java.uti...
package net.fortytwo.rdfagents.data; /** * A simple "describes" query engine which produces a RDF Dataset of graphs describing * (containing forward or backward links to) the resource, as well as those describing * the graphs, and so on recursively. * The purpose of the recursion is to capture the provenance tra...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/Dataset.java // public class Dataset { // public static final String UUID_URN_PREFIX = "urn:uuid:"; // // private final Collection<Statement> statements; // // public Dataset(Collection<Statement> statements) { // this.statements =...
public Dataset evaluate() throws DatasetQueryException {
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/Commitment.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
import net.fortytwo.rdfagents.model.ErrorExplanation;
package net.fortytwo.rdfagents.messaging; /** * A commitment (or lack thereof) to answer a query or accept a subscription. * A query may either be answered immediately * (in which case the response to the initiator consists of the query result), * or at some later point in time * (in which case an "agree" messag...
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/ErrorExplanation.java // public class ErrorExplanation { // private final Type type; // private final String message; // // public enum Type { // ExternalError("external-error"), // InteractionExplired("interaction-expired")...
private final ErrorExplanation explanation;
joshsh/rdfagents
rdfagents-core/src/main/java/net/fortytwo/rdfagents/messaging/subscribe/old/SubscribeRequestOld.java
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/AgentId.java // public class AgentId { // private final String name; // private final IRI iri; // private final IRI[] transportAddresses; // // public AgentId(final String name, // final String... transportAddresses) ...
import net.fortytwo.rdfagents.model.AgentId;
package net.fortytwo.rdfagents.messaging.subscribe.old; /** * @author Joshua Shinavier (http://fortytwo.net) */ public abstract class SubscribeRequestOld<Q> { private final Q topic;
// Path: rdfagents-core/src/main/java/net/fortytwo/rdfagents/model/AgentId.java // public class AgentId { // private final String name; // private final IRI iri; // private final IRI[] transportAddresses; // // public AgentId(final String name, // final String... transportAddresses) ...
private final AgentId remoteParticipant;
joshsh/rdfagents
rdfagents-jade/src/test/java/net/fortytwo/rdfagents/data/RecursiveDescribeQueryTest.java
// Path: rdfagents-jade/src/test/java/net/fortytwo/rdfagents/RDFAgentsTestCase.java // public abstract class RDFAgentsTestCase extends TestCase { // protected AgentId sender, receiver; // protected IRI resourceX = RDFAgents.createIRI("http://example.org/resourceX"); // protected Literal plainLiteralX = new ...
import net.fortytwo.rdfagents.RDFAgentsTestCase; import net.fortytwo.rdfagents.model.Dataset;
package net.fortytwo.rdfagents.data; /** * @author Joshua Shinavier (http://fortytwo.net) */ public class RecursiveDescribeQueryTest extends RDFAgentsTestCase { public void testAll() throws Exception { DatasetQuery q = new RecursiveDescribeQuery(ARTHUR, sail);
// Path: rdfagents-jade/src/test/java/net/fortytwo/rdfagents/RDFAgentsTestCase.java // public abstract class RDFAgentsTestCase extends TestCase { // protected AgentId sender, receiver; // protected IRI resourceX = RDFAgents.createIRI("http://example.org/resourceX"); // protected Literal plainLiteralX = new ...
Dataset arthur = q.evaluate();
ImpactDevelopment/ClientAPI
src/main/java/clientapi/load/mixin/MixinFontRenderer.java
// Path: src/main/java/clientapi/event/defaults/game/render/RenderTextEvent.java // public final class RenderTextEvent { // // /** // * The text being rendered // */ // private String text; // // public RenderTextEvent(String text) { // this.text = text; // } // // /** // *...
import clientapi.ClientAPI; import clientapi.event.defaults.game.render.RenderTextEvent; import net.minecraft.client.gui.FontRenderer; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyVariable;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/render/RenderTextEvent.java // public final class RenderTextEvent { // // /** // * The text being rendered // */ // private String text; // // public RenderTextEvent(String text) { // this.text = text; // } // // /** // *...
RenderTextEvent event = new RenderTextEvent(text);
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/executor/parser/impl/BlockParser.java
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
import clientapi.command.executor.ExecutionContext; import clientapi.command.executor.parser.ArgumentParser; import net.minecraft.block.Block; import java.lang.reflect.Type;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
public final Block parse(ExecutionContext context, Type type, String raw) {
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/executor/parser/impl/NumberParser.java
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
import clientapi.command.executor.ExecutionContext; import clientapi.command.executor.parser.ArgumentParser; import org.apache.commons.lang3.math.NumberUtils; import java.lang.reflect.Type; import java.math.BigDecimal; import java.math.BigInteger;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
public final Number parse(ExecutionContext context, Type type, String raw) {
ImpactDevelopment/ClientAPI
src/example/java/me/zero/example/mod/mods/Fly.java
// Path: src/main/java/clientapi/event/defaults/game/entity/local/UpdateEvent.java // public final class UpdateEvent extends LocalPlayerEvent.Cancellable { // // private final EventState state; // // public UpdateEvent(EntityPlayerSP player, EventState state) { // super(player); // this.state ...
import clientapi.event.defaults.game.entity.local.UpdateEvent; import clientapi.module.Module; import clientapi.module.annotation.Mod; import me.zero.alpine.listener.EventHandler; import me.zero.alpine.listener.Listener; import me.zero.example.mod.category.IMovement; import org.lwjgl.input.Keyboard;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/entity/local/UpdateEvent.java // public final class UpdateEvent extends LocalPlayerEvent.Cancellable { // // private final EventState state; // // public UpdateEvent(EntityPlayerSP player, EventState state) { // super(player); // this.state ...
private Listener<UpdateEvent> updateListener = new Listener<>(event ->
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/exception/InvalidArgumentException.java
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
import clientapi.command.ChildCommand; import clientapi.command.Command; import java.lang.reflect.Type;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
public InvalidArgumentException(Command command, ChildCommand child, String[] args, int badArg, Type expected) {
ImpactDevelopment/ClientAPI
src/example/java/me/zero/example/command/commands/TestCommand.java
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
import clientapi.command.Command; import clientapi.command.annotation.Cmd; import clientapi.command.annotation.Sub; import clientapi.command.executor.ExecutionContext; import clientapi.util.builder.impl.ChatBuilder; import net.minecraft.util.text.TextFormatting; import java.util.Optional;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
private void handle(ExecutionContext context, Optional<String> argument) {
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/Command.java
// Path: src/main/java/clientapi/command/exception/CommandInitException.java // public final class CommandInitException extends CommandException { // // public CommandInitException(Command command, String message) { // super(command, message); // } // } // // Path: src/main/java/clientapi/command/exec...
import clientapi.command.annotation.Cmd; import clientapi.command.annotation.Sub; import clientapi.command.exception.CommandException; import clientapi.command.exception.CommandInitException; import clientapi.command.exception.UnknownSubCommandException; import clientapi.command.executor.ExecutionContext; import client...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/exception/CommandInitException.java // public final class CommandInitException extends CommandException { // // public CommandInitException(Command command, String message) { // super(command, message); // } // } // // Path: src/main/java/clientapi/command/exec...
throw new CommandInitException(this, "@Cmd annotation must be present if required parameters aren't passed through constructor");
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/Command.java
// Path: src/main/java/clientapi/command/exception/CommandInitException.java // public final class CommandInitException extends CommandException { // // public CommandInitException(Command command, String message) { // super(command, message); // } // } // // Path: src/main/java/clientapi/command/exec...
import clientapi.command.annotation.Cmd; import clientapi.command.annotation.Sub; import clientapi.command.exception.CommandException; import clientapi.command.exception.CommandInitException; import clientapi.command.exception.UnknownSubCommandException; import clientapi.command.executor.ExecutionContext; import client...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/exception/CommandInitException.java // public final class CommandInitException extends CommandException { // // public CommandInitException(Command command, String message) { // super(command, message); // } // } // // Path: src/main/java/clientapi/command/exec...
if (parameters == 0 || !method.getParameterTypes()[0].equals(ExecutionContext.class) || !method.isAnnotationPresent(Sub.class))
ImpactDevelopment/ClientAPI
src/main/java/clientapi/load/mixin/MixinGuiSpectator.java
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
import clientapi.ClientAPI; import clientapi.event.defaults.game.render.HudOverlayEvent; import net.minecraft.client.gui.GuiSpectator; import net.minecraft.client.gui.ScaledResolution; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
HudOverlayEvent event = new HudOverlayEvent(HudOverlayEvent.Type.SELECTED_ITEM_TOOLTIP);
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/executor/parser/impl/ItemParser.java
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
import clientapi.command.executor.ExecutionContext; import clientapi.command.executor.parser.ArgumentParser; import net.minecraft.item.Item; import java.lang.reflect.Type;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
public final Item parse(ExecutionContext context, Type type, String raw) {
ImpactDevelopment/ClientAPI
src/main/java/clientapi/load/mixin/MixinWorldClient.java
// Path: src/main/java/clientapi/event/defaults/game/network/ServerEvent.java // public class ServerEvent { // // /** // * Server being connected/disconnected to/from // */ // private final ServerData serverData; // // ServerEvent(ServerData serverData) { // this.serverData = serverData;...
import clientapi.ClientAPI; import clientapi.event.defaults.game.network.ServerEvent; import me.zero.alpine.event.EventState; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongep...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/network/ServerEvent.java // public class ServerEvent { // // /** // * Server being connected/disconnected to/from // */ // private final ServerData serverData; // // ServerEvent(ServerData serverData) { // this.serverData = serverData;...
ClientAPI.EVENT_BUS.post(new ServerEvent.Disconnect(EventState.PRE, false, this.mc.getCurrentServerData()));
ImpactDevelopment/ClientAPI
src/main/java/clientapi/load/mixin/MixinGuiIngame.java
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import static org.spongepowered.asm.lib.Opcodes.GETFIELD; import clientapi.ClientAPI; import clientapi.event.defaults.game.render.HudOverlayEvent; import net.minecraft.block.material.Material; import net.minecraft.client.gui.GuiIngame; import net.minec...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
HudOverlayEvent event = new HudOverlayEvent(HudOverlayEvent.Type.PUMPKIN);
ImpactDevelopment/ClientAPI
src/main/java/clientapi/gui/widget/Widget.java
// Path: src/main/java/clientapi/gui/widget/data/WidgetAlignment.java // public interface WidgetAlignment { // // float getValue(); // }
import clientapi.gui.widget.data.WidgetAlignment; import clientapi.gui.widget.data.WidgetPos; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.ScaledResolution;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/gui/widget/data/WidgetAlignment.java // public interface WidgetAlignment { // // float getValue(); // } // Path: src/main/java/clientapi/gui/widget/Widget.java import clientapi.gui.widget.data.WidgetAlignment; import clientapi.gui.widget.data.WidgetPos; import net.minecraft.clien...
Widget setAlignment(WidgetAlignment alignment);
ImpactDevelopment/ClientAPI
src/main/java/clientapi/gui/widget/impl/AbstractWidget.java
// Path: src/main/java/clientapi/gui/widget/Widget.java // public interface Widget { // // /** // * Renders this widget on a screen with the specified // * scaled resolution using the specified font renderer. // * // * @param font The font that used to render text // * @param sr The screen...
import clientapi.gui.widget.Widget; import clientapi.gui.widget.data.WidgetAlignment; import clientapi.gui.widget.data.WidgetPos;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/gui/widget/Widget.java // public interface Widget { // // /** // * Renders this widget on a screen with the specified // * scaled resolution using the specified font renderer. // * // * @param font The font that used to render text // * @param sr The screen...
private WidgetAlignment alignment;
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/executor/parser/impl/CharParser.java
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
import clientapi.command.executor.ExecutionContext; import clientapi.command.executor.parser.ArgumentParser; import java.lang.reflect.Type;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/executor/ExecutionContext.java // public interface ExecutionContext { // // /** // * @return The {@link CommandSender} responsible for the command execution // */ // CommandSender sender(); // // /** // * @return The {@link CommandHandler} that carri...
public final Character parse(ExecutionContext context, Type type, String raw) {
ImpactDevelopment/ClientAPI
src/main/java/clientapi/load/mixin/MixinItemRenderer.java
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
import clientapi.ClientAPI; import clientapi.event.defaults.game.render.HudOverlayEvent; import clientapi.event.defaults.game.render.RenderItemEvent; import net.minecraft.client.entity.AbstractClientPlayer; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.item.ItemStack; import net.minecraft.util...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/render/HudOverlayEvent.java // public final class HudOverlayEvent extends Cancellable { // // /** // * The type of overlay that is being rendered // */ // private final Type type; // // public HudOverlayEvent(Type type) { // this.type ...
HudOverlayEvent event = new HudOverlayEvent(HudOverlayEvent.Type.FIRE);
ImpactDevelopment/ClientAPI
src/main/java/clientapi/util/render/gl/GLUtils.java
// Path: src/main/java/clientapi/event/defaults/game/render/RenderWorldEvent.java // public final class RenderWorldEvent extends RenderEvent { // // /** // * The Render pass this event was called from // */ // private final Pass pass; // // public RenderWorldEvent(float partialTicks, int pass) {...
import clientapi.ClientAPI; import clientapi.event.defaults.game.render.RenderWorldEvent; import clientapi.util.math.Vec3; import clientapi.util.render.Colors; import me.zero.alpine.listener.Listener; import net.minecraft.client.renderer.GlStateManager; import org.lwjgl.BufferUtils; import org.lwjgl.opengl.Display; imp...
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/event/defaults/game/render/RenderWorldEvent.java // public final class RenderWorldEvent extends RenderEvent { // // /** // * The Render pass this event was called from // */ // private final Pass pass; // // public RenderWorldEvent(float partialTicks, int pass) {...
ClientAPI.EVENT_BUS.subscribe(new Listener<RenderWorldEvent>(event -> {
ImpactDevelopment/ClientAPI
src/main/java/clientapi/command/exception/ParserException.java
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
import clientapi.command.ChildCommand; import clientapi.command.Command; import clientapi.command.executor.parser.ArgumentParser; import java.lang.reflect.Type;
/* * Copyright 2018 ImpactDevelopment * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
// Path: src/main/java/clientapi/command/Command.java // public class Command implements ICommand { // // /** // * A list of this command's child commands // */ // private final List<ChildCommand> children = new ArrayList<>(); // // /** // * A list of handles used to execute this command //...
public ParserException(Command command, ChildCommand child, ArgumentParser<?> parser, String raw, Type expected, Class<?> returned) {
cescoffier/vertx-kubernetes-workshop
currency-service/src/main/java/io/vertx/workshop/currency/CurrencyServiceProxy.java
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
import io.reactivex.Single; import io.vertx.circuitbreaker.CircuitBreakerOptions; import io.vertx.core.json.JsonObject; import io.vertx.reactivex.circuitbreaker.CircuitBreaker; import io.vertx.reactivex.core.AbstractVerticle; import io.vertx.reactivex.core.buffer.Buffer; import io.vertx.reactivex.ext.web.Router; import...
// method as example. // ----- return Single.just(new JsonObject().put("amount", 0.0).put("currency", "N/A")); }) // ---- .map(JsonObject::toBuffer) .map(Buffer::new) .subscribe(toObserver(rc)); } /** ...
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
EventBusService.getServiceProxy(discovery, svc -> svc.getName().equals("portfolio"), PortfolioService.class,
cescoffier/vertx-kubernetes-workshop
currency-service/src/main/solution/io/vertx/workshop/currency/CurrencyServiceProxy.java
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
import io.vertx.circuitbreaker.CircuitBreakerOptions; import io.vertx.core.json.JsonObject; import io.vertx.reactivex.circuitbreaker.CircuitBreaker; import io.vertx.reactivex.core.AbstractVerticle; import io.vertx.reactivex.core.buffer.Buffer; import io.vertx.reactivex.ext.web.Router; import io.vertx.reactivex.ext.web....
err -> new JsonObject() .put("amount", rc.getBodyAsJson().getDouble("amount")) .put("currency", "USD"))) // ---- .map(JsonObject::toBuffer) .map(Buffer::new) .subscribe(toObserver(rc)); } /** ...
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
EventBusService.getServiceProxy(discovery, svc -> svc.getName().equals("portfolio"), PortfolioService.class,
cescoffier/vertx-kubernetes-workshop
compulsive-traders/src/main/java/io/vertx/workshop/trader/impl/RXCompulsiveTraderVerticle.java
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
import io.reactivex.Single; import io.vertx.core.Future; import io.vertx.core.json.JsonObject; import io.vertx.reactivex.core.AbstractVerticle; import io.vertx.reactivex.core.eventbus.MessageConsumer; import io.vertx.reactivex.servicediscovery.ServiceDiscovery; import io.vertx.reactivex.servicediscovery.types.MessageSo...
package io.vertx.workshop.trader.impl; /** * A compulsive trader developed with RX Java 2. */ public class RXCompulsiveTraderVerticle extends AbstractVerticle { @Override public void start(Future<Void> future) { String company = TraderUtils.pickACompany(); int numberOfShares = TraderUtils.p...
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
Single<PortfolioService> retrieveThePortfolioService = RXEventBusService.rxGetProxy(discovery, PortfolioService.class,
cescoffier/vertx-kubernetes-workshop
compulsive-traders/src/main/solution/io/vertx/workshop/trader/impl/RXCompulsiveTraderVerticle.java
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
import io.reactivex.Single; import io.vertx.core.Future; import io.vertx.core.json.JsonObject; import io.vertx.reactivex.CompletableHelper; import io.vertx.reactivex.core.AbstractVerticle; import io.vertx.reactivex.core.eventbus.MessageConsumer; import io.vertx.reactivex.servicediscovery.ServiceDiscovery; import io.ver...
package io.vertx.workshop.trader.impl; /** * A compulsive trader developed with RX Java 2. */ public class RXCompulsiveTraderVerticle extends AbstractVerticle { @Override public void start(Future<Void> future) { String company = TraderUtils.pickACompany(); int numberOfShares = TraderUtils.p...
// Path: portfolio-service/src/main/generated/io/vertx/workshop/portfolio/reactivex/PortfolioService.java // @io.vertx.lang.reactivex.RxGen(io.vertx.workshop.portfolio.PortfolioService.class) // public class PortfolioService { // // public static final io.vertx.lang.reactivex.TypeArg<PortfolioService> __TYPE_ARG = n...
Single<PortfolioService> retrieveThePortfolioService = RXEventBusService.rxGetProxy(discovery, PortfolioService.class,
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ReadValue.java
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ByteOrder; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class ReadValue extends Statement { private final Integer _type; private final String _name; public ReadValue(Type type, String name) { _type = (Integer)type; _name = name; } @Override
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ReadValue.java
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ByteOrder; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class ReadValue extends Statement { private final Integer _type; private final String _name; public ReadValue(Type type, String name) { _type = (Integer)type; _name = name; } @Override
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ReadValue.java
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ByteOrder; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class ReadValue extends Statement { private final Integer _type; private final String _name; public ReadValue(Type type, String name) { _type = (Integer)type; _name = name; } @Override public boolean eval(ValidatorInputStream input, Map<S...
// Path: src/org/derric_lang/validator/ByteOrder.java // public enum ByteOrder { // BIG_ENDIAN { // public void apply(byte[] b) { // } // }, // LITTLE_ENDIAN { // public void apply(byte[] b) { // for (int i = 0; i < b.length / 2; i++) { // byte tmp = b[i]; // b[i] = b[(b.length - 1) - i]; // b[(...
input.byteOrder(ByteOrder.BIG_ENDIAN);
jvdb/derric
src/org/derric_lang/validator/interpreter/symbol/Iter.java
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
import java.io.IOException; import org.derric_lang.validator.interpreter.Interpreter;
package org.derric_lang.validator.interpreter.symbol; public class Iter extends Symbol { private final Symbol _symbol; public Iter(Symbol symbol) { _symbol = symbol; } @Override
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
public boolean parse(Interpreter in) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/Statement.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence; import org.eclipse.imp.pdb.facts.ISourceLocation;
package org.derric_lang.validator.interpreter.structure; public abstract class Statement { private ISourceLocation _location; private String _fieldName; public void setLocation(ISourceLocation location) { _location = location; } public ISourceLocation getLocation() { return _location; } public voi...
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public abstract boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException;
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/Statement.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence; import org.eclipse.imp.pdb.facts.ISourceLocation;
package org.derric_lang.validator.interpreter.structure; public abstract class Statement { private ISourceLocation _location; private String _fieldName; public void setLocation(ISourceLocation location) { _location = location; } public ISourceLocation getLocation() { return _location; } public voi...
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public abstract boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException;
jvdb/derric
src/org/derric_lang/validator/interpreter/symbol/Optional.java
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
import java.io.IOException; import org.derric_lang.validator.interpreter.Interpreter;
package org.derric_lang.validator.interpreter.symbol; public class Optional extends Symbol { private final Symbol _symbol; public Optional(Symbol symbol) { _symbol = symbol; } @Override
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
public boolean parse(Interpreter in) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/SkipValue.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class SkipValue extends Statement { private final Type _type; public SkipValue(Type type) { _type = type; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/SkipValue.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class SkipValue extends Statement { private final Type _type; public SkipValue(Type type) { _type = type; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/Not.java
// Path: src/org/derric_lang/validator/ValueSet.java // public class ValueSet implements ValueComparer { // // private ArrayList<ValueComparer> _values = new ArrayList<ValueComparer>(); // // public void addEquals(long value) { // _values.add(new Value(value, true)); // } // // public void addNot(long value) {...
import java.util.Map; import org.derric_lang.validator.ValueSet;
package org.derric_lang.validator.interpreter.structure; public class Not extends ValueSetExpression { private final ValueSetExpression _exp; public Not(ValueSetExpression exp) { _exp = exp; } @Override
// Path: src/org/derric_lang/validator/ValueSet.java // public class ValueSet implements ValueComparer { // // private ArrayList<ValueComparer> _values = new ArrayList<ValueComparer>(); // // public void addEquals(long value) { // _values.add(new Value(value, true)); // } // // public void addNot(long value) {...
public ValueSet eval(ValueSet vs, Map<String, Type> globals, Map<String, Type> locals) {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/SkipBuffer.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class SkipBuffer extends Statement { private final String _sizeVar; public SkipBuffer(String sizeVar) { _sizeVar = sizeVar; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/SkipBuffer.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class SkipBuffer extends Statement { private final String _sizeVar; public SkipBuffer(String sizeVar) { _sizeVar = sizeVar; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/symbol/Symbol.java
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
import java.io.IOException; import org.derric_lang.validator.interpreter.Interpreter; import org.eclipse.imp.pdb.facts.ISourceLocation;
package org.derric_lang.validator.interpreter.symbol; public abstract class Symbol { protected boolean _allowEOF = false; protected boolean _allowEOFSet = false; protected ISourceLocation _location; public void setAllowEOF(boolean allowEOF) { _allowEOF = allowEOF; _allowEOFS...
// Path: src/org/derric_lang/validator/interpreter/Interpreter.java // public class Interpreter extends Validator { // // private final String _format; // private final List<Symbol> _sequence; // private final List<Structure> _structures; // private final Map<String, Type> _globals; // // private Sentence _cur...
public abstract boolean parse(Interpreter in) throws IOException;
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ValueExpression.java
// Path: src/org/derric_lang/validator/ValueSet.java // public class ValueSet implements ValueComparer { // // private ArrayList<ValueComparer> _values = new ArrayList<ValueComparer>(); // // public void addEquals(long value) { // _values.add(new Value(value, true)); // } // // public void addNot(long value) {...
import java.util.Map; import org.derric_lang.validator.ValueSet;
package org.derric_lang.validator.interpreter.structure; public abstract class ValueExpression extends ValueSetExpression { public abstract Object eval(Map<String, Type> globals, Map<String, Type> locals);
// Path: src/org/derric_lang/validator/ValueSet.java // public class ValueSet implements ValueComparer { // // private ArrayList<ValueComparer> _values = new ArrayList<ValueComparer>(); // // public void addEquals(long value) { // _values.add(new Value(value, true)); // } // // public void addNot(long value) {...
public ValueSet eval(ValueSet vs, Map<String, Type> globals, Map<String, Type> locals) {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/Structure.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence; import org.eclipse.imp.pdb.facts.ISourceLocation;
package org.derric_lang.validator.interpreter.structure; public class Structure { private final String _name; private final Map<String, Type> _locals; private final List<Statement> _statements; private ISourceLocation _location; public Structure(String name, ArrayList<Statement> statements) { _name = nam...
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean parse(ValidatorInputStream input, Map<String, Type> globals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/Structure.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence; import org.eclipse.imp.pdb.facts.ISourceLocation;
package org.derric_lang.validator.interpreter.structure; public class Structure { private final String _name; private final Map<String, Type> _locals; private final List<Statement> _statements; private ISourceLocation _location; public Structure(String name, ArrayList<Statement> statements) { _name = nam...
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean parse(ValidatorInputStream input, Map<String, Type> globals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ReadBuffer.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class ReadBuffer extends Statement { private final String _sizeVar; private final String _name; public ReadBuffer(String sizeVar, String name) { _sizeVar = sizeVar; _name = name; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {
jvdb/derric
src/org/derric_lang/validator/interpreter/structure/ReadBuffer.java
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
import java.io.IOException; import java.util.Map; import org.derric_lang.validator.ValidatorInputStream; import org.derric_lang.validator.interpreter.Sentence;
package org.derric_lang.validator.interpreter.structure; public class ReadBuffer extends Statement { private final String _sizeVar; private final String _name; public ReadBuffer(String sizeVar, String name) { _sizeVar = sizeVar; _name = name; } @Override
// Path: src/org/derric_lang/validator/ValidatorInputStream.java // public abstract class ValidatorInputStream extends InputStream { // // public abstract boolean isByteAligned(); // public abstract boolean atEOF() throws IOException; // // public abstract long lastLocation(); // public abstract long lastRead(...
public boolean eval(ValidatorInputStream input, Map<String, Type> globals, Map<String, Type> locals, Sentence current) throws IOException {