manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1717046 - /manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/
Date Sun, 29 Nov 2015 11:56:06 GMT
Author: kwright
Date: Sun Nov 29 11:56:06 2015
New Revision: 1717046

URL: http://svn.apache.org/viewvc?rev=1717046&view=rev
Log:
Reformat as per MCF standards

Modified:
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Attachment.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResponse.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceUser.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Label.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutableAttachment.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutablePage.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Space.java
    manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Spaces.java

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Attachment.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Attachment.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Attachment.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Attachment.java Sun Nov 29 11:56:06 2015
@@ -36,95 +36,95 @@ import org.json.JSONObject;
  */
 public class Attachment extends Page {
 
-	protected static final String KEY_DOWNLOAD = "download";
-	protected static final String KEY_EXTENSIONS = "extensions";
-	protected String downloadUrl;
-	protected InputStream contentStream;
-
-	public static ConfluenceResourceBuilder<Attachment> builder() {
-		return new AttachmentBuilder();
-	}
-
-	public String getDownloadUrl() {
-		return this.downloadUrl;
-	}
-
-	@Override
-	public boolean hasContent() {
-		return (this.length > 0 && this.hasContentStream()) || (this.downloadUrl != null && !this.downloadUrl.isEmpty());
-	}
-
-	public Boolean hasContentStream() {
-		return this.contentStream != null;
-	}
-
-	@Override
-	public InputStream getContentStream() {
-		if(hasContentStream()) {
-			return this.contentStream;
-		}
-		return super.getContentStream();
-	}
-
-	@Override
-	protected void refineMetadata(Map<String, Object> metadata) {
-		super.refineMetadata(metadata);
-		metadata.put("downloadUrl", this.getBaseUrl() + this.getUrlContext()
-				+ downloadUrl);
-	}
-
-	/**
-	 * <p>
-	 * AttachmentBuilder internal class
-	 * </p>
-	 * <p>
-	 * Used to build Attachments
-	 * </p>
-	 * 
-	 * @author Antonio David Perez Morales <adperezmorales@gmail.com>
-	 *
-	 */
-	public static class AttachmentBuilder implements ConfluenceResourceBuilder<Attachment>{
-		
-		@Override
-		public Attachment fromJson(JSONObject jsonPage) {
-			return fromJson(jsonPage, new Attachment());
-		}
-
-		@SuppressWarnings("unchecked")
-		public Attachment fromJson(JSONObject jsonPage, Attachment attachment) {
-			((ConfluenceResourceBuilder<Page>) Page.builder()).fromJson(jsonPage, attachment);
-
-			try {
-				/*
-				 * Download URL
-				 */
-
-				JSONObject links = (JSONObject) jsonPage.get(Page.KEY_LINKS);
-				if (links != null) {
-					attachment.downloadUrl = links.optString(KEY_DOWNLOAD, "");
-				}
-
-				/*
-				 * Extensions
-				 */
-				JSONObject extensions = (JSONObject) jsonPage
-						.get(KEY_EXTENSIONS);
-				if (extensions != null) {
-					attachment.mediaType = extensions.optString(
-							Page.KEY_MEDIATYPE, "");
-				}
-			} catch (JSONException e) {
-				e.printStackTrace();
-			}
-
-			return attachment;
-		}
-
-		@Override
-		public Class<Attachment> getType() {
-			return Attachment.class;
-		}
+  protected static final String KEY_DOWNLOAD = "download";
+  protected static final String KEY_EXTENSIONS = "extensions";
+  protected String downloadUrl;
+  protected InputStream contentStream;
+
+  public static ConfluenceResourceBuilder<Attachment> builder() {
+    return new AttachmentBuilder();
+  }
+
+  public String getDownloadUrl() {
+    return this.downloadUrl;
+  }
+
+  @Override
+  public boolean hasContent() {
+    return (this.length > 0 && this.hasContentStream()) || (this.downloadUrl != null && !this.downloadUrl.isEmpty());
+  }
+
+  public Boolean hasContentStream() {
+    return this.contentStream != null;
+  }
+
+  @Override
+  public InputStream getContentStream() {
+    if(hasContentStream()) {
+      return this.contentStream;
+    }
+    return super.getContentStream();
+  }
+
+  @Override
+  protected void refineMetadata(Map<String, Object> metadata) {
+    super.refineMetadata(metadata);
+    metadata.put("downloadUrl", this.getBaseUrl() + this.getUrlContext()
+        + downloadUrl);
+  }
+
+  /**
+   * <p>
+   * AttachmentBuilder internal class
+   * </p>
+   * <p>
+   * Used to build Attachments
+   * </p>
+   * 
+   * @author Antonio David Perez Morales <adperezmorales@gmail.com>
+   *
+   */
+  public static class AttachmentBuilder implements ConfluenceResourceBuilder<Attachment>{
+    
+    @Override
+    public Attachment fromJson(JSONObject jsonPage) {
+      return fromJson(jsonPage, new Attachment());
+    }
+
+    @SuppressWarnings("unchecked")
+    public Attachment fromJson(JSONObject jsonPage, Attachment attachment) {
+      ((ConfluenceResourceBuilder<Page>) Page.builder()).fromJson(jsonPage, attachment);
+
+      try {
+        /*
+         * Download URL
+         */
+
+        JSONObject links = (JSONObject) jsonPage.get(Page.KEY_LINKS);
+        if (links != null) {
+          attachment.downloadUrl = links.optString(KEY_DOWNLOAD, "");
+        }
+
+        /*
+         * Extensions
+         */
+        JSONObject extensions = (JSONObject) jsonPage
+            .get(KEY_EXTENSIONS);
+        if (extensions != null) {
+          attachment.mediaType = extensions.optString(
+              Page.KEY_MEDIATYPE, "");
+        }
+      } catch (JSONException e) {
+        e.printStackTrace();
+      }
+
+      return attachment;
+    }
+
+    @Override
+    public Class<Attachment> getType() {
+      return Attachment.class;
+    }
 
-	}
+  }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResponse.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResponse.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResponse.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceResponse.java Sun Nov 29 11:56:06 2015
@@ -27,59 +27,59 @@ import org.json.JSONObject;
 
 public class ConfluenceResponse<T extends ConfluenceResource> {
 
-	private List<T> results;
-	private int start;
-	private int limit;
-	private Boolean isLast;
-	
-	public ConfluenceResponse(List<T> results, int start, int limit, Boolean isLast) {
-		this.results = results;
-		this.start = start;
-		this.limit = limit;
-		this.isLast = isLast;
-	}
-	
-	public List<T> getResults() {
-		return this.results;
-	}
-	
-	public int getStart() {
-		return this.start;
-	}
-	
-	public int getLimit() {
-		return this.limit;
-	}
-	
-	public Boolean isLast() {
-		return isLast;
-	}
-	
-	public static <T extends ConfluenceResource> ConfluenceResponse<T> fromJson(JSONObject response, ConfluenceResourceBuilder<T> builder) {
-		List<T> resources = new ArrayList<T>();
-		try {
-			JSONArray jsonArray = response.getJSONArray("results");
-			for(int i=0,size=jsonArray.length(); i<size;i++) {
-				JSONObject jsonPage = jsonArray.getJSONObject(i);
-				T resource = (T) builder.fromJson(jsonPage);
-				resources.add(resource);
-			}
-			
-			int limit = response.getInt("limit");
-			int start = response.getInt("start");
-			Boolean isLast = false;
-			JSONObject links = response.getJSONObject("_links");
-			if(links != null) {
-				isLast = links.optString("next", "undefined").equalsIgnoreCase("undefined");
-			}
-			
-			return new ConfluenceResponse<T>(resources, start, limit, isLast);
-			
-		} catch (JSONException e) {
-			// TODO Auto-generated catch block
-			e.printStackTrace();
-		}
-		
-		return new ConfluenceResponse<T>(new ArrayList<T>(), 0,0,false);
-	}
+  private List<T> results;
+  private int start;
+  private int limit;
+  private Boolean isLast;
+  
+  public ConfluenceResponse(List<T> results, int start, int limit, Boolean isLast) {
+    this.results = results;
+    this.start = start;
+    this.limit = limit;
+    this.isLast = isLast;
+  }
+  
+  public List<T> getResults() {
+    return this.results;
+  }
+  
+  public int getStart() {
+    return this.start;
+  }
+  
+  public int getLimit() {
+    return this.limit;
+  }
+  
+  public Boolean isLast() {
+    return isLast;
+  }
+  
+  public static <T extends ConfluenceResource> ConfluenceResponse<T> fromJson(JSONObject response, ConfluenceResourceBuilder<T> builder) {
+    List<T> resources = new ArrayList<T>();
+    try {
+      JSONArray jsonArray = response.getJSONArray("results");
+      for(int i=0,size=jsonArray.length(); i<size;i++) {
+        JSONObject jsonPage = jsonArray.getJSONObject(i);
+        T resource = (T) builder.fromJson(jsonPage);
+        resources.add(resource);
+      }
+      
+      int limit = response.getInt("limit");
+      int start = response.getInt("start");
+      Boolean isLast = false;
+      JSONObject links = response.getJSONObject("_links");
+      if(links != null) {
+        isLast = links.optString("next", "undefined").equalsIgnoreCase("undefined");
+      }
+      
+      return new ConfluenceResponse<T>(resources, start, limit, isLast);
+      
+    } catch (JSONException e) {
+      // TODO Auto-generated catch block
+      e.printStackTrace();
+    }
+    
+    return new ConfluenceResponse<T>(new ArrayList<T>(), 0,0,false);
+  }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceUser.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceUser.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceUser.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/ConfluenceUser.java Sun Nov 29 11:56:06 2015
@@ -27,19 +27,19 @@ import java.util.List;
  *
  */
 public class ConfluenceUser {
-	  private final String username;
-	  private final List<String> authorities;
+    private final String username;
+    private final List<String> authorities;
 
-	  public ConfluenceUser(String username, List<String> authorities) {
-	    this.username = username;
-	    this.authorities = authorities;
-	  }
+    public ConfluenceUser(String username, List<String> authorities) {
+      this.username = username;
+      this.authorities = authorities;
+    }
 
-	  public String getUsername() {
-	    return username;
-	  }
+    public String getUsername() {
+      return username;
+    }
 
-	  public List<String> getAuthorities() {
-	    return authorities;
-	  }
-	}
+    public List<String> getAuthorities() {
+      return authorities;
+    }
+  }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Label.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Label.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Label.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Label.java Sun Nov 29 11:56:06 2015
@@ -32,72 +32,72 @@ import org.json.JSONObject;
  */
 public class Label extends ConfluenceResource{
 
-	protected static final String KEY_LINKS = "_links";
-	protected static final String KEY_ID = "id";
-	protected static final String KEY_SELF = "self";
-	protected static final String KEY_PREFIX = "prefix";
-	protected static final String KEY_NAME = "name";
-
-	protected String id;
-	protected String prefix;
-	protected String name;
-
-	@SuppressWarnings("unused")
-	private JSONObject delegated;
-
-	public Label() {
-
-	}
-
-	public String getId() {
-		return this.id;
-	}
-
-	public String getPrefix() {
-		return this.prefix;
-	}
-
-	public String getName() {
-		return this.name;
-	}
-
-	public static LabelBuilder builder() {
-		return new LabelBuilder();
-	}
-
-	/**
-	 * <p>
-	 * LabelBuilder internal class
-	 * </p>
-	 * <p>
-	 * Used to build Labels
-	 * </p>
-	 * 
-	 * @author Antonio David Perez Morales <adperezmorales@gmail.com>
-	 *
-	 */
-	public static class LabelBuilder implements ConfluenceResourceBuilder<Label>{
-
-		public Label fromJson(JSONObject jsonLabel) {
-			return fromJson(jsonLabel, new Label());
-		}
-
-		public Label fromJson(JSONObject jsonPage, Label label) {
-
-			label.id = jsonPage.optString(KEY_ID, "");
-			label.prefix = jsonPage.optString(KEY_PREFIX, "");
-			label.name = jsonPage.optString(KEY_NAME, "");
-
-			label.delegated = jsonPage;
-
-			return label;
-
-		}
-
-		@Override
-		public Class<Label> getType() {
-			return Label.class;
-		}
+  protected static final String KEY_LINKS = "_links";
+  protected static final String KEY_ID = "id";
+  protected static final String KEY_SELF = "self";
+  protected static final String KEY_PREFIX = "prefix";
+  protected static final String KEY_NAME = "name";
+
+  protected String id;
+  protected String prefix;
+  protected String name;
+
+  @SuppressWarnings("unused")
+  private JSONObject delegated;
+
+  public Label() {
+
+  }
+
+  public String getId() {
+    return this.id;
+  }
+
+  public String getPrefix() {
+    return this.prefix;
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public static LabelBuilder builder() {
+    return new LabelBuilder();
+  }
+
+  /**
+   * <p>
+   * LabelBuilder internal class
+   * </p>
+   * <p>
+   * Used to build Labels
+   * </p>
+   * 
+   * @author Antonio David Perez Morales <adperezmorales@gmail.com>
+   *
+   */
+  public static class LabelBuilder implements ConfluenceResourceBuilder<Label>{
+
+    public Label fromJson(JSONObject jsonLabel) {
+      return fromJson(jsonLabel, new Label());
+    }
+
+    public Label fromJson(JSONObject jsonPage, Label label) {
+
+      label.id = jsonPage.optString(KEY_ID, "");
+      label.prefix = jsonPage.optString(KEY_PREFIX, "");
+      label.name = jsonPage.optString(KEY_NAME, "");
+
+      label.delegated = jsonPage;
+
+      return label;
+
+    }
+
+    @Override
+    public Class<Label> getType() {
+      return Label.class;
+    }
 
-	}
+  }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutableAttachment.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutableAttachment.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutableAttachment.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutableAttachment.java Sun Nov 29 11:56:06 2015
@@ -32,80 +32,80 @@ import java.util.Date;
  */
 public class MutableAttachment extends Attachment {
 
-	public void setId(String id) {
-		this.id = id;
-	}
-	
-	public void setSpace(String space) {
-		this.space = space;
-	}
+  public void setId(String id) {
+    this.id = id;
+  }
+  
+  public void setSpace(String space) {
+    this.space = space;
+  }
 
-	public void setBaseUrl(String baseUrl) {
-		this.baseUrl = baseUrl;
-	}
+  public void setBaseUrl(String baseUrl) {
+    this.baseUrl = baseUrl;
+  }
 
-	public void setUrlContext(String urlContext) {
-		this.urlContext = urlContext;
-	}
-	
-	public void setUrl(String url) {
-		this.url = url;
-	}
-	
-	public void setWebUrl(String webUrl) {
-		this.webUrl = webUrl;
-	}
-	
-	public void setCreatedDate(Date createdDate) {
-		this.createdDate = createdDate;
-	}
-	
-	public void setLastModified(Date lastModified) {
-		this.lastModified = lastModified;
-	}
-	
-	public void setType(PageType type) {
-		this.type = type;
-	}
-	
-	public void setTitle(String title) {
-		this.title = title;
-	}
-	
-	public void setVersion(int version) {
-		this.version = version;
-	}
-	
-	public void setCreator(String creator) {
-		this.creator = creator;
-	}
-	
-	public void setCreatorUsername(String creatorUsername) {
-		this.creatorUsername = creatorUsername;
-	}
-	
-	public void setLastModifier(String lastModifier) {
-		this.lastModifier = lastModifier;
-	}
-	
-	public void setLastModifierUsername(String lastModifierUsername) {
-		this.lastModifierUsername = lastModifierUsername;
-	}
-	
-	public void setMediaType(String mediaType) {
-		this.mediaType = mediaType;
-	}
-	
-	public void setLength(long length) {
-		this.length = length;
-	}
-	
-	public void setDownloadUrl(String downloadUrl) {
-		this.downloadUrl = downloadUrl;
-	}
-	
-	public void setContentStream(InputStream contentStream) {
-		this.contentStream = contentStream;
-	}	
+  public void setUrlContext(String urlContext) {
+    this.urlContext = urlContext;
+  }
+  
+  public void setUrl(String url) {
+    this.url = url;
+  }
+  
+  public void setWebUrl(String webUrl) {
+    this.webUrl = webUrl;
+  }
+  
+  public void setCreatedDate(Date createdDate) {
+    this.createdDate = createdDate;
+  }
+  
+  public void setLastModified(Date lastModified) {
+    this.lastModified = lastModified;
+  }
+  
+  public void setType(PageType type) {
+    this.type = type;
+  }
+  
+  public void setTitle(String title) {
+    this.title = title;
+  }
+  
+  public void setVersion(int version) {
+    this.version = version;
+  }
+  
+  public void setCreator(String creator) {
+    this.creator = creator;
+  }
+  
+  public void setCreatorUsername(String creatorUsername) {
+    this.creatorUsername = creatorUsername;
+  }
+  
+  public void setLastModifier(String lastModifier) {
+    this.lastModifier = lastModifier;
+  }
+  
+  public void setLastModifierUsername(String lastModifierUsername) {
+    this.lastModifierUsername = lastModifierUsername;
+  }
+  
+  public void setMediaType(String mediaType) {
+    this.mediaType = mediaType;
+  }
+  
+  public void setLength(long length) {
+    this.length = length;
+  }
+  
+  public void setDownloadUrl(String downloadUrl) {
+    this.downloadUrl = downloadUrl;
+  }
+  
+  public void setContentStream(InputStream contentStream) {
+    this.contentStream = contentStream;
+  }  
 
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutablePage.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutablePage.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutablePage.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/MutablePage.java Sun Nov 29 11:56:06 2015
@@ -33,84 +33,84 @@ import java.util.List;
  */
 public class MutablePage extends Page {
 
-	public MutablePage() {
+  public MutablePage() {
 
-	}
-	
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public void setSpace(String space) {
-		this.space = space;
-	}
-
-	public void setBaseUrl(String baseUrl) {
-		this.baseUrl = baseUrl;
-	}
-
-	public void setUrlContext(String urlContext) {
-		this.urlContext = urlContext;
-	}
-
-	public void setUrl(String url) {
-		this.url = url;
-	}
-
-	public void setWebUrl(String webUrl) {
-		this.webUrl = webUrl;
-	}
-
-	public void setCreatedDate(Date createdDate) {
-		this.createdDate = createdDate;
-	}
-
-	public void setLastModified(Date lastModified) {
-		this.lastModified = lastModified;
-	}
-
-	public void setType(PageType type) {
-		this.type = type;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public void setVersion(int version) {
-		this.version = version;
-	}
-
-	public void setCreator(String creator) {
-		this.creator = creator;
-	}
-
-	public void setCreatorUsername(String creatorUsername) {
-		this.creatorUsername = creatorUsername;
-	}
-
-	public void setLastModifier(String lastModifier) {
-		this.lastModifier = lastModifier;
-	}
-
-	public void setLastModifierUsername(String lastModifierUsername) {
-		this.lastModifierUsername = lastModifierUsername;
-	}
-
-	public void setMediaType(String mediaType) {
-		this.mediaType = mediaType;
-	}
-
-	public void setLength(long length) {
-		this.length = length;
-	}
-
-	public void setContent(String content) {
-		this.content = content;
-	}
-
-	public void setLabels(List<Label> labels) {
-		this.labels = labels;
-	}
+  }
+  
+  public void setId(String id) {
+    this.id = id;
+  }
+
+  public void setSpace(String space) {
+    this.space = space;
+  }
+
+  public void setBaseUrl(String baseUrl) {
+    this.baseUrl = baseUrl;
+  }
+
+  public void setUrlContext(String urlContext) {
+    this.urlContext = urlContext;
+  }
+
+  public void setUrl(String url) {
+    this.url = url;
+  }
+
+  public void setWebUrl(String webUrl) {
+    this.webUrl = webUrl;
+  }
+
+  public void setCreatedDate(Date createdDate) {
+    this.createdDate = createdDate;
+  }
+
+  public void setLastModified(Date lastModified) {
+    this.lastModified = lastModified;
+  }
+
+  public void setType(PageType type) {
+    this.type = type;
+  }
+
+  public void setTitle(String title) {
+    this.title = title;
+  }
+
+  public void setVersion(int version) {
+    this.version = version;
+  }
+
+  public void setCreator(String creator) {
+    this.creator = creator;
+  }
+
+  public void setCreatorUsername(String creatorUsername) {
+    this.creatorUsername = creatorUsername;
+  }
+
+  public void setLastModifier(String lastModifier) {
+    this.lastModifier = lastModifier;
+  }
+
+  public void setLastModifierUsername(String lastModifierUsername) {
+    this.lastModifierUsername = lastModifierUsername;
+  }
+
+  public void setMediaType(String mediaType) {
+    this.mediaType = mediaType;
+  }
+
+  public void setLength(long length) {
+    this.length = length;
+  }
+
+  public void setContent(String content) {
+    this.content = content;
+  }
+
+  public void setLabels(List<Label> labels) {
+    this.labels = labels;
+  }
 
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Page.java Sun Nov 29 11:56:06 2015
@@ -46,329 +46,329 @@ import com.google.common.collect.Maps;
  */
 public class Page extends ConfluenceResource{
 
-	protected static final String KEY_LINKS = "_links";
-	protected static final String KEY_ID = "id";
-	protected static final String KEY_SELF = "self";
-	protected static final String KEY_WEBUI = "webui";
-	protected static final String KEY_BASE = "base";
-	protected static final String KEY_CONTEXT = "context";
-	protected static final String KEY_KEY = "key";
-	protected static final String KEY_TITLE = "title";
-	protected static final String KEY_BODY = "body";
-	protected static final String KEY_VIEW = "view";
-	protected static final String KEY_VALUE = "value";
-	protected static final String KEY_SPACE = "space";
-	protected static final String KEY_HISTORY = "history";
-	protected static final String KEY_CREATED_DATE = "createdDate";
-	protected static final String KEY_CREATED_BY = "createdBy";
-	protected static final String KEY_BY = "by";
-	protected static final String KEY_TYPE = "type";
-	protected static final String KEY_DISPLAY_NAME = "displayName";
-	protected static final String KEY_USER_NAME = "username";
-	protected static final String KEY_VERSION = "version";
-	protected static final String KEY_WHEN = "when";
-	protected static final String KEY_MEDIATYPE = "mediaType";
-
-	private static final String PAGE_ID = "confluenceId";
-	private static final String PAGE_URL = "url";
-	private static final String PAGE_WEBURL = "webUrl";
-	private static final String PAGE_LAST_MODIFIED = "lastModified";
-	private static final String PAGE_CREATOR = "creator";
-	private static final String PAGE_CREATOR_USERNAME = "creatorUsername";
-	private static final String PAGE_LAST_MODIFIER = "lastModifier";
-	private static final String PAGE_LAST_MODIFIER_USERNAME = "lastModifierUsername";
-	private static final String PAGE_SIZE = "size";
-	private static final String PAGE_LABEL = "label";
-
-	protected String id;
-	protected String space;
-	protected String baseUrl;
-	protected String urlContext;
-	protected String url;
-	protected String webUrl;
-	protected Date createdDate;
-	protected Date lastModified;
-	protected PageType type;
-	protected String title;
-	protected int version;
-	protected String creator;
-	protected String creatorUsername;
-	protected String lastModifier;
-	protected String lastModifierUsername;
-	protected String mediaType = "text/html";
-	protected long length;
-	protected String content;
-	protected List<Label> labels = Lists.newArrayList();
-
-	@SuppressWarnings("unused")
-	private JSONObject delegated;
-
-	public Page() {
-
-	}
-
-	public String getContent() {
-		return this.content;
-	}
-
-	public String getId() {
-		return this.id;
-	}
-
-	public PageType getType() {
-		return this.type;
-	}
-
-	public String getMediaType() {
-		return this.mediaType;
-	}
-
-	public int getVersion() {
-		return this.version;
-	}
-
-	public String getTitle() {
-		return this.title;
-	}
-
-	public String getBaseUrl() {
-		return this.baseUrl;
-	}
-
-	public String getUrlContext() {
-		return this.urlContext;
-	}
-
-	public String getWebUrl() {
-		return this.webUrl;
-	}
-
-	public String getUrl() {
-		return this.url;
-	}
-
-	public String getSpace() {
-		return this.space;
-	}
-
-	public String getCreator() {
-		return this.creator;
-	}
-
-	public String getCreatorUsername() {
-		return this.creatorUsername;
-	}
-
-	public String getLastModifier() {
-		return this.lastModifier;
-	}
-
-	public String getLastModifierUsername() {
-		return this.lastModifierUsername;
-	}
-
-	public Date getCreatedDate() {
-		return this.createdDate;
-	}
-
-	public Date getLastModifiedDate() {
-		return this.lastModified;
-	}
-
-	public long getLength() {
-		return this.length;
-	}
-
-	public boolean hasContent() {
-		return this.length > 0 && this.content != null;
-	}
-	
-	public InputStream getContentStream() {
-		String contentStream = content != null ? content : "";
-		return new ByteArrayInputStream(
-				contentStream.getBytes(StandardCharsets.UTF_8));
-	}
-
-	public List<Label> getLabels() {
-		return this.labels;
-	}
-	
-	public Map<String, Object> getMetadataAsMap() {
-		Map<String, Object> pageMetadata = Maps.newHashMap();
-		pageMetadata.put(KEY_ID,  this.id);
-		pageMetadata.put(PAGE_ID, this.id);
-		pageMetadata.put(KEY_TYPE, this.type.toString());
-		pageMetadata.put(KEY_TITLE, this.title);
-		pageMetadata.put(KEY_SPACE, this.space);
-		pageMetadata.put(PAGE_URL, this.url);
-		pageMetadata.put(PAGE_WEBURL, this.webUrl);
-		pageMetadata.put(KEY_CREATED_DATE,
-				DateParser.formatISO8601Date(this.createdDate));
-		pageMetadata.put(PAGE_LAST_MODIFIED,
-				DateParser.formatISO8601Date(this.lastModified));
-		pageMetadata.put(KEY_MEDIATYPE, this.mediaType);
-		pageMetadata.put(KEY_VERSION, String.valueOf(this.version));
-		pageMetadata.put(PAGE_CREATOR, this.creator);
-		pageMetadata.put(PAGE_CREATOR_USERNAME, this.creatorUsername);
-		pageMetadata.put(PAGE_LAST_MODIFIER, this.lastModifier);
-		pageMetadata
-				.put(PAGE_LAST_MODIFIER_USERNAME, this.lastModifierUsername);
-		pageMetadata.put(PAGE_SIZE, String.valueOf(this.length));
-		
-		putLabelsOnMetadataMap(pageMetadata);
-		refineMetadata(pageMetadata);
-		return pageMetadata;
-	}
-
-	/**
-	 * <p>Put the page labels on the metadata map</p>
-	 * @param pageMetadata
-	 */
-	private void putLabelsOnMetadataMap(Map<String, Object> pageMetadata) {
-		if(this.labels == null || this.labels.isEmpty()) {
-			return;
-		}
-		
-		Iterable<String> labelsString = Iterables.transform(this.labels, new Function<Label, String>() {
-			@Override
-			public String apply(Label input) {
-				return input.getName();
-			}
-		});
-		
-		pageMetadata.put(PAGE_LABEL, Lists.newArrayList(labelsString));
-		
-	}
-
-	/**
-	 * <p>
-	 * Used to be overwritten by child classes to add more metadata to the map
-	 * </p>
-	 * 
-	 * @param metadata
-	 */
-	protected void refineMetadata(Map<String, Object> metadata) {
-	}
-
-	public static ConfluenceResourceBuilder<? extends Page> builder() {
-		return new PageBuilder();
-	}
-
-	/**
-	 * <p>PageBuilder internal class</p>
-	 * <p>Used to build pages</p>
-	 * @author Antonio David Perez Morales <adperezmorales@gmail.com>
-	 *
-	 */
-	public static class PageBuilder implements ConfluenceResourceBuilder<Page>{
-		
-		public Page fromJson(JSONObject jsonPage) {
-			return fromJson(jsonPage, new Page());
-		}
-		
-		public Page fromJson(JSONObject jsonPage, Page page) {
-
-			try {
-				String id = jsonPage.getString(KEY_ID);
-				String type = jsonPage.getString(KEY_TYPE);
-				String title = jsonPage.getString(KEY_TITLE);
-
-				page.delegated = jsonPage;
-
-				/* Init Page fields */
-				page.id = id;
-				page.type = PageType.fromName(type);
-				page.title = title;
-
-				page.space = processSpace(jsonPage);
-
-				/*
-				 * Url & WebUrl
-				 */
-				JSONObject links = (JSONObject) jsonPage.get(KEY_LINKS);
-				if (links != null) {
-					page.url = links.optString(KEY_SELF, "");
-					String webUrl = (String) links.optString(KEY_WEBUI, "");
-					page.urlContext = (String) links.optString(KEY_CONTEXT, "");
-					page.baseUrl = (String) links.optString(KEY_BASE, "");
-					page.webUrl = page.baseUrl + page.urlContext + webUrl;
-
-				}
-
-				/*
-				 * Created By and created Date
-				 */
-				JSONObject history = (JSONObject) jsonPage
-						.optJSONObject(KEY_HISTORY);
-				if (history != null) {
-
-					page.createdDate = DateParser.parseISO8601Date(history
-							.optString(KEY_CREATED_DATE, ""));
-					JSONObject createdBy = (JSONObject) history
-							.optJSONObject(KEY_CREATED_BY);
-					if (createdBy != null) {
-						page.creator = createdBy
-								.optString(KEY_DISPLAY_NAME, "");
-						page.creatorUsername = createdBy.optString(
-								KEY_USER_NAME, "");
-					}
-
-				}
-
-				/*
-				 * Last modifier and Last modified date
-				 */
-				JSONObject version = (JSONObject) jsonPage
-						.optJSONObject(KEY_VERSION);
-				if (version != null) {
-					JSONObject by = version.getJSONObject(KEY_BY);
-					if (by != null) {
-						page.lastModifier = by.optString(KEY_DISPLAY_NAME);
-						page.lastModifierUsername = by.optString(KEY_USER_NAME,
-								"");
-					}
-
-					page.lastModified = DateParser.parseISO8601Date(version
-							.optString(KEY_WHEN, ""));
-				}
-
-				/*
-				 * Page Content
-				 */
-				JSONObject body = (JSONObject) jsonPage.optJSONObject(KEY_BODY);
-				if (body != null) {
-					JSONObject view = (JSONObject) body.optJSONObject(KEY_VIEW);
-					if (view != null) {
-						page.content = view.optString(KEY_VALUE, null);
-						page.length = page.content.getBytes().length;
-					}
-				}
-
-				return page;
-
-			} catch (JSONException e) {
-				e.printStackTrace();
-			}
-
-			return new Page();
-
-		}
-
-		private static String processSpace(JSONObject page) {
-			/* Page */
-			try {
-				JSONObject space = (JSONObject) page.get(KEY_SPACE);
-				if (space != null)
-					return space.optString(KEY_KEY, "");
-			} catch (JSONException e) {
-				return "";
-			}
-			return "";
-		}
-
-		@Override
-		public Class<Page> getType() {
-			return Page.class;
-		}
-	}
+  protected static final String KEY_LINKS = "_links";
+  protected static final String KEY_ID = "id";
+  protected static final String KEY_SELF = "self";
+  protected static final String KEY_WEBUI = "webui";
+  protected static final String KEY_BASE = "base";
+  protected static final String KEY_CONTEXT = "context";
+  protected static final String KEY_KEY = "key";
+  protected static final String KEY_TITLE = "title";
+  protected static final String KEY_BODY = "body";
+  protected static final String KEY_VIEW = "view";
+  protected static final String KEY_VALUE = "value";
+  protected static final String KEY_SPACE = "space";
+  protected static final String KEY_HISTORY = "history";
+  protected static final String KEY_CREATED_DATE = "createdDate";
+  protected static final String KEY_CREATED_BY = "createdBy";
+  protected static final String KEY_BY = "by";
+  protected static final String KEY_TYPE = "type";
+  protected static final String KEY_DISPLAY_NAME = "displayName";
+  protected static final String KEY_USER_NAME = "username";
+  protected static final String KEY_VERSION = "version";
+  protected static final String KEY_WHEN = "when";
+  protected static final String KEY_MEDIATYPE = "mediaType";
+
+  private static final String PAGE_ID = "confluenceId";
+  private static final String PAGE_URL = "url";
+  private static final String PAGE_WEBURL = "webUrl";
+  private static final String PAGE_LAST_MODIFIED = "lastModified";
+  private static final String PAGE_CREATOR = "creator";
+  private static final String PAGE_CREATOR_USERNAME = "creatorUsername";
+  private static final String PAGE_LAST_MODIFIER = "lastModifier";
+  private static final String PAGE_LAST_MODIFIER_USERNAME = "lastModifierUsername";
+  private static final String PAGE_SIZE = "size";
+  private static final String PAGE_LABEL = "label";
+
+  protected String id;
+  protected String space;
+  protected String baseUrl;
+  protected String urlContext;
+  protected String url;
+  protected String webUrl;
+  protected Date createdDate;
+  protected Date lastModified;
+  protected PageType type;
+  protected String title;
+  protected int version;
+  protected String creator;
+  protected String creatorUsername;
+  protected String lastModifier;
+  protected String lastModifierUsername;
+  protected String mediaType = "text/html";
+  protected long length;
+  protected String content;
+  protected List<Label> labels = Lists.newArrayList();
+
+  @SuppressWarnings("unused")
+  private JSONObject delegated;
+
+  public Page() {
+
+  }
+
+  public String getContent() {
+    return this.content;
+  }
+
+  public String getId() {
+    return this.id;
+  }
+
+  public PageType getType() {
+    return this.type;
+  }
+
+  public String getMediaType() {
+    return this.mediaType;
+  }
+
+  public int getVersion() {
+    return this.version;
+  }
+
+  public String getTitle() {
+    return this.title;
+  }
+
+  public String getBaseUrl() {
+    return this.baseUrl;
+  }
+
+  public String getUrlContext() {
+    return this.urlContext;
+  }
+
+  public String getWebUrl() {
+    return this.webUrl;
+  }
+
+  public String getUrl() {
+    return this.url;
+  }
+
+  public String getSpace() {
+    return this.space;
+  }
+
+  public String getCreator() {
+    return this.creator;
+  }
+
+  public String getCreatorUsername() {
+    return this.creatorUsername;
+  }
+
+  public String getLastModifier() {
+    return this.lastModifier;
+  }
+
+  public String getLastModifierUsername() {
+    return this.lastModifierUsername;
+  }
+
+  public Date getCreatedDate() {
+    return this.createdDate;
+  }
+
+  public Date getLastModifiedDate() {
+    return this.lastModified;
+  }
+
+  public long getLength() {
+    return this.length;
+  }
+
+  public boolean hasContent() {
+    return this.length > 0 && this.content != null;
+  }
+  
+  public InputStream getContentStream() {
+    String contentStream = content != null ? content : "";
+    return new ByteArrayInputStream(
+        contentStream.getBytes(StandardCharsets.UTF_8));
+  }
+
+  public List<Label> getLabels() {
+    return this.labels;
+  }
+  
+  public Map<String, Object> getMetadataAsMap() {
+    Map<String, Object> pageMetadata = Maps.newHashMap();
+    pageMetadata.put(KEY_ID,  this.id);
+    pageMetadata.put(PAGE_ID, this.id);
+    pageMetadata.put(KEY_TYPE, this.type.toString());
+    pageMetadata.put(KEY_TITLE, this.title);
+    pageMetadata.put(KEY_SPACE, this.space);
+    pageMetadata.put(PAGE_URL, this.url);
+    pageMetadata.put(PAGE_WEBURL, this.webUrl);
+    pageMetadata.put(KEY_CREATED_DATE,
+        DateParser.formatISO8601Date(this.createdDate));
+    pageMetadata.put(PAGE_LAST_MODIFIED,
+        DateParser.formatISO8601Date(this.lastModified));
+    pageMetadata.put(KEY_MEDIATYPE, this.mediaType);
+    pageMetadata.put(KEY_VERSION, String.valueOf(this.version));
+    pageMetadata.put(PAGE_CREATOR, this.creator);
+    pageMetadata.put(PAGE_CREATOR_USERNAME, this.creatorUsername);
+    pageMetadata.put(PAGE_LAST_MODIFIER, this.lastModifier);
+    pageMetadata
+        .put(PAGE_LAST_MODIFIER_USERNAME, this.lastModifierUsername);
+    pageMetadata.put(PAGE_SIZE, String.valueOf(this.length));
+    
+    putLabelsOnMetadataMap(pageMetadata);
+    refineMetadata(pageMetadata);
+    return pageMetadata;
+  }
+
+  /**
+   * <p>Put the page labels on the metadata map</p>
+   * @param pageMetadata
+   */
+  private void putLabelsOnMetadataMap(Map<String, Object> pageMetadata) {
+    if(this.labels == null || this.labels.isEmpty()) {
+      return;
+    }
+    
+    Iterable<String> labelsString = Iterables.transform(this.labels, new Function<Label, String>() {
+      @Override
+      public String apply(Label input) {
+        return input.getName();
+      }
+    });
+    
+    pageMetadata.put(PAGE_LABEL, Lists.newArrayList(labelsString));
+    
+  }
+
+  /**
+   * <p>
+   * Used to be overwritten by child classes to add more metadata to the map
+   * </p>
+   * 
+   * @param metadata
+   */
+  protected void refineMetadata(Map<String, Object> metadata) {
+  }
+
+  public static ConfluenceResourceBuilder<? extends Page> builder() {
+    return new PageBuilder();
+  }
+
+  /**
+   * <p>PageBuilder internal class</p>
+   * <p>Used to build pages</p>
+   * @author Antonio David Perez Morales <adperezmorales@gmail.com>
+   *
+   */
+  public static class PageBuilder implements ConfluenceResourceBuilder<Page>{
+    
+    public Page fromJson(JSONObject jsonPage) {
+      return fromJson(jsonPage, new Page());
+    }
+    
+    public Page fromJson(JSONObject jsonPage, Page page) {
+
+      try {
+        String id = jsonPage.getString(KEY_ID);
+        String type = jsonPage.getString(KEY_TYPE);
+        String title = jsonPage.getString(KEY_TITLE);
+
+        page.delegated = jsonPage;
+
+        /* Init Page fields */
+        page.id = id;
+        page.type = PageType.fromName(type);
+        page.title = title;
+
+        page.space = processSpace(jsonPage);
+
+        /*
+         * Url & WebUrl
+         */
+        JSONObject links = (JSONObject) jsonPage.get(KEY_LINKS);
+        if (links != null) {
+          page.url = links.optString(KEY_SELF, "");
+          String webUrl = (String) links.optString(KEY_WEBUI, "");
+          page.urlContext = (String) links.optString(KEY_CONTEXT, "");
+          page.baseUrl = (String) links.optString(KEY_BASE, "");
+          page.webUrl = page.baseUrl + page.urlContext + webUrl;
+
+        }
+
+        /*
+         * Created By and created Date
+         */
+        JSONObject history = (JSONObject) jsonPage
+            .optJSONObject(KEY_HISTORY);
+        if (history != null) {
+
+          page.createdDate = DateParser.parseISO8601Date(history
+              .optString(KEY_CREATED_DATE, ""));
+          JSONObject createdBy = (JSONObject) history
+              .optJSONObject(KEY_CREATED_BY);
+          if (createdBy != null) {
+            page.creator = createdBy
+                .optString(KEY_DISPLAY_NAME, "");
+            page.creatorUsername = createdBy.optString(
+                KEY_USER_NAME, "");
+          }
+
+        }
+
+        /*
+         * Last modifier and Last modified date
+         */
+        JSONObject version = (JSONObject) jsonPage
+            .optJSONObject(KEY_VERSION);
+        if (version != null) {
+          JSONObject by = version.getJSONObject(KEY_BY);
+          if (by != null) {
+            page.lastModifier = by.optString(KEY_DISPLAY_NAME);
+            page.lastModifierUsername = by.optString(KEY_USER_NAME,
+                "");
+          }
+
+          page.lastModified = DateParser.parseISO8601Date(version
+              .optString(KEY_WHEN, ""));
+        }
+
+        /*
+         * Page Content
+         */
+        JSONObject body = (JSONObject) jsonPage.optJSONObject(KEY_BODY);
+        if (body != null) {
+          JSONObject view = (JSONObject) body.optJSONObject(KEY_VIEW);
+          if (view != null) {
+            page.content = view.optString(KEY_VALUE, null);
+            page.length = page.content.getBytes().length;
+          }
+        }
+
+        return page;
+
+      } catch (JSONException e) {
+        e.printStackTrace();
+      }
+
+      return new Page();
+
+    }
+
+    private static String processSpace(JSONObject page) {
+      /* Page */
+      try {
+        JSONObject space = (JSONObject) page.get(KEY_SPACE);
+        if (space != null)
+          return space.optString(KEY_KEY, "");
+      } catch (JSONException e) {
+        return "";
+      }
+      return "";
+    }
+
+    @Override
+    public Class<Page> getType() {
+      return Page.class;
+    }
+  }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/PageType.java Sun Nov 29 11:56:06 2015
@@ -28,19 +28,19 @@ import org.apache.commons.lang.WordUtils
  */
 public enum PageType {
 
-	PAGE, ATTACHMENT;
-	
-	public static PageType fromName(String type) {
-		for(PageType pageType: values()) {
-			if(pageType.name().equalsIgnoreCase(type)) {
-				return pageType;
-			}
-		}
-		
-		return PageType.PAGE;
-	}
-	
-	public String toString() {
-		return WordUtils.capitalize(name().toLowerCase());
-	}
+  PAGE, ATTACHMENT;
+  
+  public static PageType fromName(String type) {
+    for(PageType pageType: values()) {
+      if(pageType.name().equalsIgnoreCase(type)) {
+        return pageType;
+      }
+    }
+    
+    return PageType.PAGE;
+  }
+  
+  public String toString() {
+    return WordUtils.capitalize(name().toLowerCase());
+  }
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Space.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Space.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Space.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Space.java Sun Nov 29 11:56:06 2015
@@ -21,52 +21,52 @@ import org.json.JSONObject;
 
 public class Space {
 
-	private static final String KEY_NAME = "name";
-	private static final String KEY_KEY = "key";
-	private static final String KEY_TYPE = "type";
-	private static final String KEY_URL = "url";
-	
-	private String key;
-	private String name;
-	private String type;
-	private String url;
-	
-	public Space() {
-		
-	}
-	
-	public String getKey() {
-		return key;
-	}
-	public void setKey(String key) {
-		this.key = key;
-	}
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	public String getType() {
-		return type;
-	}
-	public void setType(String type) {
-		this.type = type;
-	}
-	public String getUrl() {
-		return url;
-	}
-	public void setUrl(String url) {
-		this.url = url;
-	}
-	
-	public static Space fromJson(JSONObject spaceJson) {
-		Space space = new Space();
-		space.key = spaceJson.optString(KEY_KEY, "");
-		space.name = spaceJson.optString(KEY_NAME, "");
-		space.type = spaceJson.optString(KEY_TYPE, "");
-		space.url = spaceJson.optString(KEY_URL, "");
-		return space;
-	}
-	
+  private static final String KEY_NAME = "name";
+  private static final String KEY_KEY = "key";
+  private static final String KEY_TYPE = "type";
+  private static final String KEY_URL = "url";
+  
+  private String key;
+  private String name;
+  private String type;
+  private String url;
+  
+  public Space() {
+    
+  }
+  
+  public String getKey() {
+    return key;
+  }
+  public void setKey(String key) {
+    this.key = key;
+  }
+  public String getName() {
+    return name;
+  }
+  public void setName(String name) {
+    this.name = name;
+  }
+  public String getType() {
+    return type;
+  }
+  public void setType(String type) {
+    this.type = type;
+  }
+  public String getUrl() {
+    return url;
+  }
+  public void setUrl(String url) {
+    this.url = url;
+  }
+  
+  public static Space fromJson(JSONObject spaceJson) {
+    Space space = new Space();
+    space.key = spaceJson.optString(KEY_KEY, "");
+    space.name = spaceJson.optString(KEY_NAME, "");
+    space.type = spaceJson.optString(KEY_TYPE, "");
+    space.url = spaceJson.optString(KEY_URL, "");
+    return space;
+  }
+  
 }

Modified: manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Spaces.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Spaces.java?rev=1717046&r1=1717045&r2=1717046&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Spaces.java (original)
+++ manifoldcf/trunk/connectors/confluence/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/confluence/model/Spaces.java Sun Nov 29 11:56:06 2015
@@ -27,28 +27,28 @@ import org.slf4j.LoggerFactory;
 
 public class Spaces extends ArrayList<Space> {
 
-	private static Logger logger = LoggerFactory.getLogger(Spaces.class);
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -5334215263162816914L;
+  private static Logger logger = LoggerFactory.getLogger(Spaces.class);
+  /**
+   * 
+   */
+  private static final long serialVersionUID = -5334215263162816914L;
 
-	
-	public static Spaces fromJson(JSONArray jsonSpaces) {
-		Spaces spaces = new Spaces();
-		for(int i=0,len=jsonSpaces.length();i<len;i++) {
-			try {
-				JSONObject spaceJson = jsonSpaces.getJSONObject(i);
-				Space space = Space.fromJson(spaceJson);
-				spaces.add(space);
-			} catch (JSONException e) {
-				logger.debug("Error obtaining JSON item from spaces. Item {} is not a JSON Object", i);
-				e.printStackTrace();
-				continue;
-			}
-		}
-		
-		return spaces;
-		
-	}
+  
+  public static Spaces fromJson(JSONArray jsonSpaces) {
+    Spaces spaces = new Spaces();
+    for(int i=0,len=jsonSpaces.length();i<len;i++) {
+      try {
+        JSONObject spaceJson = jsonSpaces.getJSONObject(i);
+        Space space = Space.fromJson(spaceJson);
+        spaces.add(space);
+      } catch (JSONException e) {
+        logger.debug("Error obtaining JSON item from spaces. Item {} is not a JSON Object", i);
+        e.printStackTrace();
+        continue;
+      }
+    }
+    
+    return spaces;
+    
+  }
 }



Mime
View raw message