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 |
|---|---|---|---|---|---|---|
ivargrimstad/snoopee | snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/api/ServicesResource.java | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java
// @Singleton
// public class SnoopEEClientRegistry {
//
// private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee");
//
// private final Map<String, Long> clients = new ConcurrentHashMa... | import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.GenericEntity;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
import javax.ws.rs.core.Response;
import javax.ws.rs.cor... | /*
* The MIT License
*
* Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com).
*
* 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... | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEClientRegistry.java
// @Singleton
// public class SnoopEEClientRegistry {
//
// private static final Logger LOGGER = Logger.getLogger("eu.agilejava.snoopee");
//
// private final Map<String, Long> clients = new ConcurrentHashMa... | final Collection<SnoopEEConfig> serviceConfigs = snoopeeClientRegistry.getServiceConfigs(); |
ivargrimstad/snoopee | snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/config/ApplicatonConfig.java | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/api/ServicesResource.java
// @Path("services")
// public class ServicesResource {
//
// @Context
// private UriInfo uriInfo;
//
// @EJB
// private SnoopEEClientRegistry snoopeeClientRegistry;
//
// @GET
// @Produces... | import eu.agilejava.snoopee.api.ServicesResource;
import java.util.HashSet;
import java.util.Set;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application; | /*
* The MIT License
*
* Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com).
*
* 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... | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/api/ServicesResource.java
// @Path("services")
// public class ServicesResource {
//
// @Context
// private UriInfo uriInfo;
//
// @EJB
// private SnoopEEClientRegistry snoopeeClientRegistry;
//
// @GET
// @Produces... | classes.add(ServicesResource.class); |
ivargrimstad/snoopee | snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEEndpoint.java | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEConfig.java
// public static SnoopEEConfig fromJSON(String json) {
//
// SnoopEEConfig config = new SnoopEEConfig();
//
// try (JsonReader reader = Json.createReader(new StringReader(json))) {
//
// JsonObject configJson... | import static eu.agilejava.snoopee.SnoopEEConfig.fromJSON;
import java.util.logging.Logger;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.websocket.OnMessage;
import javax.websocket.server.ServerEndpoint; | /*
* The MIT License
*
* Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com).
*
* 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... | // Path: snoopee-discovery/snoopee-service/src/main/java/eu/agilejava/snoopee/SnoopEEConfig.java
// public static SnoopEEConfig fromJSON(String json) {
//
// SnoopEEConfig config = new SnoopEEConfig();
//
// try (JsonReader reader = Json.createReader(new StringReader(json))) {
//
// JsonObject configJson... | SnoopEEConfig client = fromJSON(message); |
ivargrimstad/snoopee | snoopee-discovery/snoopee/src/main/java/eu/agilejava/snoopee/scan/SnoopEEScannerExtension.java | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java
// public final class SnoopEEExtensionHelper {
//
// private String serviceName;
// private boolean snoopEnabled;
//
// private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper... | import javax.enterprise.inject.spi.ProcessAnnotatedType;
import javax.enterprise.inject.spi.WithAnnotations;
import eu.agilejava.snoopee.annotation.EnableSnoopEEClient;
import eu.agilejava.snoopee.SnoopEEExtensionHelper;
import java.util.logging.Logger;
import javax.enterprise.event.Observes;
import javax.enterprise.in... | /*
* The MIT License
*
* Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com).
*
* 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... | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEExtensionHelper.java
// public final class SnoopEEExtensionHelper {
//
// private String serviceName;
// private boolean snoopEnabled;
//
// private static final SnoopEEExtensionHelper INSTANCE = new SnoopEEExtensionHelper... | SnoopEEExtensionHelper.setServiceName(serviceName); |
ivargrimstad/snoopee | snoopee-discovery/snoopee-micro/src/main/java/eu/agilejava/snoopee/scan/SnoopEERegistrationClient.java | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEConfigurationException.java
// public class SnoopEEConfigurationException extends RuntimeException {
//
// public SnoopEEConfigurationException(String message) {
// super(message);
// }
// }
//
// Path: snoopee-discove... | import eu.agilejava.snoopee.SnoopEEConfigurationException;
import eu.agilejava.snoopee.annotation.SnoopEEClient;
import eu.agilejava.snoopee.client.SnoopEEConfig;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import j... | /*
* The MIT License
*
* Copyright 2015 Ivar Grimstad (ivar.grimstad@gmail.com).
*
* 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... | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEConfigurationException.java
// public class SnoopEEConfigurationException extends RuntimeException {
//
// public SnoopEEConfigurationException(String message) {
// super(message);
// }
// }
//
// Path: snoopee-discove... | private final SnoopEEConfig applicationConfig = new SnoopEEConfig(); |
ivargrimstad/snoopee | snoopee-discovery/snoopee-micro/src/main/java/eu/agilejava/snoopee/scan/SnoopEERegistrationClient.java | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEConfigurationException.java
// public class SnoopEEConfigurationException extends RuntimeException {
//
// public SnoopEEConfigurationException(String message) {
// super(message);
// }
// }
//
// Path: snoopee-discove... | import eu.agilejava.snoopee.SnoopEEConfigurationException;
import eu.agilejava.snoopee.annotation.SnoopEEClient;
import eu.agilejava.snoopee.client.SnoopEEConfig;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import javax.annotation.PreDestroy;
import javax.enterprise.context.ApplicationScoped;
import j... | private String serviceRoot;
private final SnoopEEConfig applicationConfig = new SnoopEEConfig();
private Timer timer;
@Inject
private Event<SnoopEEConfig> configuredEvent;
private void init(@Observes @Initialized(ApplicationScoped.class) Object init) {
LOGGER.config("Checking if Snoo... | // Path: snoopee-discovery/snoopee-client/src/main/java/eu/agilejava/snoopee/SnoopEEConfigurationException.java
// public class SnoopEEConfigurationException extends RuntimeException {
//
// public SnoopEEConfigurationException(String message) {
// super(message);
// }
// }
//
// Path: snoopee-discove... | } catch (SnoopEEConfigurationException e) { |
PaulKlinger/Sprog-App | app/src/main/java/com/almoturg/sprog/model/Poem.java | // Path: app/src/main/java/com/almoturg/sprog/util/Util.java
// public final class Util {
// public static <T> T last(T[] array) {
// return array[array.length - 1];
// }
//
// @SuppressWarnings("deprecation")
// public static Spanned fromHtml(String source) {
// // This converts html t... | import com.almoturg.sprog.util.Util;
import java.util.List; | this.timestamp = timestamp;
this.timestamp_long = (long) timestamp * 1000;
this.post_title = post_title;
this.post_author = post_author;
this.post_content = post_content;
this.post_url = post_url;
this.parents = parents;
this.link = link;
this.main... | // Path: app/src/main/java/com/almoturg/sprog/util/Util.java
// public final class Util {
// public static <T> T last(T[] array) {
// return array[array.length - 1];
// }
//
// @SuppressWarnings("deprecation")
// public static Spanned fromHtml(String source) {
// // This converts html t... | return Util.last(this.link.split("/")); |
PaulKlinger/Sprog-App | app/src/main/java/com/almoturg/sprog/view/Graphs.java | // Path: app/src/main/java/com/almoturg/sprog/util/Util.java
// public final class Util {
// public static <T> T last(T[] array) {
// return array[array.length - 1];
// }
//
// @SuppressWarnings("deprecation")
// public static Spanned fromHtml(String source) {
// // This converts html t... | import android.content.Context;
import android.graphics.Color;
import android.support.v4.content.ContextCompat;
import com.almoturg.sprog.R;
import com.almoturg.sprog.util.Util;
import com.androidplot.xy.BarFormatter;
import com.androidplot.xy.BarRenderer;
import com.androidplot.xy.BoundaryMode;
import com.androidplot.... | package com.almoturg.sprog.view;
public class Graphs {
public static final int BAR = 1;
public static final int LINE = 2;
public static void initGraph(Context context, XYPlot plot, List<Number> xs, List<Number> ys, int type, int yStep) {
XYSeries data = new SimpleXYSeries(xs, ys, "");
i... | // Path: app/src/main/java/com/almoturg/sprog/util/Util.java
// public final class Util {
// public static <T> T last(T[] array) {
// return array[array.length - 1];
// }
//
// @SuppressWarnings("deprecation")
// public static Spanned fromHtml(String source) {
// // This converts html t... | Util.getThemeColor(context, R.attr.colorAccent), Color.TRANSPARENT); |
PaulKlinger/Sprog-App | app/src/test/java/com/almoturg/sprog/UpdateHelpersTest.java | // Path: app/src/main/java/com/almoturg/sprog/data/UpdateHelpers.java
// public class UpdateHelpers {
// // These are the times when an update should be available on the server
// private static final int FIRST_UPDATE_HOUR = 2;
// private static final int SECOND_UPDATE_HOUR = 14;
// private static final... | import static org.junit.Assert.*;
import com.almoturg.sprog.data.UpdateHelpers;
import org.junit.Test;
import java.util.GregorianCalendar; | package com.almoturg.sprog;
public class UpdateHelpersTest {
@Test
public void isUpdateTimeTest(){
GregorianCalendar now;
long last_update;
long last_fcm;
now = new GregorianCalendar(2017, 1, 15, 14, 45);
last_update = new GregorianCalendar(2017, 1, 13, 13, 25).getT... | // Path: app/src/main/java/com/almoturg/sprog/data/UpdateHelpers.java
// public class UpdateHelpers {
// // These are the times when an update should be available on the server
// private static final int FIRST_UPDATE_HOUR = 2;
// private static final int SECOND_UPDATE_HOUR = 14;
// private static final... | assertEquals(true, UpdateHelpers.isUpdateTime(now, last_update, last_fcm)); |
PaulKlinger/Sprog-App | app/src/main/java/com/almoturg/sprog/view/PoemRow.java | // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | import android.content.Context;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.widget.CardView;
import android.text.format.DateFormat;
import android.view.View;
import android.widget.TextView;
import com.almoturg.sprog.R;
import com.almoturg.sprog.data.MarkdownConverter;
import com.alm... | package com.almoturg.sprog.view;
public class PoemRow {
private static Calendar cal; | // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | private static MarkdownConverter markdownConverter; |
PaulKlinger/Sprog-App | app/src/main/java/com/almoturg/sprog/view/PoemRow.java | // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | import android.content.Context;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.widget.CardView;
import android.text.format.DateFormat;
import android.view.View;
import android.widget.TextView;
import com.almoturg.sprog.R;
import com.almoturg.sprog.data.MarkdownConverter;
import com.alm... | package com.almoturg.sprog.view;
public class PoemRow {
private static Calendar cal;
private static MarkdownConverter markdownConverter;
| // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | public static void update_poem_row_poem_page(Poem poem, View poem_row, |
PaulKlinger/Sprog-App | app/src/main/java/com/almoturg/sprog/view/PoemRow.java | // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | import android.content.Context;
import android.support.v4.content.res.ResourcesCompat;
import android.support.v7.widget.CardView;
import android.text.format.DateFormat;
import android.view.View;
import android.widget.TextView;
import com.almoturg.sprog.R;
import com.almoturg.sprog.data.MarkdownConverter;
import com.alm... | package com.almoturg.sprog.view;
public class PoemRow {
private static Calendar cal;
private static MarkdownConverter markdownConverter;
public static void update_poem_row_poem_page(Poem poem, View poem_row,
Context context){
update_poem_row(poe... | // Path: app/src/main/java/com/almoturg/sprog/data/MarkdownConverter.java
// public class MarkdownConverter {
// private static Bypass bypass;
// private static final Object bypassLock = new Object();
// private Context context;
//
// public MarkdownConverter(Context context){
// this.context =... | if (isDarkTheme(context)) { |
saiba/OpenBMLParser | test/src/saiba/bml/feedback/BMLBlockProgressFeedbackTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil;
import static org.junit.Assert.assertEquals; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/feedback/BMLBlockProgressFeed... | String str = "<blockProgress " + TestUtil.getDefNS() + "id=\"bml1:start\" globalTime=\"10\" characterId=\"doctor\"/>"; |
saiba/OpenBMLParser | test/src/saiba/bml/core/GestureBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/GestureBehaviourTest.jav... | String str = "<gesture "+TestUtil.getDefNS()+"id=\"g1\" lexeme=\"BEAT\" " + extraAttributeString + "/>"; |
saiba/OpenBMLParser | test/src/saiba/bml/core/HeadDirectionShiftBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/HeadDirectionShiftBehavi... | String str = "<headDirectionShift "+TestUtil.getDefNS()+"id=\"head1\" target=\"bluebox\" " + |
saiba/OpenBMLParser | test/src/saiba/utils/TestUtil.java | // Path: src/saiba/bml/core/BMLElement.java
// public class BMLElement extends XMLStructureAdapter
// {
// public String id;
// public String getBmlId()
// {
// return "";
// }
//
//
// /*
// * The XML Stag for XML encoding
// */
// private static final String XMLTAG ... | import saiba.bml.core.BMLElement; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: src/saiba/bml/core/BMLElement.java
// public class BMLElement extends XMLStructureAdapter
// {
// public String id;
// public String getBmlId()
// {
// return "";
// }
//
//
// /*
// * The XML Stag for XML encoding
// */
// private static final String XMLTAG ... | return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" "; |
saiba/OpenBMLParser | test/src/saiba/bml/core/PostureShiftBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/PostureShiftBehaviourTes... | String str = "<postureShift "+TestUtil.getDefNS()+" id=\"posture1\" " + extraAttributeString + ">" |
saiba/OpenBMLParser | test/src/saiba/bml/core/SpeechBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/SpeechBehaviourTest.java... | String str = "<speech "+TestUtil.getDefNS()+"id=\"speech1\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/core/HeadBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/HeadBehaviourTest.java
i... | String str = "<head "+TestUtil.getDefNS()+"id=\"head1\" lexeme=\"NOD\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/core/FaceLexemeBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/FaceLexemeBehaviourTest.... | String str = "<faceLexeme "+TestUtil.getDefNS()+"amount=\"0.25\" lexeme=\"lex1\" id=\"beh1\""+ |
saiba/OpenBMLParser | test/src/saiba/bml/core/PostureBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/PostureBehaviourTest.jav... | String str = "<posture "+TestUtil.getDefNS()+"id=\"posture1\" " + extraAttributeString + ">" |
saiba/OpenBMLParser | test/src/saiba/bml/core/LocomotionBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/LocomotionBehaviourTest.... | String str = "<locomotion "+TestUtil.getDefNS()+"id=\"loc1\" target=\"bluebox\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/feedback/BMLBlockPredictionFeedbackTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import saiba.utils.TestUtil;
import static org.junit.Assert.assertEquals;
import hmi.xml.XMLScanException;
import java.io.IOException;
import org.custommonkey.xmlunit.XMLAssert;
import org.junit.Test;
import org.xml.sax.SAXException; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/feedback/BMLBlockPredictionFe... | String str = "<bml " + TestUtil.getDefNS() + " id=\"bml1\" globalStart=\"1\" globalEnd=\"2\"/>"; |
saiba/OpenBMLParser | src/saiba/bml/feedback/AbstractBMLFeedback.java | // Path: src/saiba/bml/core/CustomAttributeHandler.java
// public class CustomAttributeHandler
// {
// private Map<String, String> customStringAttributes = new HashMap<String, String>();
// private Map<String, Float> customFloatAttributes = new HashMap<String, Float>();
//
// public float getCustomFloatPar... | import hmi.xml.XMLFormatting;
import hmi.xml.XMLNameSpace;
import hmi.xml.XMLStructureAdapter;
import hmi.xml.XMLTokenizer;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import saiba.bml.core.CustomAttributeHandler;
import com.google.common.collect.ImmutableList; | package saiba.bml.feedback;
/**
* Skeleton class for BMLFeedback
* @author herwinvw
*
*/
public class AbstractBMLFeedback extends XMLStructureAdapter implements BMLFeedback
{ | // Path: src/saiba/bml/core/CustomAttributeHandler.java
// public class CustomAttributeHandler
// {
// private Map<String, String> customStringAttributes = new HashMap<String, String>();
// private Map<String, Float> customFloatAttributes = new HashMap<String, Float>();
//
// public float getCustomFloatPar... | protected CustomAttributeHandler caHandler = new CustomAttributeHandler(); |
saiba/OpenBMLParser | test/src/saiba/bml/core/GazeBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/GazeBehaviourTest.java
i... | String str = "<gaze "+TestUtil.getDefNS()+"id=\"gaze1\" target=\"bluebox\" " + extraAttributeString + " influence=\"NECK\"/>"; |
saiba/OpenBMLParser | test/src/saiba/bml/core/RequiredTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsCollectionWithSize.hasSize;
import org.hamcrest.Matchers;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/RequiredTest.java
import... | reqBlock.readXML("<required"+TestUtil.getDefNS()+"/>"); |
saiba/OpenBMLParser | test/src/saiba/bml/feedback/BMLWarningFeedbackTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil;
import static org.junit.Assert.assertEquals; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/feedback/BMLWarningFeedbackTe... | String str = "<warningFeedback " + TestUtil.getDefNS() |
saiba/OpenBMLParser | test/src/saiba/bml/feedback/BMLFeedbackParserTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertNull;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/feedback/BMLFeedbackParserTes... | String str = "<blockProgress "+TestUtil.getDefNS()+ |
saiba/OpenBMLParser | test/src/saiba/bml/core/WaitBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/WaitBehaviourTest.java
i... | String str = "<wait "+TestUtil.getDefNS()+" id=\"wait1\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/core/GazeShiftBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/GazeShiftBehaviourTest.j... | String str = "<gazeShift "+TestUtil.getDefNS()+"id=\"gaze1\" target=\"bluebox\" influence=\"NECK\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/core/PointingBehaviourTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import hmi.xml.XMLTokenizer;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/core/PointingBehaviourTest.ja... | String str = "<pointing "+TestUtil.getDefNS()+"id=\"point1\" target=\"bluebox\" " + |
saiba/OpenBMLParser | test/src/saiba/bml/feedback/BMLSyncPointProgressFeedbackTest.java | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
| import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import java.io.IOException;
import org.junit.Test;
import saiba.utils.TestUtil; | /*******************************************************************************
* Copyright (c) 2013 University of Twente, Bielefeld University
*
* 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... | // Path: test/src/saiba/utils/TestUtil.java
// public final class TestUtil
// {
// private TestUtil()
// {
// }
//
// public static final String getDefNS()
// {
// return " xmlns=\""+BMLElement.BMLNAMESPACE+"\" ";
// }
// }
// Path: test/src/saiba/bml/feedback/BMLSyncPointProgress... | String str = "<syncPointProgress " + TestUtil.getDefNS() |
marc-ashman/jrdp | jrdp/android/src/main/java/com/jrdp/client/android/AndroidCanvas.java | // Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import com.jrdp.core.remote.rdp.Cursor;
import com.jrdp.core.remote.rdp.RemoteDesktopApplication; | /*
* Copyright (C) 2013 JRDP Project
*
* 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: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | private RemoteDesktopApplication app; |
marc-ashman/jrdp | jrdp/android/src/main/java/com/jrdp/client/android/AndroidCanvas.java | // Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.os.Handler;
import com.jrdp.core.remote.rdp.Cursor;
import com.jrdp.core.remote.rdp.RemoteDesktopApplication; | /*
* Copyright (C) 2013 JRDP Project
*
* 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: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | private Cursor cursor; |
marc-ashman/jrdp | jrdp/android/src/main/java/com/jrdp/client/android/ConnectionListActivity.java | // Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.view.ContextMenu;
import android.view.ContextMenu.C... | /*
* Copyright (C) 2013 JRDP Project
*
* 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: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | Logger.setLogger(new AndroidLogger(AndroidLogger.LOG_LEVEL_DEBUG)); |
marc-ashman/jrdp | jrdp/core/src/main/java/com/jrdp/core/util/InputByteStream.java | // Path: jrdp/core/src/main/java/com/jrdp/core/encryption/EncryptionSession.java
// public interface EncryptionSession
// {
// public abstract byte[] encrypt(byte[] data, int offset, int length);
// public abstract byte[] decrypt(byte[] data, int offset, int length);
// public abstract byte[] createMac(byte[] data)... | import com.jrdp.core.encryption.EncryptionSession; | public short getShortLittleEndian()
{
return (short) ((data[pos++] & 0xFF) | (data[pos++] & 0xFF) << 8);
}
public short[] getShortArray(int size)
{
short[] array = new short[size];
for(int i=0; i < size; i++)
{
array[i] = getShort();
}
return array;
}
public short[] getShortArrayLittleEndian(i... | // Path: jrdp/core/src/main/java/com/jrdp/core/encryption/EncryptionSession.java
// public interface EncryptionSession
// {
// public abstract byte[] encrypt(byte[] data, int offset, int length);
// public abstract byte[] decrypt(byte[] data, int offset, int length);
// public abstract byte[] createMac(byte[] data)... | public void decryptStream(EncryptionSession encryption) |
marc-ashman/jrdp | jrdp/core/src/main/java/com/jrdp/core/remote/Canvas.java | // Path: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | import com.jrdp.core.remote.rdp.Cursor; | /*
* Copyright (C) 2013 JRDP Project
*
* 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: jrdp/core/src/main/java/com/jrdp/core/remote/rdp/Cursor.java
// public class Cursor
// {
// private int [] img;
// private short width;
// private short height;
// private short hotspotX;
// private short hotspotY;
//
// public Cursor(int[] img, short width, short height, short hotspotX, short hotspotY... | public void setCursor(Cursor cursor); |
marc-ashman/jrdp | jrdp/android/src/main/java/com/jrdp/client/android/ConnectionSettingsActivity.java | // Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
import com.jrdp.core.util.Logger;
import android.app.Activity;
import android.app.AlertDialog.Builder;
import android.app.Dialog;
import android.content.ContentValues;
import android.content.DialogInterface;
import androi... | uri.query(connectionId + "");
Intent intent = new Intent(ConnectionSettingsActivity.this, RemoteDesktopActivity.class);
intent.setData(uri.build());
this.startActivity(intent);
}
private void save()
{
ContentValues settings = new ContentValues();
settings.put(Storage.ROW_NICKNAME, "Nickname Placeholde... | // Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | Logger.log("saved new connection under id: " + connectionId); |
marc-ashman/jrdp | jrdp/android/src/main/java/com/jrdp/client/android/Storage.java | // Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import com.jrdp.core.util.Logger;
import java.util.Vector; |
private class DatabaseHelper extends SQLiteOpenHelper
{
public DatabaseHelper(Context context, String name, CursorFactory factory, int version)
{
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db)
{
db.execSQL("CREATE TABLE " + TABLE_CONNECTION_INFO + " ("... | // Path: jrdp/core/src/main/java/com/jrdp/core/util/Logger.java
// public class Logger
// {
// public static final int INFO = 0;
// public static final int DEBUG = 1;
// public static final int ERROR = 2;
// private static LoggerInterface logger;
//
// public static void setLogger(LoggerInterface newLogger)
// ... | Logger.log(Logger.INFO, "Upgrading database from " + oldVersion + " to " + newVersion); |
marc-ashman/jrdp | jrdp/core/src/main/java/com/jrdp/core/remote/rdp/RdpPacket.java | // Path: jrdp/core/src/main/java/com/jrdp/core/encryption/EncryptionSession.java
// public interface EncryptionSession
// {
// public abstract byte[] encrypt(byte[] data, int offset, int length);
// public abstract byte[] decrypt(byte[] data, int offset, int length);
// public abstract byte[] createMac(byte[] data)... | import com.jrdp.core.encryption.EncryptionSession;
import java.util.Vector; | /*
* Copyright (C) 2013 JRDP Project
*
* 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: jrdp/core/src/main/java/com/jrdp/core/encryption/EncryptionSession.java
// public interface EncryptionSession
// {
// public abstract byte[] encrypt(byte[] data, int offset, int length);
// public abstract byte[] decrypt(byte[] data, int offset, int length);
// public abstract byte[] createMac(byte[] data)... | public void addPacketPeiceAtEnd(byte[] peice, EncryptionSession crypto) |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/ConsoleSink.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | import java.util.Map;
import com.presidentio.testdatagenerator.model.Template; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | public void process(Template template, Map<String, Object> map) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/path/ConstPathProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Template;
import java.util.Map; | package com.presidentio.testdatagenerator.output.path;
/**
* Created by presidentio on 24.04.15.
*/
public class ConstPathProvider implements PathProvider {
private String filePath;
@Override
public void init(Map<String, String> props) { | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | filePath = props.get(PropConst.FILE); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/path/ConstPathProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Template;
import java.util.Map; | package com.presidentio.testdatagenerator.output.path;
/**
* Created by presidentio on 24.04.15.
*/
public class ConstPathProvider implements PathProvider {
private String filePath;
@Override
public void init(Map<String, String> props) {
filePath = props.get(PropConst.FILE);
if (fileP... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | public String getFilePath(Template template, Map<String, Object> map) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/parser/JsonSchemaSerializer.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Schema.java
// public class Schema {
//
// private List<Template> templates = new ArrayList<>();
//
// private List<String> root = new ArrayList<>();
//
// private List<Variable> variables = new ArrayList<>();
//
// private Output output... | import com.presidentio.testdatagenerator.model.Schema;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.deser.StdDeserializerProvider;
import org.codehaus.jackson.map.module.SimpleDeserializers;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Schema.java
// public class Schema {
//
// private List<Template> templates = new ArrayList<>();
//
// private List<String> root = new ArrayList<>();
//
// private List<Variable> variables = new ArrayList<>();
//
// private Output output... | public Schema deserialize(InputStream inputStream) throws IOException { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/CounterProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.Map;
import com.presidentio.testdatagenerator.cons.PropConst; | /**
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* dist... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | if (props.containsKey(PropConst.OP)) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/CounterProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.Map;
import com.presidentio.testdatagenerator.cons.PropConst; | /**
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* dist... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/CounterProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.Map;
import com.presidentio.testdatagenerator.cons.PropConst; | /**
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* dist... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
| // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | private Context context; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
private Context context; | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | private ValueProvider valueProvider; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
private Context context;
private ValueProvider ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | private Field field; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
private Context context;
private ValueProvider ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | props.put(PropConst.DEPTH, "3"); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
private Context context;
private ValueProvider ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | valueProvider = new ParentProvider(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ParentBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ParentProvider;
import com.presidentio.testd... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ParentBenchmark {
private Context context;
private ValueProvider ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | field = new Field("testField", TypeConst.STRING, null); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/DefaultValueProviderFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/ValueProviderNameConst.java
// public class ValueProviderNameConst {
//
// public static final String CONST = "const";
// public static final String EXPR = "expr";
// public static final String EMAIL = "email";
// public static final String ... | import com.presidentio.testdatagenerator.model.Provider;
import java.util.HashMap;
import java.util.Map;
import com.presidentio.testdatagenerator.cons.ValueProviderNameConst; | /**
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* di... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/ValueProviderNameConst.java
// public class ValueProviderNameConst {
//
// public static final String CONST = "const";
// public static final String EXPR = "expr";
// public static final String EMAIL = "email";
// public static final String ... | public ValueProvider buildValueProvider(Provider provider) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/DefaultValueProviderFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/ValueProviderNameConst.java
// public class ValueProviderNameConst {
//
// public static final String CONST = "const";
// public static final String EXPR = "expr";
// public static final String EMAIL = "email";
// public static final String ... | import com.presidentio.testdatagenerator.model.Provider;
import java.util.HashMap;
import java.util.Map;
import com.presidentio.testdatagenerator.cons.ValueProviderNameConst; | /**
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* di... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/ValueProviderNameConst.java
// public class ValueProviderNameConst {
//
// public static final String CONST = "const";
// public static final String EXPR = "expr";
// public static final String EMAIL = "email";
// public static final String ... | case ValueProviderNameConst.CONST: |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/ValueProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | import com.presidentio.testdatagenerator.model.Field;
import java.util.Map;
import com.presidentio.testdatagenerator.context.Context; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | Object nextValue(Context context, Field field); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/ValueProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | import com.presidentio.testdatagenerator.model.Field;
import java.util.Map;
import com.presidentio.testdatagenerator.context.Context; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | Object nextValue(Context context, Field field); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/EmailProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | props.put(PropConst.DOMAIN, propDomain); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/EmailProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | Object result = emailProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null)); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/EmailProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | Object result = emailProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null)); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/EmailProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | Object result = emailProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null)); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/AbstractGeneratorTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | import com.presidentio.testdatagenerator.model.Output;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.junit.Test;
import java.util.List; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | SchemaBuilder schemaBuilder = new SchemaBuilder(); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/AbstractGeneratorTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | import com.presidentio.testdatagenerator.model.Output;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.junit.Test;
import java.util.List; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | Schema schema = schemaBuilder.build(); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/AbstractGeneratorTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | import com.presidentio.testdatagenerator.model.Output;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.junit.Test;
import java.util.List; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | protected abstract void testResult(Output output); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/path/PathProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | import com.presidentio.testdatagenerator.model.Template;
import java.util.Map; | package com.presidentio.testdatagenerator.output.path;
/**
* Created by presidentio on 24.04.15.
*/
public interface PathProvider {
void init(Map<String, String> props);
| // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | String getFilePath(Template template, Map<String, Object> map); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/PeopleNameValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/PeopleNameValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/PeopleNameValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/SqlFileTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Output;
import org.junit.Assert;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;
import jav... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | protected void testResult(Output output) { |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/SqlFileTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Output;
import org.junit.Assert;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;
import jav... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | executeSqlFile(output.getProps().get(PropConst.FILE)); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/ExpressionProxyProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | expr = propsCopy.remove(PropConst.EXPR); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/ExpressionProxyProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern; |
@Override
public void init(Map<String, String> props) {
Map<String, String> propsCopy = new HashMap<>(props);
expr = propsCopy.remove(PropConst.EXPR);
if (expr == null) {
throw new IllegalArgumentException("Value does not specified or null");
}
Matcher matche... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/ExpressionProxyProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern; |
@Override
public void init(Map<String, String> props) {
Map<String, String> propsCopy = new HashMap<>(props);
expr = propsCopy.remove(PropConst.EXPR);
if (expr == null) {
throw new IllegalArgumentException("Value does not specified or null");
}
Matcher matche... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/Sink.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | import java.util.Map;
import com.presidentio.testdatagenerator.model.Template; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Template.java
// public class Template {
//
// private String id;
//
// private String extend;
//
// @JsonIgnore
// private Template extendTemplate;
//
// private Integer count;
//
// private String name;
//
// private List... | void process(Template template, Map<String, Object> map); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/EsFileTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Output;
import org.elasticsearch.action.count.CountResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.index.query.QueryBuilders;
import org.junit.Assert;
import java.io.IOException;
import jav... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | protected void testResult(Output output) { |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/EsFileTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.model.Output;
import org.elasticsearch.action.count.CountResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.index.query.QueryBuilders;
import org.junit.Assert;
import java.io.IOException;
import jav... | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | executeFile(output.getProps().get(PropConst.FILE)); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/ExpressionBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import com.presidentio.testdatagenerator.provider.ExpressionProvider;
import com.presidentio.t... | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/19/2015.
*/
@Fork(1)
@Warmup(iterations = 3)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Measurement(iterations = 10)
@State(Scope.Benchmark)
public class ExpressionBenchmark {
| // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | private Context context; |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/SqlDirectTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | import com.presidentio.testdatagenerator.model.Output;
import org.junit.Assert;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Arrays;
import java.util.List; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/model/Output.java
// public class Output {
//
// private String type;
//
// @JsonDeserialize(contentUsing = StringDeserializer.class)
// private Map<String, String> props;
//
// public String getType() {
// return type;
// }
//
// ... | protected void testResult(Output output) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/stream/stop/LimitedTickStopManager.java | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | import com.presidentio.testdatagenerator.context.Context; | package com.presidentio.testdatagenerator.stream.stop;
/**
* Created by presidentio on 24.04.15.
*/
public class LimitedTickStopManager implements StopManager {
private long limit = Long.MAX_VALUE;
private long tickCount;
@Override | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | public boolean isStop(Context context) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/stream/stop/InfiniteStopManager.java | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | import com.presidentio.testdatagenerator.context.Context; | package com.presidentio.testdatagenerator.stream.stop;
/**
* Created by presidentio on 24.04.15.
*/
public class InfiniteStopManager implements StopManager {
@Override | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | public boolean isStop(Context context) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/SqlDirectSink.java | // Path: src/main/java/com/presidentio/testdatagenerator/output/formatter/Formatter.java
// public interface Formatter {
//
// void init(Map<String, String> props);
//
// String format(Map<String, Object> map, Template template);
//
// String format(List<Map<String, Object>> maps, Template template);
// ... | import com.presidentio.testdatagenerator.output.formatter.SqlFormatter;
import java.util.Map;
import com.presidentio.testdatagenerator.output.formatter.Formatter; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/output/formatter/Formatter.java
// public interface Formatter {
//
// void init(Map<String, String> props);
//
// String format(Map<String, Object> map, Template template);
//
// String format(List<Map<String, Object>> maps, Template template);
// ... | Formatter formatter = new SqlFormatter(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/SqlDirectSink.java | // Path: src/main/java/com/presidentio/testdatagenerator/output/formatter/Formatter.java
// public interface Formatter {
//
// void init(Map<String, String> props);
//
// String format(Map<String, Object> map, Template template);
//
// String format(List<Map<String, Object>> maps, Template template);
// ... | import com.presidentio.testdatagenerator.output.formatter.SqlFormatter;
import java.util.Map;
import com.presidentio.testdatagenerator.output.formatter.Formatter; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/output/formatter/Formatter.java
// public interface Formatter {
//
// void init(Map<String, String> props);
//
// String format(Map<String, Object> map, Template template);
//
// String format(List<Map<String, Object>> maps, Template template);
// ... | Formatter formatter = new SqlFormatter(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/AbstractJdbcSink.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | import com.presidentio.testdatagenerator.cons.PropConst;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Map; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/PropConst.java
// public class PropConst {
//
// public static final String TYPE = "type";
// public static final String VALUE = "value";
// public static final String SIZE = "size";
// public static final String DOMAIN = "domain";
// pu... | String connectionUrl = props.get(PropConst.CONNECTION_URL); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/formatter/DefaultFormatterFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.FileFormatConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import java.util.Map; | package com.presidentio.testdatagenerator.output.formatter;
/**
* Created by presidentio on 24.04.15.
*/
public class DefaultFormatterFactory implements FormatterFactory {
@Override
public Formatter buildFormatter(Map<String, String> props) { | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | String format = props.get(PropConst.FORMAT); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/formatter/DefaultFormatterFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.FileFormatConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import java.util.Map; | package com.presidentio.testdatagenerator.output.formatter;
/**
* Created by presidentio on 24.04.15.
*/
public class DefaultFormatterFactory implements FormatterFactory {
@Override
public Formatter buildFormatter(Map<String, String> props) {
String format = props.get(PropConst.FORMAT);
if... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | format = FileFormatConst.CSV; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/formatter/DefaultFormatterFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.FileFormatConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import java.util.Map; | package com.presidentio.testdatagenerator.output.formatter;
/**
* Created by presidentio on 24.04.15.
*/
public class DefaultFormatterFactory implements FormatterFactory {
@Override
public Formatter buildFormatter(Map<String, String> props) {
String format = props.get(PropConst.FORMAT);
if... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | return new SvFormatter(DelimiterConst.COMMA); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/output/SinkFactory.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/SinkTypeConst.java
// public class SinkTypeConst {
//
// public static final String CONSOLE = "console";
// public static final String FILE = "file";
// public static final String SQL_DIRECT = "sql-direct";
// public static final String ES_D... | import com.presidentio.testdatagenerator.model.Output;
import com.presidentio.testdatagenerator.cons.SinkTypeConst; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/SinkTypeConst.java
// public class SinkTypeConst {
//
// public static final String CONSOLE = "console";
// public static final String FILE = "file";
// public static final String SQL_DIRECT = "sql-direct";
// public static final String ES_D... | case SinkTypeConst.CONSOLE: |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/CountryValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/CountryValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/test/java/com/presidentio/testdatagenerator/provider/CountryValueProviderTest.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | import com.presidentio.testdatagenerator.cons.TypeConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.testdatagenerator.model.Field;
import org.junit.Assert;
import org.junit.Test;
import java.util.Collections; | /**
* 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 agreed to in writing, software
* distributed ... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/TypeConst.java
// public class TypeConst {
//
// public static final String STRING = "string";
// public static final String LONG = "long";
// public static final String INT = "int";
// public static final String BOOLEAN = "boolean";
//
// ... | Assert.assertNotNull(valueProvider.nextValue(new Context(null, null, null), new Field(null, TypeConst.STRING, null))); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/EsFileBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | import com.presidentio.testdatagenerator.OneTimeGenerator;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.openjdk.jmh.annotations.*;
import java.util.Arrays; | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/17/2015.
*/
public class EsFileBenchmark {
@Fork(1)
@Warmup(iterations = 3)
@Benchmark
public void measureEsDirect() { | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | SchemaBuilder schemaBuilder = new SchemaBuilder(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/EsFileBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | import com.presidentio.testdatagenerator.OneTimeGenerator;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.openjdk.jmh.annotations.*;
import java.util.Arrays; | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/17/2015.
*/
public class EsFileBenchmark {
@Fork(1)
@Warmup(iterations = 3)
@Benchmark
public void measureEsDirect() {
SchemaBuilder schemaBuilder = new SchemaBuilder();
for (String resource :... | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | Schema schema = schemaBuilder.build(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/benchmark/EsFileBenchmark.java | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | import com.presidentio.testdatagenerator.OneTimeGenerator;
import com.presidentio.testdatagenerator.model.Schema;
import com.presidentio.testdatagenerator.parser.SchemaBuilder;
import org.openjdk.jmh.annotations.*;
import java.util.Arrays; | package com.presidentio.testdatagenerator.benchmark;
/**
* Created by Vitalii_Gergel on 3/17/2015.
*/
public class EsFileBenchmark {
@Fork(1)
@Warmup(iterations = 3)
@Benchmark
public void measureEsDirect() {
SchemaBuilder schemaBuilder = new SchemaBuilder();
for (String resource :... | // Path: src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java
// public class OneTimeGenerator extends AbstractGenerator {
//
// private boolean async = false;
// private Integer threadCount = Runtime.getRuntime().availableProcessors();
//
// @Override
// public void generate(Context ... | OneTimeGenerator generator = new OneTimeGenerator(); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | package com.presidentio.testdatagenerator.provider;
/**
* Created by Vitalii_Gergel on 2/11/2015.
*/
public class PeopleNameProvider implements ValueProvider {
private static String[] MALE_FIRST_NAMES;
private static String[] FEMALE_FIRST_NAMES;
private static String[] LAST_NAMES;
private Random r... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | MALE_FIRST_NAMES = namesStr.split(DelimiterConst.COMMA); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | }
private String[] getFemaleNames() {
if (FEMALE_FIRST_NAMES == null) {
try (InputStream nameStream = DefaultValueProviderFactory.class.getClassLoader()
.getResourceAsStream("female-first-name.dat")) {
String namesStr = IOUtils.toString(nameStream);
... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | String gender = props.get(PropConst.GENDER); |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | private String[] getFemaleNames() {
if (FEMALE_FIRST_NAMES == null) {
try (InputStream nameStream = DefaultValueProviderFactory.class.getClassLoader()
.getResourceAsStream("female-first-name.dat")) {
String namesStr = IOUtils.toString(nameStream);
... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | gender = GenderConst.ALL; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | throw new RuntimeException("Failed to load names", e);
}
}
return LAST_NAMES;
}
@Override
public void init(Map<String, String> props) {
String gender = props.get(PropConst.GENDER);
if (gender == null) {
gender = GenderConst.ALL;
... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | type = NameTypeConst.ALL; |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | case GenderConst.FEMALE:
male = false;
female = true;
break;
default:
throw new IllegalArgumentException("Unknown gender: " + gender);
}
String type = props.get(PropConst.TYPE);
if (type == null) {
... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/provider/PeopleNameProvider.java | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | import com.presidentio.testdatagenerator.cons.DelimiterConst;
import com.presidentio.testdatagenerator.cons.GenderConst;
import com.presidentio.testdatagenerator.cons.NameTypeConst;
import com.presidentio.testdatagenerator.cons.PropConst;
import com.presidentio.testdatagenerator.context.Context;
import com.presidentio.... | case GenderConst.FEMALE:
male = false;
female = true;
break;
default:
throw new IllegalArgumentException("Unknown gender: " + gender);
}
String type = props.get(PropConst.TYPE);
if (type == null) {
... | // Path: src/main/java/com/presidentio/testdatagenerator/cons/DelimiterConst.java
// public class DelimiterConst {
//
// public static final String COMMA = ",";
// public static final String TAB = "\t";
// public static final String NEW_LINE = "\n";
// public static final String SPACE = " ";
//
// }
/... | public Object nextValue(Context context, Field field) { |
presidentio/test-data-generator | src/main/java/com/presidentio/testdatagenerator/OneTimeGenerator.java | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | import com.presidentio.testdatagenerator.model.Schema;
import java.util.concurrent.ForkJoinPool;
import com.presidentio.testdatagenerator.context.Context; | /**
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* dist... | // Path: src/main/java/com/presidentio/testdatagenerator/context/Context.java
// public class Context {
//
// private Parent parent;
//
// private Map<String, Template> templates;
//
// private Map<String, Object> variables;
//
// private Sink sink;
//
// public Context(Map<String, Template> te... | public void generate(Context context, Schema schema) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.