text:
> see https://aka.ms/autorest

This is the AutoRest configuration file for Fabric Admin.

---
## Getting Started
To build the SDK for Fabric Admin, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`

To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Basic Information
These are the global settings for the Fabric API.

``` yaml
title: FabricAdminClient
description: Fabric Admin Client
openapi-type: arm
tag: package-2016-05-01
```

### Tag: package-2016-05-01

These settings apply only when `--tag=package-2016-05-01` is specified on the command line.

``` yaml $(tag) == 'package-2016-05-01'
input-file:
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ApplicationOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ComputeOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/Fabric.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGateway.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGatewayPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/FabricLocation.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/FileShare.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/InfraRole.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/InfraRoleInstance.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/IpPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/LogicalNetwork.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StoragePool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StorageSystem.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/Volume.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/LogicalSubnet.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/MacAddressPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/NetworkOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnitNode.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/SlbMuxInstance.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StorageOperationResults.json"
```

### Tag: package-2018-10-01

These settings apply only when `--tag=package-2018-10-01` is specified on the command line.

``` yaml $(tag) == 'package-2018-10-01'
input-file:
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ApplicationOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ComputeOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/Fabric.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGateway.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/EdgeGatewayPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/FabricLocation.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/FileShare.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/InfraRole.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/InfraRoleInstance.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/IpPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/LogicalNetwork.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StoragePool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StorageSystem.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/LogicalSubnet.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/MacAddressPool.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/NetworkOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnit.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/ScaleUnitNode.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/SlbMuxInstance.json"
    - "Microsoft.Fabric.Admin/preview/2016-05-01/StorageOperationResults.json"
    - "Microsoft.Fabric.Admin/preview/2018-10-01/Drive.json"
    - "Microsoft.Fabric.Admin/preview/2018-10-01/StorageSubSystem.json"
    - "Microsoft.Fabric.Admin/preview/2018-10-01/Volume.json"
```

---
# Code Generation

## C#

These settings apply only when `--csharp` is specified on the command line.
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`.

``` yaml $(csharp)
csharp:
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  namespace: Microsoft.AzureStack.Management.Fabric.Admin
  payload-flattening-threshold: 1
  output-folder: $(csharp-sdks-folder)/Generated
  clear-output-folder: true
```


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Hyménomyc. de France (Sceaux) 263 (1928)

#### Original name
Peniophora eichleri Bres. ex Sacc. & P. Syd., 1902

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
//$Id: MySQLMyISAMDialect.java 5685 2005-02-12 07:19:50Z steveebersole $
package org.hibernate.dialect;

/**
 * @author Gavin King
 */
public class MySQLMyISAMDialect extends MySQLDialect {

	public String getTableTypeString() {
		return " type=MyISAM";
	}

	public boolean dropConstraints() {
		return false;
	}

}


text:
package dokutoku.golden_thumb.seed

import dokutoku.golden_thumb.seed.traits.GoldenSeed
import net.minecraft.util.Icon
import net.minecraft.item.ItemStack
import net.minecraft.item.Item
import cpw.mods.fml.common.registry.GameRegistry

class LapisSeed(id: Int, crop: Int) extends GoldenSeed(id, crop) {

  val product = new ItemStack(Item.dyePowder, 1, 4)

}


text:
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Room extends Model
{
    protected $table = 'rooms';

    protected $fillable = ['name', 'description'];

    protected $visible = ['id', 'name', 'description', 'house', 'tasks'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function house()
    {
        return $this->belongsTo(House::class);
    }

    public function tasks()
    {
        return $this->hasMany(Task::class);
    }
}


text:
<?xml version="1.0"?>
<ArrayOfCommand xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Command xsi:type="Ignition">
    <StartTime>-2</StartTime>
    <Duration>0.5</Duration>
    <Throttle>75</Throttle>
  </Command>
  <Command xsi:type="Ignition">
    <StartTime>0</StartTime>
    <Duration>6.0</Duration>
    <Throttle>100</Throttle>
  </Command>
  <Command xsi:type="Throttle">
    <StartTime>49</StartTime>
    <Duration>2</Duration>
    <TargetThrottle>85</TargetThrottle>
  </Command>
  <Command xsi:type="Throttle">
    <StartTime>70</StartTime>
    <Duration>5</Duration>
    <TargetThrottle>96</TargetThrottle>
  </Command>
  <Command xsi:type="Shutdown">
    <StartTime>90</StartTime>
    <Duration>2.0</Duration>
  </Command>
  <Command xsi:type="RelativePitch">
    <StartTime>90</StartTime>
    <Duration>15</Duration>
    <TargetOrientation>0</TargetOrientation>
  </Command>
  <Command xsi:type="Retrograde">
    <StartTime>105</StartTime>
    <Duration>140</Duration>
    <InitialAdjustmentTime>15</InitialAdjustmentTime>
  </Command>
  <Command xsi:type="Terminate">
    <StartTime>260</StartTime>
  </Command>
</ArrayOfCommand>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>de.uniba.kinf.jerusalem.gui.view.tablepanels</title>
<meta name="date" content="2014-04-16">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package de.uniba.kinf.jerusalem.gui.view.tablepanels

Class Summary

Class
Description

JerCheckBox

Dummy class to avoid that values in JerSelectionDialog
 .itemStateChanged() are overwritten with JComponent-specific (and therefore
 Look&Feel dependent) values.

JerSelectionDialog

Provides frame and actions to select columns in JerTable.

JerTable

JTable with regex filter which can be dynamically set.

JerTableColumnProps

Bundles information about specific table column of JerTableModel.

JerTableContainer

This class provides layout for JerTable.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes


text:
package org.softeg.slartus.forpdaplus.video.api;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * Format in the "fmt_list" parameter
 */
public class Quality implements Parcelable,Serializable {

    private CharSequence height;
    private CharSequence fileName;
    private boolean hd = false;

    public Quality() {

    }

    public CharSequence getHeight() {
        return height;
    }

    public void setHeight(CharSequence value) {
        height = value;
    }

    public CharSequence getFileName() {
        return fileName;
    }

    public void setFileName(CharSequence value) {
        this.fileName = value;
    }

    public static final Creator<Quality> CREATOR
            = new Creator<Quality>() {
        public Quality createFromParcel(Parcel in) {
            return new Quality(in);
        }

        public Quality[] newArray(int size) {
            return new Quality[size];
        }
    };

    protected Quality(Parcel parcel) {
        height = parcel.readString();
        fileName = parcel.readString();
        hd = parcel.readByte() == 1;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(VideoItem.getValueOrEmpty(height));
        parcel.writeString(VideoItem.getValueOrEmpty(fileName));
        parcel.writeByte(hd ? (byte) 1 : (byte) 0);
    }

    public CharSequence getTitle() {
        return height + (hd ? " (HD)" : "");
    }
}


text:
data Feed =
  BuildTask {
      blokName :: String,
      outPathBuild :: FilePath,
      relPath :: FilePath,
      srcFile :: Files.File
  }
  deriving Eq
-- <~~-------- meta.deriving.haskell

data Query
  = All
  | Some {
      feeds :: [String],
      cats :: [String],
      dates :: QueryDate
  }
  deriving Read
-- <~~---------- meta.deriving.haskell

data QueryDate
  = AnyDate
  | Between String String
  deriving Read
-- <~~---------- meta.deriving.haskell


text:
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% set page_title = 'Register' %}

{% block page_content %}

Not Accepting New Registrations

Thank you for your interest, but we're not accepting new
           registrations at this time. Please check back later.

{% endblock %}


text:
package org.openprovenance.prov.sql;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.openprovenance.prov.xml.builder.Equals;
import org.openprovenance.prov.xml.builder.HashCode;
import org.openprovenance.prov.xml.builder.ToString;
import org.openprovenance.prov.xml.builder.JAXBEqualsBuilder;
import org.openprovenance.prov.xml.builder.JAXBHashCodeBuilder;
import org.openprovenance.prov.xml.builder.JAXBToStringBuilder;

/**
 *
Java class for IDRef complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="IDRef">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <attribute ref="{http://www.w3.org/ns/prov#}ref use="required""/>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "IDRef")
public class IDRef
    implements Equals, HashCode, ToString
{

    @XmlAttribute(name = "ref", namespace = "http://www.w3.org/ns/prov#", required = true)
    protected QName ref;

    /**
     * Gets the value of the ref property.
     *
     * @return
     *     possible object is
     *     {@link QName }
     *
     */
    public QName getRef() {
        return ref;
    }

    /**
     * Sets the value of the ref property.
     *
     * @param value
     *     allowed object is
     *     {@link QName }
     *
     */
    public void setRef(QName value) {
        this.ref = value;
    }

    public void equals(Object object, EqualsBuilder equalsBuilder) {
        if (!(object instanceof IDRef)) {
            equalsBuilder.appendSuper(false);
            return ;
        }
        if (this == object) {
            return ;
        }
        final IDRef that = ((IDRef) object);
        equalsBuilder.append(this.getRef(), that.getRef());
    }

    public boolean equals(Object object) {
        if (!(object instanceof IDRef)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
        equals(object, equalsBuilder);
        return equalsBuilder.isEquals();
    }

    public void hashCode(HashCodeBuilder hashCodeBuilder) {
        hashCodeBuilder.append(this.getRef());
    }

    public int hashCode() {
        final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
        hashCode(hashCodeBuilder);
        return hashCodeBuilder.toHashCode();
    }

    public void toString(ToStringBuilder toStringBuilder) {
        {
            QName theRef;
            theRef = this.getRef();
            toStringBuilder.append("ref", theRef);
        }
    }

    public String toString() {
        final ToStringBuilder toStringBuilder = new JAXBToStringBuilder(this);
        toString(toStringBuilder);
        return toStringBuilder.toString();
    }

}


text:
require 'test_helper'

class TestConfigurationThreadSafe < MiniTest::Test
  module TestModule
    include Configurations

    configuration_defaults do |c|
      c.a = 'b'
    end
  end

  def test_thread_safe_default
    with_gc_disabled do
      ids = 1000.times.map do
        i = 0
        t = Thread.new do
          i = TestModule.configuration.object_id
        end

        t.join

        i
      end.map(&:object_id)

      assert_equal 1000, ids.uniq.size
    end
  end

  def test_thread_safe_config
    there = TestModule.configuration.a
    t = Thread.new do
      TestModule.configure do |c|
        c.a = 'c'
      end

      there = TestModule.configuration.a
    end

    t.join
    here = TestModule.configuration.a

    refute_equal here, there
  end

  def with_gc_disabled(&block)
    GC.disable
    yield
    GC.enable
  end

end


text:
package collins

import (
	"net/url"
	"reflect"

	"github.com/google/go-querystring/query"
)

// Credit to
// https://github.com/google/go-github/blob/7277108aa3e8823e0e028f6c74aea2f4ce4a1b5a/github/github.go#L102-L122
// addOptions adds the parameters in opt as URL query parameters to s.  opt
// must be a struct whose fields may contain "url" tags.
func addOptions(s string, opt interface{}) (string, error) {
	v := reflect.ValueOf(opt)
	if v.Kind() == reflect.Ptr && v.IsNil() {
		return s, nil
	}

	u, err := url.Parse(s)
	if err != nil {
		return s, err
	}

	qs, err := query.Values(opt)
	if err != nil {
		return s, err
	}

	u.RawQuery = qs.Encode()
	return u.String(), nil
}


text:
---
title: Rule no-caller
layout: doc
---
<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->
# Disallow Use of caller/callee (no-caller)

The use of `arguments.caller` and `arguments.callee` make several code optimizations impossible. They have been deprecated in future versions of JavaScript and their use is forbidden in ECMAScript 5 while in strict mode.

```js
function foo() {
    var callee = arguments.callee;
}
```

## Rule Details

