1 16 package org.apache.cocoon.forms.formmodel.tree; 17 18 import org.apache.excalibur.source.SourceResolver; 19 20 25 public class SourceTreeModelDefinition implements TreeModelDefinition { 26 27 public static final int[][] NO_PATTERNS = new int[0][]; 28 private String url; 29 private int[][] fileIncludePatterns = NO_PATTERNS; 30 private int[][] fileExcludePatterns = NO_PATTERNS; 31 private int[][] dirIncludePatterns = NO_PATTERNS; 32 private int[][] dirExcludePatterns = NO_PATTERNS; 33 private SourceResolver resolver; 34 35 public void setURL(String url) { 36 this.url = url; 37 } 38 39 public void setFilePatterns(int[][] include, int[][] exclude) { 40 this.fileIncludePatterns = include; 41 this.fileExcludePatterns = exclude; 42 } 43 44 public void setDirectoryPatterns(int[][] include, int[][] exclude) { 45 this.dirIncludePatterns = include; 46 this.dirExcludePatterns = exclude; 47 } 48 49 public TreeModel createInstance() { 50 return new SourceTreeModel(this); 51 } 52 53 public int[][] getDirectoryExcludePatterns() { 54 return dirExcludePatterns; 55 } 56 57 public int[][] getDirectoryIncludePatterns() { 58 return dirIncludePatterns; 59 } 60 61 public int[][] getFileExcludePatterns() { 62 return fileExcludePatterns; 63 } 64 65 public int[][] getFileIncludePatterns() { 66 return fileIncludePatterns; 67 } 68 69 public void setSourceResolver(SourceResolver resolver) { 70 this.resolver = resolver; 71 } 72 73 public String getRootURL() { 74 return this.url; 75 } 76 77 public SourceResolver getResolver() { 78 return this.resolver; 79 } 80 } 81 | Popular Tags |