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 |
|---|---|---|---|---|---|---|
arquillian/arquillian-container-weld | impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/TestContainer.java | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/literals/DestroyedLiteral.java
// @SuppressWarnings("all")
// public class DestroyedLiteral extends AnnotationLiteral<Destroyed> implements Destroyed {
//
// public static final DestroyedLiteral APPLICATION = new DestroyedLiteral(ApplicationS... | import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jakarta.enterprise.context.spi.Context;
import jakarta.enterprise.inject.Instance;
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.WeldBootstrap;
import org.jboss.weld.bootstr... | public TestContainer ensureRequestActive() {
RequestContext requestContext = instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get();
requestContext.activate();
// TODO deactivate the conversation context
BoundSessionContext sessionContext = instance().select(BoundSe... | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/literals/DestroyedLiteral.java
// @SuppressWarnings("all")
// public class DestroyedLiteral extends AnnotationLiteral<Destroyed> implements Destroyed {
//
// public static final DestroyedLiteral APPLICATION = new DestroyedLiteral(ApplicationS... | bootstrap.getManager(beanDeploymentArchive).getEvent().select(InitializedLiteral.APPLICATION).fire(new Object()); |
arquillian/arquillian-container-weld | impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/TestContainer.java | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/literals/DestroyedLiteral.java
// @SuppressWarnings("all")
// public class DestroyedLiteral extends AnnotationLiteral<Destroyed> implements Destroyed {
//
// public static final DestroyedLiteral APPLICATION = new DestroyedLiteral(ApplicationS... | import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jakarta.enterprise.context.spi.Context;
import jakarta.enterprise.inject.Instance;
import org.jboss.weld.Container;
import org.jboss.weld.bootstrap.WeldBootstrap;
import org.jboss.weld.bootstr... |
public WeldManager getBeanManager(BeanDeploymentArchive beanDeploymentArchive) {
return bootstrap.getManager(beanDeploymentArchive);
}
public Deployment getDeployment() {
return deployment;
}
/**
* Clean up the container, ending any active contexts
*/
public TestCont... | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/literals/DestroyedLiteral.java
// @SuppressWarnings("all")
// public class DestroyedLiteral extends AnnotationLiteral<Destroyed> implements Destroyed {
//
// public static final DestroyedLiteral APPLICATION = new DestroyedLiteral(ApplicationS... | bootstrap.getManager(beanDeploymentArchive).getEvent().select(DestroyedLiteral.APPLICATION).fire(new Object()); |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedIntegrationSessionScopeTestCase.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.Chicken;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwra... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | Chicken.class) |
arquillian/arquillian-container-weld | impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/BeanDeploymentArchiveImpl.java | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/Ejbs.java
// public static Collection<EjbDescriptor<?>> createEjbDescriptors(Iterable<Class<?>> classes) {
// // EJB API dependency is optional
// if (!Utils.isClassAccessible("jakarta.ejb.Singleton", Ejbs.class.getClassLoader())) {
/... | import static java.util.Arrays.asList;
import static org.jboss.arquillian.container.weld.embedded.mock.Ejbs.createEjbDescriptors;
import static org.jboss.weld.bootstrap.spi.BeansXml.EMPTY_BEANS_XML;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import org.jboss.weld.bootstrap.api.En... | }
public BeanDeploymentArchiveImpl(Iterable<Class<?>> classes, Environment environment) {
this("test", EMPTY_BEANS_XML, classes, environment);
}
public BeanDeploymentArchiveImpl(String id, Environment environment, Class<?>... classes) {
this(id, EMPTY_BEANS_XML, asList(classes), enviro... | // Path: impl/src/main/java/org/jboss/arquillian/container/weld/embedded/mock/Ejbs.java
// public static Collection<EjbDescriptor<?>> createEjbDescriptors(Iterable<Class<?>> classes) {
// // EJB API dependency is optional
// if (!Utils.isClassAccessible("jakarta.ejb.Singleton", Ejbs.class.getClassLoader())) {
/... | this.ejbs = createEjbDescriptors(beanClasses); |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/ExcludedBeansTest.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | import static org.junit.Assert.assertTrue;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.Chicken;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.j... | package org.jboss.arquillian.container.weld.embedded;
/**
* @author Tomas Remes
*/
@RunWith(Arquillian.class)
public class ExcludedBeansTest {
private final static String NON_EXISTING_CLASS = "org.jboss.test.NonExistent";
@Inject | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | Instance<MyBean> myBeanInstance; |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/ExcludedBeansTest.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | import static org.junit.Assert.assertTrue;
import jakarta.enterprise.inject.Instance;
import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.Chicken;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.j... | package org.jboss.arquillian.container.weld.embedded;
/**
* @author Tomas Remes
*/
@RunWith(Arquillian.class)
public class ExcludedBeansTest {
private final static String NON_EXISTING_CLASS = "org.jboss.test.NonExistent";
@Inject
Instance<MyBean> myBeanInstance;
@Inject | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/Chicken.java
// @SessionScoped
// public class Chicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age;
//
// public Integer getAge()
// {
// return a... | Instance<Chicken> chickenInstance; |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedIntegrationConversationScopeTestCase.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/TalkingChicken.java
// @ConversationScoped
// public class TalkingChicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age = -1;
//
// public Integer getAge()
/... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import jakarta.enterprise.context.Conversation;
import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.TalkingChicken;
import org.jboss.a... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/TalkingChicken.java
// @ConversationScoped
// public class TalkingChicken implements java.io.Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private Integer age = -1;
//
// public Integer getAge()
/... | TalkingChicken.class) |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedCDIProviderTest.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | import jakarta.enterprise.inject.spi.CDI;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | return ShrinkWrap.create(JavaArchive.class).addClasses(WeldEmbeddedCDIProviderTest.class, MyBean.class) |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedBeforeAfterTestCase.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | import org.junit.runner.RunWith;
import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.junit.InSequence;
import org.jboss.shrinkwrap.api.ArchiveP... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | MyBean.class) |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedIntegrationWARTestCase.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | import jakarta.enterprise.inject.spi.Extension;
import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwr... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | MyBean.class) |
arquillian/arquillian-container-weld | impl/src/test/java/org/jboss/arquillian/container/weld/embedded/WeldEmbeddedIntegrationJARTestCase.java | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | import jakarta.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.weld.embedded.beans.MyBean;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.a... | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not us... | // Path: impl/src/test/java/org/jboss/arquillian/container/weld/embedded/beans/MyBean.java
// @ApplicationScoped
// public class MyBean implements Serializable
// {
// private static final long serialVersionUID = 1L;
//
// private String name = "aslak";
//
// public String getName()
// {
// retu... | MyBean.class) |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicMpRfcMetric.java | // Path: src/treecmp/metric/MatchingPairMetric.java
// public class MatchingPairMetric extends BaseMetric implements Metric {
//
// protected int[] rowsol;
// protected int[] colsol;
// protected int[][] assigncost;
//
// public MatchingPairMetric() {
// super();
// }
//
// @Override
... | import treecmp.metric.MatchingPairMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicMpRfcMetric extends SprHeuristicRfcBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/MatchingPairMetric.java
// public class MatchingPairMetric extends BaseMetric implements Metric {
//
// protected int[] rowsol;
// protected int[] colsol;
// protected int[][] assigncost;
//
// public MatchingPairMetric() {
// super();
// }
//
// @Override
... | return new MatchingPairMetric(); |
TreeCmp/TreeCmp | src/treecmp/common/ReportUtils.java | // Path: src/treecmp/config/IOSettings.java
// public class IOSettings {
//
// private static IOSettings IOConf;
// private String inputFile;
// private String outputFile;
// private String sSep;
// private String csvSep;
// private boolean zeroValueWeights;
// private boolean pruneTrees;
/... | import java.util.ArrayList;
import java.util.Locale;
import treecmp.config.IOSettings; | /** This file is part of TreeCmp, a tool for comparing phylogenetic trees
using the Matching Split distance and other metrics.
Copyright (C) 2011, Damian Bogdanowicz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | // Path: src/treecmp/config/IOSettings.java
// public class IOSettings {
//
// private static IOSettings IOConf;
// private String inputFile;
// private String outputFile;
// private String sSep;
// private String csvSep;
// private boolean zeroValueWeights;
// private boolean pruneTrees;
/... | private static IOSettings ioSet = IOSettings.getIOSettings(); |
TreeCmp/TreeCmp | src/treecmp/spr/UsprHeuristicMSMetric.java | // Path: src/treecmp/metric/MatchingSplitMetric.java
// public class MatchingSplitMetric extends BaseMetric implements Metric {
// private MatchingSplitMetricO3 ms03;
// private MatchingSplitMetricOptRF msRF;
// private MatchingSpliMetricFree msFree;
//
// public MatchingSplitMetric(){
// super();
// ... | import treecmp.metric.Metric;
import treecmp.metric.RFMetric;
import treecmp.metric.MatchingSplitMetric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class UsprHeuristicMSMetric extends UsprHeuristicBaseMetric {
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/MatchingSplitMetric.java
// public class MatchingSplitMetric extends BaseMetric implements Metric {
// private MatchingSplitMetricO3 ms03;
// private MatchingSplitMetricOptRF msRF;
// private MatchingSpliMetricFree msFree;
//
// public MatchingSplitMetric(){
// super();
// ... | return new MatchingSplitMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicBaseMetric.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import java.util.logging.Level;
import java.util.logging.Logger;
import pal.io.OutputTarget;
import treecmp.common.TreeCmpException;
import treecmp.metric.*;
import pal.tree.Tree;
import pal.tree.TreeUtils; | int sprDist = 0;
Tree[] treeList;
Tree bestTree = null;
Tree tempTree = null;
double bestDist, tempDist;
Tree currentStepTree = t1;
double bestDist1 = Double.POSITIVE_INFINITY, bestDist2 = Double.POSITIVE_INFINITY;
do {
... | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | } catch (TreeCmpException ex) { |
TreeCmp/TreeCmp | src/treecmp/spr/UsprHeuristicBaseMetric.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import pal.io.InputSource;
import pal.tree.ReadTree;
import pal.tree.SimpleTree;
import pal.tree.TreeParseException;
import treecmp.common.TreeCmpException;
import treecmp.metric.*;
import pal.tree.Tree; | bestDist = Double.POSITIVE_INFINITY;
tempDist = 0;
sprDist++;
for (int i = 0; i < treeList.length; i++) {
tempTree = treeList[i];
tempDist = m.getDistance(tempTree, t2);
if (tempDist < bestDist) {... | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | } catch (TreeCmpException ex) { |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicTtRfcMetric.java | // Path: src/treecmp/metric/TripletMetric.java
// public class TripletMetric extends BaseMetric implements Metric {
// private TripletMetric2 tt2;
// public TripletMetric(){
// super();
// tt2 = new TripletMetric2();
// }
//
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
/... | import treecmp.metric.TripletMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicTtRfcMetric extends SprHeuristicRfcBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/TripletMetric.java
// public class TripletMetric extends BaseMetric implements Metric {
// private TripletMetric2 tt2;
// public TripletMetric(){
// super();
// tt2 = new TripletMetric2();
// }
//
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
/... | return new TripletMetric(); |
TreeCmp/TreeCmp | src/treecmp/metric/weighted/GeoMetricWrapper.java | // Path: src/treecmp/common/NodeUtilsExt.java
// public class NodeUtilsExt extends NodeUtils {
//
// public static int printNH(PrintWriter out, Node node,
// boolean printLengths, boolean printInternalLabels, int column, int fractionDigits) {
//
// if (!node.isLeaf()) {
// ... | import distanceAlg1.Geodesic;
import distanceAlg1.PhyloTree;
import pal.tree.*;
import polyAlg.PolyMain;
import treecmp.common.NodeUtilsExt;
import java.io.IOException; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.metric.weighted;
/**
*
* @author Damian
*/
/**
*
* @author Damian
*/
public class GeoMetricWrapper {
/**
*
* @param t1
* @param t2
* @param rooted
* @param logFile... | // Path: src/treecmp/common/NodeUtilsExt.java
// public class NodeUtilsExt extends NodeUtils {
//
// public static int printNH(PrintWriter out, Node node,
// boolean printLengths, boolean printInternalLabels, int column, int fractionDigits) {
//
// if (!node.isLeaf()) {
// ... | String tree1Newick = NodeUtilsExt.treeToSimpleString(t1, true); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicMastMetric.java | // Path: src/treecmp/metric/RMASTMetric.java
// public class RMASTMetric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// @Override
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// return Math.max(t1.getExternalNodeCount(), t2... | import treecmp.metric.RMASTMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicMastMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/RMASTMetric.java
// public class RMASTMetric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// @Override
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// return Math.max(t1.getExternalNodeCount(), t2... | return new RMASTMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicCophMetric.java | // Path: src/treecmp/metric/CopheneticL2Metric.java
// public class CopheneticL2Metric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// public CopheneticL2Metric() {
// super();
// }
//
// public double getDistanc... | import treecmp.metric.Metric;
import treecmp.metric.CopheneticL2Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicCophMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/CopheneticL2Metric.java
// public class CopheneticL2Metric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// public CopheneticL2Metric() {
// super();
// }
//
// public double getDistanc... | return new CopheneticL2Metric(); |
TreeCmp/TreeCmp | src/treecmp/spr/UsprHeuristicPDMetric.java | // Path: src/treecmp/metric/NodalL2Metric.java
// public class NodalL2Metric extends BaseMetric implements Metric {
//
// //This seems to be faster than old implementation
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// double dist, diff;
//
// IdGroup id1 = TreeUtils.getLe... | import treecmp.metric.NodalL2Metric;
import treecmp.metric.RFMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class UsprHeuristicPDMetric extends UsprHeuristicBaseMetric {
@Override | // Path: src/treecmp/metric/NodalL2Metric.java
// public class NodalL2Metric extends BaseMetric implements Metric {
//
// //This seems to be faster than old implementation
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// double dist, diff;
//
// IdGroup id1 = TreeUtils.getLe... | protected Metric getMetric() { return new NodalL2Metric(); } |
TreeCmp/TreeCmp | src/treecmp/metric/RFClusterMetric.java | // Path: src/treecmp/common/ClusterDist.java
// public class ClusterDist {
//
// public ClusterDist() {
// }
//
// public static int clusterXor(boolean[] clade_t1, boolean[] clade_t2)
// {
// int n=clade_t1.length;
// int neq=0;
//
// for(int i=0;i<n;i++) {
// if(c... | import treecmp.common.ClusterDist;
import java.util.BitSet;
import java.util.HashSet;
import pal.misc.IdGroup;
import pal.tree.*; | /** This file is part of TreeCmp, a tool for comparing phylogenetic trees
using the Matching Split distance and other metrics.
Copyright (C) 2011, Damian Bogdanowicz
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | // Path: src/treecmp/common/ClusterDist.java
// public class ClusterDist {
//
// public ClusterDist() {
// }
//
// public static int clusterXor(boolean[] clade_t1, boolean[] clade_t2)
// {
// int n=clade_t1.length;
// int neq=0;
//
// for(int i=0;i<n;i++) {
// if(c... | BitSet[] bs1 = ClusterDist.RootedTree2BitSetArray(t1, idGroup); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicRfcBaseMetric.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import pal.io.OutputTarget;
import treecmp.common.TreeCmpException;
import treecmp.metric.*;
import pal.tree.Tree;
import pal.tree.TreeUtils; | Tree currentStepTree = t1;
double bestDist1 = Double.POSITIVE_INFINITY, bestDist2 = Double.POSITIVE_INFINITY;
do {
treeList = SprUtils.generateRSprNeighbours(currentStepTree);
bestDist = Double.POSITIVE_INFINITY;
bestTreeList.clear();
... | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | } catch (TreeCmpException ex) { |
TreeCmp/TreeCmp | src/treecmp/common/SummaryStatCalculator.java | // Path: src/treecmp/config/IOSettings.java
// public class IOSettings {
//
// private static IOSettings IOConf;
// private String inputFile;
// private String outputFile;
// private String sSep;
// private String csvSep;
// private boolean zeroValueWeights;
// private boolean pruneTrees;
/... | import treecmp.io.ResultWriter;
import treecmp.config.IOSettings;
import treecmp.metric.Metric; | }
public int getCount()
{
return this.count;
}
public void insertValue(double dist)
{
sum+=dist;
count++;
sq_sum+=dist*dist;
if(dist<min) min=dist;
if(dist>max) max=dist;
}
public String getName() {
return this.met.getName();
}
publ... | // Path: src/treecmp/config/IOSettings.java
// public class IOSettings {
//
// private static IOSettings IOConf;
// private String inputFile;
// private String outputFile;
// private String sSep;
// private String csvSep;
// private boolean zeroValueWeights;
// private boolean pruneTrees;
/... | if (IOSettings.getIOSettings().isGenSummary()) { |
TreeCmp/TreeCmp | test/treecmp/spr/SprUtilsTest.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import pal.misc.IdGroup;
import pal.tree.Node;
import pal.tree.Tree;
import pal.tree.TreeUtils;
import treecmp.common.TreeCmpException;
import treecmp.met... | assertEquals(neighSizeExpResult, treeList.length);
}
@Test
public void testGenerateRSprNeighboursShouldReturnExactly_24_Neighbours_testing_one_5_labels_tree() {
SprUtils instance = new SprUtils();
Tree baseTree = TreeCreator.getTreeFromString("((((1,2),3),4),5);");
Tree[] tr... | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | public void testGenerateUSprNeighboursShouldReturnExactly_12_Neighbours_testing_all_5_labels_trees() throws TreeCmpException { |
TreeCmp/TreeCmp | test/treecmp/spr/SprUtilsTest.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import pal.misc.IdGroup;
import pal.tree.Node;
import pal.tree.Tree;
import pal.tree.TreeUtils;
import treecmp.common.TreeCmpException;
import treecmp.met... | }
@Test
public void testGenerateUSprNeighboursShouldReturnTreesWithRoot3Degree_testing_some_7_labels_trees() throws TreeCmpException {
SprUtils instance = new SprUtils();
Tree baseTrees[] = TreeCreator.getSomeUnrootedTreesWith_7_Labels();
Tree[] treeList;
for(Tree bt: baseTr... | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | Metric rf = new RFMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicCophRfcMetric.java | // Path: src/treecmp/metric/CopheneticL2Metric.java
// public class CopheneticL2Metric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// public CopheneticL2Metric() {
// super();
// }
//
// public double getDistanc... | import treecmp.metric.Metric;
import treecmp.metric.CopheneticL2Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicCophRfcMetric extends SprHeuristicRfcBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/CopheneticL2Metric.java
// public class CopheneticL2Metric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// public CopheneticL2Metric() {
// super();
// }
//
// public double getDistanc... | return new CopheneticL2Metric(); |
TreeCmp/TreeCmp | test/treecmp/spr/UsprHeuristicRFMetricTest.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import pal.tree.Tree;
import treecmp.common.TreeCmpException;
import treecmp.metric.Metric;
import treecmp.test.util.TreeCreator;
import static org.junit.jupiter.api.Assertions.*; | package treecmp.spr;
class UsprHeuristicRFMetricTest {
@BeforeEach
void setUp() {
}
@AfterEach
void tearDown() {
}
@Test | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | void testGetMetricTwoMarsupialsTreesWithSPR_1_distance() throws TreeCmpException { |
TreeCmp/TreeCmp | test/treecmp/spr/UsprHeuristicMPUMetricTest.java | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import pal.tree.Tree;
import treecmp.common.TreeCmpException;
import treecmp.metric.Metric;
import treecmp.test.util.TreeCreator;
import static org.junit.jupiter.api.Assertions.*; | package treecmp.spr;
class UsprHeuristicMPUMetricTest {
@BeforeEach
void setUp() {
}
@AfterEach
void tearDown() {
}
@Test | // Path: src/treecmp/common/TreeCmpException.java
// public class TreeCmpException extends Exception {
//
// private String errMsg;
// //----------------------------------------------
// // Default constructor - initializes instance variable to unknown
// public TreeCmpException()
// {
// super(); ... | void testGetMetricTwoMarsupialsTreesWithSPR_1_distance() throws TreeCmpException { |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicNsRfcMetric.java | // Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
// double dist,diff;
//
// IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
// int [][] nsMatrix1 =... | import treecmp.metric.NodalL2SplittedMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicNsRfcMetric extends SprHeuristicRfcBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
// double dist,diff;
//
// IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
// int [][] nsMatrix1 =... | return new NodalL2SplittedMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/UsprHeuristicQTMetric.java | // Path: src/treecmp/metric/QuartetMetricDouble.java
// public class QuartetMetricDouble extends BaseMetric implements Metric {
//
// public QuartetMetricDouble() {
// }
//
// public static double getQuartetDistance(pal.tree.Tree tree1, pal.tree.Tree tree2) {
//
//
// OutputTarget tree1OT = Outp... | import treecmp.metric.QuartetMetricDouble;
import treecmp.metric.QuartetMetricLong;
import treecmp.metric.RFMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class UsprHeuristicQTMetric extends UsprHeuristicBaseMetric {
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/QuartetMetricDouble.java
// public class QuartetMetricDouble extends BaseMetric implements Metric {
//
// public QuartetMetricDouble() {
// }
//
// public static double getQuartetDistance(pal.tree.Tree tree1, pal.tree.Tree tree2) {
//
//
// OutputTarget tree1OT = Outp... | return new QuartetMetricLong(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicMPMetric.java | // Path: src/treecmp/metric/MatchingPairMetric.java
// public class MatchingPairMetric extends BaseMetric implements Metric {
//
// protected int[] rowsol;
// protected int[] colsol;
// protected int[][] assigncost;
//
// public MatchingPairMetric() {
// super();
// }
//
// @Override
... | import treecmp.metric.MatchingPairMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicMPMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/MatchingPairMetric.java
// public class MatchingPairMetric extends BaseMetric implements Metric {
//
// protected int[] rowsol;
// protected int[] colsol;
// protected int[][] assigncost;
//
// public MatchingPairMetric() {
// super();
// }
//
// @Override
... | return new MatchingPairMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/UsprHeuristicRFMetric.java | // Path: src/treecmp/metric/RFMetric.java
// public class RFMetric extends BaseMetric implements Metric{
//
// public static double getRFDistance(Tree t1, Tree t2) {
//
// int n = t1.getExternalNodeCount();
// if (n <= 3)
// return 0;
//
// IdGroup idGroup = TreeUtils.getLeafI... | import treecmp.metric.RFMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class UsprHeuristicRFMetric extends UsprHeuristicBaseMetric {
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/RFMetric.java
// public class RFMetric extends BaseMetric implements Metric{
//
// public static double getRFDistance(Tree t1, Tree t2) {
//
// int n = t1.getExternalNodeCount();
// if (n <= 3)
// return 0;
//
// IdGroup idGroup = TreeUtils.getLeafI... | return new RFMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicNSMetric.java | // Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
// double dist,diff;
//
// IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
// int [][] nsMatrix1 =... | import treecmp.metric.NodalL2SplittedMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicNSMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
// double dist,diff;
//
// IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
// int [][] nsMatrix1 =... | return new NodalL2SplittedMetric(); |
TreeCmp/TreeCmp | test/treecmp/metric/weighted/RFCWeightMetricTest.java | // Path: src/treecmp/metric/RFClusterMetric.java
// public class RFClusterMetric extends BaseMetric implements Metric{
//
// public static double getRFClusterMetric(Tree t1, Tree t2) {
//
// IdGroup idGroup = TreeUtils.getLeafIdGroup(t1);
//
// BitSet[] bs1 = ClusterDist.RootedTree2BitSetArray(t1... | import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
import pal.tree.Tree;
import treecmp.metric.RFClusterMetric;
import treecmp.test.util.TreeCreator; | package treecmp.metric.weighted;
class RFCWeightMetricTest {
@BeforeEach
void setUp() {
}
@AfterEach
void tearDown() {
}
@Test
void testGetDistanceForTheSameTreesResult_0() {
RFCWeightMetric instance = new RFCWeightMetric(); | // Path: src/treecmp/metric/RFClusterMetric.java
// public class RFClusterMetric extends BaseMetric implements Metric{
//
// public static double getRFClusterMetric(Tree t1, Tree t2) {
//
// IdGroup idGroup = TreeUtils.getLeafIdGroup(t1);
//
// BitSet[] bs1 = ClusterDist.RootedTree2BitSetArray(t1... | RFClusterMetric rc = new RFClusterMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicTTMetric.java | // Path: src/treecmp/metric/TripletMetric.java
// public class TripletMetric extends BaseMetric implements Metric {
// private TripletMetric2 tt2;
// public TripletMetric(){
// super();
// tt2 = new TripletMetric2();
// }
//
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
/... | import treecmp.metric.TripletMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicTTMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/TripletMetric.java
// public class TripletMetric extends BaseMetric implements Metric {
// private TripletMetric2 tt2;
// public TripletMetric(){
// super();
// tt2 = new TripletMetric2();
// }
//
// public double getDistance(Tree t1, Tree t2, int... indexes) {
//
/... | return new TripletMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicMastRfcMetric.java | // Path: src/treecmp/metric/RMASTMetric.java
// public class RMASTMetric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// @Override
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// return Math.max(t1.getExternalNodeCount(), t2... | import treecmp.metric.RMASTMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicMastRfcMetric extends SprHeuristicRfcBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/RMASTMetric.java
// public class RMASTMetric extends BaseMetric implements Metric {
//
// @Override
// public boolean isRooted() {
// return true;
// }
//
// @Override
// public double getDistance(Tree t1, Tree t2, int... indexes) {
// return Math.max(t1.getExternalNodeCount(), t2... | return new RMASTMetric(); |
TreeCmp/TreeCmp | src/treecmp/spr/SprHeuristicRFCMetric.java | // Path: src/treecmp/metric/RFClusterMetric.java
// public class RFClusterMetric extends BaseMetric implements Metric{
//
// public static double getRFClusterMetric(Tree t1, Tree t2) {
//
// IdGroup idGroup = TreeUtils.getLeafIdGroup(t1);
//
// BitSet[] bs1 = ClusterDist.RootedTree2BitSetArray(t1... | import treecmp.metric.RFClusterMetric;
import treecmp.metric.Metric; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package treecmp.spr;
/**
*
* @author Damian
*/
public class SprHeuristicRFCMetric extends SprHeuristicBaseMetric{
@Override
protected Metric getMetric(){ | // Path: src/treecmp/metric/RFClusterMetric.java
// public class RFClusterMetric extends BaseMetric implements Metric{
//
// public static double getRFClusterMetric(Tree t1, Tree t2) {
//
// IdGroup idGroup = TreeUtils.getLeafIdGroup(t1);
//
// BitSet[] bs1 = ClusterDist.RootedTree2BitSetArray(t1... | return new RFClusterMetric(); |
TreeCmp/TreeCmp | src/treecmp/config/ConfigSettings.java | // Path: src/treecmp/metric/BaseMetric.java
// public abstract class BaseMetric implements Metric{
//
// protected String name;
// protected String commandLineName;
// protected String description;
// protected String unifomFileName;
// protected String yuleFileName;
// protected String alnFile... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
import treecmp.metric.... | String uniformFileName = "";
String yuleFileName = "";
String alnFileSuffix = "";
String rooted = "";
String weighted = "";
String diff_leaves = "";
/**
* Update defined metric set
... | // Path: src/treecmp/metric/BaseMetric.java
// public abstract class BaseMetric implements Metric{
//
// protected String name;
// protected String commandLineName;
// protected String description;
// protected String unifomFileName;
// protected String yuleFileName;
// protected String alnFile... | BaseMetric m = (BaseMetric) cl.newInstance(); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/sql/SQLClient.java | // Path: src/main/java/io/vertx/ext/sql/impl/RowStreamWrapper.java
// public class RowStreamWrapper implements SQLRowStream {
//
// private final SQLConnection connection;
// private final SQLRowStream rowStream;
//
// public RowStreamWrapper(SQLConnection connection, SQLRowStream rowStream) {
// this.conne... | import io.vertx.codegen.annotations.Fluent;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
import io.vertx.core.json.JsonArray;
import io.vertx.ext.sql.impl.RowStreamWrapper; | return this;
}
/**
* Executes the given SQL <code>SELECT</code> statement which returns the results of the query as a read stream.
*
* @param sql the SQL to execute. For example <code>SELECT * FROM table ...</code>.
* @param handler the handler which is called once the operation completes. It wil... | // Path: src/main/java/io/vertx/ext/sql/impl/RowStreamWrapper.java
// public class RowStreamWrapper implements SQLRowStream {
//
// private final SQLConnection connection;
// private final SQLRowStream rowStream;
//
// public RowStreamWrapper(SQLConnection connection, SQLRowStream rowStream) {
// this.conne... | SQLRowStream wrapped = new RowStreamWrapper(conn, query.result()); |
vert-x3/vertx-jdbc-client | src/test/java/io/vertx/ext/jdbc/spi/impl/AgroalCPDataSourceProviderTest.java | // Path: src/test/java/io/vertx/ThreadLeakCheckerRule.java
// public class ThreadLeakCheckerRule implements TestRule {
//
// private final Predicate<Thread> predicate;
//
// public ThreadLeakCheckerRule() {
// this(t ->
// t.getName().equals("vertx-jdbc-service-get-connection-thread") ||
// t.getN... | import io.vertx.ThreadLeakCheckerRule;
import io.vertx.core.json.JsonObject;
import org.junit.Rule;
import org.junit.Test;
import javax.sql.DataSource;
import java.sql.SQLException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; | package io.vertx.ext.jdbc.spi.impl;
/**
* Checks the behavior of {@link AgroalCPDataSourceProvider}.
*/
public class AgroalCPDataSourceProviderTest {
@Rule | // Path: src/test/java/io/vertx/ThreadLeakCheckerRule.java
// public class ThreadLeakCheckerRule implements TestRule {
//
// private final Predicate<Thread> predicate;
//
// public ThreadLeakCheckerRule() {
// this(t ->
// t.getName().equals("vertx-jdbc-service-get-connection-thread") ||
// t.getN... | public ThreadLeakCheckerRule rule = new ThreadLeakCheckerRule(); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/impl/actions/JDBCAutoCommit.java | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | import io.vertx.ext.sql.SQLOptions;
import java.sql.Connection;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | public JDBCAutoCommit(SQLOptions options, boolean autoCommit) { |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/spi/JDBCColumnDescriptorProvider.java | // Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescriptor implements ColumnDescriptor {
//
// private final String columnLabel;
// private final JDBCTypeWrapper jdbcTypeWrapper;
//
// private JDBCColumnDescriptor(String columnLabel, JDBCTypeWrapper jd... | import io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor;
import io.vertx.jdbcclient.impl.actions.JDBCPropertyAccessor;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescriptor implements ColumnDescriptor {
//
// private final String columnLabel;
// private final JDBCTypeWrapper jdbcTypeWrapper;
//
// private JDBCColumnDescriptor(String columnLabel, JDBCTypeWrapper jd... | return col -> JDBCColumnDescriptor.create(() -> null, |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/spi/JDBCColumnDescriptorProvider.java | // Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescriptor implements ColumnDescriptor {
//
// private final String columnLabel;
// private final JDBCTypeWrapper jdbcTypeWrapper;
//
// private JDBCColumnDescriptor(String columnLabel, JDBCTypeWrapper jd... | import io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor;
import io.vertx.jdbcclient.impl.actions.JDBCPropertyAccessor;
import java.sql.ParameterMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescriptor implements ColumnDescriptor {
//
// private final String columnLabel;
// private final JDBCTypeWrapper jdbcTypeWrapper;
//
// private JDBCColumnDescriptor(String columnLabel, JDBCTypeWrapper jd... | JDBCPropertyAccessor.jdbcType(() -> statement.getParameterMetaData().getParameterType(col)), |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/impl/actions/JDBCExecute.java | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | import io.vertx.ext.sql.SQLOptions;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | public JDBCExecute(SQLOptions options, String sql) { |
vert-x3/vertx-jdbc-client | src/test/java/io/vertx/it/ClickHouseTest.java | // Path: src/main/java/io/vertx/jdbcclient/JDBCPool.java
// @VertxGen
// public interface JDBCPool extends Pool {
//
// /**
// * The property to be used to retrieve the generated keys
// */
// PropertyKind<Row> GENERATED_KEYS = PropertyKind.create("generated-keys", Row.class);
//
// /**
// * The proper... | import io.vertx.core.Vertx;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
import io.vertx.jdbcclient.JDBCPool;
import io.vertx.sqlclient.Row;
import org.junit.After;
import ... | package io.vertx.it;
@RunWith(VertxUnitRunner.class)
public class ClickHouseTest {
private Vertx vertx;
private ClickHouseContainer container; | // Path: src/main/java/io/vertx/jdbcclient/JDBCPool.java
// @VertxGen
// public interface JDBCPool extends Pool {
//
// /**
// * The property to be used to retrieve the generated keys
// */
// PropertyKind<Row> GENERATED_KEYS = PropertyKind.create("generated-keys", Row.class);
//
// /**
// * The proper... | protected JDBCPool client; |
vert-x3/vertx-jdbc-client | src/test/java/io/vertx/ext/jdbc/spi/impl/HikariCPDataSourceProviderTest.java | // Path: src/test/java/io/vertx/ThreadLeakCheckerRule.java
// public class ThreadLeakCheckerRule implements TestRule {
//
// private final Predicate<Thread> predicate;
//
// public ThreadLeakCheckerRule() {
// this(t ->
// t.getName().equals("vertx-jdbc-service-get-connection-thread") ||
// t.getN... | import io.vertx.ThreadLeakCheckerRule;
import io.vertx.core.json.JsonObject;
import org.junit.Rule;
import org.junit.Test;
import javax.sql.DataSource;
import java.sql.SQLException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; | package io.vertx.ext.jdbc.spi.impl;
/**
* Checks the behavior of {@link HikariCPDataSourceProvider}.
*
* @author <a href="http://escoffier.me">Clement Escoffier</a>
*/
public class HikariCPDataSourceProviderTest {
@Rule | // Path: src/test/java/io/vertx/ThreadLeakCheckerRule.java
// public class ThreadLeakCheckerRule implements TestRule {
//
// private final Predicate<Thread> predicate;
//
// public ThreadLeakCheckerRule() {
// this(t ->
// t.getName().equals("vertx-jdbc-service-get-connection-thread") ||
// t.getN... | public ThreadLeakCheckerRule rule = new ThreadLeakCheckerRule(); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/impl/actions/JDBCClose.java | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | import io.vertx.core.spi.metrics.PoolMetrics;
import io.vertx.ext.sql.SQLOptions;
import java.sql.Connection;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | public JDBCClose(SQLOptions options, PoolMetrics metrics, Object metric) { |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/impl/DataSourceHolder.java | // Path: src/main/java/io/vertx/ext/jdbc/spi/DataSourceProvider.java
// public interface DataSourceProvider {
//
// /**
// * Init provider with specific configuration
// *
// * @param sqlConfig SQL connection configuration
// * @return a reference to this for fluent API
// * @apiNote Use it conjunctio... | import io.vertx.core.impl.TaskQueue;
import io.vertx.core.shareddata.Shareable;
import io.vertx.core.spi.metrics.PoolMetrics;
import io.vertx.ext.jdbc.spi.DataSourceProvider;
import javax.sql.DataSource;
import java.util.Objects;
import java.util.concurrent.ExecutorService; | /*
* Copyright (c) 2011-2019 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https:... | // Path: src/main/java/io/vertx/ext/jdbc/spi/DataSourceProvider.java
// public interface DataSourceProvider {
//
// /**
// * Init provider with specific configuration
// *
// * @param sqlConfig SQL connection configuration
// * @return a reference to this for fluent API
// * @apiNote Use it conjunctio... | final DataSourceProvider provider; |
vert-x3/vertx-jdbc-client | src/test/java/io/vertx/it/OracleTest.java | // Path: src/main/java/io/vertx/ext/jdbc/JDBCClient.java
// @VertxGen
// public interface JDBCClient extends SQLClient {
//
// /**
// * The default data source provider is C3P0
// */
// String DEFAULT_PROVIDER_CLASS = "io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider";
//
// /**
// * The name of the ... | import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.jdbc.JDBCClient;
import io.vertx.ext.unit.Async;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.RunTestOnContext;
import... | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/jdbc/JDBCClient.java
// @VertxGen
// public interface JDBCClient extends SQLClient {
//
// /**
// * The default data source provider is C3P0
// */
// String DEFAULT_PROVIDER_CLASS = "io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider";
//
// /**
// * The name of the ... | JDBCClient client = initJDBCClient(); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/jdbcclient/SqlOutParam.java | // Path: src/main/java/io/vertx/jdbcclient/impl/SqlOutParamImpl.java
// public class SqlOutParamImpl implements SqlOutParam {
//
// final Object value;
// final int type;
// final boolean in;
//
// public SqlOutParamImpl(Object value, int type) {
// this.value = value;
// this.type = type;
// in =... | import io.vertx.codegen.annotations.VertxGen;
import io.vertx.jdbcclient.impl.SqlOutParamImpl;
import java.sql.JDBCType; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/jdbcclient/impl/SqlOutParamImpl.java
// public class SqlOutParamImpl implements SqlOutParam {
//
// final Object value;
// final int type;
// final boolean in;
//
// public SqlOutParamImpl(Object value, int type) {
// this.value = value;
// this.type = type;
// in =... | return new SqlOutParamImpl(out); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/jdbcclient/impl/actions/JDBCResponse.java | // Path: src/main/java/io/vertx/jdbcclient/JDBCPool.java
// @VertxGen
// public interface JDBCPool extends Pool {
//
// /**
// * The property to be used to retrieve the generated keys
// */
// PropertyKind<Row> GENERATED_KEYS = PropertyKind.create("generated-keys", Row.class);
//
// /**
// * The proper... | import io.vertx.jdbcclient.JDBCPool;
import io.vertx.sqlclient.Row;
import io.vertx.sqlclient.impl.QueryResultHandler;
import io.vertx.sqlclient.impl.RowDesc;
import java.util.ArrayList;
import java.util.List; | this.update = updateCount;
}
public void push(R decodeResultSet, RowDesc desc, int size) {
if (rs == null) {
rs = new ArrayList<>();
}
rs.add(new RS<>(decodeResultSet, desc, size));
}
public void returnedKeys(Row keys) {
this.ids = keys;
}
public void empty(R apply) {
this.e... | // Path: src/main/java/io/vertx/jdbcclient/JDBCPool.java
// @VertxGen
// public interface JDBCPool extends Pool {
//
// /**
// * The property to be used to retrieve the generated keys
// */
// PropertyKind<Row> GENERATED_KEYS = PropertyKind.create("generated-keys", Row.class);
//
// /**
// * The proper... | handler.addProperty(JDBCPool.GENERATED_KEYS, ids); |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/spi/JDBCDecoder.java | // Path: src/main/java/io/vertx/ext/jdbc/impl/actions/SQLValueProvider.java
// @FunctionalInterface
// public interface SQLValueProvider {
//
// Object apply(Class cls) throws SQLException;
//
// }
//
// Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescri... | import io.vertx.ext.jdbc.impl.actions.SQLValueProvider;
import io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/jdbc/impl/actions/SQLValueProvider.java
// @FunctionalInterface
// public interface SQLValueProvider {
//
// Object apply(Class cls) throws SQLException;
//
// }
//
// Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescri... | Object decode(JDBCColumnDescriptor descriptor, SQLValueProvider valueProvider) throws SQLException; |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/spi/JDBCDecoder.java | // Path: src/main/java/io/vertx/ext/jdbc/impl/actions/SQLValueProvider.java
// @FunctionalInterface
// public interface SQLValueProvider {
//
// Object apply(Class cls) throws SQLException;
//
// }
//
// Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescri... | import io.vertx.ext.jdbc.impl.actions.SQLValueProvider;
import io.vertx.jdbcclient.impl.actions.JDBCColumnDescriptor;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/jdbc/impl/actions/SQLValueProvider.java
// @FunctionalInterface
// public interface SQLValueProvider {
//
// Object apply(Class cls) throws SQLException;
//
// }
//
// Path: src/main/java/io/vertx/jdbcclient/impl/actions/JDBCColumnDescriptor.java
// public class JDBCColumnDescri... | Object decode(JDBCColumnDescriptor descriptor, SQLValueProvider valueProvider) throws SQLException; |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/spi/DataSourceProvider.java | // Path: src/main/java/io/vertx/ext/jdbc/JDBCClient.java
// @VertxGen
// public interface JDBCClient extends SQLClient {
//
// /**
// * The default data source provider is C3P0
// */
// String DEFAULT_PROVIDER_CLASS = "io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider";
//
// /**
// * The name of the ... | import java.sql.SQLException;
import java.util.Objects;
import javax.sql.DataSource;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.jdbc.JDBCClient; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/jdbc/JDBCClient.java
// @VertxGen
// public interface JDBCClient extends SQLClient {
//
// /**
// * The default data source provider is C3P0
// */
// String DEFAULT_PROVIDER_CLASS = "io.vertx.ext.jdbc.spi.impl.C3P0DataSourceProvider";
//
// /**
// * The name of the ... | providerClass = JDBCClient.DEFAULT_PROVIDER_CLASS; |
vert-x3/vertx-jdbc-client | src/main/java/io/vertx/ext/jdbc/impl/actions/JDBCQuery.java | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | import io.vertx.core.json.JsonArray;
import io.vertx.ext.sql.SQLOptions;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException; | /*
* Copyright (c) 2011-2014 The original author or authors
* ------------------------------------------------------
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distributi... | // Path: src/main/java/io/vertx/ext/sql/SQLOptions.java
// @DataObject(generateConverter = true)
// public class SQLOptions {
//
// // connection
// private boolean readOnly;
// private String catalog;
// private TransactionIsolation transactionIsolation;
// private ResultSetType resultSetType;
// private ... | public JDBCQuery(JDBCStatementHelper helper, SQLOptions options, String sql, JsonArray in) { |
soluvas/sanad | app/src/main/java/org/soluvas/sanad/app/AppConfig.java | // Path: core/src/main/java/org/soluvas/sanad/core/mvc/SanadMvcConfig.java
// @Configuration
// @Import(SanadConfig.class)
// @ComponentScan("org.soluvas.sanad.core.mvc")
// @EnableTransactionManagement
// @EnableWebMvc
// @EnableSwagger
// public class SanadMvcConfig extends WebMvcConfigurerAdapter {
//
// private ... | import java.io.File;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Named;
import org.soluvas.commons.AggregatingSupplier;
import org.soluvas.commons.AppManifest;
import org.soluvas.commons.SupplierXmiClasspathScanner;
import org.soluvas.commons.config.CommonsWebConfig;
import org.soluvas.common... | package org.soluvas.sanad.app;
/**
* @author ceefour
*
*/
@Configuration
@PropertySource("classpath:/META-INF/sanad.properties") | // Path: core/src/main/java/org/soluvas/sanad/core/mvc/SanadMvcConfig.java
// @Configuration
// @Import(SanadConfig.class)
// @ComponentScan("org.soluvas.sanad.core.mvc")
// @EnableTransactionManagement
// @EnableWebMvc
// @EnableSwagger
// public class SanadMvcConfig extends WebMvcConfigurerAdapter {
//
// private ... | @Import({SanadSecurityConfig.class, MultiTenantWebConfig.class, SanadMvcConfig.class}) |
soluvas/sanad | core/src/test/java/org/soluvas/sanad/core/mvc/AnnotationTest.java | // Path: core/src/test/java/org/soluvas/sanad/core/PropertyMockingApplicationContextInitializer.java
// public class PropertyMockingApplicationContextInitializer implements
// ApplicationContextInitializer<ConfigurableApplicationContext> {
//
// @Override
// public void initialize(ConfigurableApplicationContext ap... | import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.res... | package org.soluvas.sanad.core.mvc;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration | // Path: core/src/test/java/org/soluvas/sanad/core/PropertyMockingApplicationContextInitializer.java
// public class PropertyMockingApplicationContextInitializer implements
// ApplicationContextInitializer<ConfigurableApplicationContext> {
//
// @Override
// public void initialize(ConfigurableApplicationContext ap... | @ContextConfiguration(classes=SanadMvcConfig.class, initializers=PropertyMockingApplicationContextInitializer.class) |
soluvas/sanad | core/src/main/java/org/soluvas/sanad/core/jpa/Literal.java | // Path: core/src/main/java/org/soluvas/sanad/core/AsciidocUtils.java
// public class AsciidocUtils {
//
// static final Pattern NOT_PRINT = Pattern.compile("([\\p{Punct}\\p{Cntrl}\\p{Sc}]|\\P{Print})+", Pattern.UNICODE_CHARACTER_CLASS);
// static final Pattern WHITESPACE = Pattern.compile("\\s+", Pattern.UNICODE_CH... | import java.util.HashSet;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.Many... | * href="http://tools.ietf.org/html/bcp47">IETF BCP 47</a>. <!--
* end-model-doc -->
*
* @param newInLanguage
* the new value of the '{@link Literal#getInLanguage()
* inLanguage}' feature.
* @generated
*/
public void setInLanguage(String newInLanguage) {
inLanguage = newInLangua... | // Path: core/src/main/java/org/soluvas/sanad/core/AsciidocUtils.java
// public class AsciidocUtils {
//
// static final Pattern NOT_PRINT = Pattern.compile("([\\p{Punct}\\p{Cntrl}\\p{Sc}]|\\P{Print})+", Pattern.UNICODE_CHARACTER_CLASS);
// static final Pattern WHITESPACE = Pattern.compile("\\s+", Pattern.UNICODE_CH... | setNormalized(AsciidocUtils.normalize(adoc)); |
soluvas/sanad | app/src/main/java/org/soluvas/sanad/app/ServletConfig.java | // Path: core/src/main/java/org/soluvas/sanad/core/mvc/SanadMvcConfig.java
// @Configuration
// @Import(SanadConfig.class)
// @ComponentScan("org.soluvas.sanad.core.mvc")
// @EnableTransactionManagement
// @EnableWebMvc
// @EnableSwagger
// public class SanadMvcConfig extends WebMvcConfigurerAdapter {
//
// private ... | import javax.inject.Inject;
import org.soluvas.sanad.core.mvc.SanadMvcConfig;
import org.springframework.context.annotation.Configuration; | package org.soluvas.sanad.app;
@Configuration
public class ServletConfig {
@Inject | // Path: core/src/main/java/org/soluvas/sanad/core/mvc/SanadMvcConfig.java
// @Configuration
// @Import(SanadConfig.class)
// @ComponentScan("org.soluvas.sanad.core.mvc")
// @EnableTransactionManagement
// @EnableWebMvc
// @EnableSwagger
// public class SanadMvcConfig extends WebMvcConfigurerAdapter {
//
// private ... | SanadMvcConfig sanadMvcConfig; |
xinthink/xinkvpn | main/src/domain/xink/vpn/wrapper/L2tpProfile.java | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | import java.lang.reflect.Method;
import xink.vpn.AppException;
import xink.vpn.R;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log; | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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... | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | throw new AppException("setSecretEnabled failed", e); |
xinthink/xinkvpn | main/src/service/xink/vpn/VpnAppWidgetProvider.java | // Path: main/src/java/xink/vpn/Constants.java
// public final class Constants {
// public static final int REQ_SELECT_VPN_TYPE = 1;
//
// public static final int REQ_ADD_VPN = 2;
//
// public static final int REQ_EDIT_VPN = 3;
//
// public static final String ACT_ADD_VPN = "xink.addVpnAction";
//
/... | import static xink.vpn.Constants.*;
import xink.vpn.wrapper.VpnState;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
imp... | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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 ag... | // Path: main/src/java/xink/vpn/Constants.java
// public final class Constants {
// public static final int REQ_SELECT_VPN_TYPE = 1;
//
// public static final int REQ_ADD_VPN = 2;
//
// public static final int REQ_EDIT_VPN = 3;
//
// public static final String ACT_ADD_VPN = "xink.addVpnAction";
//
/... | private VpnState getActiveVpnState(final Context context) { |
xinthink/xinkvpn | tests/src/android/xink/vpn/test/CompatibleTest.java | // Path: main/src/domain/xink/vpn/wrapper/KeyStore.java
// public class KeyStore extends AbstractWrapper {
//
// public static final String UNLOCK_ACTION = "android.credentials.UNLOCK";
//
// private static final int NO_ERROR = 1;
//
// /*
// private static final int LOCKED = 2;
// private static... | import java.lang.reflect.Method;
import xink.vpn.wrapper.KeyStore;
import xink.vpn.wrapper.PptpProfile;
import xink.vpn.wrapper.VpnManager;
import xink.vpn.wrapper.VpnService;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.test.AndroidTestCase; | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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... | // Path: main/src/domain/xink/vpn/wrapper/KeyStore.java
// public class KeyStore extends AbstractWrapper {
//
// public static final String UNLOCK_ACTION = "android.credentials.UNLOCK";
//
// private static final int NO_ERROR = 1;
//
// /*
// private static final int LOCKED = 2;
// private static... | Class<?> profileClass = new PptpProfile(getContext()).getGenericProfileClass(); |
xinthink/xinkvpn | tests/src/android/xink/vpn/test/CompatibleTest.java | // Path: main/src/domain/xink/vpn/wrapper/KeyStore.java
// public class KeyStore extends AbstractWrapper {
//
// public static final String UNLOCK_ACTION = "android.credentials.UNLOCK";
//
// private static final int NO_ERROR = 1;
//
// /*
// private static final int LOCKED = 2;
// private static... | import java.lang.reflect.Method;
import xink.vpn.wrapper.KeyStore;
import xink.vpn.wrapper.PptpProfile;
import xink.vpn.wrapper.VpnManager;
import xink.vpn.wrapper.VpnService;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.test.AndroidTestCase; | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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... | // Path: main/src/domain/xink/vpn/wrapper/KeyStore.java
// public class KeyStore extends AbstractWrapper {
//
// public static final String UNLOCK_ACTION = "android.credentials.UNLOCK";
//
// private static final int NO_ERROR = 1;
//
// /*
// private static final int LOCKED = 2;
// private static... | KeyStore ks = new KeyStore(getContext()); |
xinthink/xinkvpn | main/src/domain/xink/vpn/wrapper/KeyStore.java | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | import java.lang.reflect.Method;
import xink.vpn.AppException;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.util.Log; | }
public boolean delete(final String key) {
return this.<Boolean> invokeStubMethod("delete", key);
}
public void unlock(final Activity ctx) {
try {
Intent intent = new Intent(UNLOCK_ACTION);
ctx.startActivity(intent);
} catch (ActivityNotFoundException e... | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | throw new AppException("verify failed", e); |
xinthink/xinkvpn | main/src/java/xink/crypto/StreamCrypto.java | // Path: main/src/java/xink/vpn/Assert.java
// public final class Assert {
//
// // 不允许实例化
// private Assert() {
// // do nothing
// }
//
// /**
// * Asserts the expression to be true
// * @param expr expression to be tested
// */
// public static void isTrue(final boolean e... | import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.GeneralSecurityException;
import javax.crypto.Cipher;
import javax.crypto.CipherOutputStream;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import xink.vpn.Assert;
import xink.vp... | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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... | // Path: main/src/java/xink/vpn/Assert.java
// public final class Assert {
//
// // 不允许实例化
// private Assert() {
// // do nothing
// }
//
// /**
// * Asserts the expression to be true
// * @param expr expression to be tested
// */
// public static void isTrue(final boolean e... | Assert.isEquals(rawKey.length, 16, "AES-128 requires a 16 bytes raw key"); |
xinthink/xinkvpn | main/src/domain/xink/vpn/wrapper/PptpProfile.java | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | import java.lang.reflect.Method;
import xink.vpn.AppException;
import android.content.Context; | /*
* Copyright 2011 yingxinwu.g@gmail.com
*
* 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... | // Path: main/src/domain/xink/vpn/AppException.java
// public class AppException extends RuntimeException {
//
// private static final long serialVersionUID = 1L;
//
// private int messageCode;
//
// private Object[] messageArgs;
//
// public AppException(final String detailMessage) {
// sup... | throw new AppException("setEncryptionEnabled failed", e); |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/CrowdfundUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/CrowdfundBean.java
// public class CrowdfundBean
// {
// private String at;
// private String atRS;
// private String creatorRS;
// private double percent;
//
// private String name;
// private String description;
// private String ratio;
//
// private St... | import burstcoin.observer.bean.CrowdfundBean;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/CrowdfundBean.java
// public class CrowdfundBean
// {
// private String at;
// private String atRS;
// private String creatorRS;
// private double percent;
//
// private String name;
// private String description;
// private String ratio;
//
// private St... | private List<CrowdfundBean> crowdfundBeans; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/PoolUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/PoolBean.java
// public class PoolBean
// {
// private String accountId;
// private String accountRS;
// private String name;
// private String description;
// // pool balance
// private String balance;
// // accounts with reward assignment
// private Integ... | import burstcoin.observer.bean.PoolBean;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/PoolBean.java
// public class PoolBean
// {
// private String accountId;
// private String accountRS;
// private String name;
// private String description;
// // pool balance
// private String balance;
// // accounts with reward assignment
// private Integ... | private List<PoolBean> poolBeans; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/AssetUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/AssetBean.java
// public class AssetBean
// {
// private String asset;
// private String name;
// private String description;
//
// private String accountRS;
// private String account;
//
// private String quantityQNT;
// private int decimals;
//
// priv... | import burstcoin.observer.bean.AssetBean;
import burstcoin.observer.bean.AssetCandleStickBean;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/AssetBean.java
// public class AssetBean
// {
// private String asset;
// private String name;
// private String description;
//
// private String accountRS;
// private String account;
//
// private String quantityQNT;
// private int decimals;
//
// priv... | private List<AssetBean> assetBeans; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/AssetUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/AssetBean.java
// public class AssetBean
// {
// private String asset;
// private String name;
// private String description;
//
// private String accountRS;
// private String account;
//
// private String quantityQNT;
// private int decimals;
//
// priv... | import burstcoin.observer.bean.AssetBean;
import burstcoin.observer.bean.AssetCandleStickBean;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/AssetBean.java
// public class AssetBean
// {
// private String asset;
// private String name;
// private String description;
//
// private String accountRS;
// private String account;
//
// private String quantityQNT;
// private int decimals;
//
// priv... | private List<AssetCandleStickBean> assetCandleStickBeans; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/NodeUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/NodeListBean.java
// public class NodeListBean
// {
// private String announcedAddress;
// private String ip;
// private String version;
// private String platform;
//
// private String country;
// private String region;
// private String city;
//
// priv... | import burstcoin.observer.bean.NodeListBean;
import burstcoin.observer.bean.NodeStats;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/NodeListBean.java
// public class NodeListBean
// {
// private String announcedAddress;
// private String ip;
// private String version;
// private String platform;
//
// private String country;
// private String region;
// private String city;
//
// priv... | private List<NodeListBean> nodes; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/NodeUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/NodeListBean.java
// public class NodeListBean
// {
// private String announcedAddress;
// private String ip;
// private String version;
// private String platform;
//
// private String country;
// private String region;
// private String city;
//
// priv... | import burstcoin.observer.bean.NodeListBean;
import burstcoin.observer.bean.NodeStats;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/NodeListBean.java
// public class NodeListBean
// {
// private String announcedAddress;
// private String ip;
// private String version;
// private String platform;
//
// private String country;
// private String region;
// private String city;
//
// priv... | private NodeStats nodeStats; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/service/model/Account.java | // Path: src/main/java/burstcoin/observer/service/model/asset/AssetBalance.java
// public class AssetBalance
// {
// protected String asset;
// protected String balanceQNT;
//
// public String getAsset()
// {
// return asset;
// }
//
// public String getBalanceQNT()
// {
// return balanceQNT;
//... | import burstcoin.observer.service.model.asset.AssetBalance;
import burstcoin.observer.service.model.asset.UnconfirmedAssetBalance;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/service/model/asset/AssetBalance.java
// public class AssetBalance
// {
// protected String asset;
// protected String balanceQNT;
//
// public String getAsset()
// {
// return asset;
// }
//
// public String getBalanceQNT()
// {
// return balanceQNT;
//... | protected List<AssetBalance> assetBalances; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/service/model/Account.java | // Path: src/main/java/burstcoin/observer/service/model/asset/AssetBalance.java
// public class AssetBalance
// {
// protected String asset;
// protected String balanceQNT;
//
// public String getAsset()
// {
// return asset;
// }
//
// public String getBalanceQNT()
// {
// return balanceQNT;
//... | import burstcoin.observer.service.model.asset.AssetBalance;
import burstcoin.observer.service.model.asset.UnconfirmedAssetBalance;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/service/model/asset/AssetBalance.java
// public class AssetBalance
// {
// protected String asset;
// protected String balanceQNT;
//
// public String getAsset()
// {
// return asset;
// }
//
// public String getBalanceQNT()
// {
// return balanceQNT;
//... | protected List<UnconfirmedAssetBalance> unconfirmedAssetBalances; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/event/NetworkUpdateEvent.java | // Path: src/main/java/burstcoin/observer/bean/NetworkBean.java
// public class NetworkBean
// {
// private String height;
// private String domain;
// private String url;
// private String baseTarget;
// private String generationSignature;
// private String targetDeadline;
// private String type;
// pr... | import burstcoin.observer.bean.NetworkBean;
import java.util.Date;
import java.util.List; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/bean/NetworkBean.java
// public class NetworkBean
// {
// private String height;
// private String domain;
// private String url;
// private String baseTarget;
// private String generationSignature;
// private String targetDeadline;
// private String type;
// pr... | private List<NetworkBean> networkBeans; |
de-luxe/burstcoin-observer | src/main/java/burstcoin/observer/service/network/MiningInfoEvent.java | // Path: src/main/java/burstcoin/observer/service/model/MiningInfo.java
// public class MiningInfo
// implements Serializable
// {
// private String generationSignature;
// private String baseTarget;
// private long requestProcessingTime;
// private long height;
//
// // only if pool
// private long targ... | import burstcoin.observer.service.model.MiningInfo;
import org.springframework.context.ApplicationEvent;
import java.io.Serializable;
import java.util.UUID; | /*
* The MIT License (MIT)
*
* Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5
*
* 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,
... | // Path: src/main/java/burstcoin/observer/service/model/MiningInfo.java
// public class MiningInfo
// implements Serializable
// {
// private String generationSignature;
// private String baseTarget;
// private long requestProcessingTime;
// private long height;
//
// // only if pool
// private long targ... | private MiningInfo miningInfo; |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/network/NewsDetileAPI.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/NewsDetile.java
// public class NewsDetile {
//
// private String author;
//
// private Map<String,ContentImage> articleMediaMap;
//
// private String content;
//
// public String getAuthor() {
// return author;
// }
//
// p... | import com.me.silencedut.nbaplus.model.NewsDetile;
import retrofit.http.GET;
import retrofit.http.Path;
import rx.Observable; | package com.me.silencedut.nbaplus.network;
/**
* Created by SilenceDut on 2015/12/10.
*/
public interface NewsDetileAPI {
@GET("{date}/{detileId}") | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/NewsDetile.java
// public class NewsDetile {
//
// private String author;
//
// private Map<String,ContentImage> articleMediaMap;
//
// private String content;
//
// public String getAuthor() {
// return author;
// }
//
// p... | Observable<NewsDetile> getNewsDetile(@Path("date") String type,@Path("detileId") String newsId); |
SilenceDut/NBAPlus | chartlibrary/src/com/db/chart/view/Tooltip.java | // Path: chartlibrary/src/com/db/chart/listener/OnTooltipEventListener.java
// public interface OnTooltipEventListener {
//
// void onEnter(View view);
// void onExit(View view);
//
// }
| import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Rect;
import android.os.Build;
import android.widget.RelativeLayout;
import android.widget.TextView;
imp... | /*
* Copyright 2015 Diogo Bernardino
*
* 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 agree... | // Path: chartlibrary/src/com/db/chart/listener/OnTooltipEventListener.java
// public interface OnTooltipEventListener {
//
// void onEnter(View view);
// void onExit(View view);
//
// }
// Path: chartlibrary/src/com/db/chart/view/Tooltip.java
import android.animation.Animator;
import android.animation.ObjectAni... | private OnTooltipEventListener mTooltipEventListener; |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/event/NewsEvent.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/News.java
// public class News {
// /**
// * nextId : 116409785
// * newslist : [{"contentType":"ARTICLE","description":"央视体育频道女主播\u201c乌贼刘\u201d刘语熙在社交网络发文\u201c人生若只如初见,再见最前线!\u201d,以此正式宣布离开《","title":"告别NBA!最美女主播宣布退出","putdate":"20151204","imgUrl... | import com.me.silencedut.nbaplus.model.News;
import com.me.silencedut.nbaplus.data.Constant.GETNEWSWAY; | package com.me.silencedut.nbaplus.event;
/**
* Created by Silencedut on 2015/11/28.
*/
public class NewsEvent extends Event {
private News news; | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/News.java
// public class News {
// /**
// * nextId : 116409785
// * newslist : [{"contentType":"ARTICLE","description":"央视体育频道女主播\u201c乌贼刘\u201d刘语熙在社交网络发文\u201c人生若只如初见,再见最前线!\u201d,以此正式宣布离开《","title":"告别NBA!最美女主播宣布退出","putdate":"20151204","imgUrl... | private GETNEWSWAY getNewsWay; |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/ui/adapter/RecycleAdapter/MainAdapter.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/News.java
// public static class NewslistEntity {
// private String description;
// private String title;
// private String putdate;
// private String articleId;
// private String contentSourceName;
// private String articleUrl;
// p... | import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.me.silencedut.nbaplus.R;
import com.me.silencedut.nbaplus.model.News.NewslistEntity;
import com.me.silencedut.nbaplus.util... | case NORMAL:
viewHolder= new NomalNewsViewHolder(mInflater.inflate(R.layout.item_fragment_news_normal, parent, false));break;
default:
break;
}
return viewHolder;
}
class NomalNewsViewHolder extends EntityHolder {
@Bind(R.id.news... | // Path: app/src/main/java/com/me/silencedut/nbaplus/model/News.java
// public static class NewslistEntity {
// private String description;
// private String title;
// private String putdate;
// private String articleId;
// private String contentSourceName;
// private String articleUrl;
// p... | showTime = DateFormatter.getRecentlyTimeFormatText(new DateTime(Long.parseLong(newEntity.getPutdate()))); |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/utils/AppUtils.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/App.java
// public class App extends Application {
// private static Application sInstance;
// @Override
// public void onCreate() {
// super.onCreate();
// FIR.init(this);
// // mRefWatcher = LeakCanary.install(this);
// ... | import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Color;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.widget.TextView;
import com.me.silencedut.nbaplus.R;
import com.me.silencedut.nbaplus.app... | package com.me.silencedut.nbaplus.utils;
/**
* Created by SilenceDut on 2015/12/11.
*/
public class AppUtils {
public static String getVersionName(Context context) {
String versionName = null;
try {
versionName = context.getApplicationContext().getPackageManager()
... | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/App.java
// public class App extends Application {
// private static Application sInstance;
// @Override
// public void onCreate() {
// super.onCreate();
// FIR.init(this);
// // mRefWatcher = LeakCanary.install(this);
// ... | Resources resources =App.getContext().getResources(); |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/event/StatEvent.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/data/Constant.java
// public class Constant {
//
// public static final String APP_FIR_IM_URL="http://fir.im/nbaplus";
// public static final String API_TOKEN_FIR="ff55b0c5cb165ec0b04c473cf77c8995";
//
// public static final String LOADIMAGE = "LOADIMAG... | import com.me.silencedut.nbaplus.data.Constant; | package com.me.silencedut.nbaplus.event;
/**
* Created by SilenceDut on 2015/12/18.
*/
public class StatEvent extends Event {
private String mStatKind;
private String[][] mLables;
private String[][] mPlayerUrls;
private float[][] mStatValues; | // Path: app/src/main/java/com/me/silencedut/nbaplus/data/Constant.java
// public class Constant {
//
// public static final String APP_FIR_IM_URL="http://fir.im/nbaplus";
// public static final String API_TOKEN_FIR="ff55b0c5cb165ec0b04c473cf77c8995";
//
// public static final String LOADIMAGE = "LOADIMAG... | private Constant.GETNEWSWAY getNewsWay; |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/event/TeamSortEvent.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/data/Constant.java
// public class Constant {
//
// public static final String APP_FIR_IM_URL="http://fir.im/nbaplus";
// public static final String API_TOKEN_FIR="ff55b0c5cb165ec0b04c473cf77c8995";
//
// public static final String LOADIMAGE = "LOADIMAG... | import com.me.silencedut.nbaplus.data.Constant;
import com.me.silencedut.nbaplus.model.Teams; | package com.me.silencedut.nbaplus.event;
/**
* Created by SilenceDut on 2015/12/23.
*/
public class TeamSortEvent extends Event {
private Teams mTeams; | // Path: app/src/main/java/com/me/silencedut/nbaplus/data/Constant.java
// public class Constant {
//
// public static final String APP_FIR_IM_URL="http://fir.im/nbaplus";
// public static final String API_TOKEN_FIR="ff55b0c5cb165ec0b04c473cf77c8995";
//
// public static final String LOADIMAGE = "LOADIMAG... | public TeamSortEvent(Teams teams,Constant.Result result) { |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/ui/activity/BaseActivity.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/AppService.java
// public class AppService {
// private static final AppService NBAPLUS_SERVICE=new AppService();
// private static Gson sGson;
// private static EventBus sBus ;
// private static DBHelper sDBHelper;
// private static NbaplusAP... | import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.me.silencedut.nbaplus.app.AppService;
import com.me.silencedut.nbaplus.event.Event;
import butterknife.ButterKnife; | package com.me.silencedut.nbaplus.ui.activity;
/**
* Created by SilenceDut on 2015/11/28.
*/
public abstract class BaseActivity extends AppCompatActivity {
protected abstract void initViews();
protected abstract int getContentViewId();
@Override
protected void onCreate(Bundle savedInstanceState)... | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/AppService.java
// public class AppService {
// private static final AppService NBAPLUS_SERVICE=new AppService();
// private static Gson sGson;
// private static EventBus sBus ;
// private static DBHelper sDBHelper;
// private static NbaplusAP... | AppService.getInstance().addCompositeSub(getTaskId()); |
SilenceDut/NBAPlus | app/src/main/java/com/me/silencedut/nbaplus/ui/fragment/base/BaseFragment.java | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/AppService.java
// public class AppService {
// private static final AppService NBAPLUS_SERVICE=new AppService();
// private static Gson sGson;
// private static EventBus sBus ;
// private static DBHelper sDBHelper;
// private static NbaplusAP... | import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.me.silencedut.nbaplus.app.AppService;
import butterknife.ButterKnife; | package com.me.silencedut.nbaplus.ui.fragment.base;
/**
* Created by SilenceDut on 2015/11/28.
*/
public abstract class BaseFragment extends Fragment {
private int mTaskId;
protected View rootView;
protected abstract void initViews() ;
protected abstract int getContentViewId();
protected in... | // Path: app/src/main/java/com/me/silencedut/nbaplus/app/AppService.java
// public class AppService {
// private static final AppService NBAPLUS_SERVICE=new AppService();
// private static Gson sGson;
// private static EventBus sBus ;
// private static DBHelper sDBHelper;
// private static NbaplusAP... | AppService.getInstance().getBus().register(this); |
adamcin/httpsig-java | ssh-jce/src/main/java/net/adamcin/httpsig/ssh/jce/UserKeysFingerprintKeyId.java | // Path: api/src/main/java/net/adamcin/httpsig/api/Key.java
// public interface Key {
//
// /**
// * @return the {@link Key}'s self-identification. This may end up not being unique within a keychain.
// */
// String getId();
//
// /**
// * @return the {@link Set} of Signature {@link Algorit... | import net.adamcin.httpsig.api.Key;
import net.adamcin.httpsig.api.KeyId; | /*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictio... | // Path: api/src/main/java/net/adamcin/httpsig/api/Key.java
// public interface Key {
//
// /**
// * @return the {@link Key}'s self-identification. This may end up not being unique within a keychain.
// */
// String getId();
//
// /**
// * @return the {@link Set} of Signature {@link Algorit... | public String getId(Key key) { |
adamcin/httpsig-java | ssh-jce/src/main/java/net/adamcin/httpsig/ssh/jce/SSHKey.java | // Path: api/src/main/java/net/adamcin/httpsig/api/Algorithm.java
// public enum Algorithm {
// RSA_SHA1("rsa-sha1"),
// RSA_SHA256("rsa-sha256"),
// RSA_SHA512("rsa-sha512"),
// DSA_SHA1("dsa-sha1"),
// HMAC_SHA1("hmac-sha1"),
// HMAC_SHA256("hmac-sha256"),
// HMAC_SHA512("hmac-sha512"),
//... | import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Signature;
import java.security.SignatureException;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import net.adamcin.httpsig... | }
if (keyPair.getPublic() == null) {
throw new IllegalArgumentException("publicKey must not be null");
}
this.keyPair = keyPair;
this.fingerprint = keyFormat.getFingerprint(keyPair.getPublic());
}
public SSHKey(KeyFormat keyFormat, PublicKey publicKey,
... | // Path: api/src/main/java/net/adamcin/httpsig/api/Algorithm.java
// public enum Algorithm {
// RSA_SHA1("rsa-sha1"),
// RSA_SHA256("rsa-sha256"),
// RSA_SHA512("rsa-sha512"),
// DSA_SHA1("dsa-sha1"),
// HMAC_SHA1("hmac-sha1"),
// HMAC_SHA256("hmac-sha256"),
// HMAC_SHA512("hmac-sha512"),
//... | public Set<Algorithm> getAlgorithms() { |
adamcin/httpsig-java | hmac/src/main/java/net/adamcin/httpsig/hmac/HmacKey.java | // Path: api/src/main/java/net/adamcin/httpsig/api/Algorithm.java
// public enum Algorithm {
// RSA_SHA1("rsa-sha1"),
// RSA_SHA256("rsa-sha256"),
// RSA_SHA512("rsa-sha512"),
// DSA_SHA1("dsa-sha1"),
// HMAC_SHA1("hmac-sha1"),
// HMAC_SHA256("hmac-sha256"),
// HMAC_SHA512("hmac-sha512"),
//... | import org.slf4j.LoggerFactory;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import net.adamcin.httpsig.api.Algorithm;
import net.adamcin.... | /*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictio... | // Path: api/src/main/java/net/adamcin/httpsig/api/Algorithm.java
// public enum Algorithm {
// RSA_SHA1("rsa-sha1"),
// RSA_SHA256("rsa-sha256"),
// RSA_SHA512("rsa-sha512"),
// DSA_SHA1("dsa-sha1"),
// HMAC_SHA1("hmac-sha1"),
// HMAC_SHA256("hmac-sha256"),
// HMAC_SHA512("hmac-sha512"),
//... | public Set<Algorithm> getAlgorithms() { |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/SavedQueryPut.java | // Path: core/src/main/java/io/keen/client/java/http/HttpMethods.java
// public final class HttpMethods {
// private HttpMethods() {}
//
// public final static String GET = "GET";
// public final static String POST = "POST";
// public final static String PUT = "PUT";
// public final static String D... | import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import io.keen.client.java.http.HttpMethods; | package io.keen.client.java;
/**
* Represents PUT requests performed against the Saved/Cached Queries API.
*
* @author masojus
*/
class SavedQueryPut extends SavedQueryRequest {
private final KeenQueryRequest query;
private final int refreshRate;
private final Map<String, Object> miscProperties;
... | // Path: core/src/main/java/io/keen/client/java/http/HttpMethods.java
// public final class HttpMethods {
// private HttpMethods() {}
//
// public final static String GET = "GET";
// public final static String POST = "POST";
// public final static String PUT = "PUT";
// public final static String D... | super(HttpMethods.PUT, true /* needsMasterKey */, queryName, displayName); |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/CachedDatasets.java | // Path: query/src/main/java/io/keen/client/java/result/IntervalResultValue.java
// public class IntervalResultValue {
// private final AbsoluteTimeframe timeframe;
// private final QueryResult result;
//
// public IntervalResultValue(AbsoluteTimeframe timeframe, QueryResult result) {
// this.timef... | import io.keen.client.java.result.IntervalResultValue;
import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Map; | package io.keen.client.java;
/**
* Client interface for Cached Datasets.
* <p>
* Cached Datasets are a way to pre-compute data for hundreds or thousands of entities at once. They are a great way to
* improve your query efficiency as well as minimize your compute costs.
*
* @see <a href="https://keen.io/docs/co... | // Path: query/src/main/java/io/keen/client/java/result/IntervalResultValue.java
// public class IntervalResultValue {
// private final AbsoluteTimeframe timeframe;
// private final QueryResult result;
//
// public IntervalResultValue(AbsoluteTimeframe timeframe, QueryResult result) {
// this.timef... | List<IntervalResultValue> getResults(DatasetDefinition datasetDefinition, Map<String, ?> indexByValues, Timeframe timeframe) throws IOException; |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/PersistentAnalysis.java | // Path: core/src/main/java/io/keen/client/java/http/HttpMethods.java
// public final class HttpMethods {
// private HttpMethods() {}
//
// public final static String GET = "GET";
// public final static String POST = "POST";
// public final static String PUT = "PUT";
// public final static String D... | import io.keen.client.java.http.HttpMethods; | package io.keen.client.java;
/**
* Base class that represents requests to the endpoints for managing persistent analyses, such as
* <a href="https://keen.io/docs/api/#saved-queries">Saved/Cached Queries</a> and
* <a href="https://keen.io/docs/api/#cached-datasets">Cached Datasets</a>.
*
* Should be an interface,... | // Path: core/src/main/java/io/keen/client/java/http/HttpMethods.java
// public final class HttpMethods {
// private HttpMethods() {}
//
// public final static String GET = "GET";
// public final static String POST = "POST";
// public final static String PUT = "PUT";
// public final static String D... | if (null == resourceName && !HttpMethods.GET.equals(httpMethod)) { |
keenlabs/KeenClient-Java | android/src/test/java/io/keen/client/android/AndroidJsonHandlerTest.java | // Path: core/src/main/java/io/keen/client/java/KeenConstants.java
// public final class KeenConstants {
// private KeenConstants() {}
//
// static final String SERVER_ADDRESS = "https://api.keen.io";
// static final String API_VERSION = "3.0";
//
// // Keen API constants
//
// static final int M... | import org.hamcrest.Matchers;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONTokener;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import j... |
// This string doesn't matter, but it's what we mimic with the mocks.
String mapResponse = "{\"result\": \"dummyResult\"}";
StringReader reader = new StringReader(mapResponse);
Map<String, Object> map = handler.readJson(reader);
assertNotNull(map);
assertEquals(1, map.si... | // Path: core/src/main/java/io/keen/client/java/KeenConstants.java
// public final class KeenConstants {
// private KeenConstants() {}
//
// static final String SERVER_ADDRESS = "https://api.keen.io";
// static final String API_VERSION = "3.0";
//
// // Keen API constants
//
// static final int M... | assertTrue(map.containsKey(KeenConstants.KEEN_FAKE_JSON_ROOT)); |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/KeenQueryRequest.java | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | import java.net.URL;
import java.util.Collection;
import java.util.Map;
import io.keen.client.java.exceptions.KeenQueryClientException;
import io.keen.client.java.http.HttpMethods; | package io.keen.client.java;
/**
* Interface to be implemented by a query request
*
* @author baumatron
*/
abstract class KeenQueryRequest {
abstract URL getRequestURL(RequestUrlBuilder urlBuilder, String projectId) | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | throws KeenQueryClientException; |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/KeenQueryRequest.java | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | import java.net.URL;
import java.util.Collection;
import java.util.Map;
import io.keen.client.java.exceptions.KeenQueryClientException;
import io.keen.client.java.http.HttpMethods; | package io.keen.client.java;
/**
* Interface to be implemented by a query request
*
* @author baumatron
*/
abstract class KeenQueryRequest {
abstract URL getRequestURL(RequestUrlBuilder urlBuilder, String projectId)
throws KeenQueryClientException;
// By default, we POST to get most of our q... | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | return HttpMethods.POST; |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/SavedQueries.java | // Path: query/src/main/java/io/keen/client/java/result/QueryResult.java
// public abstract class QueryResult {
// /**
// * @return {@code false}
// */
// public boolean isDouble() {
// return false;
// }
//
// /**
// * @return {@code false}
// */
// public boolean isLon... | import java.io.IOException;
import java.util.List;
import java.util.Map;
import io.keen.client.java.result.QueryResult; | package io.keen.client.java;
/**
* Represents the set of operations that can be performed against the
* <a href="https://keen.io/docs/api/#saved-queries">Saved/Cached Query API</a> endpoints.
*
* @author masojus
*/
public interface SavedQueries {
/**
* Save the given query.
*
* @param queryNa... | // Path: query/src/main/java/io/keen/client/java/result/QueryResult.java
// public abstract class QueryResult {
// /**
// * @return {@code false}
// */
// public boolean isDouble() {
// return false;
// }
//
// /**
// * @return {@code false}
// */
// public boolean isLon... | QueryResult getResult(String queryName) throws IOException; |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/RequestUrlBuilder.java | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | import io.keen.client.java.exceptions.KeenQueryClientException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util... | package io.keen.client.java;
/**
* Class which handles formatting of request URLs.
*
* @author baumatron
*/
class RequestUrlBuilder {
// The API version string
private final String apiVersion;
// The base URL, including the scheme and domain
private final String baseUrl;
RequestUrlBuilder(S... | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | URL getAnalysisUrl(String projectId, String analysisPath) throws KeenQueryClientException { |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/DatasetQuery.java | // Path: query/src/main/java/io/keen/client/java/KeenQueryConstants.java
// class KeenQueryConstants {
// // Query names
// static final String COUNT = "count";
// static final String COUNT_UNIQUE = "count_unique";
// static final String MINIMUM = "minimum";
// static final String MAXIMUM = "maximum... | import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.*;
import static io.keen.client.java.KeenQueryConstants.*; | }
Map<String, Object> asMap() {
Map<String, Object> result = new HashMap<String, Object>();
if (analysisType != null) {
result.put(ANALYSIS_TYPE, analysisType);
}
if (targetProperty != null) {
result.put(TARGET_PROPERTY, targetProperty);
}
... | // Path: query/src/main/java/io/keen/client/java/KeenQueryConstants.java
// class KeenQueryConstants {
// // Query names
// static final String COUNT = "count";
// static final String COUNT_UNIQUE = "count_unique";
// static final String MINIMUM = "minimum";
// static final String MAXIMUM = "maximum... | result.put(KeenQueryConstants.ANALYSES, analysesMap); |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/Funnel.java | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import io.keen.client.java.exceptions.KeenQueryClientException; |
// Validate step properties that cannot be true for the first funnel step
FunnelStep firstStep = builder.steps.get(0);
if (null != firstStep.getInverted() &&
true == firstStep.getInverted()) {
throw new IllegalArgumentException(
"First step in fu... | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | throws KeenQueryClientException { |
keenlabs/KeenClient-Java | query/src/main/java/io/keen/client/java/CachedDatasetRequest.java | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import io.keen.client.java.exceptions.KeenQueryClientException;
import io.keen.client.java.http.HttpMethods;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.Coll... | package io.keen.client.java;
abstract class CachedDatasetRequest extends PersistentAnalysis {
private CachedDatasetRequest(String httpMethod, boolean needsMasterKey, String datasetName) {
super(httpMethod, needsMasterKey, datasetName, null);
}
static KeenQueryRequest definitionRequest(String d... | // Path: query/src/main/java/io/keen/client/java/exceptions/KeenQueryClientException.java
// public class KeenQueryClientException extends KeenException {
// private static final long serialVersionUID = -8714276738565293346L;
//
// public KeenQueryClientException() {
// super();
// }
//
// pub... | return new CachedDatasetRequest(HttpMethods.GET, false, datasetName) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.