This rule is aimed at discouraging the use of deprecated and sub-optimal code, but disallowing the use of `arguments.caller` and `arguments.callee`. As such, it will warn when `arguments.caller` and `arguments.callee` are used.

The following patterns are considered problems:

```js
/*eslint no-caller: 2*/

function foo(n) {
    if (n <= 0) {
        return;
    }

    arguments.callee(n - 1);   /*error Avoid arguments.callee.*/
}

[1,2,3,4,5].map(function(n) {
    return !(n > 1) ? 1 : arguments.callee(n - 1) * n; /*error Avoid arguments.callee.*/
});
```

The following patterns are not considered problems:

```js
/*eslint no-caller: 2*/

function foo(n) {
    if (n <= 0) {
        return;
    }

    foo(n - 1);
}

[1,2,3,4,5].map(function factorial(n) {
    return !(n > 1) ? 1 : factorial(n - 1) * n;
});
```

## Version

This rule was introduced in ESLint 0.0.6.

## Resources

* [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/no-caller.js)
* [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/no-caller.md)


text:
package com.cloud.legacymodel.network;

import com.cloud.legacymodel.Displayable;
import com.cloud.legacymodel.Identity;
import com.cloud.legacymodel.InternalIdentity;
import com.cloud.legacymodel.acl.ControlledEntity;

import java.util.List;

public interface FirewallRule extends ControlledEntity, Identity, InternalIdentity, Displayable {
    /**
     * @return external id.
     */
    String getXid();

    /**
     * @return first port of the source port range.
     */
    Integer getSourcePortStart();

    /**
     * @return last port of the source prot range.  If this is null, that means only one port is mapped.
     */
    Integer getSourcePortEnd();

    /**
     * @return protocol to open these ports for.
     */
    String getProtocol();

    Purpose getPurpose();

    State getState();

    long getNetworkId();

    Long getSourceIpAddressId();

    Integer getIcmpCode();

    Integer getIcmpType();

    List<String> getSourceCidrList();

    Long getRelated();

    FirewallRuleType getType();

    /**
     * @return
     */
    TrafficType getTrafficType();

    @Override
    boolean isDisplay();

    enum Purpose {
        Firewall, PortForwarding, LoadBalancing, Vpn, StaticNat, NetworkACL,
    }

    enum FirewallRuleType {
        System, // The pre-defined rules created by admin, in the system wide
        User // the rules created by user, to a specific ip
    }

    enum State {
        Staged, // Rule been created but has never got through network rule conflict detection.  Rules in this state can not be sent to network elements.
        Add,    // Add means the rule has been created and has gone through network rule conflict detection.
        Active, // Rule has been sent to the network elements and reported to be active.
        Revoke,  // Revoke means this rule has been revoked. If this rule has been sent to the network elements, the rule will be deleted from database.
        Deleting // rule has been revoked and is scheduled for deletion
    }

    enum TrafficType {
        Ingress, Egress
    }
}


text:
require 'compass/import-once/activate'
# Require any additional compass plugins here.
add_import_path 'static/bower_components/materialize/sass'

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "static/css"
sass_dir = "static/scss"
images_dir = "static/img"
javascripts_dir = "static/js"
fonts_dir = "static/font"

output_style = :nested

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
color_output = false

preferred_syntax = :scss


text:
package com.oregonscientific.meep.ebook;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.oregonscientific.meep.control.EbookCtrl;
import com.oregonscientific.meep.control.MeepStorageCtrl;
import com.oregonscientific.meep.customfont.MyButton;
import com.oregonscientific.meep.customfont.MyEditText;
import com.oregonscientific.meep.customfont.MyTextView;
import com.oregonscientific.meep.database.table.TableBlacklist;
import com.oregonscientific.meep.global.BadWordChecker;
import com.oregonscientific.meep.global.Global;
import com.oregonscientific.meep.global.Global.AppType;
import com.oregonscientific.meep.message.common.MeepAppMessage;
import com.oregonscientific.meep.message.common.MeepAppMessageCtrl;
import com.oregonscientific.meep.message.common.MeepLogger;
import com.oregonscientific.meep.message.common.OsListViewItem;
import com.oregonscientific.meep.message.common.MeepAppMessage.Category;
import com.oregonscientific.meep.notification.NotificationMessage;
import com.oregonscientific.meep.tool.ImageDownloader;
import android.app.DialogFragment;
import android.app.Fragment;
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Html.ImageGetter;
import android.util.Log;
import android.view.GestureDetector;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.GestureDetector.OnGestureListener;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.view.View.OnTouchListener;
import android.view.ViewGroup.LayoutParams;
import android.view.inputmethod.InputMethodManager;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import static com.oregonscientific.meep.ebook.ServiceController.*;

public class GridViewFragment extends Fragment {
	/*
	 * String RENAME = "Rename"; String ADD = "Add"; String DELETE = "Delete";
	 */

	// RingMenu ringMenu ;
	ImageView ring_delete;
	ImageView ring_rename;
	/*
	 * ImageView ring_menu_top_right_two; ImageView ring_menu_top_left_two;
	 * ImageView ring_menu_bottom_right_two; ImageView
	 * ring_menu_bottom_left_two;
	 */

	NotificationMessage notification;
	String Rename = "";

	Bitmap mBmpPreviewBg = null;
	Bitmap mBmpPrevieTop = null;

	private FullListViewActivity mContext;
	private ViewGroup mViewGroup = null;
	private String[] blackListWord;
	private BadWordChecker badWordChecker = new BadWordChecker();

	/** add new cache dir about ebook 's caches */
	private final static String CACHE_DIR = "ebook";
	private final static String BASE_STORAGE_PATH = "/data/home/";
	/*
	 * private final static String PATH_SDCARD = "/mnt/sdcard/"; private final
	 * static String PATH_EXT_SD = "/mnt/extsd/"; private final static String
	 * PATH_ICON_DIR = BASE_STORAGE_PATH + "ebook/icon/"; private final static
	 * String PATH_SMALL_ICON_DIR = BASE_STORAGE_PATH +"ebook/icon_s/"; private
	 * final static String PATH_LARGE_ICON_DIR = BASE_STORAGE_PATH
	 * +"ebook/icon_l/"; private final static String PATH_LARGE_DIM_ICON_DIR =
	 * BASE_STORAGE_PATH +"ebook/icon_ld/"; private final static String
	 * PATH_EBOOK_DATA_DIR = BASE_STORAGE_PATH +"ebook/data/"; private final
	 * static String EBOOK_PATH_BOOK_ICON_DEFAULT = BASE_STORAGE_PATH
	 * +"default/book_icon_default.png";
	 */
	private final static String PATH_FOR_UPDATE_CHECKING = BASE_STORAGE_PATH
			+ "ebook/checked";

	List<OsListViewItem> mListViewItemList = null;
	List<Bitmap> mImageList = null;
	List<String> mNameList = null;
	// 2013-3-15 - Amy - update shelves
	// LinearLayout mLayout = null;
	// ScrollView mScrollView = null;
	RelativeLayout mOptionLayout = null;
	RelativeLayout mRenameLayout = null;
	EditText mTxtRename = null;

	ImageView mSnackIcon = null;

	ImageView mBtnOptionPlay = null;
	ImageView mBtnOptionEdit = null;
	ImageView mBtnOptionDelete = null;
	ImageView mBtnOptionFavourite = null;
	ImageView mBtnOptionMessage = null;

	Button mBtnConfirm = null;
	RelativeLayout mPopupLayout = null;
	EditText mRenameText = null;

	private EditMode mEditMode = EditMode.VIEW;
	Handler mHandlerReadImg = null;
	Thread mThread = null;
	String mType = "";
	String mPath = "";
	GestureDetector mGuestureDetector = null;
	GestureDetector mItemGuestureDetector = null;

	Bitmap mImgTick = null;
	OsListViewItem mListViewItem = null;

	View mSelectedView = null;

	int mCorX = 0;
	int mCorY = 0;

	// 2013-3-15 - Amy - update shelves
	private GridView myEbooks = null;
	private EbooksAdapter ebookAdapter = null;
	private LoadImagesThread ebooksLoadThread = null;
	// 2013-3-16 - Amy - add AsyncTask to loading picture
	private ImageDownloader imageDownloader = null;
	Bitmap defaultCdCover;
	DialogFragment popupFragment;

	public static GridViewFragment newInstance(String tag) {
		GridViewFragment f = new GridViewFragment();
		// Supply index input as an argument.
		Bundle args = new Bundle();
		args.putString("tag", tag);
		f.setArguments(args);

		return f;
	}

	public enum EditMode {
		VIEW, DELETE, EDIT, OPTION_SHOWN,
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		// return super.onCreateView(inflater, container, savedInstanceState);
		View view = inflater.inflate(R.layout.full_list_view, container, false);

		mGuestureDetector = new GestureDetector(mContext, mOnGuestureListener);
		mItemGuestureDetector = new GestureDetector(mContext,
				mOnGuestureListener);
		mListViewItemList = new ArrayList<OsListViewItem>();
		mImageList = new ArrayList<Bitmap>();
		mNameList = new ArrayList<String>();
		mType = "ebook";
		// mType = getIntent().getStringExtra(Global.STRING_TYPE);
		// mPath = getIntent().getStringExtra(Global.STRING_PATH);
		mContext = (FullListViewActivity) this.getActivity();
		initUIComponent(view);
		initHandler();

		//Insert and pull out the sdcard Listener
		registerSDCardListener();

		// 2013-3-15 - Amy - update shelves
		ebooksLoadThread = new LoadImagesThread();
		ebooksLoadThread.start();
		// 2013-3-16 - Amy - add AsyncTask to loading picture
		popupFragment = PopUpDialogFragment
				.newInstance(PopUpDialogFragment.LOADING);
		popupFragment.show(getFragmentManager(), "dialog");
		imageDownloader = new ImageDownloader(mContext, CACHE_DIR);
		imageDownloader.setmImageDownloadListener(mDownloadListener);

		getEbookBlackList();
		/*
		 * if(!checkUpdateFile() && false) { notificationDownloadAfterUpdate();
		 * }
		 */

		/*if (ServiceController.getUser() == null) {
			getAccount(getActivity());
		}*/
		return view;
	}

	// 2013-6-11 - Zoya - SDCardListener class
	private final BroadcastReceiver sdcardListener = new BroadcastReceiver() {
		@Override
		public void onReceive(Context context, Intent intent) {
			String action = intent.getAction();

			if (action.equals("android.intent.action.MEDIA_MOUNTED")) {//insert sdcard
				ebooksLoadThread = new LoadImagesThread();
				ebooksLoadThread.start();
			} else if (action.equals("android.intent.action.MEDIA_REMOVED")//pull sdcard
					|| action.equals("android.intent.action.MEDIA_BAD_REMOVAL")) {
				ebooksLoadThread = new LoadImagesThread();
				ebooksLoadThread.start();
			}else if (action.equals("com.meepstore.action.DOWNLOAD_COMPLETE")) {
			ebooksLoadThread = new LoadImagesThread();
			ebooksLoadThread.start();
		}
		}
	};

