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 |
|---|---|---|---|---|---|---|
trivago/Mail-Pigeon | pigeon-web/src/main/java/com/trivago/mail/pigeon/web/components/wizard/setup/steps/WizardAddRecipientGroupComponent.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/RecipientGroup.java
// public class RecipientGroup extends AbstractBean
// {
// public static final String ID = "group_id";
//
// public static final String NAME = "name";
//
// public static final String DATE = "date";
//
// public Recipi... | import com.trivago.mail.pigeon.bean.RecipientGroup;
import com.vaadin.terminal.UserError;
import com.vaadin.ui.*;
import org.vaadin.teemu.wizards.WizardStep;
import java.util.Date; | + "You need a Recipient Group in order to send a Newsletter.</p>", Label.CONTENT_XHTML);
Panel rootPanel = new Panel("Add new group");
final VerticalLayout verticalLayout = new VerticalLayout();
tfName = new TextField("Name");
verticalLayout.addComponent(label);
verticalLayout.addComponent(tfName);
root... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/RecipientGroup.java
// public class RecipientGroup extends AbstractBean
// {
// public static final String ID = "group_id";
//
// public static final String NAME = "name";
//
// public static final String DATE = "date";
//
// public Recipi... | RecipientGroup g = new RecipientGroup(grou_id, tfName.getValue().toString()); |
trivago/Mail-Pigeon | pigeon-web/src/main/java/com/trivago/mail/pigeon/web/components/sender/SenderList.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/Sender.java
// public class Sender extends AbstractBean
// {
// public static final String ID = "sender_id";
//
// public static final String NAME = "name";
//
// public static final String FROM_MAIL = "from_mail";
//
// public static fina... | import com.trivago.mail.pigeon.bean.Sender;
import com.vaadin.data.util.BeanContainer;
import com.vaadin.terminal.ThemeResource;
import com.vaadin.ui.*;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.index.IndexHits;
import java.util.ArrayList;
import java.util.List; | /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/Sender.java
// public class Sender extends AbstractBean
// {
// public static final String ID = "sender_id";
//
// public static final String NAME = "name";
//
// public static final String FROM_MAIL = "from_mail";
//
// public static fina... | private BeanContainer<Long, Sender> beanContainer; |
trivago/Mail-Pigeon | pigeon-common/src/main/java/com/trivago/mail/pigeon/storage/ConnectionFactory.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/configuration/Settings.java
// public class Settings
// {
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Settings.class);
//
// private static Settings instance;
//
// private Configuration configuration;
//
// ... | import com.trivago.mail.pigeon.configuration.Settings;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.index.Index;
import org.neo4j.kernel.AbstractGraphDatabase;
import org.neo4j.kernel.EmbeddedGraphDatabase;
import org.neo4j.server.WrappingNeoServerBootstra... | /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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.apa... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/configuration/Settings.java
// public class Settings
// {
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Settings.class);
//
// private static Settings instance;
//
// private Configuration configuration;
//
// ... | private static AbstractGraphDatabase graphDb = new EmbeddedGraphDatabase(Settings.create().getConfiguration().getString("neo4j.path"));
|
trivago/Mail-Pigeon | pigeon-web/src/main/java/com/trivago/mail/pigeon/web/components/groups/GroupSelectBox.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/RecipientGroup.java
// public class RecipientGroup extends AbstractBean
// {
// public static final String ID = "group_id";
//
// public static final String NAME = "name";
//
// public static final String DATE = "date";
//
// public Recipi... | import com.trivago.mail.pigeon.bean.RecipientGroup;
import com.vaadin.data.Property;
import com.vaadin.ui.AbstractSelect;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Panel;
import com.vaadin.ui.Select;
import org.apache.log4j.Logger;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.index.IndexHits... | {
Panel rootPanel = new Panel("Select Recipient Group");
select = new Select("Available Groups");
select.setFilteringMode(AbstractSelect.Filtering.FILTERINGMODE_CONTAINS);
select.setNullSelectionAllowed(false);
reloadSelect();
select.addListener(new Select.ValueChangeListener()
{
@Override
public v... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/RecipientGroup.java
// public class RecipientGroup extends AbstractBean
// {
// public static final String ID = "group_id";
//
// public static final String NAME = "name";
//
// public static final String DATE = "date";
//
// public Recipi... | final IndexHits<Node> indexHits = RecipientGroup.getAll(); |
trivago/Mail-Pigeon | pigeon-common/src/main/java/com/trivago/mail/pigeon/queue/ConnectionPool.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/configuration/Settings.java
// public class Settings
// {
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Settings.class);
//
// private static Settings instance;
//
// private Configuration configuration;
//
// ... | import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.trivago.mail.pigeon.configuration.Settings;
import org.apache.commons.configuration.Configuration;
import org.apache.log4j.Logger;
import java.io.IOException; | /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/configuration/Settings.java
// public class Settings
// {
// private static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(Settings.class);
//
// private static Settings instance;
//
// private Configuration configuration;
//
// ... | private static Settings settings = Settings.create(); |
trivago/Mail-Pigeon | pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/AbstractBean.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/storage/ConnectionFactory.java
// public class ConnectionFactory
// {
//
// private static AbstractGraphDatabase graphDb = new EmbeddedGraphDatabase(Settings.create().getConfiguration().getString("neo4j.path"));
//
// private static Index<Node> newsl... | import com.trivago.mail.pigeon.storage.ConnectionFactory;
import org.apache.log4j.Logger;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.NotFoundException;
import org.neo4j.graphdb.Transaction;
import org.svenson.JSONProperty;
| /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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.apa... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/storage/ConnectionFactory.java
// public class ConnectionFactory
// {
//
// private static AbstractGraphDatabase graphDb = new EmbeddedGraphDatabase(Settings.create().getConfiguration().getString("neo4j.path"));
//
// private static Index<Node> newsl... | Transaction tx = ConnectionFactory.getDatabase().beginTx();
|
trivago/Mail-Pigeon | pigeon-web/src/main/java/com/trivago/mail/pigeon/web/components/templates/ModalAddTemplate.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/MailTemplate.java
// public class MailTemplate extends AbstractBean
// {
// public static final String ID = "template_id";
// public static final String SUBJECT = "subject";
// public static final String TEXT = "text_content";
// public static f... | import com.trivago.mail.pigeon.bean.MailTemplate;
import com.trivago.mail.pigeon.storage.Util;
import com.vaadin.data.util.BeanItem;
import com.vaadin.terminal.ExternalResource;
import com.vaadin.terminal.UserError;
import com.vaadin.ui.*;
import org.vaadin.openesignforms.ckeditor.CKEditorTextField;
| }
else
{
subject.setComponentError(null);
}
if (htmlContent.getValue().equals(""))
{
htmlContent.setComponentError(new UserError("Please provide some HTML content"));
hasError = true;
}
else
{
htmlContent.setComponentError(null);
}
if (te... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/bean/MailTemplate.java
// public class MailTemplate extends AbstractBean
// {
// public static final String ID = "template_id";
// public static final String SUBJECT = "subject";
// public static final String TEXT = "text_content";
// public static f... | long templateId = Util.generateId();
|
trivago/Mail-Pigeon | pigeon-daemon/src/test/java/com/trivago/TestDateFilter.java | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/json/MailTransport.java
// public class MailTransport
// {
// private String from;
//
// private String to;
//
// private String replyTo;
//
// private String subject;
//
// private String html;
//
// private String text;
//
// priv... | import com.trivago.mail.pigeon.daemon.filter.DateFilter;
import com.trivago.mail.pigeon.json.MailTransport;
import org.junit.Test;
import static org.junit.Assert.*;
import java.util.Calendar;
import java.util.Date;
| /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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.apa... | // Path: pigeon-common/src/main/java/com/trivago/mail/pigeon/json/MailTransport.java
// public class MailTransport
// {
// private String from;
//
// private String to;
//
// private String replyTo;
//
// private String subject;
//
// private String html;
//
// private String text;
//
// priv... | MailTransport mt = new MailTransport();
|
trivago/Mail-Pigeon | pigeon-web/src/main/java/com/trivago/mail/pigeon/web/components/menu/MenuBar.java | // Path: pigeon-web/src/main/java/com/trivago/mail/pigeon/web/MainApp.java
// @SuppressWarnings("serial")
// public class MainApp extends Application
// {
// private Window window;
// private MenuBar menu;
//
// @Override
// public void init()
// {
// //DOMConfigurator.configure(Thread.currentThrea... | import com.trivago.mail.pigeon.web.MainApp;
import java.lang.reflect.InvocationTargetException;
| /**
* Copyright (C) 2011-2012 trivago GmbH <mario.mueller@trivago.com>, <christian.krause@trivago.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.apa... | // Path: pigeon-web/src/main/java/com/trivago/mail/pigeon/web/MainApp.java
// @SuppressWarnings("serial")
// public class MainApp extends Application
// {
// private Window window;
// private MenuBar menu;
//
// @Override
// public void init()
// {
// //DOMConfigurator.configure(Thread.currentThrea... | private MainApp app;
|
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/BrowserBuilder.java | // Path: src/main/java/io/github/bonigarcia/seljup/BrowsersTemplate.java
// public static class Browser {
// String type;
// String version;
// String remoteUrl;
// String[] arguments;
// String[] preferences;
// Object capabilities;
//
// public Browser(String type, String version, String ... | import com.google.gson.internal.LinkedTreeMap;
import io.github.bonigarcia.seljup.BrowsersTemplate.Browser;
| public static BrowserBuilder safariInDocker() {
return new BrowserBuilder("safari-in-docker");
}
public BrowserBuilder version(String version) {
this.version = version;
return this;
}
public BrowserBuilder remoteUrl(String url) {
this.remoteUrl = url;
... | // Path: src/main/java/io/github/bonigarcia/seljup/BrowsersTemplate.java
// public static class Browser {
// String type;
// String version;
// String remoteUrl;
// String[] arguments;
// String[] preferences;
// Object capabilities;
//
// public Browser(String type, String version, String ... | public Browser build() {
|
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/config/Config.java | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | import io.github.bonigarcia.wdm.WebDriverManager;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_AND_PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.SUREF... |
private <T> T resolve(ConfigKey<T> configKey) {
String strValue = null;
String name = configKey.getName();
T tValue = configKey.getValue();
Class<T> type = configKey.getType();
strValue = System.getenv(name.toUpperCase().replace(".", "_"));
if (strValue == null) {
... | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | throw new SeleniumJupiterException( |
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/config/Config.java | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | import io.github.bonigarcia.wdm.WebDriverManager;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_AND_PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.SUREF... | return manager;
}
public void setManager(WebDriverManager manager) {
this.manager = manager;
}
// Readable API methods
public void enableVnc() {
setVnc(true);
}
public void enableScreenshot() {
setScreenshot(true);
}
public void enableRecording() ... | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | setOutputFolder(SUREFIRE_REPORTS_KEY); |
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/config/Config.java | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | import io.github.bonigarcia.wdm.WebDriverManager;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_AND_PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.SUREF... | this.manager = manager;
}
// Readable API methods
public void enableVnc() {
setVnc(true);
}
public void enableScreenshot() {
setScreenshot(true);
}
public void enableRecording() {
setRecording(true);
}
public void enableRecordingWhenFailure() {
... | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | setScreenshotFormat(BASE64_KEY); |
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/config/Config.java | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | import io.github.bonigarcia.wdm.WebDriverManager;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_AND_PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.SUREF... |
public void enableVnc() {
setVnc(true);
}
public void enableScreenshot() {
setScreenshot(true);
}
public void enableRecording() {
setRecording(true);
}
public void enableRecordingWhenFailure() {
setRecordingWhenFailure(true);
}
public void enableS... | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | setScreenshotFormat(PNG_KEY); |
bonigarcia/selenium-jupiter | src/main/java/io/github/bonigarcia/seljup/config/Config.java | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | import io.github.bonigarcia.wdm.WebDriverManager;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_AND_PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.BASE64_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.PNG_KEY;
import static io.github.bonigarcia.seljup.OutputHandler.SUREF... |
public void enableScreenshot() {
setScreenshot(true);
}
public void enableRecording() {
setRecording(true);
}
public void enableRecordingWhenFailure() {
setRecordingWhenFailure(true);
}
public void enableScreenshotWhenFailure() {
setScreenshotWhenFailure(t... | // Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_AND_PNG_KEY = "base64andpng";
//
// Path: src/main/java/io/github/bonigarcia/seljup/OutputHandler.java
// public static final String BASE64_KEY = "base64";
//
// Path: src/main/java/io/github/bonigarcia/seljup/O... | setScreenshotFormat(BASE64_AND_PNG_KEY); |
chenmins/objector | objector/src/main/java/org/chenmin/open/objector/annotation/Column.java | // Path: objector/src/main/java/org/chenmin/open/objector/ColumnTypeObject.java
// public enum ColumnTypeObject {
// STRING, INTEGER, BOOLEAN, DOUBLE, BINARY;
// }
| import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.chenmin.open.objector.ColumnTypeObject;
| package org.chenmin.open.objector.annotation;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Inherited
public @interface Column {
/**
* Controls the actual kind name used in the datastore.
*/
String value() default "";
| // Path: objector/src/main/java/org/chenmin/open/objector/ColumnTypeObject.java
// public enum ColumnTypeObject {
// STRING, INTEGER, BOOLEAN, DOUBLE, BINARY;
// }
// Path: objector/src/main/java/org/chenmin/open/objector/annotation/Column.java
import java.lang.annotation.ElementType;
import java.lang.annotation... | ColumnTypeObject type() default ColumnTypeObject.STRING;
|
chenmins/objector | objector/src/main/java/org/chenmin/open/objector/annotation/Key.java | // Path: objector/src/main/java/org/chenmin/open/objector/PrimaryKeyTypeObject.java
// public enum PrimaryKeyTypeObject {
// STRING, INTEGER, BINARY;
// }
| import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.chenmin.open.objector.PrimaryKeyTypeObject;
| package org.chenmin.open.objector.annotation;
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Inherited
public @interface Key {
/**
* Controls the actual kind name used in the datastore.
*/
String value() default "";
| // Path: objector/src/main/java/org/chenmin/open/objector/PrimaryKeyTypeObject.java
// public enum PrimaryKeyTypeObject {
// STRING, INTEGER, BINARY;
// }
// Path: objector/src/main/java/org/chenmin/open/objector/annotation/Key.java
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
... | PrimaryKeyTypeObject type() default PrimaryKeyTypeObject.STRING;
|
chenmins/objector | objector-test/src/test/java/org/chenmin/open/objector/test/Custom.java | // Path: objector-ots/src/main/java/org/chenmin/open/objector/BooleanIntrospector.java
// public class BooleanIntrospector implements BeanIntrospector{
// @Override
// public void introspect(IntrospectionContext icontext) throws IntrospectionException {
// for (Method m : icontext.getTargetClass().ge... | import org.apache.commons.beanutils.BeanIntrospector;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.beanutils.DynaBean;
import org.apache.commons.beanutils.DynaProperty;
import org.apache.commons.beanutils.WrapDynaBean;
import org.chenm... | package org.chenmin.open.objector.test;
public class Custom {
public static class Test {
private Integer a;
private Boolean b;
private Boolean c;
public Integer getA() {
return a;
}
public void setA(Integer a) {
this.a = a;
}
public Boolean getB() {
return b;
}
public... | // Path: objector-ots/src/main/java/org/chenmin/open/objector/BooleanIntrospector.java
// public class BooleanIntrospector implements BeanIntrospector{
// @Override
// public void introspect(IntrospectionContext icontext) throws IntrospectionException {
// for (Method m : icontext.getTargetClass().ge... | BeanIntrospector a = new BooleanIntrospector();
|
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/AbstractIterator.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkState(boolean expression) {
// if (!expression) {
// throw new IllegalStateException();
// }
// }
| import java.util.NoSuchElementException;
import static com.fernandocejas.arrow.checks.Preconditions.checkState; | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkState(boolean expression) {
// if (!expression) {
// throw new IllegalStateException();
// }
// }
// Path: src/main/java/com/fernandocejas/arrow/collections/AbstractIterator.java
import java.util.NoSuchElementE... | checkState(state != State.FAILED); |
android10/arrow | src/main/java/com/fernandocejas/arrow/strings/Joiner.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {
// if (reference == null) {
// throw new NullPointerException();
// }
// return reference;
// }
| import java.io.IOException;
import java.util.AbstractList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkNotNull; | /**
* Copyright (C) 2008 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {
// if (reference == null) {
// throw new NullPointerException();
// }
// return reference;
// }
// Path: src/main/java/com/fernandocejas/arrow/strings/Joiner.java
import java.io.IOExce... | this.separator = checkNotNull(separator); |
android10/arrow | src/main/java/com/fernandocejas/arrow/optional/Absent.java | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | import com.fernandocejas.arrow.functions.Function;
import java.util.Collections;
import java.util.Set;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkNotNull; | /**
* Copyright (C) 2011 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); |
android10/arrow | src/main/java/com/fernandocejas/arrow/optional/Absent.java | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | import com.fernandocejas.arrow.functions.Function;
import java.util.Collections;
import java.util.Set;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkNotNull; | }
@Override
public T get() {
throw new IllegalStateException("Optional.get() cannot be called on an absent value");
}
@Override
public T or(T defaultValue) {
return checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)");
}
@SuppressWarnings("unchecked") // safe covar... | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | public <V> Optional<V> transform(Function<? super T, V> function) { |
android10/arrow | src/main/java/com/fernandocejas/arrow/optional/Present.java | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | import com.fernandocejas.arrow.functions.Function;
import java.util.Collections;
import java.util.Set;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkNotNull; | /**
* Copyright (C) 2011 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)"); |
android10/arrow | src/main/java/com/fernandocejas/arrow/optional/Present.java | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | import com.fernandocejas.arrow.functions.Function;
import java.util.Collections;
import java.util.Set;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkNotNull; | }
@Override
public T get() {
return reference;
}
@Override
public T or(T defaultValue) {
checkNotNull(defaultValue, "use Optional.orNull() instead of Optional.or(null)");
return reference;
}
@Override
public Optional<T> or(Optional<? extends T> secondChoice) {
checkNotNull(secondCho... | // Path: src/main/java/com/fernandocejas/arrow/functions/Function.java
// public interface Function<F, T> {
// /**
// * Returns the result of applying this function to {@code input}. This method is <i>generally
// * expected</i>, but not absolutely required, to have the following properties:
// *
// * <ul... | public <V> Optional<V> transform(Function<? super T, V> function) { |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/ReverseList.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | import java.util.AbstractList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex;
import static com.fernandocejas.arrow.checks.P... | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | this.forwardList = checkNotNull(forwardList); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/ReverseList.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | import java.util.AbstractList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex;
import static com.fernandocejas.arrow.checks.P... | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | checkElementIndex(index, size); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/ReverseList.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | import java.util.AbstractList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex;
import static com.fernandocejas.arrow.checks.P... | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | checkPositionIndex(index, size); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/ReverseList.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | import java.util.AbstractList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex;
import static com.fernandocejas.arrow.checks.P... | forwardList.clear();
}
@Override
public T remove(int index) {
return forwardList.remove(reverseIndex(index));
}
@Override
protected void removeRange(int fromIndex, int toIndex) {
subList(fromIndex, toIndex).clear();
}
@Override
public T set(int index, @Nullable T element) {
return f... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | checkPositionIndexes(fromIndex, toIndex, size()); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/ReverseList.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | import java.util.AbstractList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import org.jetbrains.annotations.Nullable;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex;
import static com.fernandocejas.arrow.checks.P... | return forwardIterator.previous();
}
@Override
public int nextIndex() {
return reversePosition(forwardIterator.nextIndex());
}
@Override
public T previous() {
if (!hasPrevious()) {
throw new NoSuchElementException();
}
canRemoveOrSet = true;
return f... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNotNull(T reference) {... | checkState(canRemoveOrSet); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/Partition.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
| import java.util.AbstractList;
import java.util.List;
import static com.fernandocejas.arrow.checks.Preconditions.checkElementIndex; | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static int checkElementIndex(int index, int size) {
// return checkElementIndex(index, size, "index");
// }
// Path: src/main/java/com/fernandocejas/arrow/collections/Partition.java
import java.util.AbstractList;
import java.util.Lis... | checkElementIndex(index, size()); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/Lists.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkArgument(boolean expression) {
// if (!expression) {
// throw new IllegalArgumentException();
// }
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNot... | import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.RandomAccess;
import static com.fernandocejas.arrow.checks.Preconditions.checkArgument;
import static com.fernandocejas.arrow.checks.Prec... | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkArgument(boolean expression) {
// if (!expression) {
// throw new IllegalArgumentException();
// }
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNot... | checkNotNull(elements); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/Lists.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkArgument(boolean expression) {
// if (!expression) {
// throw new IllegalArgumentException();
// }
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNot... | import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.RandomAccess;
import static com.fernandocejas.arrow.checks.Preconditions.checkArgument;
import static com.fernandocejas.arrow.checks.Prec... | return list;
}
/**
* Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557
*/
static <T> List<T> cast(Iterable<T> iterable) {
return (List<T>) iterable;
}
/**
* Returns consecutive {@linkplain List#subList(int, int) sublists} of a list,
* each of the same size (the final list may ... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkArgument(boolean expression) {
// if (!expression) {
// throw new IllegalArgumentException();
// }
// }
//
// Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static <T> T checkNot... | checkArgument(size > 0); |
android10/arrow | src/main/java/com/fernandocejas/arrow/collections/CollectPreconditions.java | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkState(boolean expression) {
// if (!expression) {
// throw new IllegalStateException();
// }
// }
| import static com.fernandocejas.arrow.checks.Preconditions.checkState; | /**
* Copyright (C) 2007 The Guava Authors
*
* 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 agr... | // Path: src/main/java/com/fernandocejas/arrow/checks/Preconditions.java
// public static void checkState(boolean expression) {
// if (!expression) {
// throw new IllegalStateException();
// }
// }
// Path: src/main/java/com/fernandocejas/arrow/collections/CollectPreconditions.java
import static com.fernandoc... | checkState(canRemove, "no calls to next() since the last call to remove()"); |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/ReverseIntIterator32.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.WORD_IN_BITS;
import com.googlecode.javaewah.IntIterator; | }
@Override
public int next() {
final int answer;
if (literalHasNext()) {
final int t = this.word & -this.word;
answer = this.literalPosition - Integer.bitCount(t - 1);
this.word ^= t;
} else {
answer = this.position--;
}
... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | this.runningLength -= WORD_IN_BITS * (rlw.getRunningLength() + this.wordLength); |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/symmetric/ThresholdFuncBitmap32.java | // Path: src/main/java/com/googlecode/javaewah32/BitmapStorage32.java
// public interface BitmapStorage32 {
//
// /**
// * Adding words directly to the bitmap (for expert use).
// *
// * This is normally how you add data to the array. So you add bits in
// * streams of 8*8 bits.
// *
// ... | import com.googlecode.javaewah32.BitmapStorage32;
import java.util.Arrays; | package com.googlecode.javaewah32.symmetric;
/**
* A threshold Boolean function returns true if the number of true values exceed
* a threshold. It is a symmetric Boolean function.
*
* This class implements an algorithm described in the following paper:
*
* Owen Kaser and Daniel Lemire, Compressed bitmap inde... | // Path: src/main/java/com/googlecode/javaewah32/BitmapStorage32.java
// public interface BitmapStorage32 {
//
// /**
// * Adding words directly to the bitmap (for expert use).
// *
// * This is normally how you add data to the array. So you add bits in
// * streams of 8*8 bits.
// *
// ... | public void dispatch(BitmapStorage32 out, int runBegin, int runend) { |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/ClearIntIterator32.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import com.googlecode.javaewah.IntIterator;
import static com.googlecode.javaewah32.EWAHCompressedBitmap32.WORD_IN_BITS; | while (!runningHasNext() && !literalHasNext()) {
if (!this.ewahIter.hasNext()) {
return false;
}
setRunningLengthWord(this.ewahIter.next());
}
return true;
}
@Override
public boolean hasNext() {
return this.hasNext;
}
... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | WORD_IN_BITS * rlw.getRunningLength() + this.position); |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/IteratorAggregation32.java | // Path: src/main/java/com/googlecode/javaewah/CloneableIterator.java
// public interface CloneableIterator<E> extends Cloneable {
//
// /**
// * @return whether there is more
// */
// boolean hasNext();
//
// /**
// * @return the next element
// */
// E next();
//
// /**
// ... | import com.googlecode.javaewah.CloneableIterator;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList; | int l = i.getRunningLength();
if (pos + l > bitmap.length) {
if (!i.getRunningBit()) {
for (int k = pos; k < bitmap.length; ++k)
bitmap[k] = 0;
}
i.discardFirstWords(howMany);
... | // Path: src/main/java/com/googlecode/javaewah/CloneableIterator.java
// public interface CloneableIterator<E> extends Cloneable {
//
// /**
// * @return whether there is more
// */
// boolean hasNext();
//
// /**
// * @return the next element
// */
// E next();
//
// /**
// ... | class ORIt implements CloneableIterator<EWAHIterator32> { |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/IntIteratorImpl32.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.WORD_IN_BITS;
import com.googlecode.javaewah.IntIterator; | public boolean moveToNext() {
while (!runningHasNext() && !literalHasNext()) {
if (!this.ewahIter.hasNext()) {
return false;
}
setRunningLengthWord(this.ewahIter.next());
}
return true;
}
@Override
public boolean hasNext() {
... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | this.runningLength = WORD_IN_BITS * rlw.getRunningLength() |
lemire/javaewah | src/main/java/com/googlecode/javaewah/IntIteratorOverIteratingRLW.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
| import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS; | private boolean moveToNext() {
while (!runningHasNext() && !literalHasNext()) {
if (this.parent.next())
setupForCurrentRunningLengthWord();
else
return false;
}
return true;
}
@Override
public boolean hasNext() {
re... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
// Path: src/main/java/com/googlecode/javaewah/IntIteratorOverIteratingRLW.java
import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS;
private boolean moveToNext() {
wh... | this.runningLength = WORD_IN_BITS * (int) this.parent.getRunningLength() + this.position; |
lemire/javaewah | src/test/java/com/googlecode/javaewah32/IteratorAggregation32Test.java | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.maxSizeInBits;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
import org.junit.Test;
import com.googlecode.javaewah.synth.ClusteredDataGenerator; | package com.googlecode.javaewah32;
/*
* Copyright 2009-2016, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, Google Inc., Veronika Zenz, Owen Kaser, Gregory Ssi-Yan-Kai, Rory Graves
* Licensed under the Apache License, Version 2.0.
*/
/**
* Tests specifically for iterators.
*/
public class IteratorA... | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | final ClusteredDataGenerator cdg = new ClusteredDataGenerator( |
lemire/javaewah | src/test/java/com/googlecode/javaewah32/IteratorAggregation32Test.java | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.maxSizeInBits;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
import org.junit.Test;
import com.googlecode.javaewah.synth.ClusteredDataGenerator; | this.sparsity += 3;
return ewah;
}
@Override
public void remove() {
// unimplemented
}
};
}
/**
*
*/
@Test
public void testAnd() {
for (int N = 1; N < 10; ++N) {
Syst... | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | x1.setSizeInBits(maxSizeInBits(x), false); |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/BufferedIterator32.java | // Path: src/main/java/com/googlecode/javaewah/CloneableIterator.java
// public interface CloneableIterator<E> extends Cloneable {
//
// /**
// * @return whether there is more
// */
// boolean hasNext();
//
// /**
// * @return the next element
// */
// E next();
//
// /**
// ... | import com.googlecode.javaewah.CloneableIterator; | package com.googlecode.javaewah32;
/*
* Copyright 2009-2016, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, Google Inc., Veronika Zenz, Owen Kaser, Gregory Ssi-Yan-Kai, Rory Graves
* Licensed under the Apache License, Version 2.0.
*/
/**
* This class can be used to iterate over blocks of bitmap data.
... | // Path: src/main/java/com/googlecode/javaewah/CloneableIterator.java
// public interface CloneableIterator<E> extends Cloneable {
//
// /**
// * @return whether there is more
// */
// boolean hasNext();
//
// /**
// * @return the next element
// */
// E next();
//
// /**
// ... | final CloneableIterator<EWAHIterator32> iterator) { |
lemire/javaewah | src/test/java/com/googlecode/javaewah32/ThresholdFuncBitmap32Test.java | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.maxSizeInBits;
import org.junit.Assert;
import org.junit.Test; | .equals(ewah1));
Assert.assertTrue(EWAHCompressedBitmap32.threshold(1, ewah2)
.equals(ewah2));
Assert.assertTrue(EWAHCompressedBitmap32.threshold(1, ewah3)
.equals(ewah3));
Assert.assertTrue(EWAHCompressedBitmap32.threshold(2, ewah1,
... | // Path: src/main/java/com/googlecode/javaewah32/EWAHCompressedBitmap32.java
// static int maxSizeInBits(final EWAHCompressedBitmap32... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap32 bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// ... | ewahandth.setSizeInBitsWithinLastWord(maxSizeInBits(ewah1, ewah2, ewah3)); |
lemire/javaewah | src/test/java/com/googlecode/javaewah32/IntIteratorOverIteratingRLW32Test.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import java.util.Iterator;
import org.junit.Test;
import com.googlecode.javaewah.IntIterator;
import static org.junit.Assert.*; | EWAHCompressedBitmap32 e1 = EWAHCompressedBitmap32.bitmapOf(0, 2, 1000, 10001);
EWAHCompressedBitmap32 e2 = new EWAHCompressedBitmap32();
for (int k = 64; k < 450; ++k)
e2.set(k);
EWAHCompressedBitmap32 e3 = new EWAHCompressedBitmap32();
for (int k = 64; k < 450; ++k)
e2.set(400 * k);
assertEquals(Ite... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | IntIterator ii = IteratorUtil32.toSetBitsIntIterator(e.getIteratingRLW()); |
lemire/javaewah | src/test/java/com/googlecode/javaewah/IteratorAggregationTest.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | import static com.googlecode.javaewah.EWAHCompressedBitmap.maxSizeInBits;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
import org.junit.Test;
import com.googlecode.javaewah.synth.ClusteredDataGenerator; | package com.googlecode.javaewah;
/*
* Copyright 2009-2016, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, Google Inc., Veronika Zenz, Owen Kaser, Gregory Ssi-Yan-Kai, Rory Graves
* Licensed under the Apache License, Version 2.0.
*/
/**
* Tests specifically for iterators.
*/
public class IteratorAgg... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | final ClusteredDataGenerator cdg = new ClusteredDataGenerator(123); |
lemire/javaewah | src/test/java/com/googlecode/javaewah/IteratorAggregationTest.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | import static com.googlecode.javaewah.EWAHCompressedBitmap.maxSizeInBits;
import static org.junit.Assert.assertTrue;
import java.util.Iterator;
import org.junit.Test;
import com.googlecode.javaewah.synth.ClusteredDataGenerator; | }
this.sparsity += 3;
return ewah;
}
@Override
public void remove() {
// unimplemented
}
};
}
/**
*
*/
@Test
public void testAnd() {
for (int N = 1; N < 10; ++N) ... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | x1.setSizeInBits(maxSizeInBits(x), false); |
lemire/javaewah | src/main/java/com/googlecode/javaewah/ClearIntIterator.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
| import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS; | while (!runningHasNext() && !literalHasNext()) {
if (!this.ewahIter.hasNext()) {
return false;
}
setRunningLengthWord(this.ewahIter.next());
}
return true;
}
@Override
public boolean hasNext() {
return this.hasNext;
}
... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
// Path: src/main/java/com/googlecode/javaewah/ClearIntIterator.java
import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS;
while (!runningHasNext() && !literalHasNext()) {... | WORD_IN_BITS * (int) rlw.getRunningLength() + this.position); |
lemire/javaewah | src/main/java/com/googlecode/javaewah/symmetric/ThresholdFuncBitmap.java | // Path: src/main/java/com/googlecode/javaewah/BitmapStorage.java
// public interface BitmapStorage {
//
// /**
// * Adding words directly to the bitmap (for expert use).
// *
// * This is normally how you add data to the array. So you add bits in
// * streams of 8*8 bits.
// *
// * ... | import com.googlecode.javaewah.BitmapStorage;
import java.util.Arrays; | package com.googlecode.javaewah.symmetric;
/**
* A threshold Boolean function returns true if the number of true values exceed
* a threshold. It is a symmetric Boolean function.
*
* This class implements an algorithm described in the following paper:
*
* Owen Kaser and Daniel Lemire, Compressed bitmap indexe... | // Path: src/main/java/com/googlecode/javaewah/BitmapStorage.java
// public interface BitmapStorage {
//
// /**
// * Adding words directly to the bitmap (for expert use).
// *
// * This is normally how you add data to the array. So you add bits in
// * streams of 8*8 bits.
// *
// * ... | public void dispatch(BitmapStorage out, int runBegin, int runEnd) { |
lemire/javaewah | src/main/java/com/googlecode/javaewah/datastructure/ImmutableBitSet.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import java.nio.LongBuffer;
import java.util.Iterator;
import com.googlecode.javaewah.IntIterator; | return true;
}
/**
* get value of bit i
*
* @param i index
* @return value of the bit
*/
public boolean get(final int i) {
return (this.data.get(i / 64) & (1l << (i % 64))) != 0;
}
@Override
public int hashCode() {
int b = 31;
long hash = 0;
int length = thi... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | public IntIterator intIterator() { |
lemire/javaewah | src/main/java/com/googlecode/javaewah/IntIteratorImpl.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
| import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS; | public boolean moveToNext() {
while (!runningHasNext() && !literalHasNext()) {
if (!this.ewahIter.hasNext()) {
return false;
}
setRunningLengthWord(this.ewahIter.next());
}
return true;
}
@Override
public boolean hasNext() {
... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
// Path: src/main/java/com/googlecode/javaewah/IntIteratorImpl.java
import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS;
public boolean moveToNext() {
while (!running... | this.runningLength = WORD_IN_BITS * (int) rlw.getRunningLength() + this.position; |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/ChunkIteratorImpl32.java | // Path: src/main/java/com/googlecode/javaewah/ChunkIterator.java
// public interface ChunkIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next bit
// *
// * @return ... | import static com.googlecode.javaewah32.EWAHCompressedBitmap32.WORD_IN_BITS;
import com.googlecode.javaewah.ChunkIterator; | @Override
public void move() {
move(this.nextLength);
}
@Override
public void move(int bits) {
this.nextLength -= bits;
if(this.nextLength <= 0) {
do {
this.nextBit = null;
updateNext();
this.hasNext = moveToNextRLW... | // Path: src/main/java/com/googlecode/javaewah/ChunkIterator.java
// public interface ChunkIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next bit
// *
// * @return ... | this.position + WORD_IN_BITS * rlw.getRunningLength()); |
lemire/javaewah | src/main/java/com/googlecode/javaewah/datastructure/BitSet.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import com.googlecode.javaewah.IntIterator;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Arrays;
import java.util.Iterator; | this.data[i] = ~this.data[i];
this.data[endword] ^= ~0L >>> -end;
}
/**
* Get the value of the bit. This might throw an exception if size() is insufficient, consider calling resize().
* @param i index
* @return value of the bit
*/
public boolean get(final int i) {
... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | public IntIterator intIterator() { |
lemire/javaewah | src/main/java/com/googlecode/javaewah/ChunkIteratorImpl.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
| import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS; | @Override
public void move() {
move(this.nextLength);
}
@Override
public void move(int bits) {
this.nextLength -= bits;
if(this.nextLength <= 0) {
do {
this.nextBit = null;
updateNext();
this.hasNext = moveToNextRLW... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
// Path: src/main/java/com/googlecode/javaewah/ChunkIteratorImpl.java
import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS;
@Override
public void move() {
move(thi... | this.position + WORD_IN_BITS * (int) rlw.getRunningLength()); |
lemire/javaewah | src/main/java/com/googlecode/javaewah32/IntIteratorOverIteratingRLW32.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import com.googlecode.javaewah.IntIterator;
import static com.googlecode.javaewah32.EWAHCompressedBitmap32.WORD_IN_BITS; | private boolean moveToNext() {
while (!runningHasNext() && !literalHasNext()) {
if (this.parent.next())
setupForCurrentRunningLengthWord();
else
return false;
}
return true;
}
@Override
public boolean hasNext() {
re... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | this.runningLength = WORD_IN_BITS |
lemire/javaewah | src/main/java/com/googlecode/javaewah/ReverseIntIterator.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
| import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS; | }
@Override
public int next() {
final int answer;
if (literalHasNext()) {
final long t = this.word & -this.word;
answer = this.literalPosition - Long.bitCount(t - 1);
this.word ^= t;
} else {
answer = this.position--;
}
... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// public static final int WORD_IN_BITS = 64;
// Path: src/main/java/com/googlecode/javaewah/ReverseIntIterator.java
import static com.googlecode.javaewah.EWAHCompressedBitmap.WORD_IN_BITS;
}
@Override
public int next() {
f... | this.runningLength -= WORD_IN_BITS * (rlw.getRunningLength() + this.wordLength); |
lemire/javaewah | src/test/java/com/googlecode/javaewah/datastructure/BitSetTest.java | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | import static org.junit.Assert.*;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
imp... | package com.googlecode.javaewah.datastructure;
public class BitSetTest
{
public static ImmutableBitSet toImmutableBitSet(BitSet b) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
b.serialize(new DataOutputStream(bos));
ByteBuffer bb = ByteBuffer.wrap(bos.toByteArray());
... | // Path: src/main/java/com/googlecode/javaewah/IntIterator.java
// public interface IntIterator {
//
// /**
// * Is there more?
// *
// * @return true, if there is more, false otherwise
// */
// boolean hasNext();
//
// /**
// * Return the next integer
// *
// * @return ... | IntIterator is = Bitmap1.intIterator(); |
lemire/javaewah | src/test/java/com/googlecode/javaewah/ThresholdFuncBitmapTest.java | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | import static com.googlecode.javaewah.EWAHCompressedBitmap.maxSizeInBits;
import org.junit.Assert;
import org.junit.Test; | EWAHCompressedBitmap ewah3 = EWAHCompressedBitmap.bitmapOf(1,
110, 1000, 1101, 1200, 1201, 31416, 31417);
Assert.assertTrue(EWAHCompressedBitmap.threshold(1, ewah1)
.equals(ewah1));
Assert.assertTrue(EWAHCompressedBitmap.threshold(1, ewah2)
.equal... | // Path: src/main/java/com/googlecode/javaewah/EWAHCompressedBitmap.java
// static int maxSizeInBits(final EWAHCompressedBitmap... bitmaps) {
// int maxSizeInBits = 0;
// for(EWAHCompressedBitmap bitmap : bitmaps) {
// maxSizeInBits = Math.max(maxSizeInBits, bitmap.sizeInBits());
// }
// r... | ewahandth.setSizeInBitsWithinLastWord(maxSizeInBits(ewah1, ewah2, ewah3)); |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/tokenizer/WordTokenizer.java | // Path: JHazm/src/main/java/jhazm/utility/RegexPattern.java
// public class RegexPattern {
// private final String Pattern;
// private final String Replace;
// public RegexPattern(String pattern, String replace) {
// this.Pattern = pattern;
// this.Replace = replace;
// }
//
// pub... | import jhazm.utility.RegexPattern;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*; | package jhazm.tokenizer;
/**
*
* @author Mojtaba Khallash
*/
public class WordTokenizer {
public static WordTokenizer instance;
List<String> verbs;
private boolean joinVerbParts = true;
private HashSet<String> beforeVerbs;
private HashSet<String> afterVerbs; | // Path: JHazm/src/main/java/jhazm/utility/RegexPattern.java
// public class RegexPattern {
// private final String Pattern;
// private final String Replace;
// public RegexPattern(String pattern, String replace) {
// this.Pattern = pattern;
// this.Replace = replace;
// }
//
// pub... | private RegexPattern pattern; |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/Normalizer.java | // Path: JHazm/src/main/java/jhazm/utility/MakeTrans.java
// public class MakeTrans {
// private final Map<Character, Character> d;
//
// public MakeTrans(String intab, String outab) {
// d = new HashMap<>();
// for (int i = 0; i < intab.length(); i++)
// d.put(intab.charAt(i), outa... | import jhazm.utility.MakeTrans;
import jhazm.utility.RegexPattern;
import java.util.ArrayList;
import java.util.List; | package jhazm;
/**
* @author Mojtaba Khallash
*/
public class Normalizer {
public static Normalizer instance;
private final String puncAfter = "!:\\.،؛؟»\\]\\)\\}";
private final String puncBefore = "«\\[\\(\\{";
private boolean characterRefinement = true; | // Path: JHazm/src/main/java/jhazm/utility/MakeTrans.java
// public class MakeTrans {
// private final Map<Character, Character> d;
//
// public MakeTrans(String intab, String outab) {
// d = new HashMap<>();
// for (int i = 0; i < intab.length(); i++)
// d.put(intab.charAt(i), outa... | private List<RegexPattern> characterRefinementPatterns; |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/Normalizer.java | // Path: JHazm/src/main/java/jhazm/utility/MakeTrans.java
// public class MakeTrans {
// private final Map<Character, Character> d;
//
// public MakeTrans(String intab, String outab) {
// d = new HashMap<>();
// for (int i = 0; i < intab.length(); i++)
// d.put(intab.charAt(i), outa... | import jhazm.utility.MakeTrans;
import jhazm.utility.RegexPattern;
import java.util.ArrayList;
import java.util.List; | package jhazm;
/**
* @author Mojtaba Khallash
*/
public class Normalizer {
public static Normalizer instance;
private final String puncAfter = "!:\\.،؛؟»\\]\\)\\}";
private final String puncBefore = "«\\[\\(\\{";
private boolean characterRefinement = true;
private List<RegexPattern> characterRe... | // Path: JHazm/src/main/java/jhazm/utility/MakeTrans.java
// public class MakeTrans {
// private final Map<Character, Character> d;
//
// public MakeTrans(String intab, String outab) {
// d = new HashMap<>();
// for (int i = 0; i < intab.length(); i++)
// d.put(intab.charAt(i), outa... | private MakeTrans translations; |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/StemmerTests.java | // Path: JHazm/src/main/java/jhazm/Stemmer.java
// public class Stemmer {
// public static Stemmer instance;
// private final String[] ends = new String[] {
// "ات", "ان", "ترین", "تر", "م", "ت", "ش", "یی", "ی", "ها", "ٔ", "ا", //
// };
//
// public static Stemmer i() {
// if (instance... | import jhazm.Stemmer;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package jhazm.test;
/**
*
* @author Mojtaba Khallash
*/
public class StemmerTests {
@Test
public void stemTest() { | // Path: JHazm/src/main/java/jhazm/Stemmer.java
// public class Stemmer {
// public static Stemmer instance;
// private final String[] ends = new String[] {
// "ات", "ان", "ترین", "تر", "م", "ت", "ش", "یی", "ی", "ها", "ٔ", "ا", //
// };
//
// public static Stemmer i() {
// if (instance... | Stemmer stemmer = new Stemmer(); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/PersicaReaderTest.java | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | import jhazm.model.Doc;
import jhazm.reader.PersicaReader;
import org.junit.Test;
import java.util.Iterator;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
* Created by Mojtaba on 30/10/2015.
*/
public class PersicaReaderTest {
@Test
public void getDocsTest() { | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | PersicaReader pr = new PersicaReader(); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/PersicaReaderTest.java | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | import jhazm.model.Doc;
import jhazm.reader.PersicaReader;
import org.junit.Test;
import java.util.Iterator;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
* Created by Mojtaba on 30/10/2015.
*/
public class PersicaReaderTest {
@Test
public void getDocsTest() {
PersicaReader pr = new PersicaReader();
int expected = 843656; | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | Iterator<Doc> iter = pr.getDocs().iterator(); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/PeykareReaderTest.java | // Path: JHazm/src/main/java/jhazm/reader/PeykareReader.java
// public class PeykareReader {
// private static List<String> cpos;
// private static WordTokenizer tokenizer = null;
//
//
// static {
// try {
// cpos = Arrays.asList(new String[] {
// "N", /... | import edu.stanford.nlp.ling.TaggedWord;
import jhazm.reader.PeykareReader;
import org.junit.Test;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
* Created by Mojtaba on 30/10/2015.
*/
public class PeykareReaderTest {
@Test
public void coarsePOSTest() {
List<String> input = Arrays.asList(new String[]{ "N", "COM", "SING" });
String expected = "N"; | // Path: JHazm/src/main/java/jhazm/reader/PeykareReader.java
// public class PeykareReader {
// private static List<String> cpos;
// private static WordTokenizer tokenizer = null;
//
//
// static {
// try {
// cpos = Arrays.asList(new String[] {
// "N", /... | String actual = PeykareReader.coarsePOS(input); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/POSTaggerTest.java | // Path: JHazm/src/main/java/jhazm/POSTagger.java
// public class POSTagger {
// public static POSTagger instance;
// private MaxentTagger tagger;
//
// public POSTagger() throws IOException {
// this("resources/models/persian.tagger");
// }
//
// public POSTagger(String pathToModel) throw... | import edu.stanford.nlp.ling.TaggedWord;
import edu.stanford.nlp.util.StringUtils;
import jhazm.POSTagger;
import org.junit.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals; | package jhazm.test;
/**
*
* @author Mojtaba Khallash
*/
public class POSTaggerTest {
@Test
public void batchTagTest() throws IOException { | // Path: JHazm/src/main/java/jhazm/POSTagger.java
// public class POSTagger {
// public static POSTagger instance;
// private MaxentTagger tagger;
//
// public POSTagger() throws IOException {
// this("resources/models/persian.tagger");
// }
//
// public POSTagger(String pathToModel) throw... | POSTagger tagger = new POSTagger(); |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/tokenizer/SentenceTokenizer.java | // Path: JHazm/src/main/java/jhazm/utility/RegexPattern.java
// public class RegexPattern {
// private final String Pattern;
// private final String Replace;
// public RegexPattern(String pattern, String replace) {
// this.Pattern = pattern;
// this.Replace = replace;
// }
//
// pub... | import jhazm.utility.RegexPattern;
import java.util.Arrays;
import java.util.List; | package jhazm.tokenizer;
/**
* @author Mojtaba Khallash
*/
public class SentenceTokenizer {
public static SentenceTokenizer instance; | // Path: JHazm/src/main/java/jhazm/utility/RegexPattern.java
// public class RegexPattern {
// private final String Pattern;
// private final String Replace;
// public RegexPattern(String pattern, String replace) {
// this.Pattern = pattern;
// this.Replace = replace;
// }
//
// pub... | private final RegexPattern pattern; |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/tokenizer/SentenceTokenizerTests.java | // Path: JHazm/src/main/java/jhazm/tokenizer/SentenceTokenizer.java
// public class SentenceTokenizer {
// public static SentenceTokenizer instance;
// private final RegexPattern pattern;
//
// public SentenceTokenizer() {
// this.pattern = new RegexPattern("([!\\.\\?⸮؟]+)[ \\n]+", "$1\n\n");
// ... | import jhazm.tokenizer.SentenceTokenizer;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertEquals; | package jhazm.test.tokenizer;
/**
*
* @author Mojtaba Khallash
*/
public class SentenceTokenizerTests {
public SentenceTokenizerTests() {
}
@Test
public void tokenizeTest() { | // Path: JHazm/src/main/java/jhazm/tokenizer/SentenceTokenizer.java
// public class SentenceTokenizer {
// public static SentenceTokenizer instance;
// private final RegexPattern pattern;
//
// public SentenceTokenizer() {
// this.pattern = new RegexPattern("([!\\.\\?⸮؟]+)[ \\n]+", "$1\n\n");
// ... | SentenceTokenizer senTokenizer = new SentenceTokenizer(); |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/reader/PersicaReader.java | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | import com.infomancers.collections.yield.Yielder;
import jhazm.model.Doc;
import org.apache.commons.lang3.StringUtils;
import java.io.*;
import java.nio.charset.Charset;
import java.util.*; | package jhazm.reader;
/**
* interfaces [Persica Corpus](https://sourceforge.net/projects/persica/)
*
* Created by Mojtaba on 30/10/2015.
*/
public class PersicaReader {
//
// Fields
//
private String persicaFile;
//
// Constructors
//
public PersicaReader() {
this("r... | // Path: JHazm/src/main/java/jhazm/model/Doc.java
// public class Doc {
// public int ID;
// public String Title;
// public String Text;
// public String Date;
// public String Time;
// public String Category;
// public String Category2;
//
// public Doc(int ID, String Title, String Tex... | public Iterable<Doc> getDocs() { return new YieldDoc(); } |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/reader/VerbValencyReader.java | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | import com.infomancers.collections.yield.Yielder;
import jhazm.model.Verb;
import java.io.*;
import java.nio.charset.Charset; | package jhazm.reader;
/**
* interfaces [Verb Valency Corpus](http://dadegan.ir/catalog/pervallex)
* Mohammad Sadegh Rasooli, Amirsaeid Moloodi, Manouchehr Kouhestani, & Behrouz Minaei Bidgoli. (2011). A Syntactic Valency Lexicon for Persian Verbs: The First Steps towards Persian Dependency Treebank. in 5th Languag... | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | public Iterable<Verb> getVerbs() throws IOException { return new YieldVernValency(); } |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/BijankhanReaderTest.java | // Path: JHazm/src/main/java/jhazm/reader/BijankhanReader.java
// public class BijankhanReader {
// //
// // Fields
// //
//
// private final String[] punctuation = new String[] { "#", "*", ".", "؟", "!" };
//
// private String bijankhanFile;
// private boolean joinedVerbParts;
// private ... | import edu.stanford.nlp.ling.TaggedWord;
import jhazm.reader.BijankhanReader;
import org.junit.Test;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
*
* @author Mojtaba Khallash
*/
public class BijankhanReaderTest {
@Test
public void posMapTest() throws IOException { | // Path: JHazm/src/main/java/jhazm/reader/BijankhanReader.java
// public class BijankhanReader {
// //
// // Fields
// //
//
// private final String[] punctuation = new String[] { "#", "*", ".", "؟", "!" };
//
// private String bijankhanFile;
// private boolean joinedVerbParts;
// private ... | BijankhanReader reader = new BijankhanReader(false); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/NormalizerTests.java | // Path: JHazm/src/main/java/jhazm/Normalizer.java
// public class Normalizer {
// public static Normalizer instance;
// private final String puncAfter = "!:\\.،؛؟»\\]\\)\\}";
// private final String puncBefore = "«\\[\\(\\{";
// private boolean characterRefinement = true;
// private List<RegexPatte... | import jhazm.Normalizer;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package jhazm.test;
/**
*
* @author Mojtaba Khallash
*/
public class NormalizerTests {
@Test
public void characterRefinementTest() { | // Path: JHazm/src/main/java/jhazm/Normalizer.java
// public class Normalizer {
// public static Normalizer instance;
// private final String puncAfter = "!:\\.،؛؟»\\]\\)\\}";
// private final String puncBefore = "«\\[\\(\\{";
// private boolean characterRefinement = true;
// private List<RegexPatte... | Normalizer normalizer = new Normalizer(true, false, false); |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/reader/HamshahriReader.java | // Path: JHazm/src/main/java/jhazm/model/Document.java
// public class Document {
// private String ID;
// private String Number;
// private String OriginalFile;
// private String Issue;
// private String WesternDate;
// private String PersianDate;
// private String EnglishCategory;
// p... | import com.infomancers.collections.yield.Yielder;
import jhazm.model.Document;
import jhazm.utility.RegexPattern;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.File;
import java.util.ArrayList;
import ja... | package jhazm.reader;
/**
* interfaces Hamshahri Corpus (http://ece.ut.ac.ir/dbrg/hamshahri/files/HAM2/Corpus.zip)
* that you must download and extract it.
*
* @author Mojtaba Khallash
*/
public class HamshahriReader {
private final String[] invalidFiles = new String[] {
"hamshahri.dtd", "HAM2-960... | // Path: JHazm/src/main/java/jhazm/model/Document.java
// public class Document {
// private String ID;
// private String Number;
// private String OriginalFile;
// private String Issue;
// private String WesternDate;
// private String PersianDate;
// private String EnglishCategory;
// p... | private RegexPattern paragraphPattern; |
mojtaba-khallash/JHazm | JHazm/src/main/java/jhazm/reader/HamshahriReader.java | // Path: JHazm/src/main/java/jhazm/model/Document.java
// public class Document {
// private String ID;
// private String Number;
// private String OriginalFile;
// private String Issue;
// private String WesternDate;
// private String PersianDate;
// private String EnglishCategory;
// p... | import com.infomancers.collections.yield.Yielder;
import jhazm.model.Document;
import jhazm.utility.RegexPattern;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.File;
import java.util.ArrayList;
import ja... | "HAM2-970414.xml", "HAM2-970415.xml", "HAM2-970612.xml", "HAM2-970614.xml", "HAM2-970710.xml",
"HAM2-970712.xml", "HAM2-970713.xml", "HAM2-970717.xml", "HAM2-970719.xml", "HAM2-980317.xml",
"HAM2-040820.xml", "HAM2-040824.xml", "HAM2-040825.xml", "HAM2-040901.xml", "HAM2-040917.xml",
"HA... | // Path: JHazm/src/main/java/jhazm/model/Document.java
// public class Document {
// private String ID;
// private String Number;
// private String OriginalFile;
// private String Issue;
// private String WesternDate;
// private String PersianDate;
// private String EnglishCategory;
// p... | public Iterable<Document> getDocuments() { |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/VerbValencyReaderTest.java | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | import jhazm.model.Verb;
import jhazm.reader.VerbValencyReader;
import org.junit.Test;
import java.io.IOException;
import java.util.Iterator;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
* Created by Mojtaba on 30/10/2015.
*/
public class VerbValencyReaderTest {
@Test
public void getVerbsTest() throws IOException { | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | VerbValencyReader vv = new VerbValencyReader(); |
mojtaba-khallash/JHazm | JHazm/src/test/java/jhazm/test/reader/VerbValencyReaderTest.java | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | import jhazm.model.Verb;
import jhazm.reader.VerbValencyReader;
import org.junit.Test;
import java.io.IOException;
import java.util.Iterator;
import static org.junit.Assert.assertEquals; | package jhazm.test.reader;
/**
* Created by Mojtaba on 30/10/2015.
*/
public class VerbValencyReaderTest {
@Test
public void getVerbsTest() throws IOException {
VerbValencyReader vv = new VerbValencyReader();
String expected = "بر"; | // Path: JHazm/src/main/java/jhazm/model/Verb.java
// public class Verb {
// public String PastLightVerb;
// public String PresentLightVerb;
// public String Prefix;
// public String NonVerbalElement;
// public String Preposition;
// public String Valency;
//
// public Verb(String PastLight... | Iterator<Verb> iter = vv.getVerbs().iterator(); |
zohmg/zohmg | src/darling/src/java/fm/last/darling/hbase/HBaseUtils.java | // Path: src/darling/src/java/fm/last/darling/utils/Util.java
// public class Util {
//
// public static String epochtoYMD(long epoch) {
// Calendar thence = new GregorianCalendar();
// thence.setTimeInMillis(epoch * 1000);
// int year = thence.get(Calendar.YEAR);
// int month = thence.get(Calendar.M... | import fm.last.darling.utils.Util; | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | // Path: src/darling/src/java/fm/last/darling/utils/Util.java
// public class Util {
//
// public static String epochtoYMD(long epoch) {
// Calendar thence = new GregorianCalendar();
// thence.setTimeInMillis(epoch * 1000);
// int year = thence.get(Calendar.YEAR);
// int month = thence.get(Calendar.M... | String ymd = Util.epochtoYMD(epoch); |
zohmg/zohmg | src/darling/test/java/fm/last/darling/util/UtilTest.java | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
//
// Path: src/darling/src/jav... | import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import fm.last.darling.nspace.Dimension;
import fm.last.darling.utils.Util; | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
//
// Path: src/darling/src/jav... | String ymd = Util.epochtoYMD(1240300000); |
zohmg/zohmg | src/darling/test/java/fm/last/darling/util/UtilTest.java | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
//
// Path: src/darling/src/jav... | import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import fm.last.darling.nspace.Dimension;
import fm.last.darling.utils.Util; | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
//
// Path: src/darling/src/jav... | List<List<Dimension>> ret = Util.readRequestedProjections(yaml); |
zohmg/zohmg | src/darling/src/java/fm/last/darling/utils/Util.java | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
| import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Map;
import org.ho.yaml.Yaml;
import fm.last.darling.nspace.Dimension; | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | // Path: src/darling/src/java/fm/last/darling/nspace/Dimension.java
// public class Dimension {
// private String dimension;
//
// public Dimension(String dimension) {
// this.dimension = dimension;
// }
//
// public String toString() {
// return dimension;
// }
// }
// Path: src/darling/src/java/... | public static List<List<Dimension>> readRequestedProjections(File yamlFile) throws FileNotFoundException { |
zohmg/zohmg | src/darling/test/java/fm/last/darling/hbase/HBaseJSONOutputReaderTest.java | // Path: src/darling/src/java/fm/last/darling/hbase/HBaseJSONOutputReader.java
// public class HBaseJSONOutputReader extends OutputReader<ImmutableBytesWritable, Put> {
//
// private ImmutableBytesWritable rowkey;
// private Put put;
//
// // save the last seen line of output as Text
// // and the bytes, so t... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import org.apache.ha... | package fm.last.darling.hbase;
public class HBaseJSONOutputReaderTest {
String keyString1 = "pageviews-20080717";
String column1 = "country-domain-useragent-usertype:all-m.last.fm-other-all";
String keyString2 = "pageviews-20090101";
String column2 = "country:all";
@Test
public void test() throw... | // Path: src/darling/src/java/fm/last/darling/hbase/HBaseJSONOutputReader.java
// public class HBaseJSONOutputReader extends OutputReader<ImmutableBytesWritable, Put> {
//
// private ImmutableBytesWritable rowkey;
// private Put put;
//
// // save the last seen line of output as Text
// // and the bytes, so t... | HBaseJSONOutputReader outputReader = new HBaseJSONOutputReader(); |
plutext/docx4j-export-FO | src/docx4j-extras/PdfViaIText/org/docx4j/convert/out/pdf/viaIText/Conversion.java | // Path: src/main/java/org/docx4j/convert/out/pdf/viaXSLFO/PdfSettings.java
// public class PdfSettings extends FOSettings {
// }
| import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.xml.bind.JAXBElement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.docx4j.XmlUtils;
import org.docx4j.convert.out.pdf.viaXSLFO.Pd... | package org.docx4j.convert.out.pdf.viaIText;
public class Conversion extends org.docx4j.convert.out.pdf.PdfConversion {
protected static Logger log = LoggerFactory.getLogger(Conversion.class);
public Conversion(WordprocessingMLPackage wordMLPackage) {
super(wordMLPackage);
headerFooterPolicy = wordML... | // Path: src/main/java/org/docx4j/convert/out/pdf/viaXSLFO/PdfSettings.java
// public class PdfSettings extends FOSettings {
// }
// Path: src/docx4j-extras/PdfViaIText/org/docx4j/convert/out/pdf/viaIText/Conversion.java
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.u... | public void output(OutputStream os, PdfSettings settings) throws Docx4JException { |
plutext/docx4j-export-FO | src/test/java/org/docx4j/convert/out/XSLFO/TextBoxTest.java | // Path: src/main/java/org/docx4j/convert/out/fo/FOExporterVisitor.java
// public class FOExporterVisitor extends AbstractFOExporter {
// protected static final FOExporterVisitorDelegate EXPORTER_DELEGATE_INSTANCE = new
// FOExporterVisitorDelegate();
//
// protected static FOExporterVisitor instance = null;
//... | import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import javax.xml.bind.JAXBElement;
import org.apache.commons.io.FileUtils;
import org.docx4j.Docx4J;
import org.docx4j.XmlUtils;
import org.docx4j.convert.out.FOSettings;
import org.docx4j.convert.out.com... |
// style="position:absolute;margin-left:0;margin-top:0;width:186.95pt;height:110.55pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-left-percent:600;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bo... | // Path: src/main/java/org/docx4j/convert/out/fo/FOExporterVisitor.java
// public class FOExporterVisitor extends AbstractFOExporter {
// protected static final FOExporterVisitorDelegate EXPORTER_DELEGATE_INSTANCE = new
// FOExporterVisitorDelegate();
//
// protected static FOExporterVisitor instance = null;
//... | Exporter<FOSettings> exporter = FOExporterVisitor.getInstance(); |
plutext/docx4j-export-FO | src/main/java/org/docx4j/convert/out/pdf/PdfConversion.java | // Path: src/main/java/org/docx4j/convert/out/pdf/viaXSLFO/PdfSettings.java
// public class PdfSettings extends FOSettings {
// }
| import org.docx4j.openpackaging.exceptions.Docx4JException;
import java.io.OutputStream;
import org.docx4j.convert.out.pdf.viaXSLFO.PdfSettings; | /*
Licensed to Plutext Pty Ltd under one or more contributor license agreements.
* This file is part of docx4j.
docx4j is 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
... | // Path: src/main/java/org/docx4j/convert/out/pdf/viaXSLFO/PdfSettings.java
// public class PdfSettings extends FOSettings {
// }
// Path: src/main/java/org/docx4j/convert/out/pdf/PdfConversion.java
import org.docx4j.openpackaging.exceptions.Docx4JException;
import java.io.OutputStream;
import org.docx4j.convert.out... | public abstract void outputXSLFO(OutputStream os, PdfSettings settings) throws Docx4JException; |
plutext/docx4j-export-FO | src/main/java/org/docx4j/convert/out/fo/FOPictWriterFloatAvoided.java | // Path: src/main/java/org/docx4j/convert/out/fo/renderers/AbstractFORenderer.java
// public abstract class AbstractFORenderer implements FORenderer {
//
// protected static Logger log = LoggerFactory.getLogger(AbstractFORenderer.class);
//
// // TODO this needs to be rethought in an architectural sense,
// // s... | import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import java.util.Map;
import org.docx4j.XmlUtils;
import org.docx4j.convert.out.FORenderer;
import org.docx4j.convert.out.FOSettings;
import org.docx4j.convert.out.common.AbstractWmlConversionContext;
import o... |
</fo:table-cell>
</fo:table-row>
</fo:table-body>
*/
Element tbody = doc.createElementNS(XSL_FO, "table-body");
ret.appendChild(tbody);
Element trow = doc.createElementNS(XSL_FO, "table-row");
tbody.appendChild(trow);
// Cell 1 is the te... | // Path: src/main/java/org/docx4j/convert/out/fo/renderers/AbstractFORenderer.java
// public abstract class AbstractFORenderer implements FORenderer {
//
// protected static Logger log = LoggerFactory.getLogger(AbstractFORenderer.class);
//
// // TODO this needs to be rethought in an architectural sense,
// // s... | if (foRenderer instanceof AbstractFORenderer) { |
plutext/docx4j-export-FO | src/samples/docx4j/org/docx4j/samples/FONonXSLT.java | // Path: src/main/java/org/docx4j/convert/out/XSLFO/XSLFOExporterNonXSLT.java
// public class XSLFOExporterNonXSLT {
// private static Logger log = LoggerFactory.getLogger(XSLFOExporterNonXSLT.class);
// protected static final int DEFAULT_OUTPUT_SIZE = 102400;
//
// FOSettings foSettings = null;
//
// public XSL... | import java.io.OutputStream;
import org.docx4j.XmlUtils;
import org.docx4j.convert.out.FOSettings;
import org.docx4j.convert.out.XSLFO.XSLFOExporterNonXSLT;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.w3c.dom.Document; | /*
* Copyright 2012, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is 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/LICEN... | // Path: src/main/java/org/docx4j/convert/out/XSLFO/XSLFOExporterNonXSLT.java
// public class XSLFOExporterNonXSLT {
// private static Logger log = LoggerFactory.getLogger(XSLFOExporterNonXSLT.class);
// protected static final int DEFAULT_OUTPUT_SIZE = 102400;
//
// FOSettings foSettings = null;
//
// public XSL... | XSLFOExporterNonXSLT withoutXSLT = new XSLFOExporterNonXSLT(wmlPackage, |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/SearchQueryFactory.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.fasterxml.jackson.databind.JsonNode; | package com.codefork.refine;
public interface SearchQueryFactory {
SearchQuery createSearchQuery(JsonNode queryStruct);
| // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | SearchQuery createSearchQuery(String query, int limit, NameType nameType, String typeStrict); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/solr/SolrParseState.java | // Path: src/main/java/com/codefork/refine/parsers/ParseState.java
// public class ParseState {
//
// public boolean captureChars = false;
//
// public final List<Result> results = new ArrayList<>();
// public Result result = null;
//
// /** buffer for collecting contents of an Element as parser does... | import com.codefork.refine.parsers.ParseState;
import com.codefork.refine.resources.NameType;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.solr;
public class SolrParseState extends ParseState {
enum Field { ID, NAME }
Field fieldBeingCaptured;
List<String> multipleValues = new ArrayList<>();
// we don't yet support multiple name types for Solr records
// so this is the list we use for every result. | // Path: src/main/java/com/codefork/refine/parsers/ParseState.java
// public class ParseState {
//
// public boolean captureChars = false;
//
// public final List<Result> results = new ArrayList<>();
// public Result result = null;
//
// /** buffer for collecting contents of an Element as parser does... | List<NameType> nameTypes = new ArrayList<>(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/viaf/VIAFMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.viaf;
public class VIAFMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://rdf.freebase.com/ns/user/hangy/viaf"; | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static View VIEW = new View("http://viaf.org/viaf/{{id}}"); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/viaf/VIAFMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.viaf;
public class VIAFMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://rdf.freebase.com/ns/user/hangy/viaf";
private final static View VIEW = new View("http://viaf.org/viaf/{{id}}");
private final static String SCHEMA_... | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static List<NameType> DEFAULT_TYPES = new ArrayList<>(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/parsers/xml/XMLParser.java | // Path: src/main/java/com/codefork/refine/parsers/ParseState.java
// public class ParseState {
//
// public boolean captureChars = false;
//
// public final List<Result> results = new ArrayList<>();
// public Result result = null;
//
// /** buffer for collecting contents of an Element as parser does... | import com.codefork.refine.parsers.ParseState;
import com.codefork.refine.resources.Result;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Stack; | package com.codefork.refine.parsers.xml;
/**
* SAX parser handler. We use SAX b/c it's faster than loading a whole DOM.
*/
public abstract class XMLParser<R extends ParseState> extends DefaultHandler {
protected Map<String, StartElementHandler<R>> startElementHandlers = new HashMap<>();
protected Map<Stri... | // Path: src/main/java/com/codefork/refine/parsers/ParseState.java
// public class ParseState {
//
// public boolean captureChars = false;
//
// public final List<Result> results = new ArrayList<>();
// public Result result = null;
//
// /** buffer for collecting contents of an Element as parser does... | public List<Result> getResults() { |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/openlibrary/OpenLibraryMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.openlibrary;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OpenLibraryMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://rdf.freebase.com/ns/user/hangy/viaf"; | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static View VIEW = new View("https://openlibrary.org{{id}}"); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/openlibrary/OpenLibraryMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.openlibrary;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OpenLibraryMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://rdf.freebase.com/ns/user/hangy/viaf";
private final static View VIEW = new View("https://openl... | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static List<NameType> DEFAULT_TYPES = new ArrayList<>(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/viaf/VIAFNameType.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType; |
package com.codefork.refine.viaf;
/**
* Different types of names. Note that this is for the application's internal
* use; see NameType (and the asNameType() method in this enum) for a
* class used to format data sent to VIAF.
*/
public enum VIAFNameType {
Person("/people/person", "Person", "Personal", "local... | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private NameType nameType; |
codeforkjeff/conciliator | src/test/java/com/codefork/refine/orcid/OrcidParserTest.java | // Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//
// private String id;
// private String name;
//
// /**
// * It's weird that this is a list but that's what OpenRefine expects.
// * A VIAF result only ever has one type, but maybe other reconciliati... | import com.codefork.refine.resources.Result;
import org.junit.Test;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.InputStream;
import java.util.List;
import static org.junit.Assert.assertEquals; | package com.codefork.refine.orcid;
public class OrcidParserTest {
@Test
public void testParseNames() throws Exception {
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
OrcidParser orcidParser = new OrcidParser();
InputStream is ... | // Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//
// private String id;
// private String name;
//
// /**
// * It's weird that this is a list but that's what OpenRefine expects.
// * A VIAF result only ever has one type, but maybe other reconciliati... | List<Result> results = orcidParser.getResults(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/parsers/ParseState.java | // Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//
// private String id;
// private String name;
//
// /**
// * It's weird that this is a list but that's what OpenRefine expects.
// * A VIAF result only ever has one type, but maybe other reconciliati... | import com.codefork.refine.resources.Result;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.parsers;
public class ParseState {
public boolean captureChars = false;
| // Path: src/main/java/com/codefork/refine/resources/Result.java
// public class Result {
//
// private String id;
// private String name;
//
// /**
// * It's weird that this is a list but that's what OpenRefine expects.
// * A VIAF result only ever has one type, but maybe other reconciliati... | public final List<Result> results = new ArrayList<>(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/orcid/OrcidMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.orcid;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrcidMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://xmlns.com/foaf/0.1/"; | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static View VIEW = new View("https://orcid.org/{{id}}"); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/orcid/OrcidMetaDataResponse.java | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | import com.codefork.refine.resources.NameType;
import com.codefork.refine.resources.ServiceMetaDataResponse;
import com.codefork.refine.resources.View;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.ArrayList;
import java.util.List; | package com.codefork.refine.orcid;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrcidMetaDataResponse extends ServiceMetaDataResponse {
private final static String IDENTIFIER_SPACE = "http://xmlns.com/foaf/0.1/";
private final static View VIEW = new View("https://orcid.org/{{id}}");
private f... | // Path: src/main/java/com/codefork/refine/resources/NameType.java
// public class NameType {
//
// private String id;
// private String name;
//
// public NameType(String id, String name) {
// this.id = id;
// this.name = name;
// }
//
// public String getId() {
// return... | private final static List<NameType> DEFAULT_TYPES = new ArrayList<>(); |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/solr/AnotherSolr.java | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | import com.codefork.refine.Config;
import com.codefork.refine.ThreadPoolFactory;
import com.codefork.refine.datasource.ConnectionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Component; | package com.codefork.refine.solr;
/**
* Example of a second Solr data source. You can create as many solr data sources
* as you want, by copying/renaming this file.
*
* The name of this class doesn't actually matter, as long as it's unique and matches
* the .java filename.
*
* @Component specifies the name tha... | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | public AnotherSolr(Config config, CacheManager cacheManager, ThreadPoolFactory threadPoolFactory, ConnectionFactory connectionFactory) { |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/solr/AnotherSolr.java | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | import com.codefork.refine.Config;
import com.codefork.refine.ThreadPoolFactory;
import com.codefork.refine.datasource.ConnectionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Component; | package com.codefork.refine.solr;
/**
* Example of a second Solr data source. You can create as many solr data sources
* as you want, by copying/renaming this file.
*
* The name of this class doesn't actually matter, as long as it's unique and matches
* the .java filename.
*
* @Component specifies the name tha... | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | public AnotherSolr(Config config, CacheManager cacheManager, ThreadPoolFactory threadPoolFactory, ConnectionFactory connectionFactory) { |
codeforkjeff/conciliator | src/main/java/com/codefork/refine/solr/AnotherSolr.java | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | import com.codefork.refine.Config;
import com.codefork.refine.ThreadPoolFactory;
import com.codefork.refine.datasource.ConnectionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Component; | package com.codefork.refine.solr;
/**
* Example of a second Solr data source. You can create as many solr data sources
* as you want, by copying/renaming this file.
*
* The name of this class doesn't actually matter, as long as it's unique and matches
* the .java filename.
*
* @Component specifies the name tha... | // Path: src/main/java/com/codefork/refine/Config.java
// @Component
// public class Config {
//
// public static final String PROP_CACHE_ENABLED = "cache.enabled";
// public static final String PROP_CACHE_TTL = "cache.ttl";
// public static final String PROP_CACHE_SIZE = "cache.size";
//
// private s... | public AnotherSolr(Config config, CacheManager cacheManager, ThreadPoolFactory threadPoolFactory, ConnectionFactory connectionFactory) { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.