summaryrefslogtreecommitdiff
path: root/src/com/google/wireless/gdata/spreadsheets/data/WorksheetEntry.java
blob: 2c00d6639ab1bd90ad17b75f6da5846cb156d378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// Copyright 2007 The Android Open Source Project
package com.google.wireless.gdata.spreadsheets.data;

import com.google.wireless.gdata.GDataException;
import com.google.wireless.gdata.data.Entry;
import com.google.wireless.gdata.data.StringUtils;

/**
 * Represents an entry in a GData Worksheets meta-feed.
 */
public class WorksheetEntry extends Entry {
    /** The URI to this entry's cells feed. */
    private String cellsUri = null;

    /** The number of columns in the worksheet. */
    private int colCount = -1;

    /** The URI to this entry's list feed. */
    private String listUri = null;

    /** The number of rows in the worksheet. */
    private int rowCount = -1;

    /**
     * Fetches the URI of this entry's Cells feed.
     * 
     * @return The URI of the entry's Cells feed.
     */
    public String getCellFeedUri() {
        return cellsUri;
    }

    /**
     * Fetches the number of columns in the worksheet.
     * 
     * @return The number of columns.
     */
    public int getColCount() {
        return colCount;
    }

    /**
     * Fetches the URI of this entry's List feed.
     * 
     * @return The URI of the entry's List feed.
     * @throws GDataException If the URI is not set or is invalid.
     */
    public String getListFeedUri() {
        return listUri;
    }

    /**
     * Fetches the number of rows in the worksheet.
     * 
     * @return The number of rows.
     */
    public int getRowCount() {
        return rowCount;
    }

    /**
     * Sets the URI of this entry's Cells feed.
     * 
     * @param href The HREF attribute that should be the Cells feed URI.
     */
    public void setCellFeedUri(String href) {
        cellsUri = href;
    }

    /**
     * Sets the number of columns in the worksheet.
     * 
     * @param colCount The new number of columns.
     */
    public void setColCount(int colCount) {
        this.colCount = colCount;
    }

    /**
     * Sets this entry's Atom ID.
     * 
     * @param id The new ID value.
     */
    public void setId(String id) {
        super.setId(id);
    }

    /**
     * Sets the URI of this entry's List feed.
     * 
     * @param href The HREF attribute that should be the List feed URI.
     */
    public void setListFeedUri(String href) {
        listUri = href;
    }

    /**
     * Sets the number of rows in the worksheet.
     * 
     * @param rowCount The new number of rows.
     */
    public void setRowCount(int rowCount) {
        this.rowCount = rowCount;
    }
}