	// 2013-6-11 - Zoya - registerSDCardListener
	private void registerSDCardListener() {
		IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_MOUNTED);
		intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
		intentFilter.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
		intentFilter.addAction(Intent.ACTION_MEDIA_REMOVED);
		intentFilter.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
		intentFilter.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL);
		intentFilter.addDataScheme("file");
		mContext.registerReceiver(sdcardListener, intentFilter);
		IntentFilter intentFilter1 = new IntentFilter();
		intentFilter1.addAction("com.meepstore.action.DOWNLOAD_COMPLETE");
		mContext.registerReceiver(sdcardListener, intentFilter1);
	}

	@Override
	public void onDestroy() {
		// TODO Auto-generated method stub
		mContext.unregisterReceiver(sdcardListener);
		super.onDestroy();
	}

	private void initUIComponent(View v) {
		mImgTick = BitmapFactory.decodeResource(getResources(),
				R.drawable.del_icon_s);
		// 2013-3-15 - Amy - update shelves
		/*
		 * mScrollView = (ScrollView)findViewById(R.id.scrollViewFullList);
		 * mScrollView.setOnTouchListener(scrollViewOnTouchListener);
		 * mScrollView.setLongClickable(true);
		 *
		 * mLayout = (LinearLayout)findViewById(R.id.linearLayoutFullList);
		 */

		/*
		 * mOptionLayout = (RelativeLayout)findViewById(R.id.gridLayoutOption);
		 *
		 * mBtnOptionFavourite =
		 * (ImageView)findViewById(R.id.imageViewBtnFavourite);
		 * mBtnOptionMessage =
		 * (ImageView)findViewById(R.id.imageViewBtnMessage); mBtnOptionPlay =
		 * (ImageView)findViewById(R.id.imageViewBtnPlay);
		 */
		defaultCdCover = BitmapFactory.decodeResource(getResources(),R.drawable.book_dummy);

		// 2013-3-15 - Amy - update shelves
		myEbooks = (GridView) v.findViewById(R.id.myEbook);
		myEbooks.setSelector(new ColorDrawable(Color.TRANSPARENT));
		ebookAdapter = new EbooksAdapter();
		myEbooks.setAdapter(ebookAdapter);

		mSnackIcon = (ImageView) v.findViewById(R.id.imageViewSnackView);

		mSnackIcon.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				goToEbookView();
			}
		});

		mBtnConfirm = (Button) v.findViewById(R.id.buttonConfirmButton);
		mBtnConfirm.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				if (mEditMode == EditMode.DELETE) {
					for (int i = 0; i < mListViewItemList.size(); i++) {
						if (mListViewItemList.get(i).isChecked()) {
							// deleteFile(mListViewItemList.get(i).getPath());
							deleteItem(mListViewItemList.get(i));

						}

					}
				}
			}
		});

		mRenameLayout = (RelativeLayout) v
				.findViewById(R.id.relativeLayoutRename);
		mTxtRename = (EditText) v.findViewById(R.id.editTextRename);

		mTxtRename.setOnKeyListener(new View.OnKeyListener() {

			@Override
			public boolean onKey(View v, int keyCode, KeyEvent event) {
				if (keyCode == KeyEvent.KEYCODE_ENTER) {

				}
				return false;
			}
		});

		mViewGroup = (ViewGroup) v.findViewById(R.id.ebookFullListViewLayout);
	}

	// 2013-3-19 -Amy- Use PopupWindow replace RingMenu
	PopupWindow popWindow = null;
	private View ringMenuShow = null;

	private void showRingMenu(float x, float y, OsListViewItem item) {
		if(Global.DISABLE_RING_MENU){
			Log.e("MeepEbook-showRingMenu","DISABLE_RING_MENU");
			return;
		}

		int left = 0;
		//int right = 1;
		int buttonNum = 2;

		if (y < 0) {
			y = -20;
		}

		// 2013-4-16 -Amy- modified to change pop images
		FrameLayout two_button_left;
		RelativeLayout contentLayout;
		int xx = (int) x + 55;
		int yy = (int) y + 5;
		LayoutInflater layoutInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		popWindow = new PopupWindow(ringMenuShow, LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT);
		ringMenuShow = layoutInflater.inflate(R.layout.ring_menu_rename_delete,	null);
		two_button_left = (FrameLayout) ringMenuShow.findViewById(R.id.two_button_left);
		contentLayout = (RelativeLayout) ringMenuShow.findViewById(R.id.contentLayoutleft);
		android.widget.FrameLayout.LayoutParams layoutParams = (android.widget.FrameLayout.LayoutParams) contentLayout.getLayoutParams();
		layoutParams.leftMargin = xx;
		// Log.e("cdf",""+yy);
		if (yy > 250) {
			yy = 250;
		}
		layoutParams.topMargin = yy;
		contentLayout.setLayoutParams(layoutParams);
		popWindow.setContentView(ringMenuShow);
		popWindow.update();
		two_button_left.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				ringMenuShow.setVisibility(View.GONE);
			}
		});

		popWindow.showAtLocation(myEbooks, Gravity.START, (int) x + 70,
				(int) y - 120);
		ringMenuHandler(left, buttonNum, item);
	}

	private void hideRingMenu() {
		if (popWindow != null && popWindow.isShowing()) {
			popWindow.dismiss();
		}
		ringMenuShow = null;
	}

	private void ringMenuHandler(int leftRight, int buttonNum,
			OsListViewItem item) {
		// if (leftRight == 0 && buttonNum == 2) {
		// left menu with two button
		leftMenuTwoButton(item);
		// }else if (leftRight == 1 && buttonNum == 2) {
		// right menu with two button
		// rightMenuTwoButton(item);
		// }
	}

	private void leftMenuTwoButton(final OsListViewItem item) {
		ring_delete = (ImageView) ringMenuShow.findViewById(R.id.btnDelete);
		ring_rename = (ImageView) ringMenuShow.findViewById(R.id.btnRename);

		// 2013-4-17 -Zoya- update ring menu layout.
		OnClickListener myLeftClickListener = new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				switch (v.getId()) {
				case R.id.btnDelete:
					deleteItem(item);
					imageDownloader.clearCache();
					ebookAdapter.notifyDataSetChanged();
					hideRingMenu();
					break;
				case R.id.btnRename:
//					2013-6-13 -Amy- delete function: can not rename system file
//					if((item.getPath()).contains("/data/home/ebook/unzip/")){
//						//Toast.makeText(getActivity(), "It is system file ,can not be renamed .", 0).show();
//						String renameErr = (String) getResources().getString(R.string.music_title_rename_error);
//						String msg_system_file = (String) getResources().getString(R.string.msg_system_file_ebook);
//						notification = new NotificationMessage(mContext, null, renameErr, msg_system_file);
//						hideRingMenu();
//						return;
//					}else{
						renameLayer(item);
						imageDownloader.clearCache();
						ebookAdapter.notifyDataSetChanged();
						hideRingMenu();
//					}
					break;
				}
			}
		};
		ring_delete.setOnClickListener(myLeftClickListener);
		ring_rename.setOnClickListener(myLeftClickListener);
	}

	public LayoutInflater getLayoutInflater() {
		return this.getActivity().getWindow().getLayoutInflater();
	}

	private void renameLayer(final OsListViewItem item) {
		LayoutInflater lf = getLayoutInflater();
		mPopupLayout = (RelativeLayout) lf.inflate(R.layout.layout_popup_text_input, null);
		ImageButton imageViewQuit = (ImageButton) mPopupLayout.findViewById(R.id.imageViewQuit);
		MyButton textViewOkBtn = (MyButton) mPopupLayout.findViewById(R.id.textViewOkBtn);
		MyEditText editTextRename = (MyEditText) mPopupLayout.findViewById(R.id.editTextRename);
		MyTextView textViewNotice = (MyTextView) mPopupLayout.findViewById(R.id.textViewNotice);
		ImageView imageViewEditUserBg = (ImageView) mPopupLayout.findViewById(R.id.imageViewEditUserBg);

		imageViewQuit.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				hidePopupMessageLayout();
			}
		});
		textViewOkBtn.setText(R.string.ebook_btn_ok);
		textViewOkBtn.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				boolean isExist = false;
				badWordChecker.setBlacklist(blackListWord);
				String renameErr = (String) getResources().getString(R.string.ebook_title_rename_error);

				//2013-03-22 - raymond - avoid rename system folder
				if(item.getName().equals("data") || item.getName().equals("extsd")){
					//mRenameText.setText("");
					String msg_system_file = (String) getResources().getString(R.string.msg_system_file_ebook);
					notification = new NotificationMessage(mContext, null, renameErr, msg_system_file,mViewGroup);
					return;
				}

				// 2013-03-20 - raymond - replace all special char
				String tmpName = mRenameText.getText().toString().trim();
				boolean shouldBlock = false;
				/*if (user != null) {
					PermissionManager pm = (PermissionManager) ServiceManager .getService(mContext, ServiceManager.PERMISSION_SERVICE);
					if (pm.containsBadword(user, tmpName) == true) {
						String msg_error = (String) getResources().getString( R.string.msg_error);
						notification = new NotificationMessage(mContext, null, renameErr, msg_error);
						return;
					}
				}*/
				//2013-6-20 - Zoya - solve #4292
				if (item.getName().equals(tmpName)) {
					// String renameErrMsgInvalidName = (String) getResources()	.getString(R.string.msg_rename_same);
					// notification = new NotificationMessage(mContext, null,renameErr, null);
					mPopupLayout.setVisibility(View.GONE);
					return;
				}

				//2013-6-26 -Amy- rename file's name containing space charector not in first or last
				/*if (tmpName.indexOf(" ") != -1){
					shouldBlock = true;
				}*/
				shouldBlock=MeepStorageCtrl.isRegexBadCharctors(tmpName);
				if (tmpName.equals("")) {
					String renameErrMsgInvalidName = (String) getResources() .getString(R.string.msg_null);
					notification = new NotificationMessage(mContext, null, renameErr, renameErrMsgInvalidName,mViewGroup);
					return;
				} else if (shouldBlock) {
					String renameErrMsgInvalidName = (String) getResources() .getString(R.string.ebook_msg_blocked);
					notification = new NotificationMessage(mContext, null, renameErr, renameErrMsgInvalidName,mViewGroup);
					return;
				/*}else if (item.getName().equals(tmpName)) {
					String renameErrMsgInvalidName = (String) getResources() .getString(R.string.msg_rename_same);
					notification = new NotificationMessage(mContext, null, renameErr, renameErrMsgInvalidName);
					return;*/
				}else {
					mRenameText.setText(tmpName);
				}

				if (isContainBadWord(getActivity(), tmpName)) {
					String msg_error = (String) getResources().getString(R.string.msg_error);
					notification = new NotificationMessage(mContext, null, renameErr, msg_error,mViewGroup);
					return;
				}

				// 3-21-2013 aaronli use tmpname
				if (mRenameText != null && !tmpName.equals("")) {
					for (int i = 0; i < mListViewItemList.size(); i++) {
						boolean a = mListViewItemList .get(i) .getName() .toLowerCase() .equals(mRenameText.getText().toString() .toLowerCase());
						if (mListViewItemList .get(i) .getName() .toLowerCase() .equals(mRenameText.getText().toString() .toLowerCase())) {
							isExist = true;
						}
					}
					if (isExist) {
						String renameErrMsgFormat = (String) getResources() .getString(R.string.msg_blocked);
						String renameErrMsg = String.format(renameErrMsgFormat, mRenameText.getText().toString());
						notification = new NotificationMessage(mContext, null, renameErr, renameErrMsg,mViewGroup);
					} else if ((tmpName.substring(0, 1)).equals(".")) {
						String renameErrMsgInvalidName = (String) getResources() .getString(R.string.ebook_msg_name_invalid);
						notification = new NotificationMessage(mContext, null, renameErr, renameErrMsgInvalidName,mViewGroup);
					}
					/*else if (!badWordChecker.isStringSafe(tmpName)) {
						String renameErrMsgInvalidName = (String) getResources() .getString(R.string.msg_error);
						notification = new NotificationMessage(mContext, null, renameErr, renameErrMsgInvalidName,mViewGroup);
					} */
					else {
						renameFile(tmpName.trim(), item);
						// 2013-3-18 -Amy- Rename after refres
						imageDownloader.clearCache();
						ebookAdapter.notifyDataSetChanged();
						// redrawListView();
					}
				}
				hidePopupMessageLayout();
			}
		});
		mRenameText = (EditText) editTextRename;

		ImageGetter imageGetter = new ImageGetter() {
			public Drawable getDrawable(String source) {
				int id = Integer.parseInt(source);
				Drawable d = getResources().getDrawable(id);
				d.setBounds(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
				return d;
			}
		};

		// CharSequence cs = Html.fromHtml("<img src='" + R.drawable.del_icon_s+
		// "'/>",imageGetter,null);

		textViewNotice.setText(R.string.ebook_btn_ring_rename);
		// 2012-3-22 - Amy - During renaming, then touch the screen outside the
		// Rename blank, it will enter into corresponding moive or others
		imageViewEditUserBg.setOnTouchListener(new OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				return true;
			}
		});

		mPopupLayout.setVisibility(View.VISIBLE);
		mPopupLayout.setLayoutParams(new LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		mViewGroup.addView(mPopupLayout);
		// 2012-3-22 - Amy - During renaming, then touch the screen outside the
		// Rename blank, it will enter into corresponding moive or others
		mPopupLayout.setOnTouchListener(new OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				return true;
			}
		});
		// private void renameLayer(final OsListViewItem item){
		//
		// final Dialog dialog = new Dialog(mContext);
		// dialog.setContentView(R.layout.notification_rename);
		// dialog.setCancelable(true);
		// dialog.getWindow().setBackgroundDrawable(new
		// ColorDrawable(android.graphics.Color.TRANSPARENT));
		// //String rename = "Rename eBook from \"" + item.getName() +
		// "\" to: ";
		//
		// TextView textViewOkBtn = (TextView)
		// dialog.findViewById(R.id.textViewOkBtn);
		//
		// TextView textViewMessage = (TextView)
		// dialog.findViewById(R.id.textViewMessage);
		// //textViewMessage.setText(rename);
		//
		// ImageView imageViewQuit = (ImageView)
		// dialog.findViewById(R.id.imageViewQuit);
		// imageViewQuit.setImageResource(R.drawable.quit_room);
		//
		// final EditText editTextRename = (EditText)
		// dialog.findViewById(R.id.editTextRename);
		// editTextRename.setInputType(InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD);
		//
		// imageViewQuit.setOnClickListener(new View.OnClickListener() {
		// public void onClick(View pV) {
		// dialog.dismiss();
		// }
		// });
		//
		// textViewOkBtn.setOnClickListener(new View.OnClickListener() {
		// public void onClick(View pV) {
		// String renameFileName = editTextRename.getText().toString();
		// // if (!renameFileName.equals("")){
		// // renameEbook(renameFileName, item);
		// // }
		// boolean isExist = false;
		// if (!renameFileName.equals("")){
		// //renameEbook(renameFileName+".png", item);
		// for (int i = 0; i < mListViewItemList.size(); i++) {
		// //Log.d("All ebook name", "All ebook name: " +
		// mListViewItemList.get(i).getName());
		// //Log.d("All ebook name", "All ebook name: " +
		// mListViewItemList.get(i).getName().substring(0,
		// mListViewItemList.get(i).getName().lastIndexOf(".")));
		// if (mListViewItemList.get(i).getName().equals(renameFileName)){
		// isExist = true;
		// }
		// }
		//
		// if (isExist){
		// notification = new NotificationMessage(mContext, null,
		// "Rename error", "This destination already contains a file named \"" +
		// renameFileName + "\". \nPlease check it before renaming this file.");
		// }else if ((renameFileName.substring(0, 1)).equals(".")){
		// notification = new NotificationMessage(mContext, null,
		// "Rename error",
		// "The file name cannot start with \".\", please change the file name");
		// } else {
		// renameFile(renameFileName, item);
		// }
		// }
		// dialog.dismiss();
		// redrawListView();
		// }
		// });
		//
		// dialog.show();

	}

	/*
	 * //2013-03-26 - raymond - remove Jump to gridview feature //2013-4-2 -Amy-
	 * when click back, Jump to gridview --add mPopupLayout != null && public
	 * void onBackPressed() { if(mPopupLayout != null &&
	 * mPopupLayout.isShown()){ Log.e("cdf","back pressed ! ");
	 * mViewGroup.removeView(mPopupLayout);
	 * //mViewGroup.removeViewInLayout(mPopupLayout); }else{
	 * super.onBackPressed(); } return; }
	 */

	private void hidePopupMessageLayout() {
		// 2013-03-25 - raymond - dismiss rename keyboard
		if (mTxtRename != null) {
			InputMethodManager imm = (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
			imm.hideSoftInputFromWindow(mTxtRename.getWindowToken(), 0);
		}
		mViewGroup.removeView(mPopupLayout);
		mPopupLayout = null;
	}

	private void renameFile(String renameFileName, OsListViewItem item) {
		// 2013-3-18 -Amy- Rename after refres
		// modified by aaronli at Jul9 2013 .- and return the new file path
		DataSourceManager.renameFile(renameFileName, item);
		//String newPath = EbookCtrl.renameEbook(item.getPath(), renameFileName);
		//item.setPath(newPath);
		//item.setName(renameFileName);
		// EbookCtrl.renameEbook(item.getPath(),
		// EncodingBase64.encode(renameFileName));

		// String oldName = EncodingBase64.decode(item.getName().substring(0,
		// item.getName().length()));
		// String pathTo = item.getPath().substring(0,
		// item.getPath().lastIndexOf("/")+1);
		//
		// Log.i("path from", "path from: " + item.getPath());
		// Log.i("path to", "path to: " + pathTo + renameFileName + ".epub");
		//
		//
		// File from = new File(item.getPath());
		// File to = new File(pathTo + renameFileName + ".epub");
		// from.renameTo(to);
		//
		// File fromIcon = new File(PATH_ICON_DIR + oldName + ".png");
		// File toIcon = new File(PATH_ICON_DIR + renameFileName + ".png");
		// fromIcon.renameTo(toIcon);
		//
		// File fromLargeIcon = new File(PATH_LARGE_ICON_DIR + oldName +
		// ".png");
		// File toLargeIcon = new File(PATH_LARGE_ICON_DIR + renameFileName +
		// ".png");
		// fromLargeIcon.renameTo(toLargeIcon);
		//
		// File fromDimIcon = new File(PATH_LARGE_DIM_ICON_DIR + oldName +
		// ".png");
		// File toDimIcon = new File(PATH_LARGE_DIM_ICON_DIR + renameFileName +
		// ".png");
		// fromDimIcon.renameTo(toDimIcon);
		//
		// File fromSmallIcon = new File(PATH_SMALL_ICON_DIR + oldName +
		// ".png");
		// File toSmallIcon = new File(PATH_SMALL_ICON_DIR + renameFileName +
		// ".png");
		// fromSmallIcon.renameTo(toSmallIcon);
	}

	private void initHandler() {
		mHandlerReadImg = new Handler() {
			@Override
			public void handleMessage(Message msg) {
				switch (msg.what) {
				case 1:
					int idx = msg.getData().getInt("imgIdx");
					popupFragment.dismiss();
					ebookAdapter.notifyDataSetChanged();
					// drawImage(idx);
					Log.w("thread", "thread full list view alive");
					break;
				case 2: // draw shelf only
					// drawShelfOnly();
					break;
				default:
					break;
				}
				// 2013-3-15 - Amy - update shelves
				// mLayout.invalidate();
				super.handleMessage(msg);
			}
		};

		mThread = new Thread(runReadImage);
		mThread.start();
	}

	private Runnable runReadImage = new Runnable() {

		@Override
		public void run() {
			// loadAndDrawImage();
			try {
				mThread.join();
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	};

	// ******start define listener******
	OnGestureListener mOnGuestureListener = new OnGestureListener() {

		@Override
		public boolean onSingleTapUp(MotionEvent e) {
			hideRingMenu();
			if (mEditMode == EditMode.VIEW) {
				// if(mSelectedView!=null)
				// {
				// String name = (String) mSelectedView.getTag();
				// OsListViewItem item = findListViewItemByName(name);
				// String[] paths = getAllEbookPaths();
				// if (mEditMode == EditMode.VIEW) {
				// if (mSelectedView.getTag() != null) {
				// if (item != null) {
				// goToEbook(paths, item.getPath());
				// }
				// }
				// }
				// }
			} else {
				// hideOption();
			}
			return false;
		}

		@Override
		public void onShowPress(MotionEvent e) {
			// TODO Auto-generated method stub

		}

		@Override
		public boolean onScroll(MotionEvent e1, MotionEvent e2,
				float distanceX, float distanceY) {
			// TODO Auto-generated method stub
			return false;
		}

		@Override
		public void onLongPress(MotionEvent e) {
			// float x = e.getX() - 120 + mCorX;
			// float y = e.getY() - 90 + mCorY;
			// showOption(x,y);
			// setEditMode(EditMode.OPTION_SHOWN);
		}

		@Override
		public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
				float velocityY) {
			// TODO Auto-generated method stub
			return false;
		}

		@Override
		public boolean onDown(MotionEvent e) {
			// TODO Auto-generated method stub
			return false;
		}
	};

	OnTouchListener scrollViewOnTouchListener = new OnTouchListener() {

		@Override
		public boolean onTouch(View v, MotionEvent event) {
			hideRingMenu();
			if (event.getAction() == MotionEvent.ACTION_DOWN) {
				final int[] location = new int[2];
				v.getLocationOnScreen(location);
				mCorX = location[0];
				mCorY = location[1];
			}
			mGuestureDetector.onTouchEvent(event);
			return false;
		}
	};

	// OnClickListener btnItemOnclickListener = new OnClickListener() {
	// @Override
	// public void onClick(View v) {
	// String name = (String) v.getTag();
	// OsListViewItem item = findListViewItemByName(name);
	// String[] paths = getAllEbookPaths();
	// if (mEditMode == EditMode.VIEW) {
	// if (v.getTag() != null) {
	// if (item != null) {
	// goToEbook(paths, item.getPath());
	// }
	// }
	// }else if (mEditMode == EditMode.DELETE){
	// RelativeLayout layout = (RelativeLayout)v;
	// ImageView tickView = (ImageView) layout.getChildAt(2);
	// if (tickView.getVisibility() != View.VISIBLE) {
	// tickView.setVisibility(View.VISIBLE);
	// item.setIsChecked(true);
	// } else {
	// tickView.setVisibility(View.GONE);
	// item.setIsChecked(false);
	// }
	// }
	// }
	// };

	OnTouchListener btnItemOnTouchListener = new OnTouchListener() {

		@Override
		public boolean onTouch(View v, MotionEvent event) {
			// if(event.getAction()==MotionEvent.ACTION_DOWN)
			// {
			// mSelectedView = v;
			// final int[] location = new int[2];
			// v.getLocationOnScreen(location);
			// mCorX = location[0];
			// mCorY = location[1];
			// }
			// else if (event.getAction()==MotionEvent.ACTION_UP)
			// {
			// if(mEditMode !=EditMode.VIEW)
			// {
			// mSelectedView = null;
			// }
			// }
			// mItemGuestureDetector.onTouchEvent(event);
			return false;
		}
	};

	OnClickListener btnItemClickListener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Log.i("mEditMode", "mEditMode:" + mEditMode.toString());

			if (mEditMode == EditMode.VIEW) {
				// 2013-3-15 - Amy - update shelves
				// String name = (String) v.getTag();
				//String name = (String) v.getTag(R.id.TAG);
				//OsListViewItem item = findListViewItemByName(name);
				OsListViewItem item = (OsListViewItem) v.getTag(R.id.TAG);
				String itemName = "";
				String path = "";
				if (item != null) {
					path = item.getPath();
				}

				String extension = getExtension(path);

				if (extension.equals(Global.FILE_TYPE_EPUB)) {
					itemName = item.getName() + Global.FILE_TYPE_EPUB;
				} else if (extension.equals(Global.FILE_TYPE_PDF)) {
					itemName = item.getName() + Global.FILE_TYPE_PDF;
				} else {
					// delete by aaronli at Mar21 2013,never change the path
					// string
					// path = "/data/home/ebook/unzip/" + item.getName();
				}

				if (mEditMode == EditMode.VIEW && ringMenuShow == null) {
					if (item != null) {
						goToEbook(path, itemName);
					}
				}
				hideRingMenu();
			}
		}
	};

	OnLongClickListener btnItemLongClickListener = new OnLongClickListener() {

		@Override
		public boolean onLongClick(View v) {
			final int[] location = new int[2];
			v.getLocationOnScreen(location);
			mCorX = location[0];
			mCorY = location[1];

			float x = mCorX - 90;
			float y = mCorY - 75;
			hideRingMenu();

			//String name = (String) v.getTag(R.id.TAG);
			//OsListViewItem item = findListViewItemByName(name);
			OsListViewItem item = (OsListViewItem) v.getTag(R.id.TAG);
			showRingMenu(x, y, item);

			return true;
		}
	};

	// end define listener
	private OsListViewItem findListViewItemByName(String name) {
		for (int i = 0; i < mListViewItemList.size(); i++) {
			if (mListViewItemList.get(i).getName().equals(name)) {
				return mListViewItemList.get(i);
			}
		}
		return null;
	}

	// private void traverseDir(File dir, List<File> theList) {
	// Log.i("ebook-traversal-(Ebook)", "traverseDir LOADED");
	// File[] files = dir.listFiles();
	// if (files != null) {
	// for (int i=0; i<files.length; i++) {
	// if (files[i].isDirectory()) {
	// traverseDir(files[i], theList);
	// } else {
	// if (!files[i].isHidden() &&
	// files[i].getName().toLowerCase().contains(Global.FILE_TYPE_EPUB)) {
	// theList.add(files[i]);
	// Log.i("ebook-traversal-(Ebook)", files[i].getAbsolutePath());
	// }
	// }
	// }
	// }
	// }

	private String getFileNameOnly(String fileName) {
		// 2013-03-20 - raymond - check index of out bound error
		int extIndex = fileName.lastIndexOf('.');
		if (extIndex > 0) {
			return fileName.substring(0, extIndex);
		} else {
			return fileName;
		}
	}

	// 2013-4-24 - Zoya - update shelves use GridView
	private static class ViewHolder {
		ImageView pic;
		TextView pic_title;
	}

	private class EbooksAdapter extends BaseAdapter {
		private LayoutInflater inflater = LayoutInflater.from(mContext);

		@Override
		public int getCount() {
			// Log.e("cdf","mListViewItemList.size() == "+mListViewItemList.size());
			if (mListViewItemList == null) {
				return 0;
			} else {
				return mListViewItemList.size();
			}
		}

		@Override
		public Object getItem(int position) {
			if (mListViewItemList == null) {
				return null;
			}
			return mListViewItemList.get(position);

		}

		@Override
		public long getItemId(int position) {
			if (mListViewItemList == null) {
				return -1;
			} else {
				return mListViewItemList.get(position).hashCode();
			}

		}

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			ViewHolder holder = null;

			if (convertView == null) {
				holder = new ViewHolder();

				convertView = inflater.inflate(R.layout.gridview_item, null);

				holder.pic = (ImageView) convertView
						.findViewById(R.id.ebookpic);
				holder.pic_title = (TextView) convertView
						.findViewById(R.id.ebookpic_title);
				convertView.setTag(holder);
			} else {
				holder = (ViewHolder) convertView.getTag();
			}

			final OsListViewItem item = mListViewItemList.get(position);
			holder.pic_title.setText(item.getName());
			// holder.pic.setImageBitmap(item.getImage());
			holder.pic.setTag(R.id.TAG, item);
			// Log.e("cdf","item.getName() == 2  "+item.getName());
			holder.pic.setOnClickListener(btnItemClickListener);
			holder.pic.setOnLongClickListener(btnItemLongClickListener);
			// 2013-3-16 - Amy - add AsyncTask to loading picture
			// String path = PATH_SMALL_ICON_DIR +
			// getSimpleNameOfFilePath(item.getPath()) + ".png";
			// String bigpath = PATH_ICON_DIR +
			// getSimpleNameOfFilePath(item.getPath()) + ".png";
			imageDownloader.download(item.getPath(), holder.pic,
					defaultCdCover, null);
			// imageDownloader.downloadEbook(path,bigpath, SHOW_WIDTH,
			// SHOW_HEIGHT, holder.pic,defaultCdCover);
			convertView.setVisibility(View.VISIBLE);

			return convertView;
		}
	}

	// 2013-3-15 - Amy - update shelves
	class LoadImagesThread extends Thread {
		@Override
		public void run() {
			// TODO Auto-generated method stub
			if (mListViewItemList != null) {
				mListViewItemList.clear();
			}
			Message message = new Message();
			// Log.e("cdf","cdf-----------");
			loadAndDrawImage();
			message.what = 1;
			mHandlerReadImg.sendMessage(message);
			super.run();
		}
	}

	private void loadAndDrawImage() {
		// draw default 3 shell
		// mHandlerReadImg.sendEmptyMessage(2);
		// get ebook file list
		/*
		 * List<File> fileList = EbookCtrl.getEbookList();
		 *
		 * int count = 0; //Log.e("cdf","fileList.size() --> " +
		 * fileList.size()); for (int i = 0; i < fileList.size(); i++) { File
		 * thisFile = fileList.get(i); String filename = thisFile.getName();
		 *
		 * String encodedName = null; if (thisFile.isDirectory()) { // decode
		 * the filename shown in director // modified by aaronli Mar21 2013
		 * encodedName = EncodingBase64.decode(filename); } else { String
		 * fileNameOnly = getFileNameOnly(filename); //2013-3-18 -Amy- Rename
		 * after refresh // Mar 19 2013 aaronli show the ecodename of books
		 * which in data dir if
		 * (thisFile.getAbsolutePath().contains(PATH_EBOOK_DATA_DIR)) {
		 *
		 * encodedName = EncodingBase64.decode(fileNameOnly);
		 *
		 * //2013-03-22 - raymond - remove downloading file fileList.remove(i);
		 * continue; } else { encodedName = fileNameOnly; } }
		 *
		 * //get icon bitmap Bitmap bmap = null;
		 *
		 * // try to load small icon first bmap =
		 * BitmapFactory.decodeFile(PATH_SMALL_ICON_DIR + encodedName + ".png");
		 * if (bmap == null) { Log.d("EbookListView",
		 * "small image null, try to generate from icon image"); // create small
		 * icon from original icon bmap = BitmapFactory.decodeFile(PATH_ICON_DIR
		 * + encodedName + ".png"); if (bmap != null) { bmap =
		 * ThumbnailUtils.extractThumbnail(bmap, 90, 107); } else {
		 * Log.w("EbookListView", "icon image null, try to get default image");
		 * } }
		 *
		 * if (bmap == null) { // Load default ebook image bmap =
		 * BitmapFactory.decodeResource(getResources(), R.drawable.book_dummy);
		 * bmap = ThumbnailUtils.extractThumbnail(bmap, 90, 107); }
		 *
		 * //if (bmap != null) { OsListViewItem item = new OsListViewItem();
		 * //item.setImage(bmap); item.setName(encodedName);
		 * item.setPath(thisFile.getAbsolutePath());
		 * mListViewItemList.add(item); //2013-3-15 - Amy - update shelves
		 * Message msg = new Message(); Bundle data = new Bundle();
		 * data.putInt("imgIdx", count); msg.setData(data); msg.what = 1;
		 * mHandlerReadImg.sendMessage(msg); //Log.e("cdf","encodedName --> " +
		 * encodedName); //Log.e("cdf","thisFile.getAbsolutePath() --> " +
		 * thisFile.getAbsolutePath()); count++; //} else { //
		 * Log.e("EbookListView", "default bmap is null, cannot show the icon");
		 * //} }
		 */

		//List<File> files = DataSourceManager.getEbookList();
		//DataSourceManager.getDataSource(files, mListViewItemList);
		// Cache method
		mListViewItemList = DataSourceManager.getAllItems(false);

	}

	private void redrawListView() {
		// 2013-3-15 - Amy - update shelves
		// mLayout.removeAllViews();
		mListViewItemList.removeAll(mListViewItemList);
		// loadAndDrawImage();
	}

	/*
	 * private void drawShelfOnly() { LinearLayout ll = null;
	 *
	 * ll = new LinearLayout(this);
	 * ll.setBackgroundResource(R.drawable.movie_shelf); ll.setPadding(0, 0, 0,
	 * 15); ll.setOrientation(LinearLayout.HORIZONTAL); mLayout.addView(ll);
	 *
	 * ll = new LinearLayout(this);
	 * ll.setBackgroundResource(R.drawable.movie_shelf); ll.setPadding(0, 0, 0,
	 * 15); ll.setOrientation(LinearLayout.HORIZONTAL); mLayout.addView(ll);
	 *
	 * ll = new LinearLayout(this);
	 * ll.setBackgroundResource(R.drawable.movie_shelf); ll.setPadding(0, 0, 0,
	 * 15); ll.setOrientation(LinearLayout.HORIZONTAL); mLayout.addView(ll); }
	 */

	/*
	 * private void drawImage(int index) {
	 *
	 * OsListViewItem item = mListViewItemList.get(index); boolean isNewRow =
	 * false; LinearLayout ll = null;
	 *
	 * if (index < 15) { ll = (LinearLayout) mLayout.getChildAt((int) ((index) /
	 * 5)); } else { if (mLayout.getChildCount() > 0) { ll = (LinearLayout)
	 * mLayout.getChildAt(mLayout.getChildCount() - 1); }
	 *
	 * if (mLayout.getChildCount() == 0 || ll.getChildCount() >= 5) {
	 *
	 * ll = new LinearLayout(this); ll.setLayoutParams(new
	 * LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, 200));
	 *
	 * ll.setBackgroundResource(R.drawable.movie_shelf); ll.setPadding(0, 30, 0,
	 * 15); ll.setOrientation(LinearLayout.HORIZONTAL); isNewRow = true; } }
	 *
	 * // image ImageView image = new ImageView(this);
	 * RelativeLayout.LayoutParams lpImg = new RelativeLayout.LayoutParams(120,
	 * 120); lpImg.setMargins(-10, 0, 0, 0); image.setLayoutParams(lpImg);
	 * image.setImageBitmap(item.getImage()); image.setTag(item.getName());
	 * image.setOnClickListener(btnItemClickListener);
	 * image.setOnLongClickListener(btnItemLongClickListener);
	 *
	 * // name TextView txt = new TextView(this); //String tempName =
	 * item.getName().substring(0, item.getName().length() - 4); String tempName
	 * = EncodingBase64.decode(item.getName()); if (tempName.length() > 15) {
	 * tempName = tempName.substring(0, 13) + ".."; } txt.setText(tempName);
	 *
	 * txt.setBackgroundResource(R.drawable.text_bar); //
	 * txt.setText(item.getName().substring(0, item.getName().length())); //
	 * txt.setBackgroundResource(R.drawable.text_bar);
	 * //txt.setOnTouchListener(btnItemOnTouchListener);
	 *
	 * RelativeLayout.LayoutParams lp = new
	 * RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
	 * RelativeLayout.LayoutParams.WRAP_CONTENT); lp.setMargins(0, 125 , 0, 0);
	 * txt.setWidth(103); txt.setLayoutParams(lp);
	 * txt.setGravity(Gravity.CENTER);
	 *
	 * // //tick icon // ImageView imageTick = new ImageView(this); //
	 * RelativeLayout.LayoutParams lp2 = new
	 * RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,
	 * RelativeLayout.LayoutParams.WRAP_CONTENT); // lp2.setMargins(42, 0 , 0,
	 * 0); // imageTick.setLayoutParams(lp2); //
	 * imageTick.setImageBitmap(mImgTick); // if (mEditMode == EditMode.DELETE)
	 * { // imageTick.setVisibility(View.VISIBLE); // } else { //
	 * imageTick.setVisibility(View.GONE); // } //
	 * imageTick.setTag(item.getName()); // imageTick.setOnClickListener(new
	 * View.OnClickListener() { // // @Override // public void onClick(View v) {
	 * // String name = (String) v.getTag(); // OsListViewItem item =
	 * findListViewItemByName(name); // deleteItem(item); // } // });
	 *
	 *
	 * RelativeLayout rl = new RelativeLayout(this);
	 * //rl.setOnTouchListener(btnItemOnTouchListener);
	 * rl.setTag(item.getName()); if (ll.getChildCount() == 0) {
	 * rl.setPadding(30, 10, 12, 0); } else { rl.setPadding(12, 10, 12, 0); }
	 * //rl.setOnClickListener(btnItemOnclickListener);
	 *
	 * rl.addView(image); rl.addView(txt); //rl.addView(imageTick);
	 *
	 * ll.addView(rl);
	 *
	 * if (isNewRow) { try { mLayout.addView(ll); } catch (Exception ex) {
	 * ex.printStackTrace(); } } }
	 */

	private void goToEbook(String path, String name) {
		// // Old Ebook reader (1.0)
		// Intent intent = new Intent(this, FullListViewActivity.class);
		// intent.setComponent(ComponentName.unflattenFromString("com.oregonscientific.meep.Reader.main/.BooksReaderActivity"));
		// intent.addCategory("android.intent.category.LAUNCHER");
		// intent.putExtra(Global.STRING_PATH, path);
		// intent.putExtra(Global.STRING_NAME, name);

		// New Ebook reader (2.0)
		Intent intent = new Intent(mContext, FullListViewActivity.class);
		intent.setComponent(new ComponentName(
				"com.oregonscientific.meep.epubreader",
				"com.oregonscientific.meep.epubreader.BookRendering"));
		intent.addCategory("android.intent.category.LAUNCHER");
		intent.putExtra("path", path);
		intent.putExtra(Global.STRING_NAME, name);
		try {
			startActivity(intent);
			Log.e("cdf",""+path);
			MeepLogger meepLogger = new MeepLogger(mContext);
			meepLogger.p("was reading eBook: " + name);
		} catch (Exception ex) {
			Log.e("meepbook", "go to ebookReader:" + ex.toString());
		}
	}

	// 2013-3-15 - Amy - update shelves
	/*
	 * private void showOption(float x, float y) { mOptionLayout.setX(x);
	 * mOptionLayout.setY(y); mOptionLayout.setVisibility(View.VISIBLE); }
	 */

	/*
	 * private void hideOption() { mOptionLayout.setVisibility(View.GONE);
	 * setEditMode(EditMode.VIEW); }
	 */

	/*
	 * private void setEditMode(EditMode editMode) { mEditMode = editMode;
	 * if(editMode == EditMode.DELETE) { showAllDeleteIcons();
	 * mBtnConfirm.setVisibility(View.VISIBLE); } else { hideAllDeleteIcons();
	 * mBtnConfirm.setVisibility(View.GONE); } }
	 */

	/*
	 * private void showAllDeleteIcons() { for(int i= 0;
	 * i<mLayout.getChildCount(); i++) { LinearLayout rowLayout =
	 * (LinearLayout)mLayout.getChildAt(i); for(int j = 0; j<
	 * rowLayout.getChildCount();j++) { RelativeLayout rl =
	 * (RelativeLayout)rowLayout.getChildAt(j); if(rl!= null) { ImageView img =
	 * (ImageView)rl.getChildAt(2); img.setVisibility(View.VISIBLE); } } } }
	 */

	/*
	 * private void hideAllDeleteIcons() { for(int i= 0;
	 * i<mLayout.getChildCount(); i++) { RelativeLayout rl =
	 * (RelativeLayout)mOptionLayout.getChildAt(i); if(rl!= null) { ImageView
	 * img = (ImageView)rl.getChildAt(2); img.setVisibility(View.GONE); } } }
	 */

	private void deleteItem(OsListViewItem item) {
		// delete item from database

		// EbookCtrl.deleteEbook(item.getPath());
		// Log.d("delete path", "delete path0:" + PATH_SDCARD + item.getName());
		// Log.d("delete path", "delete path1:" + "/mnt/sdcard/home/ebook/temp/"
		// + item.getName());
		// Log.d("delete path", "delete path2:" + item.getPath());
		// Log.d("delete path", "delete path3:" + PATH_ICON_DIR +
		// item.getName());
		// Log.d("delete path", "delete path4:" + PATH_LARGE_ICON_DIR +
		// item.getName());
		// Log.d("delete path", "delete path5:" + PATH_LARGE_DIM_ICON_DIR +
		// item.getName());
		// Log.d("delete path", "delete path6:" + PATH_SMALL_ICON_DIR +
		// item.getName());
		//
		// deleteDirectory(new File(PATH_SDCARD + item.getName() + ".epub"));
		// deleteDirectory(new File("/mnt/sdcard/home/ebook/temp/" +
		// item.getName() + ".epub"));
		// deleteItemFile(item.getPath());
		// deleteItemFile(PATH_ICON_DIR + item.getName() + ".png");
		// deleteItemFile(PATH_LARGE_ICON_DIR + item.getName() + ".png");
		// deleteItemFile(PATH_LARGE_DIM_ICON_DIR + item.getName() + ".png");
		// deleteItemFile(PATH_SMALL_ICON_DIR + item.getName() + ".png");
		//
		// mListViewItemList.remove(item);
		// ebookAdapter.notifyDataSetChanged();
		// redrawListView();

		// 2013-5-14 -Zoya- add delete dialog
		String delErr = (String) getResources().getString(R.string.delete);
		String delMsg = (String) getResources().getString(R.string.delete_sure);
		final OsListViewItem mitem = item;
		// notification = new NotificationMessage(mContext, null, delErr,
		// delMsg);

		LayoutInflater lf = getLayoutInflater();
		final RelativeLayout popupLayout = (RelativeLayout) lf.inflate(R.layout.notification_delete, null);
		//2013-7-9 -Amy- add quit button
		ImageButton imageViewQuitDelete = (ImageButton) popupLayout.findViewById(R.id.imageViewQuitDelete);
		MyButton textViewYesBtn = (MyButton) popupLayout.findViewById(R.id.textViewYesBtn);
		MyButton textViewNoBtn = (MyButton) popupLayout.findViewById(R.id.textViewNoBtn);
		MyTextView textViewNotice = (MyTextView) popupLayout.findViewById(R.id.textViewNotice);
		//2013-7-9 -Amy- change popup window text style
		TextView textViewMessage = (TextView) popupLayout.findViewById(R.id.textViewMessage);

		textViewNotice.setText(delErr);
		textViewMessage.setText(delMsg);
		textViewYesBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				// delete item from database
				EbookCtrl.deleteEbook(mitem.getPath());

				mListViewItemList.remove(mitem);
				//ebookAdapter.notifyDataSetChanged();
				// redrawListView();
				popupLayout.setVisibility(View.GONE);
				ebookAdapter.notifyDataSetChanged();
			}
		});
		textViewNoBtn.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				popupLayout.setVisibility(View.GONE);
			}
		});
		imageViewQuitDelete.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				popupLayout.setVisibility(View.GONE);
			}
		});

		popupLayout.setVisibility(View.VISIBLE);
		popupLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
				LayoutParams.MATCH_PARENT));
		mViewGroup.addView(popupLayout);

		popupLayout.setOnTouchListener(new OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				return true;
			}
		});

	}

	private void deleteItemFile(String path) {
		// delete the real item
		File file = new File(path);
		try {
			if (file.exists()) {
				file.delete();
			}
		} catch (Exception e) {
			Log.e("MovieFullListView", "delete file error : " + e.toString());
		}
	}

	public static boolean deleteDirectory(File path) {
		if (path.exists()) {
			File[] files = path.listFiles();
			if (files == null) {
				return true;
			}
			for (int i = 0; i < files.length; i++) {
				if (files[i].isDirectory()) {
					deleteDirectory(files[i]);
				} else {
					files[i].delete();
				}
			}
		}
		return (path.delete());
	}

	private void goToEbookView() {
		/*
		 * Intent myIntent = new Intent(this, MeepEbookActivity.class);
		 * myIntent.putExtra(Global.STRING_TYPE, "ebook");
		 *
		 * try { startActivityForResult(myIntent, 0); } catch (Exception ex) {
		 * ex.printStackTrace(); }
		 */
		mContext.showDetails(FullListViewActivity.STATE_FRAG_SNACK);
	}

	private void getEbookBlackList() {
		String sql = "select * from " + TableBlacklist.S_TABLE_NAME + " where "
				+
				// TableBlacklist.S_LIST_TYPE + " = '" + Global.AppType.Ebook +
				// "'" ;
				TableBlacklist.S_LIST_TYPE + " = 'browser'";
		MeepAppMessage mam = new MeepAppMessage(Category.DATABASE_QUERY,
				MeepAppMessage.OPCODE_DATABASE_BLACK_LIST, sql,
				Global.INTENT_MSG_PREFIX + Global.AppType.Youtube);
		mContext.sendBroadcast(MeepAppMessageCtrl.getBroadcastIntent(mam,
				AppType.MeepMessage));
	}

	private void notificationDownloadAfterUpdate() {
		/*
		 * final Dialog dialog = new Dialog(this);
		 * dialog.setContentView(R.layout.custom_dialog);
		 * dialog.getWindow().setLayout(LayoutParams.FILL_PARENT,
		 * LayoutParams.FILL_PARENT);
		 * dialog.getWindow().setBackgroundDrawable(new
		 * ColorDrawable(android.graphics.Color.TRANSPARENT));
		 *
		 * Button ok = (Button) dialog.findViewById(R.id.btnOk); Button quit =
		 * (Button) dialog.findViewById(R.id.btnQuit);
		 *
		 * // if button is clicked, directly link to MEEP! Store
		 * ok.setOnClickListener(new OnClickListener() {
		 *
		 * @Override public void onClick(View v) { //Log.d("test",
		 * "send open meep store"); MeepAppMessage mam = new
		 * MeepAppMessage(Category.SYSTEM,
		 * MeepAppMessage.OPCODE_OPEN_MEEP_STORE,"", Global.INTENT_MSG_PREFIX +
		 * Global.AppType.Ebook); String jsonStr = new Gson().toJson(mam);
		 * Intent i = new Intent(); i.setAction(Global.INTENT_MSG_PREFIX +
		 * Global.AppType.Store); i.putExtra(Global.STRING_MESSAGE, jsonStr);
		 * sendBroadcast(i); } }); // if button is clicked, close this dialog
		 * quit.setOnClickListener(new OnClickListener() {
		 *
		 * @Override public void onClick(View v) { dialog.dismiss(); } });
		 *
		 * dialog.show();
		 */
	}

	public boolean checkUpdateFile() {
		File file = new File(PATH_FOR_UPDATE_CHECKING);
		if (file.exists()) {
			return true;
		}
		try {
			file.createNewFile();
			return false;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (Exception e) {
			// TODO: handle exception
		}
		return false;
	}

	private ImageDownloader.ImageDownloadListener mDownloadListener = new ImageDownloader.ImageDownloadListener() {

		@Override
		public void onDownloadSuccessed(ImageView view, Bitmap bitmap) {
			view.setImageBitmap(bitmap);

		}

		@Override
		public void onDownloadFromCache(ImageView view, Bitmap bitmapFromCache) {
			view.setImageBitmap(bitmapFromCache);

		}

		@Override
		public void onDownloadFail(ImageView view) {
			view.setImageBitmap(defaultCdCover);

		}

		/*
		 * @Override public Bitmap loadImageFromUrl(String url) { // TODO
		 * Auto-generated method stub return null; }
		 */

		@Override
		public Bitmap loadImageFromUrl(String url) {
			return getBitmapFromDisk(url);
		}
	};

	private Bitmap getBitmapFromDisk(String path) {
		// String pngName = path.substring(0, path.length() - 4) +
		// Global.FILE_TYPE_PNG;
		Bitmap bmap = null;
		try {
			// try to load small icon first
			/*
			 * bmap = BitmapFactory.decodeFile(path); if (bmap == null) {
			 * //Log.d("EbookListView",
			 * "small image null, try to generate from icon image"); // create
			 * small icon from original icon bmap =
			 * BitmapFactory.decodeFile(path); if (bmap != null) { bmap =
			 * ThumbnailUtils.extractThumbnail(bmap, 90, 107); } else {
			 * Log.w("EbookListView",
			 * "icon image null, try to get default image"); } }
			 */

			bmap = DataSourceManager.loadListImage(defaultCdCover,
					DataSourceManager.getEbookImgName(path));
			//bmap = BitmapFactory.decodeFile(PATHLARGEICONDIR + imageName + Global.FILE_TYPE_PNG);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
		return bmap;
	}

	// TODO: should call MeepLib
	private String getExtension(String filename) {
		// dot is included
		int dotIndex = filename.lastIndexOf(".");

		if (dotIndex > 0) {
			return filename.substring(dotIndex, filename.length()).toLowerCase();
		} else {
			return "";
		}
	}

	public static String getSimpleNameOfFilePath(String path) {
		Log.d("FullListViewActivity", "getSimpleNameOfFilePath path " + path);
		int lastSeparatorIndex = path.lastIndexOf(File.separator);
		int lastDotIndex = path.lastIndexOf('.');
		lastDotIndex = lastDotIndex > lastSeparatorIndex ? lastDotIndex : path
				.length();
		Log.d("FullListViewActivity",
				"getSimpleNameOfFilePath lastSeparatorIndex "
						+ lastSeparatorIndex);
		Log.d("FullListViewActivity", "getSimpleNameOfFilePath lastDotIndex "
				+ lastDotIndex);

		return path.substring(lastSeparatorIndex + 1, lastDotIndex);
	}

}


text:
<?php
/**
 * Created by PhpStorm.
 * User: manei
 * Date: 18/03/14
 * Time: 23:38
 */

class Experiences_Model extends CI_Model
{

    protected $objectIdField;
    protected $table;
    protected $objectClass;

    public function __construct()
    {
        parent::__construct();
        $this->load->database();
        $this->table = 'experiences';
        $this->objectIdField = 'idExperiences';
        $this->objectClass = 'Experience';
    }

    public function getUserExperiences( $idUser )
    {
        $this->db->select( '*' );
        $this->db->from( 'experiences as e' );
        $this->db->join( 'job_titles as jt', 'jt.idJobTitles = e.JobTitles_idJobTitles' );
        $this->db->join( 'sectors as s', 's.idSectors = jt.Sectors_idSectors' );
        $this->db->join( 'employment_levels as el', 'el.idLevelsOfEmployment = e.EmploymentLevels_idLevelsOfEmployment' );
        $this->db->where( 'Persons_idUser', $idUser );
        $results = $this->db->get()->result_array();

        $objects = array();
        foreach ( $results as $result ) {
            $result['jobtitle'] = new Jobtitle( $result );
            $result['sector'] = new Sector( $result );
            $result['employmentlevel'] = new EmploymentLevel( $result );
            $experience = new Experience( $result );
            $objects[] = $experience;
        }

        return $objects;
    }

    public function searchExperiences( $dateStarted, $jobTitle, $employmentLevel, $dateFinished = null, $otherJobTitle = null )
    {

    }

    public function getExperience( $id )
    {
        $this->db->select( '*' );
        $this->db->from( 'experiences as e' );
        $this->db->join( 'job_titles as jt', 'jt.idJobTitles = e.JobTitles_idJobTitles' );
        $this->db->join( 'sectors as s', 's.idSectors = jt.Sectors_idSectors' );
        $this->db->join( 'employment_levels as el', 'el.idLevelsOfEmployment = e.EmploymentLevels_idLevelsOfEmployment' );
        $this->db->where( $this->objectIdField, $id );
        $data = $this->db->get()->row_array();
        $data['jobtitle'] = new Jobtitle( $data );
        $data['sector'] = new Sector( $data );
        $data['employmentlevel'] = new EmploymentLevel( $data );
        if ( !empty( $data ) ) {
            return new $this->objectClass( $data );
        } else {
            return -1;
        }
    }

    public function addExperience( $idUser, Experience $obj )
    {
        try {
            //Check the skill does not exist already
            if ( $this->alreadyExists( $idUser, $obj ) ) {
                return -2;
            }
            $this->db->insert( $this->table, $obj );
        } catch ( Exception $e ) {
            return -1;
        }

        return $this->db->insert_id();
    }

    public function deleteExperience( $id )
    {
        $this->db->where( $this->objectIdField, $id );
        $this->db->delete( $this->table );
    }

    public function setVerified()
    {

    }

    public function unsetVerified()
    {

    }

    public function alreadyExists( $idUser, Experience $experience )
    {
        $this->db->select( '*' );
        $this->db->from( $this->table );
        $this->db->where( 'JobTitles_idJobTitles', $experience->getJobTitleId() );
        if ( $employerName = $experience->getExperienceName( false ) ) {
            $this->db->where( 'employerName', $employerName );
        }
        if ( $dateStarted = $experience->getDateStarted() ) {
            $this->db->where( 'dateStarted', $dateStarted );
        }
        if ( $dateFinished = $experience->getDateFinished() ) {
            $this->db->where( 'dateFinished', $dateStarted );
        }
        $this->db->where( 'Persons_idUser', $idUser );
        return $this->db->get()->num_rows();
    }

}


text:
package org.sakaiproject.component.test.privacy;

import junit.extensions.TestSetup;
import junit.framework.Test;
import junit.framework.TestSuite;
import java.util.*;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.sakaiproject.api.privacy.PrivacyManager;
import org.sakaiproject.api.privacy.PrivacyRecord;
import org.sakaiproject.test.SakaiTestBase;

public class PrivacyTest extends SakaiTestBase
{
	private static Log log = LogFactory.getLog(PrivacyTest.class);
	private PrivacyManager privacyManager;

	public static Test suite()
	{
		TestSetup setup = new TestSetup(new TestSuite(PrivacyTest.class))
		{
			protected void setUp() throws Exception
			{
				log.info("starting setup -- PrivacyTest");
				oneTimeSetup();
				log.info("finished setup -- PrivacyTest");
			}
			protected void tearDown() throws Exception
			{
				oneTimeTearDown();
			}
		};
		return setup;
	}

	public void setUp() throws Exception
	{
		log.info("Setting up an AuthzIntegrationTest test");

		privacyManager = (PrivacyManager)getService(PrivacyManager.class.getName());
	}

	public void tearDown() throws Exception
	{
		log.info("Tearing down an PrivacyTest test");

		privacyManager = null;
	}

	public void testSetViewableState() throws Exception
	{
//		privacyManager.setViewableState("main_page", "a", new Boolean(false), org.sakaiproject.api.privacy.PrivacyManager.USER_RECORD_TYPE);
//		privacyManager.setViewableState("main_page", "a", new Boolean(true), org.sakaiproject.api.privacy.PrivacyManager.SYSTEM_RECORD_TYPE);
//
//		privacyManager.setViewableState("main_page1", "a", new Boolean(false), org.sakaiproject.api.privacy.PrivacyManager.USER_RECORD_TYPE);
//		privacyManager.setViewableState("main_page1", "a", new Boolean(true), org.sakaiproject.api.privacy.PrivacyManager.SYSTEM_RECORD_TYPE);
//
//		privacyManager.setViewableState("main_page", "b", new Boolean(false), org.sakaiproject.api.privacy.PrivacyManager.USER_RECORD_TYPE);
//		privacyManager.setViewableState("main_page", "b", new Boolean(true), org.sakaiproject.api.privacy.PrivacyManager.SYSTEM_RECORD_TYPE);
//
//		privacyManager.setViewableState("main_page1", "b", new Boolean(true), org.sakaiproject.api.privacy.PrivacyManager.USER_RECORD_TYPE);
//		privacyManager.setViewableState("main_page1", "b", new Boolean(true), org.sakaiproject.api.privacy.PrivacyManager.SYSTEM_RECORD_TYPE);
	}

	public void testFindViewable() throws Exception
	{
		Set inputSet = new TreeSet();
		inputSet.add("a");
		inputSet.add("b");
		inputSet.add("c");
		inputSet.add("d");
		Set resultSet = privacyManager.findViewable("main_page", inputSet);
		Iterator iter = resultSet.iterator();
		while(iter.hasNext())
		{
			String user = (String)iter.next();
			log.info("Hidden users -- maing_page: " + user);
		}
	}

	public void testGetViewableState() throws Exception
	{
		Set resultSet = privacyManager.getViewableState("main_page1", new Boolean(true), PrivacyManager.SYSTEM_RECORD_TYPE);
		Iterator iter = resultSet.iterator();
		while(iter.hasNext())
		{
			String user = (String)iter.next();
			log.info("PrivacyRecord -- main_page1:" + PrivacyManager.SYSTEM_RECORD_TYPE + ":" + user);
		}
	}

	public void testGetViewableState2() throws Exception
	{
		Map returnedMap = privacyManager.getViewableState("main_page", PrivacyManager.USER_RECORD_TYPE);
		Set keySet = returnedMap.keySet();
		Iterator iter = keySet.iterator();
		while(iter.hasNext())
		{
			String userId = (String)iter.next();
			Boolean bl = (Boolean)returnedMap.get(userId);
			log.info("testGetViewableState2 -- " + "main_page:" + PrivacyManager.USER_RECORD_TYPE + ":" + userId + ":" + bl.booleanValue());
		}
	}

	public void testSetViewableState2() throws Exception
	{
		Map inputMap = new HashMap();
		inputMap.put("a", new Boolean(false));
		inputMap.put("b", new Boolean(true));
		inputMap.put("c", new Boolean(true));
		privacyManager.setViewableState("main_page", inputMap, PrivacyManager.USER_RECORD_TYPE);
	}

	public void testIsViewable() throws Exception
	{
		log.info("Privacy Test -- testIsView:");
		log.info(new Boolean(privacyManager.isViewable("main_page", "a")).toString());
	}
}


text:
module.exports = {
  blog(browser) {
    browser
      .url('http://localhost:8080/blog/')
      .waitForElementVisible('#vue-app', 1000)
      .assert.elementPresent('button.fetch-articles')
      .assert.elementPresent('button.create-article')

      // Fetch List Tests
      .click('button.fetch-articles')
      .waitForElementVisible('#articles', 1000)
      .assert.elementPresent('article.article-1')
      .assert.elementPresent('article.article-2')
      .assert.elementPresent('article.article-3')
      .assert.elementNotPresent('article.article-4')

      // Create Tests
      .click('button.create-article')
      .click('button.fetch-articles')
      .waitForElementVisible('article.article-4', 1000)
      .assert.elementPresent('article.article-1')
      .assert.elementPresent('article.article-2')
      .assert.elementPresent('article.article-3')
      .assert.elementPresent('article.article-4')

      // Update Tests
      .getText('article.article-1 h1', (result) => {
        browser.expect.element('article.article-1 h1').text.to.equal(result.value);
      })
      .getText('article.article-1 h1', (result) => {
        browser.click('article.article-1 .edit-article');
        browser.expect.element('article.article-1 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.expect.element('article.article-1 p.content').text.to.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.click('article.article-1 .edit-article');
        browser.expect.element('article.article-1 p.content').text.to.not.equal(result.value);
      })

      // Replace Tests
      .getText('article.article-2 h1', (result) => {
        browser.expect.element('article.article-2 h1').text.to.equal(result.value);
      })
      .getText('article.article-2 h1', (result) => {
        browser.click('article.article-2 .replace-article');
        browser.expect.element('article.article-2 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-2 p.content', (result) => {
        browser.expect.element('article.article-2 p.content').text.to.equal(result.value);
      })
      .getText('article.article-2 p.content', (result) => {
        browser.click('article.article-2 .replace-article');
        browser.expect.element('article.article-2 p.content').text.to.not.equal(result.value);
      })

      // Delete Test
      .click('article.article-4 .delete-article')
      .assert.elementNotPresent('article.article-4')

      // Navigate to single article
      .click('article.article-3 a')
      .waitForElementVisible('#article', 1000)

      .assert.elementNotPresent('article.article-1')
      .assert.elementNotPresent('article.article-2')
      .assert.elementPresent('article.article-3')
      .assert.elementNotPresent('article.article-4')

      // Update Single Tests
      .getText('article.article-3 h1', (result) => {
        browser.expect.element('article.article-3 h1').text.to.equal(result.value);
      })
      .getText('article.article-3 h1', (result) => {
        browser.click('article.article-3 .edit-article');
        browser.expect.element('article.article-3 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-3 p.content', (result) => {
        browser.expect.element('article.article-3 p.content').text.to.equal(result.value);
      })
      .getText('article.article-3 p.content', (result) => {
        browser.click('article.article-3 .edit-article');
        browser.expect.element('article.article-3 p.content').text.to.not.equal(result.value);
      })

      // Replace Single Tests
      .getText('article.article-3 h1', (result) => {
        browser.expect.element('article.article-3 h1').text.to.equal(result.value);
      })
      .getText('article.article-3 h1', (result) => {
        browser.click('article.article-3 .replace-article');
        browser.expect.element('article.article-3 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-3 p.content', (result) => {
        browser.expect.element('article.article-3 p.content').text.to.equal(result.value);
      })
      .getText('article.article-3 p.content', (result) => {
        browser.click('article.article-3 .replace-article');
        browser.expect.element('article.article-3 p.content').text.to.not.equal(result.value);
      })

      // Delete Single Test
      .click('article.article-3 .delete-article')
      .assert.elementNotPresent('article.article-3')
      .click('.back a')
      .waitForElementVisible('#articles', 1000)
      .assert.elementNotPresent('article.article-3')

      // Single fetch tests
      .url('http://localhost:8080/blog/#/articles/1')
      .refresh()
      .waitForElementVisible('#article', 1000)

      // Update Single Tests
      .getText('article.article-1 h1', (result) => {
        browser.expect.element('article.article-1 h1').text.to.equal(result.value);
      })
      .getText('article.article-1 h1', (result) => {
        browser.click('article.article-1 .edit-article');
        browser.expect.element('article.article-1 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.expect.element('article.article-1 p.content').text.to.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.click('article.article-1 .edit-article');
        browser.expect.element('article.article-1 p.content').text.to.not.equal(result.value);
      })

      // Replace Single Tests
      .getText('article.article-1 h1', (result) => {
        browser.expect.element('article.article-1 h1').text.to.equal(result.value);
      })
      .getText('article.article-1 h1', (result) => {
        browser.click('article.article-1 .replace-article');
        browser.expect.element('article.article-1 h1').text.to.not.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.expect.element('article.article-1 p.content').text.to.equal(result.value);
      })
      .getText('article.article-1 p.content', (result) => {
        browser.click('article.article-1 .replace-article');
        browser.expect.element('article.article-1 p.content').text.to.not.equal(result.value);
      })

      // Delete Single Test
      .click('article.article-1 .delete-article')
      .assert.elementNotPresent('article.article-1')
      .click('.back a')
      .waitForElementVisible('#vue-app', 1000)
      .assert.elementNotPresent('#articles')
      .click('button.fetch-articles')
      .waitForElementVisible('#articles', 1000)
      .assert.elementNotPresent('article.article-1')
      .assert.elementPresent('article.article-2')
      .assert.elementNotPresent('article.article-3')
      .assert.elementNotPresent('article.article-4')

      .end();
  }
};


text:
<?php
namespace Breview\Manifest;
class Item {
	protected $data;
	protected $adapter;
	public function __construct($data, $params = array()) {
		$this->data = $data;
		$this->adapter = (is_array($params) && array_key_exists('adapter', $params)) ? $params['adapter'] : null;
	}
	public function __get($param) {
		if($param == 'assets') {
			$assets = array();
			foreach($this->data['assets'] as $asset) {
				if(gettype($asset) == 'array') {
					$asset = array_merge(
						$this->data['attributes'],
						$asset
					);
					$assets[] = new Item\Asset($asset, array('adapter' => $this->adapter));
				}
				elseif(gettype($asset) == 'string') {
					$assets[] = new Item\Asset(array_merge(
						$this->data['attributes'],
						array('path' => $asset)
					), array('adapter' => $this->adapter));
				}
				else {
					throw new \Exception('Path or an object containing a path to an asset must be provided.');
				}
			}
			return $assets;
		}
		elseif($param == 'attributes') {
			$attributes = array();
			foreach($this->data['attributes'] as $attribute) {
				$targetAttributeClassName = __NAMESPACE__ . '\Item\Attribute\\' . ucfirst($attribute);
				if(class_exists($targetAttributeClassName)) {
					$targetAttributeClassParams = array();
					if($attribute == 'path') {
						$targetAttributeClassParams['adapter'] = $this->adapter;
					}
					$attributes[] = new $targetAttributeClassName($attribute, $targetAttributeClassParams);
				}
				$attributes[] = $attribute;
			}
		}
		return $this->data[$param];
	}
	public function __isset($param) {
		if(array_key_exists($param, $this->data)) {
			return true;
		}
		return false;
	}
	public function getAttribute($attribute) {
		if(array_key_exists($attribute, $this->data['attributes'])) {
			$targetAttributeClassName = __NAMESPACE__ . '\Item\Attribute\\' . ucfirst($attribute);
			if(class_exists($targetAttributeClassName)) {
				if($attribute == 'path') {
					$targetAttributeClassParams['adapter'] = $this->adapter;
				}
				return new $targetAttributeClassName($this->data['attributes'][$attribute], $targetAttributeClassParams);
			}
			return $this->data['attributes'][$attribute];
		}
		return null;
	}
}


text:
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee18195a26b">
<name type="corporate">
 <namePart>United States Government Printing Office</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">printer</roleTerm>
  <roleTerm type="code" authority="marcrelator">prt</roleTerm>
</role>
 <role>
  <roleTerm type="text" authority="marcrelator">distributor</roleTerm>
  <roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
 <namePart>United States</namePart>
 <namePart>United States District Court Eastern District of Michigan</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">author</roleTerm>
  <roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
 <description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
 <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
 <collectionCode>USCOURTS</collectionCode>
 <category>Judicial Publications</category>
 <branch>judicial</branch>
 <dateIngested>2012-01-18</dateIngested>
</extension>
<originInfo>
 <publisher>Administrative Office of the United States Courts</publisher>
 <dateIssued encoding="w3cdtf">2006-01-24</dateIssued>
 <issuance>monographic</issuance>
</originInfo>
<physicalDescription>
 <note type="source content type">deposited</note>
 <digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-mied-2_04-cv-72676</identifier>
<identifier type="local">P0b002ee18195a26b</identifier>
<recordInfo>
 <recordContentSource authority="marcorg">DGPO</recordContentSource>
 <recordCreationDate encoding="w3cdtf">2012-01-18</recordCreationDate>
 <recordChangeDate encoding="w3cdtf">2012-01-19</recordChangeDate>
 <recordIdentifier source="DGPO">USCOURTS-mied-2_04-cv-72676</recordIdentifier>
 <recordOrigin>machine generated</recordOrigin>
 <languageOfCataloging>
  <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-mied-2_04-cv-72676</accessId>
 <courtType>District</courtType>
 <courtCode>mied</courtCode>
 <courtCircuit>6th</courtCircuit>
 <courtState>Michigan</courtState>
 <courtSortOrder>2251</courtSortOrder>
 <caseNumber>2:04-cv-72676</caseNumber>
 <caseOffice>Detroit</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>150</natureSuitCode>
 <natureSuit>Overpayments & Enforcement of Judgments</natureSuit>
 <party firstName="William" fullName="William Allison" lastName="Allison" role="Plaintiff"></party>
 <party fullName="Internal Revenue Service" lastName="Internal Revenue Service" role="Defendant"></party>
</extension>
<titleInfo>
 <title>Allison v. Internal Revenue Service</title>
 <partNumber>2:04-cv-72676</partNumber>
</titleInfo>
<location>
 <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-mied-2_04-cv-72676/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">2:04-cv-72676;04-72676</identifier>
<name type="corporate">
 <namePart>United States District Court Eastern District of Michigan</namePart>
 <namePart>6th Circuit</namePart>
 <namePart>Detroit</namePart>
 <affiliation>U.S. Courts</affiliation>
 <role>
  <roleTerm authority="marcrelator" type="text">author</roleTerm>
  <roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
 <displayForm>William Allison</displayForm>
 <namePart type="family">Allison</namePart>
 <namePart type="given">William</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Plaintiff</description>
</name>
<name type="personal">
 <displayForm>Internal Revenue Service</displayForm>
 <namePart type="family">Internal Revenue Service</namePart>
 <namePart type="given"></namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-mied-2_04-cv-72676</accessId>
 <courtType>District</courtType>
 <courtCode>mied</courtCode>
 <courtCircuit>6th</courtCircuit>
 <courtState>Michigan</courtState>
 <courtSortOrder>2251</courtSortOrder>
 <caseNumber>2:04-cv-72676</caseNumber>
 <caseOffice>Detroit</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>150</natureSuitCode>
 <natureSuit>Overpayments & Enforcement of Judgments</natureSuit>
 <party firstName="William" fullName="William Allison" lastName="Allison" role="Plaintiff"></party>
 <party fullName="Internal Revenue Service" lastName="Internal Revenue Service" role="Defendant"></party>
 <state>Michigan</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-mied-2_04-cv-72676-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-mied-2_04-cv-72676/USCOURTS-mied-2_04-cv-72676-0/mods.xml">
 <titleInfo>
  <title>Allison v. Internal Revenue Service</title>
  <subTitle>ORDER granting 6 Motion to Dismiss- Signed by Honorable John Corbett O'Meara. (DGoo, )</subTitle>
  <partNumber>0</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2006-01-24</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-mied-2_04-cv-72676-0.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee181a5704c</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-mied-2_04-cv-72676/USCOURTS-mied-2_04-cv-72676-0</identifier>
 <identifier type="former granule identifier">mied-2_04-cv-72676_0.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-mied-2_04-cv-72676/USCOURTS-mied-2_04-cv-72676-0/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-mied-2_04-cv-72676/pdf/USCOURTS-mied-2_04-cv-72676-0.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:04-cv-72676; Allison v. Internal Revenue Service; </searchTitle>
  <courtName>United States District Court Eastern District of Michigan</courtName>
  <state>Michigan</state>
  <accessId>USCOURTS-mied-2_04-cv-72676-0</accessId>
  <sequenceNumber>0</sequenceNumber>
  <dateIssued>2006-01-24</dateIssued>
  <docketText>ORDER granting 6 Motion to Dismiss- Signed by Honorable John Corbett O'Meara. (DGoo, )</docketText>
</extension>
</relatedItem>
</mods>