text:
.class public Lcom/handmark/pulltorefresh/library/PullToRefreshListView;
.super Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;

# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase",
        "<",
        "Landroid/widget/ListView;",
        ">;"
    }
.end annotation

# instance fields
.field private m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

.field private n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

.field private o:Landroid/widget/FrameLayout;

.field private p:Z

# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;-><init>(Landroid/content/Context;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;-><init>(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$AnimationStyle;)V
    .locals 0

    invoke-direct {p0, p1, p2, p3}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;-><init>(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$AnimationStyle;)V

    return-void
.end method

.method static synthetic a(Lcom/handmark/pulltorefresh/library/PullToRefreshListView;)Landroid/widget/FrameLayout;
    .locals 1

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->o:Landroid/widget/FrameLayout;

    return-object v0
.end method

# virtual methods
.method protected createListView(Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/widget/ListView;
    .locals 2

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x9

    if-lt v0, v1, :cond_0

    new-instance v0, Lcom/handmark/pulltorefresh/library/o;

    invoke-direct {v0, p0, p1, p2}, Lcom/handmark/pulltorefresh/library/o;-><init>(Lcom/handmark/pulltorefresh/library/PullToRefreshListView;Landroid/content/Context;Landroid/util/AttributeSet;)V

    :goto_0
    return-object v0

    :cond_0
    new-instance v0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView$InternalListView;

    invoke-direct {v0, p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView$InternalListView;-><init>(Lcom/handmark/pulltorefresh/library/PullToRefreshListView;Landroid/content/Context;Landroid/util/AttributeSet;)V

    goto :goto_0
.end method

.method protected createLoadingLayoutProxy(ZZ)Lcom/handmark/pulltorefresh/library/LoadingLayoutProxy;
    .locals 3

    invoke-super {p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->createLoadingLayoutProxy(ZZ)Lcom/handmark/pulltorefresh/library/LoadingLayoutProxy;

    move-result-object v0

    iget-boolean v1, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->p:Z

    if-eqz v1, :cond_1

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getMode()Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;

    move-result-object v1

    if-eqz p1, :cond_0

    invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->showHeaderLoadingLayout()Z

    move-result v2

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v0, v2}, Lcom/handmark/pulltorefresh/library/LoadingLayoutProxy;->addLayout(Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;)V

    :cond_0
    if-eqz p2, :cond_1

    invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->showFooterLoadingLayout()Z

    move-result v1

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v0, v1}, Lcom/handmark/pulltorefresh/library/LoadingLayoutProxy;->addLayout(Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;)V

    :cond_1
    return-object v0
.end method

.method protected bridge synthetic createRefreshableView(Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/view/View;
    .locals 1

    invoke-virtual {p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->createRefreshableView(Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/widget/ListView;

    move-result-object v0

    return-object v0
.end method

.method protected createRefreshableView(Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/widget/ListView;
    .locals 2

    invoke-virtual {p0, p1, p2}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->createListView(Landroid/content/Context;Landroid/util/AttributeSet;)Landroid/widget/ListView;

    move-result-object v0

    const v1, 0x102000a

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setId(I)V

    return-object v0
.end method

.method public final getPullToRefreshScrollDirection()Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;
    .locals 1

    sget-object v0, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;->VERTICAL:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Orientation;

    return-object v0
.end method

.method protected handleStyledAttributes(Landroid/content/res/TypedArray;)V
    .locals 7

    const/16 v6, 0x8

    const/4 v5, 0x1

    invoke-super {p0, p1}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->handleStyledAttributes(Landroid/content/res/TypedArray;)V

    const/16 v0, 0xe

    invoke-virtual {p1, v0, v5}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z

    move-result v0

    iput-boolean v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->p:Z

    iget-boolean v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->p:Z

    if-eqz v0, :cond_0

    new-instance v1, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v0, -0x1

    const/4 v2, -0x2

    invoke-direct {v1, v0, v2, v5}, Landroid/widget/FrameLayout$LayoutParams;-><init>(III)V

    new-instance v2, Landroid/widget/FrameLayout;

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {v2, v0}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getContext()Landroid/content/Context;

    move-result-object v0

    sget-object v3, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->PULL_FROM_START:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;

    invoke-virtual {p0, v0, v3, p1}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->createLoadingLayout(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;Landroid/content/res/TypedArray;)Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v0

    iput-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v0, v6}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v2, v0, v1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v0, v2, v3, v4}, Landroid/widget/ListView;->addHeaderView(Landroid/view/View;Ljava/lang/Object;Z)V

    new-instance v0, Landroid/widget/FrameLayout;

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-direct {v0, v2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->o:Landroid/widget/FrameLayout;

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getContext()Landroid/content/Context;

    move-result-object v0

    sget-object v2, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->PULL_FROM_END:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;

    invoke-virtual {p0, v0, v2, p1}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->createLoadingLayout(Landroid/content/Context;Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;Landroid/content/res/TypedArray;)Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v0

    iput-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v0, v6}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->o:Landroid/widget/FrameLayout;

    iget-object v2, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {v0, v2, v1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    const/16 v0, 0xd

    invoke-virtual {p1, v0}, Landroid/content/res/TypedArray;->hasValue(I)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p0, v5}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->setScrollingWhileRefreshingEnabled(Z)V

    :cond_0
    return-void
.end method

.method protected onRefreshing(Z)V
    .locals 7

    const/4 v2, 0x0

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getAdapter()Landroid/widget/ListAdapter;

    move-result-object v0

    iget-boolean v1, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->p:Z

    if-eqz v1, :cond_0

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getShowViewWhileRefreshing()Z

    move-result v1

    if-eqz v1, :cond_0

    if-eqz v0, :cond_0

    invoke-interface {v0}, Landroid/widget/ListAdapter;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_2

    :cond_0
    invoke-super {p0, p1}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->onRefreshing(Z)V

    :cond_1
    :goto_0
    return-void

    :cond_2
    invoke-super {p0, v2}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->onRefreshing(Z)V

    sget-object v0, Lcom/handmark/pulltorefresh/library/n;->a:[I

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getCurrentMode()Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;

    move-result-object v1

    invoke-virtual {v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->ordinal()I

    move-result v1

    aget v0, v0, v1

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getHeaderLayout()Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v4

    iget-object v3, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v1, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getScrollY()I

    move-result v0

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getHeaderSize()I

    move-result v5

    add-int/2addr v0, v5

    move-object v5, v4

    move-object v4, v3

    move-object v3, v1

    move v1, v2

    :goto_1
    invoke-virtual {v5}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->reset()V

    invoke-virtual {v5}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->hideAllViews()V

    const/16 v5, 0x8

    invoke-virtual {v3, v5}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setVisibility(I)V

    invoke-virtual {v4, v2}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setVisibility(I)V

    invoke-virtual {v4}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->refreshing()V

    if-eqz p1, :cond_1

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->disableLoadingLayoutVisibilityChanges()V

    invoke-virtual {p0, v0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->setHeaderScroll(I)V

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0, v1}, Landroid/widget/ListView;->setSelection(I)V

    invoke-virtual {p0, v2}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->smoothScrollTo(I)V

    goto :goto_0

    :pswitch_0
    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getFooterLayout()Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v5

    iget-object v4, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v3, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getCount()I

    move-result v0

    add-int/lit8 v1, v0, -0x1

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getScrollY()I

    move-result v0

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getFooterSize()I

    move-result v6

    sub-int/2addr v0, v6

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

.method protected onReset()V
    .locals 7

    const/4 v2, 0x0

    const/4 v1, 0x1

    iget-boolean v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->p:Z

    if-nez v0, :cond_0

    invoke-super {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->onReset()V

    :goto_0
    return-void

    :cond_0
    sget-object v0, Lcom/handmark/pulltorefresh/library/n;->a:[I

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getCurrentMode()Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;

    move-result-object v3

    invoke-virtual {v3}, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$Mode;->ordinal()I

    move-result v3

    aget v0, v0, v3

    packed-switch v0, :pswitch_data_0

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getHeaderLayout()Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v5

    iget-object v4, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->m:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getHeaderSize()I

    move-result v0

    neg-int v3, v0

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getFirstVisiblePosition()I

    move-result v0

    sub-int/2addr v0, v2

    invoke-static {v0}, Ljava/lang/Math;->abs(I)I

    move-result v0

    if-gt v0, v1, :cond_3

    :goto_1
    move v0, v1

    move v1, v3

    move-object v3, v4

    move-object v4, v5

    :goto_2
    invoke-virtual {v3}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->getVisibility()I

    move-result v5

    if-nez v5, :cond_1

    invoke-virtual {v4}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->showInvisibleViews()V

    const/16 v4, 0x8

    invoke-virtual {v3, v4}, Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;->setVisibility(I)V

    if-eqz v0, :cond_1

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getState()Lcom/handmark/pulltorefresh/library/PullToRefreshBase$State;

    move-result-object v0

    sget-object v3, Lcom/handmark/pulltorefresh/library/PullToRefreshBase$State;->MANUAL_REFRESHING:Lcom/handmark/pulltorefresh/library/PullToRefreshBase$State;

    if-eq v0, v3, :cond_1

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0, v2}, Landroid/widget/ListView;->setSelection(I)V

    invoke-virtual {p0, v1}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->setHeaderScroll(I)V

    :cond_1
    invoke-super {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshAdapterViewBase;->onReset()V

    goto :goto_0

    :pswitch_0
    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getFooterLayout()Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    move-result-object v6

    iget-object v5, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->n:Lcom/handmark/pulltorefresh/library/internal/LoadingLayout;

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getCount()I

    move-result v0

    add-int/lit8 v3, v0, -0x1

    invoke-virtual {p0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->getFooterSize()I

    move-result v4

    iget-object v0, p0, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->l:Landroid/view/View;

    check-cast v0, Landroid/widget/ListView;

    invoke-virtual {v0}, Landroid/widget/ListView;->getLastVisiblePosition()I

    move-result v0

    sub-int/2addr v0, v3

    invoke-static {v0}, Ljava/lang/Math;->abs(I)I

    move-result v0

    if-gt v0, v1, :cond_2

    move v0, v1

    :goto_3
    move v2, v3

    move v1, v4

    move-object v3, v5

    move-object v4, v6

    goto :goto_2

    :cond_2
    move v0, v2

    goto :goto_3

    :cond_3
    move v1, v2

    goto :goto_1

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method


text:
package org.openkilda.messaging.nbtopology.request;

public class FlowsBaseRequest extends BaseRequest {

}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

    <title>submergence+clientOnline~summary documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../../../../index.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../../highlight.css" />

            spare

                :submergence+clientOnline~summary

When the first live connection for a client id comes online, exactly one substation instance in
your cluster will emit this event once. It is emitted for every client belonging to a user.

        This document was generated with
        doczar
        at 3:55pm on 8/14/2015


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="wrap_content"
    android:layout_height="32dp"
    android:background="@drawable/round_corner_layout"
    android:backgroundTint="@color/material_gray_300">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:text="Chip"
        android:paddingLeft="12dp"
        android:gravity="center_vertical"
        android:id="@+id/chipLabel"/>

    <Button
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_marginLeft="4dp"
        android:layout_marginRight="4dp"
        android:layout_gravity="center_vertical"
        android:background="@drawable/ic_cancel_black_24dp"
        android:backgroundTint="@color/black54"

        android:id="@+id/chipCancelButton"/>

</LinearLayout>


text:
<?php

return [
    // Set up details on how to connect to the database
    'dsn'     => "mysql:host=localhost;dbname=DBNAME;charset=utf8",
    'username'        => "DNAME",
    'password'        => "DBPASS",
    'driver_options'  => [PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'", PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION],
    'table_prefix'    => "test_",

    // Display details on what happens
    'verbose' => true,

    // Throw a more verbose exception when failing to connect
    //'debug_connect' => 'true',
];


text:
/*
 * This is not the original file distributed by the Apache Software Foundation
 * It has been modified by the Hipparchus project
 */

package org.hipparchus.stat.ranking;

/**
 * Interface representing a rank transformation.
 */
public interface RankingAlgorithm {
    /**
     * Performs a rank transformation on the input data, returning an array
     * of ranks.
     * <p>
     * Ranks should be 1-based - that is, the smallest value
     * returned in an array of ranks should be greater than or equal to one,
     * rather than 0. Ranks should in general take integer values, though
     * implementations may return averages or other floating point values
     * to resolve ties in the input data.
     *
     * @param data array of data to be ranked
     * @return an array of ranks corresponding to the elements of the input array
     */
    double[] rank(double[] data);
}


text:
package org.ga4gh.ctk.transport.protocols;

import com.google.protobuf.InvalidProtocolBufferException;
import com.mashape.unirest.http.exceptions.UnirestException;

import ga4gh.AlleleAnnotationServiceOuterClass.SearchVariantAnnotationSetsRequest;
import ga4gh.AlleleAnnotationServiceOuterClass.SearchVariantAnnotationSetsResponse;
import ga4gh.AlleleAnnotationServiceOuterClass.SearchVariantAnnotationsRequest;
import ga4gh.AlleleAnnotationServiceOuterClass.SearchVariantAnnotationsResponse;
import ga4gh.AlleleAnnotations.VariantAnnotation;
import ga4gh.AlleleAnnotations.VariantAnnotationSet;
import ga4gh.Metadata.Dataset;
import ga4gh.MetadataServiceOuterClass.SearchDatasetsRequest;
import ga4gh.MetadataServiceOuterClass.SearchDatasetsResponse;
import ga4gh.ReadServiceOuterClass.SearchReadGroupSetsRequest;
import ga4gh.ReadServiceOuterClass.SearchReadGroupSetsResponse;
import ga4gh.ReadServiceOuterClass.SearchReadsRequest;
import ga4gh.ReadServiceOuterClass.SearchReadsResponse;
import ga4gh.Reads.ReadAlignment;
import ga4gh.Reads.ReadGroup;
import ga4gh.Reads.ReadGroupSet;
import ga4gh.ReferenceServiceOuterClass.*;
import ga4gh.References.Reference;
import ga4gh.References.ReferenceSet;
import ga4gh.SequenceAnnotationServiceOuterClass;
import ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsRequest;
import ga4gh.SequenceAnnotationServiceOuterClass.SearchFeatureSetsResponse;
import ga4gh.SequenceAnnotationServiceOuterClass.SearchFeaturesResponse;
import ga4gh.SequenceAnnotations.Feature;
import ga4gh.SequenceAnnotations.FeatureSet;
import ga4gh.VariantServiceOuterClass.*;
import ga4gh.Variants.CallSet;
import ga4gh.Variants.Variant;
import ga4gh.Variants.VariantSet;
import org.ga4gh.ctk.transport.GAWrapperException;
import org.ga4gh.ctk.transport.URLMAPPING;
import org.ga4gh.ctk.transport.WireTracker;
import org.ga4gh.ctk.transport.protobuf.Get;
import org.ga4gh.ctk.transport.protobuf.Post;

import java.util.HashMap;
import java.util.Map;

/**
 * This class provides an interface to/facade for the GA4GH server we're testing.
 *

 * Methods are categorized by functional area:
 *

 *
{@link #reads reads}

 *
{@link #variants variants}

 *
{@link #references references}

 *
{@link #variantAnnotations variantAnnotations}

 *
{@link #sequenceAnnotations sequenceAnnotations}

*

 *
 * @author Herb Jellinek
 */
public class Client {

    private final URLMAPPING urls;

    public final WireTracker wireTracker;

    /**
     * Provides access to variants-related methods.  For example,
     *

     *     myClient.variants.searchVariantSets(...);
     *

     */
    public final Variants variants = new Variants();

    /**
     * Provides access to reads-related methods.  For example,
     *

     *     myClient.reads.searchReads(...);
     *

     */
    public final Reads reads = new Reads();

    /**
     * Provides access to references-related methods.  For example,
     *

     *     myClient.references.searchReferenceSets(...);
     *

     */
    public final References references = new References();

    /**
     * Provides access to variantannotations-related methods.  For example,
     *

     *     myClient.variantAnnotations.searchVariantAnnotations(...);
     *

     */
    public final VariantAnnotations variantAnnotations = new VariantAnnotations();

    /**
     * Provides access to sequenceannotations-related methods.  For example,
     *

     *     myClient.sequenceAnnotations.searchFeatures(...);
     *

     */
    public final SequenceAnnotations sequenceAnnotations = new SequenceAnnotations();

    /**
     * Provides access to metadata-related methods.  For example,
     *

     *     myClient.metadata.searchDatasets(...);
     *

     */

    public final Metadata metadata = new Metadata();

    /**
     * Create a new client that can make requests on a GA4GH server.
     *
     * @param urls an URLMAPPING object that gives us the paths to use
     */
    public Client(URLMAPPING urls) {
        this(urls, null);
    }

    /**
     * Create a new client that can make requests on a GA4GH server.
     *
     * @param urls an URLMAPPING object that gives us the paths to use
     * @param wt   If not null, capture the data going across the wire
     */
    public Client(URLMAPPING urls, WireTracker wt) {
        this.urls = urls;
        wireTracker = wt;
    }

    /**
     * Inner class holding all metadata-related methods.  Gathering them in an inner class like this
     * makes it a little easier for someone writing tests to use their IDE's auto-complete
     * to type method names.
     */
    public class Metadata {
        /**
         * Gets a list of datasets accessible through the API.
         * <tt>POST /datasets/search</tt> accepts a {@link SearchDatasetsRequest}
         * and returns a {@link SearchDatasetsResponse}.
         *
         * @param request the {@link SearchDatasetsRequest} request
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchDatasetsResponse searchDatasets(SearchDatasetsRequest request) throws UnirestException, InvalidProtocolBufferException, GAWrapperException {
            SearchDatasetsResponse.Builder responseBuilder = SearchDatasetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchDataSets(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link Dataset} by ID.
         * <tt>GET /datasets/{id}</tt> returns a {@link Dataset}.
         *
         * @param id the ID of the dataset
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public Dataset getDataset(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            Dataset.Builder responseBuilder = Dataset.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetDataSet(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }
    }

    /**
     * Inner class holding all variants-related methods.  Gathering them in an inner class like this
     * makes it a little easier for someone writing tests to use their IDE's auto-complete
     * to type method names.
     */
    public class Variants {

        /**
         * Gets a list of {@link VariantSet} matching the search criteria via
         * <tt>POST /variantsets/search</tt>.
         *
         * @param request the {@link SearchVariantSetsRequest} we'll issue
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchVariantSetsResponse searchVariantSets(SearchVariantSetsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchVariantSetsResponse.Builder responseBuilder = SearchVariantSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchVariantSets(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link VariantSet} by ID.
         * <tt>GET /variantsets/{id}</tt> will return a JSON version of {@link VariantSet}.
         *
         * @param id the ID of the variant set
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public VariantSet getVariantSet(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            VariantSet.Builder responseBuilder = VariantSet.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetVariantSet(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a list of {@link Variant} matching the search criteria.
         *

         * <tt>POST /variants/search</tt> accepts a {@link SearchVariantsRequest}
         * and returns a {@link SearchVariantsResponse}.
         *
         * @param request the {@link SearchVariantsRequest} we'll issue
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchVariantsResponse searchVariants(SearchVariantsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchVariantsResponse.Builder responseBuilder = SearchVariantsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchVariants(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link Variant} by ID.
         * <tt>GET /variants/{id}</tt> will return a {@link Variant}.
         *
         * @param id the ID of the variant
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public Variant getVariant(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            Variant.Builder responseBuilder = Variant.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetVariant(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a list of {@link CallSet}s matching the search criteria.
         *

         * <tt>POST /callsets/search</tt> accepts a {@link SearchCallSetsRequest}
         * and returns a {@link SearchCallSetsResponse}.
         *
         * @param request the SearchCallSetsRequest we'll issue
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchCallSetsResponse searchCallSets(SearchCallSetsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchCallSetsResponse.Builder responseBuilder = SearchCallSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchCallSets(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link CallSet} by ID.
         * <tt>GET /callsets/{id}</tt> will return a {@link CallSet}.
         *
         * @param id the ID of the call set
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public CallSet getCallSet(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            CallSet.Builder responseBuilder = CallSet.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetCallSet(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }
    }

    /**
     * Inner class holding all reads-related methods.  Gathering them in an inner class like this
     * makes it a little easier for someone writing tests to use their IDE's auto-complete
     * to type method names.
     */
    public class Reads {

        /**
         * Gets a list of {@link ReadAlignment} matching the search criteria.
         *

         * <tt>POST /reads/search</tt> accepts a {@link SearchReadsRequest} and returns
         * a {@link SearchReadsResponse}.

         *
         * @param request filled-in Avro object to be serialized as JSON to the server
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchReadsResponse searchReads(SearchReadsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchReadsResponse.Builder responseBuilder = SearchReadsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchReads(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a list of {@link ReadGroupSet} matching the search criteria.
         *

         * <tt>POST /readgroupsets/search</tt> accepts a {@link SearchReadGroupSetsRequest}
         * and returns a {@link SearchReadGroupSetsResponse}.

         *
         * @param request filled-in Avro object to be serialized as JSON to the server
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchReadGroupSetsResponse searchReadGroupSets(SearchReadGroupSetsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchReadGroupSetsResponse.Builder responseBuilder = SearchReadGroupSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchReadGroupSets(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link ReadGroupSet} by ID.
         * <tt>GET /readgroupsets/{id}</tt> will return a JSON version of {@link ReadGroupSet}.
         *
         * @param id the ID of the read group set
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public ReadGroupSet getReadGroupSet(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            ReadGroupSet.Builder responseBuilder = ReadGroupSet.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetReadGroupSet(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link ReadGroup} by ID.
         * <tt>GET /readgroups/{id}</tt> will return a JSON version of {@link ReadGroup}.
         *
         * @param id the ID of the read group
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public ReadGroup getReadGroup(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            ReadGroup.Builder responseBuilder = ReadGroup.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getGetReadGroup(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }
    }

    /**
     * Inner class holding all references-related methods.  Gathering them in an inner class like
     * this
     * makes it a little easier for someone writing tests to use their IDE's auto-complete
     * to type method names.
     */
    public class References {

        /**
         * Gets a list of {@link ReferenceSet} matching the search criteria.
         *

         * <tt>POST /referencesets/search</tt> accepts a {@link SearchReferenceSetsRequest}
         * and returns a {@link SearchReferenceSetsResponse}.
         *
         * @param request Avro object to be serialized as JSON to the server
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchReferenceSetsResponse searchReferenceSets(SearchReferenceSetsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchReferenceSetsResponse.Builder responseBuilder = SearchReferenceSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchReferenceSets(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link ReferenceSet} by ID.
         * <tt>GET /referencesets/{id}</tt> returns a {@link ReferenceSet}.
         *
         * @param id the reference set ID
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public ReferenceSet getReferenceSet(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            ReferenceSet.Builder responseBuilder = ReferenceSet.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getReferenceSets(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a list of {@link Reference} matching the search criteria.
         *

         * <tt>POST /references/search</tt> accepts a {@link SearchReferencesRequest}
         * and returns a {@link SearchReferencesResponse}.
         *
         * @param request Avro object to be serialized as JSON to the server
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public SearchReferencesResponse searchReferences(SearchReferencesRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            SearchReferencesResponse.Builder responseBuilder = SearchReferencesResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), urls.getSearchReferences(), request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link Reference} by ID.
         * <tt>GET /references/{id}</tt> returns a {@link Reference}.
         *
         * @param id the reference set ID
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public Reference getReference(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            Reference.Builder responseBuilder = Reference.newBuilder();
            new Get<>(urls.getUrlRoot(), urls.getReference(), id, null, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Add <tt>key</tt> = <tt>value</tt> to the {@link Map} if <tt>value</tt> is not <tt>null</tt>.
         *
         * @param map   the Map into which we might insert
         * @param key   the key
         * @param value the value
         */
        private void putInMapIfValueNotNull(Map<String, Object> map,
                                            String key,
                                            Object value) {
            if (value != null) {
                map.put(key, value);
            }
        }

        /**
         * Lists {@link Reference} bases by ID and optional range.
         * <tt>GET /references/{id}/bases</tt> returns a {@link ListReferenceBasesResponse}.
         *
         * @param id      the reference set ID
         * @param request Avro object to be serialized as JSON to the server
         * @throws GAWrapperException if the server finds the request invalid in some way
         * @throws UnirestException if there's a problem speaking HTTP to the server
         * @throws InvalidProtocolBufferException if there's a problem processing the JSON response from the server
         */
        public ListReferenceBasesResponse getReferenceBases(String id, ListReferenceBasesRequest request) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            ListReferenceBasesResponse.Builder responseBuilder = ListReferenceBasesResponse.newBuilder();
            final Map<String, Object> params = new HashMap<>();
            putInMapIfValueNotNull(params, "start", request.getStart());
            putInMapIfValueNotNull(params, "end", request.getEnd());
            putInMapIfValueNotNull(params, "pageToken", request.getPageToken());
            new Get<>(urls.getUrlRoot(), urls.getSearchReferenceBases(), id, params, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }
    }

    /**
     * Inner class holding all sequence annotation-related methods.
     */
    public class SequenceAnnotations {
        public SearchFeatureSetsResponse searchFeatureSets(SearchFeatureSetsRequest request) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getSearchFeatureSets();
            SearchFeatureSetsResponse.Builder responseBuilder = SearchFeatureSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), path, request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        public FeatureSet getFeatureSet(String id) throws InvalidProtocolBufferException, UnirestException, GAWrapperException {
            String path = urls.getGetFeatureSet();
            FeatureSet.Builder builder = FeatureSet.newBuilder();
            new Get<>(urls.getUrlRoot(), path, id, null, builder, wireTracker).performQuery();
            return builder.build();
        }

        public SearchFeaturesResponse searchFeatures(SequenceAnnotationServiceOuterClass.SearchFeaturesRequest request)
                throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getSearchFeatures();
            SearchFeaturesResponse.Builder responseBuilder = SearchFeaturesResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), path, request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        public Feature getFeature(String id) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getGetFeature();
            Feature.Builder builder = Feature.newBuilder();
            new Get<>(urls.getUrlRoot(), path, id, null, builder, wireTracker).performQuery();
            return builder.build();
        }

    }

    /**
     * Inner class holding all variant annotation-related methods.  Gathering them in an inner class like this makes it a little easier for someone writing
     * tests to use their IDE's auto-complete to type method names.
     */
    public class VariantAnnotations {

        /**
         * Gets a list of {@link VariantAnnotationSet} matching the search criteria via <tt>POST /variantannotationsets/search</tt>.
         *
         * @param request the {@link SearchVariantAnnotationSetsRequest} we'll issue
         */
        public SearchVariantAnnotationSetsResponse searchVariantAnnotationSets(SearchVariantAnnotationSetsRequest request)
                throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getSearchVariantAnnotationSets();
            SearchVariantAnnotationSetsResponse.Builder responseBuilder = SearchVariantAnnotationSetsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), path, request, responseBuilder, wireTracker).performQuery();
            return responseBuilder.build();
        }

        /**
         * Gets a {@link VariantAnnotationSet} by ID. <tt>GET /variantannotationsets/{id}</tt> will return a JSON version of {@link VariantAnnotationSet}.
         *
         * @param id the ID of the variant annotation set
         */
        public VariantAnnotationSet getVariantAnnotationSet(String id) throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getGetVariantAnnotationSet();
            VariantAnnotationSet.Builder builder = VariantAnnotationSet.newBuilder();
            new Get<>(urls.getUrlRoot(), path, id, null, builder, wireTracker).performQuery();
            return builder.build();
        }

        /**
         * Gets a list of {@link VariantAnnotation} matching the search criteria.
 <tt>POST /variantannotations/search</tt> accepts a {@link
         * SearchVariantAnnotationsRequest} and returns a {@link SearchVariantAnnotationsResponse}.
         *
         * @param request the {@link SearchVariantAnnotationsRequest} we'll issue
         */
        public SearchVariantAnnotationsResponse searchVariantAnnotations(SearchVariantAnnotationsRequest request)
                throws InvalidProtocolBufferException, GAWrapperException, UnirestException {
            String path = urls.getSearchVariantAnnotations();
            SearchVariantAnnotationsResponse.Builder builder = SearchVariantAnnotationsResponse.newBuilder();
            new Post<>(urls.getUrlRoot(), path, request, builder, wireTracker).performQuery();
            return builder.build();
        }

    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using PolicyBuilder.Models;
using policyDB.EntityClasses;
using policyDB.CollectionClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using policyDB.HelperClasses;
using policyDB;
using System.IO;

namespace PolicyBuilder.Controllers
{
    public class policyController : Controller
    {
        public ActionResult Index(policyData vData, int? id)
        {
            if (id.HasValue)
                vData.Library = new LibraryEntity(id.Value);

            return View(vData);
        }

        #region LIBRARY
        public ActionResult Library(policyData vData,int? id)
        {
            if (id.HasValue)
                vData.Library = new LibraryEntity(id.Value);

            return View(vData);
        }

        public ActionResult CreatePolicyFromLib(policyData vData)
        {
            CreatePolicy(vData, null, false,true);

            return RedirectToAction("EditPolicy", new { id = vData.PolicyLink.Id });
        }

        public ActionResult EditPolicyFromLib(policyData vData, int id)
        {
            PredicateExpression pe = new PredicateExpression(PolicyLinkFields.ParentId == DBNull.Value);
            pe.Add(PolicyLinkFields.PolicyId == id);
            pe.Add(new FieldCompareSetPredicate(PolicyLinkFields.Id, PolicyDocumentFields.PolicyLinkId, SetOperator.In, null, true));

            PolicyLinkCollection plcoll = new PolicyLinkCollection();
            if (plcoll.GetMulti(pe) && plcoll.Count > 0)
                vData.PolicyLink = plcoll[0];
            else
            {
                vData.PolicyLink = new PolicyLinkEntity();
                vData.PolicyLink.PolicyId = id;
                vData.PolicyLink.Save();
            }

            return RedirectToAction("EditPolicy", new { id = vData.PolicyLink.Id });
        }

        static private bool DeletePolicyFromLib(int id)
        {
            PredicateExpression pe = new PredicateExpression(PolicyLinkFields.PolicyId == id);
            PredicateExpression peOr = new PredicateExpression(new FieldCompareSetPredicate(PolicyLinkFields.Id, PolicyDocumentFields.PolicyLinkId, SetOperator.In, null));
            peOr.AddWithOr(PolicyLinkFields.ParentId != DBNull.Value);
            pe.Add(peOr);

            PolicyLinkCollection plcoll = new PolicyLinkCollection();
            if (plcoll.GetMulti(pe) && plcoll.Count == 0)
            {
                // Policy isn't referenced in any policy document.
                PolicyEntity delPolicy = new PolicyEntity(id);
                delPolicy.PolicyLink.DeleteMulti();

                DeletePolicy(delPolicy);

                return true;
            }
            else
                return false;
        }

        public ActionResult DeletePolicyFromLib(policyData vData, int id)
        {
            try
            {
                if (!DeletePolicyFromLib(id))
                    TempData["message"] = "you can't delete this policy - it is in use";
            }
            catch (Exception ex)
            {
                TempData["message"] = "you can't delete this policy - it is in use";
            }

            return RedirectToAction("Library");
        }
        #endregion

        #region POLICY DOC
        public ActionResult EditPolicyDoc(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);
            if (!vData.PolicyDocument.IsNew)
                vData.Policy = vData.PolicyDocument.PolicyLink.Policy;

            return View(vData);
        }

        static private void DeletePolicyDoc(PolicyDocumentEntity pde)
        {
            PolicyLinkEntity policyLink = pde.PolicyLink;
            pde.Delete();

            if (!policyLink.IsNew)
                DeletePolicyLink(policyLink);
        }

        static public void DeleteEntireLibrary(int id)
        {
            DeleteEntireLibrary(id, false);
        }

        static public void DeleteEntireLibrary(int id, bool fullDelete)
        {
            LibraryEntity le = new LibraryEntity(id);
            if (le.IsNew)
                return;

            foreach (PolicyDocumentEntity pde in le.PolicyDocument)
            {
                DeletePolicyDoc(pde);
            }

            foreach (PolicyEntity pe in le.Policy)
            {
                DeletePolicyFromLib(pe.Id);
            }

            if (fullDelete)
            {
                foreach (QueryEntity qe in le.Query)
                {
                    testController.DeleteQuery(qe.Id);
                }

                le.Delete();
            }
        }

        public ActionResult DeletePolicyDoc(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);

            DeletePolicyDoc(vData.PolicyDocument);

            return RedirectToAction("Index");
        }

        public ActionResult DownloadPolicyDoc(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);

            string path = string.Format("~/exports/{0}.xml", Path.GetRandomFileName());
            string mappedPath = Server.MapPath(path);
            xmlGenerate gen = new xmlGenerate();
            string xml = gen.generate(vData.PolicyDocument);

            StreamWriter sw = new StreamWriter(mappedPath);
            sw.Write(xml);
            sw.Close();

            return File(mappedPath, "text/xml", vData.PolicyDocument.Name + ".xml");
        }

        public ActionResult ClearPolicyDoc(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);
            vData.PolicyLink = vData.PolicyDocument.PolicyLink;
            vData.PolicyDocument.PolicyLinkId = null;
            vData.PolicyDocument.Save();

            if (!vData.PolicyLink.IsNew)
                DeletePolicyLink(vData.PolicyLink);

            return RedirectToAction("EditPolicyDoc", new { id = id });
        }

        private string GetPolicyAction(PolicyEntity policy)
        {
            return policy.Set ? "EditPolicySet" : "EditPolicy";
        }

        public ActionResult CreateDocumentPolicy(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);
            CreatePolicy(vData, null, false,false);
            vData.PolicyDocument.PolicyLinkId = vData.PolicyLink.Id;
            vData.PolicyDocument.Save(true);

            return RedirectToAction(GetPolicyAction(vData.Policy), new { id = vData.PolicyLink.Id });
        }

        public ActionResult CreateDocumentPolicySet(policyData vData, int id)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);
            CreatePolicy(vData, null, true,false);
            vData.PolicyDocument.PolicyLinkId = vData.PolicyLink.Id;
            vData.PolicyDocument.Save(true);

            return RedirectToAction("EditPolicySet", new { id = vData.PolicyLink.Id });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult PolicyDocDetailUpdate(policyData vData, int id, FormCollection collection)
        {
            vData.PolicyDocument = new PolicyDocumentEntity(id);
            if (vData.PolicyDocument.IsNew)
                vData.PolicyDocument.LibraryId = vData.Library.Id;

            vData.PolicyDocument.Name = collection["name"];
            vData.PolicyDocument.Save(true);

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction("EditPolicyDoc", new { id = vData.PolicyDocument.Id });
        }

        #endregion

        #region POLICY SET

        public ActionResult EditPolicySet(policyData vData, int id)
        {
            SortExpression se = new SortExpression(PolicyLinkFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.PolicyLinkEntity);
            pp.Add(PolicyLinkEntity.PrefetchPathChildren, 0, null, null, se);
            vData.PolicyLink = new PolicyLinkEntity(id,pp);
            vData.PolicySet = vData.PolicyLink.Policy;

            return View(vData);
        }

        public ActionResult CreatePolicySetPolicySet(policyData vData, int id)
        {
            CreatePolicy(vData, id, true, false);
            vData.PolicySet = vData.Policy;
            return RedirectToAction("EditPolicySet", new { id = vData.PolicyLink.Id });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult ReferencePolicy(policyData vData,int id, bool isDoc, FormCollection collection)
        {
            int parse;
            if (int.TryParse(collection["libraryPolicyId"], out parse) && parse > 0)
            {
                PolicyEntity copy = duplicator.dupPolicy(parse);

                vData.PolicyLink = new PolicyLinkEntity();
                vData.PolicyLink.PolicyId = copy.Id;

                if (isDoc)
                {
                    vData.PolicyDocument = new PolicyDocumentEntity(id);
                    vData.PolicyDocument.PolicyLink = vData.PolicyLink;
                    vData.PolicyDocument.Save(true);

                    return RedirectToAction("EditPolicyDoc", new { id = id });
                }
                else
                {
                    vData.PolicyLink.ParentId = id;

                    PolicyLinkCollection maxColl = new PolicyLinkCollection();
                    PredicateExpression pe = new PredicateExpression(PolicyLinkFields.ParentId == id);
                    object maxObj = maxColl.GetScalar(PolicyLinkFieldIndex.Order, null, AggregateFunction.Max, pe);
                    if (maxObj != null && maxObj != DBNull.Value)
                        vData.PolicyLink.Order = (int)maxObj + 1;
                    else
                        vData.PolicyLink.Order = 0;

                    vData.PolicyLink.Save();

                    return RedirectToAction("EditPolicySet", new { id = id });
                }
            }
            else
                return RedirectToAction("AddPolicy", new { id = id, isDoc = isDoc });
        }

        [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
        public ActionResult CreatePolicySetPolicy(policyData vData, int id, bool isDoc, FormCollection collection)
        {
            if (isDoc)
            {
                vData.PolicyDocument = new PolicyDocumentEntity(id);
                CreatePolicy(vData, null, false, false);
                vData.PolicyDocument.PolicyLink = vData.PolicyLink;
                vData.PolicyDocument.Save(true);
            }
            else
            {
                CreatePolicy(vData, id, false, false);
            }

            if (collection["description"].Length > 0)
            {
                vData.Policy.Description = collection["description"];
                vData.Policy.Save();
            }

            return RedirectToAction("EditPolicy", new { id = vData.PolicyLink.Id });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult PolicySetDetailUpdate(policyData vData, int id, int id2, FormCollection collection)
        {
            vData.PolicySet = new PolicyEntity(id);
            vData.PolicySet.Description = collection["description"];
            vData.PolicySet.CombineModeId = int.Parse(collection["combineModeId"]);
            vData.PolicySet.Save(true);

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction("EditPolicySet", new { id = id2 });
        }

        [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
        public ActionResult PolicyOrder(policyData vData, int id, FormCollection collection)
        {
            PolicyLinkEntity policyLink = new PolicyLinkEntity(id);
            PolicyLinkCollection coll = new PolicyLinkCollection();

            PredicateExpression pe = new PredicateExpression(PolicyLinkFields.Id != policyLink.Id);
            pe.Add(PolicyLinkFields.ParentId == policyLink.ParentId);
            SortExpression se = null;

            if (collection["up"] != null)
            {
                // Find all categories with display index less than ours.
                pe.Add(PolicyLinkFields.Order <= policyLink.Order);

                // Order by display index, highest first.
                se = new SortExpression(PolicyLinkFields.Order | SortOperator.Descending);
            }
            else
            {
                // Find all categories with display index greater than ours.
                pe.Add(PolicyLinkFields.Order >= policyLink.Order);

                // Order by display index, lowest first.
                se = new SortExpression(PolicyLinkFields.Order | SortOperator.Ascending);
            }

            // Swap with closest one.
            if (coll.GetMulti(pe, 1, se) && coll.Count > 0)
            {
                int temp = coll[0].Order;
                coll[0].Order = policyLink.Order;
                policyLink.Order = temp;

                policyLink.Save();
                coll.SaveMulti();
            }

            return RedirectToAction("EditPolicySet", new { id = policyLink.ParentId });
        }
        #endregion

        #region POLICY
        public ActionResult AddPolicy(policyData vData, int id, bool isDoc)
        {
            vData.IsDocumentLink = isDoc;
            if (isDoc)
                vData.PolicyDocument = new PolicyDocumentEntity(id);
            else
                vData.PolicyLink = new PolicyLinkEntity(id);

            return View(vData);
        }

        public ActionResult EditPolicy(policyData vData, int id)
        {
            vData.PolicyLink = new PolicyLinkEntity(id);

            SortExpression se = new SortExpression(RuleFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.PolicyEntity);
            pp.Add(PolicyEntity.PrefetchPathRule, 0, null, null, se);
            vData.Policy = new PolicyEntity(vData.PolicyLink.PolicyId,pp);

            return View(vData);
        }

        private void CreatePolicy(policyData vData, int? id, bool set,bool isLibrary)
        {
            vData.Policy = new PolicyEntity();
            vData.Policy.LibraryId = vData.Library.Id;
            vData.Policy.Description = set ? "new policy set" : "new policy";
            vData.Policy.Set = set;
            vData.Policy.IsLibrary = isLibrary;
            vData.Policy.Target.Description = string.Empty;

            vData.PolicyLink = new PolicyLinkEntity();
            vData.PolicyLink.Policy = vData.Policy;

            if (id.HasValue)
            {
                vData.PolicyLink.ParentId = id;

                PolicyLinkCollection maxColl = new PolicyLinkCollection();
                PredicateExpression pe = new PredicateExpression(PolicyLinkFields.ParentId == id);
                object maxObj = maxColl.GetScalar(PolicyLinkFieldIndex.Order, null, AggregateFunction.Max, pe);
                if (maxObj != null && maxObj != DBNull.Value)
                    vData.PolicyLink.Order = (int)maxObj + 1;
                else
                    vData.PolicyLink.Order = 0;
            }

            CombineModeCollection cmcoll = new CombineModeCollection();
            cmcoll.GetMulti((CombineModeFields.Name == "deny-overrides"));
            vData.Policy.CombineModeId = cmcoll[0].Id;

            vData.Policy.Save(true);
        }

        static private void DeletePolicyLink(PolicyLinkEntity ple)
        {
            foreach (PolicyLinkEntity child in ple.Children)
            {
                DeletePolicyLink(child);
            }

            PolicyEntity delPolicy = ple.Policy;

            ple.Delete();

            DeletePolicy(delPolicy);
        }

        static private void DeletePolicy(PolicyEntity pe)
        {
            // Delete target conditions.
            foreach (DecisionNodeEntity ce in pe.Target.ConditionCollectionViaTargetCondition)
            {
                DeleteDecisionNode(ce);
            }

            // Delete rule conditions.
            foreach (RuleEntity re in pe.Rule)
            {
                DeleteDecisionNode(re.Condition);
            }

            // Delete the policy.
            pe.Delete();

            // Delete the target.
            pe.Target.Delete();
        }

        public ActionResult DeletePolicy(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(id);
            DeletePolicyLink(vData.PolicyLink);

            return RedirectToAction("EditPolicySet", new { id = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult PolicyDetailUpdate(policyData vData, int id, FormCollection collection)
        {
            vData.PolicyLink = new PolicyLinkEntity(id);
            vData.Policy = vData.PolicyLink.Policy;
            vData.Policy.Description = collection["description"];
            vData.Policy.CombineModeId = int.Parse(collection["combineModeId"]);
            vData.Policy.Save(true);

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction(GetPolicyAction(vData.Policy), new { id = vData.PolicyLink.Id });
        }

        [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
        public ActionResult RuleOrder(policyData vData, int id, int linkId, FormCollection collection)
        {
            RuleEntity rule = new RuleEntity(id);
            RuleCollection coll = new RuleCollection();

            PredicateExpression pe = new PredicateExpression(RuleFields.Id != rule.Id);
            pe.Add(RuleFields.PolicyId == rule.PolicyId);
            SortExpression se = null;

            if (collection["up"] != null)
            {
                // Find all categories with display index less than ours.
                pe.Add(RuleFields.Order <= rule.Order);

                // Order by display index, highest first.
                se = new SortExpression(RuleFields.Order | SortOperator.Descending);
            }
            else
            {
                // Find all categories with display index greater than ours.
                pe.Add(RuleFields.Order >= rule.Order);

                // Order by display index, lowest first.
                se = new SortExpression(RuleFields.Order | SortOperator.Ascending);
            }

            // Swap with closest one.
            if (coll.GetMulti(pe, 1, se) && coll.Count > 0)
            {
                int temp = coll[0].Order;
                coll[0].Order = rule.Order;
                rule.Order = temp;

                rule.Save();
                coll.SaveMulti();
            }

            return RedirectToAction("EditPolicy", new { id = linkId });
        }
        #endregion

        #region CONDITION
        public ActionResult CreateTargetCondition(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            vData.Target = new TargetEntity(id);
            vData.Condition = new DecisionNodeEntity();
            vData.Condition.Type = constants.conditionType;
            vData.Condition.CombineAnd = true;

            TargetConditionEntity tce = new TargetConditionEntity();
            tce.Target = vData.Target;
            tce.DecisionNode = vData.Condition;
            tce.Save(true);

            ViewData["title"] = "new target condition";

            return View("EditTarget",vData);
        }
        #endregion

        #region TARGET
        public ActionResult EditTarget(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            SortExpression se = new SortExpression(DecisionNodeFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.DecisionNodeEntity);
            pp.Add(DecisionNodeEntity.PrefetchPathChildren, 0, null, null, se);
            vData.Condition = new DecisionNodeEntity(id,pp);

            ViewData["title"] = "edit target condition";

            return View(vData);
        }
        #endregion

        #region SUB-CONDITIONS
        public ActionResult CreateSubCondition(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            DecisionNodeEntity ce = new DecisionNodeEntity(id);

            vData.Condition = new DecisionNodeEntity();
            vData.Condition.Type = constants.conditionType;
            vData.Condition.Parent = ce;

            DecisionNodeCollection maxColl = new DecisionNodeCollection();
            PredicateExpression pe = new PredicateExpression(DecisionNodeFields.ParentId == id);
            object maxObj = maxColl.GetScalar(DecisionNodeFieldIndex.Order, null, AggregateFunction.Max, pe);
            if (maxObj != null && maxObj != DBNull.Value)
                vData.Condition.Order = (int)maxObj + 1;
            else
                vData.Condition.Order = 0;

            vData.Condition.Save();

            ViewData["title"] = "new sub-condition";

            return View("EditCondition", vData);
        }

        public ActionResult EditCondition(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            SortExpression se = new SortExpression(DecisionNodeFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.DecisionNodeEntity);
            pp.Add(DecisionNodeEntity.PrefetchPathChildren, 0, null, null, se);
            vData.Condition = new DecisionNodeEntity(id, pp);

            ViewData["title"] = "edit condition";

            return View(vData);
        }
        #endregion

        #region RULE
        public ActionResult CreateRule(policyData vData, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);
            vData.Policy = vData.PolicyLink.Policy;
            vData.Rule = new RuleEntity();
            vData.Rule.Policy = vData.Policy;
            vData.Rule.Condition.Type = constants.conditionType;
            vData.Condition = vData.Rule.Condition;
            vData.Condition.CombineAnd = true;

            RuleCollection maxColl = new RuleCollection();
            PredicateExpression pe = new PredicateExpression(RuleFields.PolicyId == vData.PolicyLink.PolicyId);
            object maxObj = maxColl.GetScalar(RuleFieldIndex.Order, null, AggregateFunction.Max, pe);
            if (maxObj != null && maxObj != DBNull.Value)
                vData.Rule.Order = (int)maxObj + 1;
            else
                vData.Rule.Order = 0;

            EffectCollection ecoll = new EffectCollection();
            ecoll.GetMulti((EffectFields.Name == "permit"));
            vData.Rule.EffectId = ecoll[0].Id;

            vData.Rule.Save(true);

            return RedirectToAction("EditRule", new { id = vData.Rule.Id, linkId = linkId });
        }

        public ActionResult EditRule(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            SortExpression se = new SortExpression(DecisionNodeFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.RuleEntity);
            pp.Add(RuleEntity.PrefetchPathCondition).SubPath.Add(DecisionNodeEntity.PrefetchPathChildren, 0, null, null, se);
            vData.Rule = new RuleEntity(id, pp);
            vData.Condition = vData.Rule.Condition;

            return View(vData);
        }

        public ActionResult DeleteRule(policyData vData, int id, int linkId)
        {
            vData.Rule = new RuleEntity(id);
            DeleteDecisionNode(vData.Rule.Condition);

            return RedirectToAction("EditPolicy",new { id = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult SetRuleEffect(policyData vData, int id, int linkId, FormCollection collection)
        {
            vData.Rule = new RuleEntity(id);
            vData.Rule.EffectId = int.Parse(collection["EffectId"]);
            vData.Rule.Save(true);

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction("EditRule", new { id = vData.Rule.Id, linkId = linkId });
        }

        #endregion

        #region ATTRIBUTE MATCH

        public ActionResult CreateMatch(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            vData.Condition = new DecisionNodeEntity(id);
            vData.DecisionNode = new DecisionNodeEntity();
            vData.DecisionNode.Type = constants.attributeMatchType;
            vData.DecisionNode.Parent = vData.Condition;

            ViewData["title"] = "new match";

            if (vData.DecisionNode.Parent.Rule.Count > 0)
                ViewData["selectList"] = vData.allAttributes(vData.DecisionNode.AttributeId);
            else
                ViewData["selectList"] = vData.subjectAttributes(vData.DecisionNode.AttributeId);

            return View("EditMatch", vData);
        }

        public ActionResult EditMatch(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);

            SortExpression se = new SortExpression(AttributeValueFields.Order | SortOperator.Ascending);
            PrefetchPath pp = new PrefetchPath(EntityType.DecisionNodeEntity);
            pp.Add(DecisionNodeEntity.PrefetchPathAttributeValue, 0, null, null, se);
            vData.DecisionNode = new DecisionNodeEntity(id,pp);

            ViewData["title"] = "edit match";

//            if (vData.DecisionNode.Parent.Rule.Count > 0)
                ViewData["selectList"] = vData.allAttributes(vData.DecisionNode.AttributeId);
            //else
            //    ViewData["selectList"] = vData.subjectAttributes(vData.DecisionNode.AttributeId);

            return View(vData);
        }

        public ActionResult DeleteDecisionNode(policyData vData, int id, int linkId)
        {
            vData.PolicyLink = new PolicyLinkEntity(linkId);
            vData.DecisionNode = new DecisionNodeEntity(id);

            string redirectAction;
            int redirectId;
            if (!vData.DecisionNode.ParentId.HasValue)
            {
                redirectAction = GetPolicyAction(vData.PolicyLink.Policy);
                redirectId = vData.PolicyLink.Id;
            }
            else if (vData.DecisionNode.Parent.ParentId.HasValue)
            {
                // This is a sub-condition rather than a top-level target condition or rule condition.
                redirectAction = "EditCondition";
                redirectId = vData.DecisionNode.ParentId.Value;
            }
            else if (vData.DecisionNode.Parent.TargetCondition.Count > 0)
            {
                redirectAction = "EditCondition";
                redirectId = vData.DecisionNode.Parent.Id;
            }
            else
            {
                redirectAction = "EditRule";
                redirectId = vData.DecisionNode.Parent.Rule[0].Id;
            }

            DeleteDecisionNode(vData.DecisionNode);

            return RedirectToAction(redirectAction, new { id = redirectId, linkId = linkId });
        }

        static private void DeleteDecisionNode(DecisionNodeEntity de)
        {
            foreach (DecisionNodeEntity child in de.Children)
            {
                DeleteDecisionNode(child);
            }

            de.AttributeValue.DeleteMulti();
            de.TargetCondition.DeleteMulti();
            de.Rule.DeleteMulti();
            de.Delete();
        }

        public ActionResult AddValue(policyData vData, int id, bool literal, int linkId)
        {
            AttributeValueEntity ave = new AttributeValueEntity();
            ave.AttributeMatchId = id;
            ave.Literal = literal;

            AttributeValueCollection maxColl = new AttributeValueCollection();
            PredicateExpression pe = new PredicateExpression(AttributeValueFields.AttributeMatchId == id);
            object maxObj = maxColl.GetScalar(AttributeValueFieldIndex.Order, null, AggregateFunction.Max,pe);
            if (maxObj != null && maxObj != DBNull.Value)
                ave.Order = (int)maxObj + 1;
            else
                ave.Order = 0;

            if (literal)
                ave.Value = string.Empty;
            else
                ave.Value = null;

            ave.Save();

            return RedirectToAction("EditMatch", new { id = id, linkId = linkId });
        }

        public ActionResult DeleteValue(policyData vData, int id, int valueId, int linkId)
        {
            AttributeValueEntity ave = new AttributeValueEntity(valueId);
            ave.Delete();

            return RedirectToAction("EditMatch", new { id = id, linkId = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult SetConditionOperator(policyData vData, int id, int linkId, FormCollection collection)
        {
            vData.Condition = new DecisionNodeEntity(id);
            vData.Condition.CombineAnd = collection["operator"] == "AND" ? true : false;
            vData.Condition.Save();

            return RedirectToAction("EditCondition", new { id = id, linkId = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult SetAttribute(policyData vData, int id, int id2, int linkId, FormCollection collection)
        {
            vData.DecisionNode = new DecisionNodeEntity(id);
            if (vData.DecisionNode.IsNew)
            {
                vData.DecisionNode.Type = constants.attributeMatchType;

                DecisionNodeCollection maxColl = new DecisionNodeCollection();
                PredicateExpression pe = new PredicateExpression(DecisionNodeFields.ParentId == id2);
                object maxObj = maxColl.GetScalar(DecisionNodeFieldIndex.Order, null, AggregateFunction.Max, pe);
                if (maxObj != null && maxObj != DBNull.Value)
                    vData.DecisionNode.Order = (int)maxObj + 1;
                else
                    vData.DecisionNode.Order = 0;

                AttributeValueEntity ave = new AttributeValueEntity();
                ave.AttributeMatch = vData.DecisionNode;
                ave.Literal = true;
                ave.Value = string.Empty;
            }
            vData.DecisionNode.ParentId = id2;
            vData.DecisionNode.AttributeId = int.Parse(collection["AttributeId"]);

            if (vData.DecisionNode.Attribute.AttributeType.Name == "uri")
                vData.DecisionNode.Extra = collection["uriExtra"];
            else if (vData.DecisionNode.Attribute.AttributeType.Name == "param")
                vData.DecisionNode.Extra = collection["extra"];
            else
                vData.DecisionNode.Extra = string.Empty;

            vData.DecisionNode.Save(true);

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction("EditMatch", new { id = vData.DecisionNode.Id, linkId = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
        public ActionResult UpdateAttributeValue(policyData vData, int id, int valueId, int linkId, FormCollection collection)
        {
            AttributeValueEntity attrValue = new AttributeValueEntity(valueId);

            if (attrValue.Literal)
            {
                attrValue.Value = collection["Literal"];
            }
            else
            {
                if (collection["LookupId"] != null && collection["LookupId"] != string.Empty)
                    attrValue.AttributeId = int.Parse(collection["LookupId"]);
                else
                    attrValue.AttributeId = null;
            }

            attrValue.Save();

            TempData["message"] = policyData.detailsSaved;

            return RedirectToAction("EditMatch", new { id = id, linkId = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post),ValidateInput(false)]
        public ActionResult ValueOrder(policyData vData, int id, int id2, int linkId, FormCollection collection)
        {
            AttributeValueEntity attrValue = new AttributeValueEntity(id2);
            AttributeValueCollection coll = new AttributeValueCollection();

            PredicateExpression pe = new PredicateExpression(AttributeValueFields.Id != attrValue.Id);
            pe.Add(AttributeValueFields.AttributeMatchId == id);
            SortExpression se = null;

            if (collection["up"] != null)
            {
                // Find all categories with display index less than ours.
                pe.Add(AttributeValueFields.Order <= attrValue.Order);

                // Order by display index, highest first.
                se = new SortExpression(AttributeValueFields.Order | SortOperator.Descending);
            }
            else
            {
                // Find all categories with display index greater than ours.
                pe.Add(AttributeValueFields.Order >= attrValue.Order);

                // Order by display index, lowest first.
                se = new SortExpression(AttributeValueFields.Order | SortOperator.Ascending);
            }

            // Swap with closest one.
            if (coll.GetMulti(pe, 1, se) && coll.Count > 0)
            {
                int temp = coll[0].Order;
                coll[0].Order = attrValue.Order;
                attrValue.Order = temp;

                attrValue.Save();
                coll.SaveMulti();
            }

            return RedirectToAction("EditMatch", new { id = id, linkId = linkId });
        }

        [AcceptVerbs(HttpVerbs.Post), ValidateInput(false)]
        public ActionResult DecisionNodeOrder(policyData vData, int id, int id2, int linkId, FormCollection collection)
        {
            DecisionNodeEntity match = new DecisionNodeEntity(id2);
            DecisionNodeCollection coll = new DecisionNodeCollection();

            PredicateExpression pe = new PredicateExpression(DecisionNodeFields.Id != match.Id);
            pe.Add(DecisionNodeFields.ParentId == id);
            SortExpression se = null;

            if (collection["up"] != null)
            {
                // Find all categories with display index less than ours.
                pe.Add(DecisionNodeFields.Order <= match.Order);

                // Order by display index, highest first.
                se = new SortExpression(DecisionNodeFields.Order | SortOperator.Descending);
            }
            else
            {
                // Find all categories with display index greater than ours.
                pe.Add(DecisionNodeFields.Order >= match.Order);

                // Order by display index, lowest first.
                se = new SortExpression(DecisionNodeFields.Order | SortOperator.Ascending);
            }

            // Swap with closest one.
            if (coll.GetMulti(pe, 1, se) && coll.Count > 0)
            {
                int temp = coll[0].Order;
                coll[0].Order = match.Order;
                match.Order = temp;

                match.Save();
                coll.SaveMulti();
            }

            string action = collection["backTo"];
            if (action == "EditRule")
            {
                vData.Condition = new DecisionNodeEntity(id);
                id = vData.Condition.Rule[0].Id;
            }

            return RedirectToAction(action, new { id = id, linkId = linkId });
        }

        #endregion
    }
}


text:
package petablox.program.visitors;

import soot.jimple.internal.JNopStmt;

/**
 * Visitor over all assignment statements in all methods in the program.
 */

public interface INopInstVisitor extends IInstVisitor {
    public void visit(JNopStmt s);
}


text:
<?php

$start_time = microtime(1);

// no cache
header("Expires: Thu, 01 Jan 1970 00:00:00 GMT");
header("Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT");
header("Pragma: no-cache");
header("Cache-Control: no-store, no-cache, must-revalidate");

require_once "common.php";

set_error_handler(array($debug = Debug::getInstance(), 'parsePHPError'));

$response = new AjaxBackend();
Stb::getInstance();
$loader = new DataLoader($_REQUEST['type'], $_REQUEST['action']);
$response->setBody($loader->getResult());

echo "generated in: ".round(microtime(1) - $start_time, 3)."s; query counter: ".Mysql::get_num_queries()."; cache hits: ".Mysql::get_cache_hits()."; cache miss: ".Mysql::get_cache_misses()."; ".$debug->getErrorStr();
$response->send();
?>


text:
template <typename Derived>
class FixedAxisOneDoFJoint : public DrakeJointImpl<Derived> {
  // disable copy construction and assignment
  // FixedAxisOneDoFJoint(const DrakeJoint&) = delete;
  // FixedAxisOneDoFJoint& operator=(const FixedAxisOneDoFJoint&) = delete;

 private:
  drake::TwistVector<double> joint_axis;
  double damping;
  double coulomb_friction;
  double coulomb_window;

 protected:
  FixedAxisOneDoFJoint(Derived& derived, const std::string& name,
                       const Eigen::Isometry3d& transform_to_parent_body,
                       const drake::TwistVector<double>& _joint_axis)
      : DrakeJointImpl<Derived>(derived, name, transform_to_parent_body, 1, 1),
        joint_axis(_joint_axis),
        damping(0.0),
        coulomb_friction(0.0),
        coulomb_window(0.0) {}

 public:
  virtual ~FixedAxisOneDoFJoint() {}

  using DrakeJoint::getNumPositions;
  using DrakeJoint::getNumVelocities;

  template <typename DerivedQ, typename DerivedMS>
  void motionSubspace(
      const Eigen::MatrixBase<DerivedQ>& q,
      Eigen::MatrixBase<DerivedMS>& motion_subspace,
      typename drake::math::Gradient<DerivedMS, Eigen::Dynamic>::type*
          dmotion_subspace = nullptr) const {
    motion_subspace = joint_axis.cast<typename DerivedQ::Scalar>();
    if (dmotion_subspace) {
      dmotion_subspace->setZero(motion_subspace.size(), getNumPositions());
    }
  }

  template <typename DerivedQ, typename DerivedV>
  void motionSubspaceDotTimesV(
      const Eigen::MatrixBase<DerivedQ>& q,
      const Eigen::MatrixBase<DerivedV>& v,
      Eigen::Matrix<typename DerivedQ::Scalar, 6, 1>&
          motion_subspace_dot_times_v,
      typename drake::math::Gradient<
          Eigen::Matrix<typename DerivedQ::Scalar, 6, 1>, Eigen::Dynamic>::type*
          dmotion_subspace_dot_times_vdq = nullptr,
      typename drake::math::Gradient<
          Eigen::Matrix<typename DerivedQ::Scalar, 6, 1>, Eigen::Dynamic>::type*
          dmotion_subspace_dot_times_vdv = nullptr) const {
    motion_subspace_dot_times_v.setZero();

    if (dmotion_subspace_dot_times_vdq) {
      dmotion_subspace_dot_times_vdq->setZero(drake::kTwistSize, 1);
    }

    if (dmotion_subspace_dot_times_vdv) {
      dmotion_subspace_dot_times_vdv->setZero(drake::kTwistSize, 1);
    }
  }

  template <typename DerivedQ>
  void qdot2v(const Eigen::MatrixBase<DerivedQ>& q,
              Eigen::Matrix<typename DerivedQ::Scalar, Eigen::Dynamic,
                            Eigen::Dynamic, 0, DrakeJoint::MAX_NUM_VELOCITIES,
                            DrakeJoint::MAX_NUM_POSITIONS>& qdot_to_v,
              Eigen::Matrix<typename DerivedQ::Scalar, Eigen::Dynamic,
                            Eigen::Dynamic>* dqdot_to_v) const {
    qdot_to_v.setIdentity(getNumVelocities(), getNumPositions());
    drake::resizeDerivativesToMatchScalar(qdot_to_v, q(0));
    if (dqdot_to_v) {
      dqdot_to_v->setZero(qdot_to_v.size(), getNumPositions());
    }
  }

  template <typename DerivedQ>
  void v2qdot(const Eigen::MatrixBase<DerivedQ>& q,
              Eigen::Matrix<typename DerivedQ::Scalar, Eigen::Dynamic,
                            Eigen::Dynamic, 0, DrakeJoint::MAX_NUM_POSITIONS,
                            DrakeJoint::MAX_NUM_VELOCITIES>& v_to_qdot,
              Eigen::Matrix<typename DerivedQ::Scalar, Eigen::Dynamic,
                            Eigen::Dynamic>* dv_to_qdot) const {
    v_to_qdot.setIdentity(getNumPositions(), getNumVelocities());
    drake::resizeDerivativesToMatchScalar(v_to_qdot, q(0));
    if (dv_to_qdot) {
      dv_to_qdot->setZero(v_to_qdot.size(), getNumPositions());
    }
  }

  template <typename DerivedV>
  Eigen::Matrix<typename DerivedV::Scalar, Eigen::Dynamic, 1> frictionTorque(
      const Eigen::MatrixBase<DerivedV>& v) const {
    typedef typename DerivedV::Scalar Scalar;
    Eigen::Matrix<Scalar, Eigen::Dynamic, 1> ret(getNumVelocities(), 1);
    using std::abs;
    ret[0] = damping * v[0];
    Scalar coulomb_window_fraction = v[0] / coulomb_window;
    Scalar coulomb =
        std::min(Scalar(1), std::max(Scalar(-1), coulomb_window_fraction)) *
        coulomb_friction;
    ret[0] += coulomb;
    return ret;
  }

  void setJointLimits(double joint_limit_min, double joint_limit_max) {
    if (joint_limit_min > joint_limit_max) {
      throw std::logic_error(
          "ERROR: joint_limit_min cannot be larger than joint_limit_max");
    }

    DrakeJoint::joint_limit_min[0] = joint_limit_min;
    DrakeJoint::joint_limit_max[0] = joint_limit_max;
  }

  Eigen::VectorXd zeroConfiguration() const { return Eigen::VectorXd::Zero(1); }

  Eigen::VectorXd randomConfiguration(
      std::default_random_engine& generator) const {
    Eigen::VectorXd q(1);
    if (std::isfinite(DrakeJoint::joint_limit_min.value()) &&
        std::isfinite(DrakeJoint::joint_limit_max.value())) {
      std::uniform_real_distribution<double> distribution(
          DrakeJoint::joint_limit_min.value(),
          DrakeJoint::joint_limit_max.value());
      q[0] = distribution(generator);
    } else {
      std::normal_distribution<double> distribution;
      double stddev = 1.0;
      double joint_limit_offset = 1.0;
      if (std::isfinite(DrakeJoint::joint_limit_min.value())) {
        distribution = std::normal_distribution<double>(
            DrakeJoint::joint_limit_min.value() + joint_limit_offset, stddev);
      } else if (std::isfinite(DrakeJoint::joint_limit_max.value())) {
        distribution = std::normal_distribution<double>(
            DrakeJoint::joint_limit_max.value() - joint_limit_offset, stddev);
      } else {
        distribution = std::normal_distribution<double>();
      }

      q[0] = distribution(generator);
      if (q[0] < DrakeJoint::joint_limit_min.value()) {
        q[0] = DrakeJoint::joint_limit_min.value();
      }
      if (q[0] > DrakeJoint::joint_limit_max.value()) {
        q[0] = DrakeJoint::joint_limit_max.value();
      }
    }
    return q;
  }

  void setDynamics(double damping_in, double coulomb_friction_in,
                   double coulomb_window_in) {
    damping = damping_in;
    coulomb_friction = coulomb_friction_in;
    coulomb_window = coulomb_window_in;
  }

  virtual std::string getPositionName(int index) const {
    if (index != 0) throw std::runtime_error("bad index");
    return DrakeJoint::name;
  }

 public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
};


text:
package models;

import javax.persistence.*;

@Entity
@Table(name="SQA_TYPE_KNOWLEDGE")
public class TypeKnowledge extends AbstractEnumWithoutKey{
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	protected Long typeKnowledgeId;

	public Long getTypeKnowledgeId() {
		return typeKnowledgeId;
	}

	public void setTypeKnowledgeId(Long typeKnowledgeId) {
		this.typeKnowledgeId = typeKnowledgeId;
	}
}


text:
.alamat-td {
	white-space:pre-wrap;
	word-break: break-word;
}


text:
using System;

namespace Knowledge.KIF.Converter.model.kif {
    public class KifString : KifTerm {//TODO: another types???

        public static readonly string DOUBLE_QUOTE = "\"";

        public override string ToString() {
            return DOUBLE_QUOTE + base.ToString() + DOUBLE_QUOTE;
        }

        public KifString(String str) : base(str) {
        }
    }
}


text:
  display: none;
  visibility: hidden;
}

#eligible-list .collection-item.selected-res i.add-icon {
  visibility: collapse;
}

#eligible-list .collection-item:not(.selected-res):hover i.add-icon {
  display: inline-block;
  visibility: visible;
}

#eligible-list .collection-item:not(.selected-res) i.selected-icon {
  display: none;
}

.selected-icons {
  display: none;
}

#selected-list .collection-item:hover .selected-icons {
  display: inline-block;
  cursor: pointer;
}

#print-btn.btn-flat {
  border: 1px lightgrey solid;
}

li.collection-item.item-group-divider {
  border-bottom: solid 2px #b3b3b3;
}


text:
/**
 *
 */
package net.vidageek.mirror.provider.java;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

import net.vidageek.mirror.exception.ReflectionProviderException;
import net.vidageek.mirror.provider.ConstructorReflectionProvider;

/**
 * @author jonasabreu
 *
 */
public final class PureJavaConstructorReflectionProvider<T> implements ConstructorReflectionProvider<T> {

	private final Class<T> clazz;

	private final Constructor<T> constructor;

	public PureJavaConstructorReflectionProvider(final Class<T> clazz, final Constructor<T> constructor) {
		this.clazz = clazz;
		this.constructor = constructor;
	}

	public void setAccessible() {
		constructor.setAccessible(true);
	}

	public T instantiate(final Object... args) {
		try {
			setAccessible();
			T newInstance = constructor.newInstance(args);
			return newInstance;
		} catch (IllegalArgumentException e) {
			throw new ReflectionProviderException("could not invoke constructor " + constructor.toGenericString()
					+ " on class " + clazz.getName(), e);
		} catch (InstantiationException e) {
			throw new ReflectionProviderException("could not invoke constructor " + constructor.toGenericString()
					+ " on class " + clazz.getName(), e);
		} catch (IllegalAccessException e) {
			throw new ReflectionProviderException("could not invoke constructor " + constructor.toGenericString()
					+ " on class " + clazz.getName(), e);
		} catch (InvocationTargetException e) {
			throw new ReflectionProviderException("could not invoke constructor " + constructor.toGenericString()
					+ " on class " + clazz.getName(), e.getCause() == null ? e : e.getCause());
		}
	}

	public Class<?>[] getParameters() {
		return constructor.getParameterTypes();
	}
}