If you think the Android project js-android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/*
* Copyright (C) 2012-2014 Jaspersoft Corporation. All rights reserved.
* http://community.jaspersoft.com/project/mobile-sdk-android
*//fromwww.java2s.com
* Unless you have purchased a commercial license agreement from Jaspersoft,
* the following license terms apply:
*
* This program is part of Jaspersoft Mobile SDK for Android.
*
* Jaspersoft Mobile SDK is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Jaspersoft Mobile SDK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Jaspersoft Mobile SDK for Android. If not, see
* <http://www.gnu.org/licenses/lgpl>.
*/package com.jaspersoft.android.sdk.client.oxm.resource;
import android.os.Parcel;
import android.os.Parcelable;
import org.simpleframework.xml.Element;
/**
* This class represents a resource lookup entity for convenient XML serialization process.
*
* @author Ivan Gadzhega
* @since 1.7
*/publicclass ResourceLookup implements Parcelable {
@Element(required=false)
protected String label;
@Element(required=false)
protected String description;
@Element
protected String uri;
@Element(required=false)
protected String resourceType;
@Element(required=false)
protectedint version;
@Element(required=false)
protectedint permissionMask;
@Element(required=false)
protected String creationDate;
@Element(required=false)
protected String updateDate;
public ResourceLookup() { }
//---------------------------------------------------------------------
// Parcelable
//---------------------------------------------------------------------
public ResourceLookup(Parcel source) {
this.label = source.readString();
this.description = source.readString();
this.uri = source.readString();
this.resourceType = source.readString();
this.creationDate = source.readString();
this.updateDate = source.readString();
this.version = source.readInt();
this.permissionMask = source.readInt();
}
publicstaticfinal Parcelable.Creator CREATOR = new Parcelable.Creator() {
public ResourceLookup createFromParcel(Parcel source) {
returnnew ResourceLookup(source);
}
public ResourceLookup[] newArray(int size) {
returnnew ResourceLookup[size];
}
};
@Override
publicint describeContents() {
return 0;
}
@Override
publicvoid writeToParcel(Parcel dest, int flags) {
dest.writeString(label);
dest.writeString(description);
dest.writeString(uri);
dest.writeString(resourceType);
dest.writeString(creationDate);
dest.writeString(updateDate);
dest.writeInt(version);
dest.writeInt(permissionMask);
}
//---------------------------------------------------------------------
// Getters & Setters
//---------------------------------------------------------------------
public ResourceType getResourceType() {
try {
return ResourceType.valueOf(resourceType);
} catch (IllegalArgumentException ex) {
return ResourceType.unknown;
}
}
publicvoid setResourceType(ResourceType resourceType) {
this.resourceType = resourceType.toString();
}
publicvoid setResourceType(String resourceType) {
this.resourceType = resourceType;
}
public String getLabel() {
return label;
}
publicvoid setLabel(String label) {
this.label = label;
}
public String getDescription() {
return description;
}
publicvoid setDescription(String description) {
this.description = description;
}
public String getUri() {
return uri;
}
publicvoid setUri(String uri) {
this.uri = uri;
}
publicint getVersion() {
return version;
}
publicvoid setVersion(int version) {
this.version = version;
}
publicint getPermissionMask() {
return permissionMask;
}
publicvoid setPermissionMask(int permissionMask) {
this.permissionMask = permissionMask;
}
public String getCreationDate() {
return creationDate;
}
publicvoid setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
public String getUpdateDate() {
return updateDate;
}
publicvoid setUpdateDate(String updateDate) {
this.updateDate = updateDate;
}
//---------------------------------------------------------------------
// Nested Classes
//---------------------------------------------------------------------
publicenum ResourceType {
folder,
reportUnit,
dashboard,
legacyDashboard,
unknown
}
}