// Path: sample/src/main/java/com/ls/drupal8demo/util/ModelUtils.java
// public class ModelUtils {
//     public final static String trimImageURL(String imageURL)
//     {
//         if(TextUtils.isEmpty(imageURL))
//         {
//             return null;
//         }
// 
//         int indexIfImageStart = imageURL.indexOf("src=\"");
//         if(indexIfImageStart <=0)
//         {
//             return null;
//         }else{
//             indexIfImageStart+=5;
//         }
// 
//         int indexOfImageEnd = imageURL.indexOf("\"",indexIfImageStart);
//         String result = imageURL.substring(indexIfImageStart,indexOfImageEnd);
//         return result;
//     }
// }


import com.ls.drupal8demo.util.ModelUtils;
/**
 * The MIT License (MIT)
 * Copyright (c) 2014 Lemberg Solutions Limited
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.ls.drupal8demo.article;



public class ArticlePreview {

	private String nid;
	private String title;
	private String field_blog_date;
	private String field_image;
	private String field_blog_author;
	private String field_blog_category;
	private String body;

	public String getNid() {
		return nid;
	}

	public String getTitle() {
		return title;
	}

	public String getDate() {
		return field_blog_date;
	}

	public String getAuthor() {
		return field_blog_author;
	}

	public String getBody() {
		return body;
	}

	public String getImage() {
// Path: sample/src/main/java/com/ls/drupal8demo/util/ModelUtils.java
// public class ModelUtils {
//     public final static String trimImageURL(String imageURL)
//     {
//         if(TextUtils.isEmpty(imageURL))
//         {
//             return null;
//         }
// 
//         int indexIfImageStart = imageURL.indexOf("src=\"");
//         if(indexIfImageStart <=0)
//         {
//             return null;
//         }else{
//             indexIfImageStart+=5;
//         }
// 
//         int indexOfImageEnd = imageURL.indexOf("\"",indexIfImageStart);
//         String result = imageURL.substring(indexIfImageStart,indexOfImageEnd);
//         return result;
//     }
// }


// Path: sample/src/main/java/com/ls/drupal8demo/article/ArticlePreview.java
import com.ls.drupal8demo.util.ModelUtils;

/**
 * The MIT License (MIT)
 * Copyright (c) 2014 Lemberg Solutions Limited
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.ls.drupal8demo.article;



public class ArticlePreview {

	private String nid;
	private String title;
	private String field_blog_date;
	private String field_image;
	private String field_blog_author;
	private String field_blog_category;
	private String body;

	public String getNid() {
		return nid;
	}

	public String getTitle() {
		return title;
	}

	public String getDate() {
		return field_blog_date;
	}

	public String getAuthor() {
		return field_blog_author;
	}

	public String getBody() {
		return body;
	}

	public String getImage() {
		return ModelUtils.trimImageURL(this.field_image);