syncloud.google.docs.model.Category Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of syncloud-google-docs Show documentation
Show all versions of syncloud-google-docs Show documentation
Google Docs Syncloud Starage Adapter
The newest version!
package syncloud.google.docs.model;
import com.google.api.client.util.Key;
import java.util.List;
public class Category {
@Key("@scheme")
public String scheme;
@Key("@term")
public String term;
@Key("@label")
public String label;
public static Category find(List categories, CategoryScheme categoryScheme){
if (categories == null)
return null;
for(Category category : categories)
if (category.scheme.equalsIgnoreCase(categoryScheme.getScheme()))
return category;
return null;
}
public static Category find(List categories, CategoryScheme categoryScheme, CategoryTerm term){
if (categories == null)
return null;
for(Category category : categories)
if (category.scheme.equalsIgnoreCase(categoryScheme.getScheme()) && category.term.equalsIgnoreCase(term.getTerm()))
return category;
return null;
}
public static Category folder(){
Category category = new Category();
category.scheme = CategoryScheme.KIND.getScheme();
category.term = CategoryTerm.FOLDER.getTerm();
return category;
}
public static Category file(){
Category category = new Category();
category.scheme = CategoryScheme.KIND.getScheme();
category.term = CategoryTerm.FILE.getTerm();
return category;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy