Class DataPage

java.lang.Object
com.mohamnag.jstatic.data_tree.DataPage

public class DataPage extends Object
This represents a page in DataTree. A page contains own data and will get compiled down to a final file.
  • Method Details

    • getData

      public Map<String,Object> getData()
    • getData

      public Optional<Object> getData(String key)
    • getRecursiveData

      public Optional<Object> getRecursiveData(String key)
      Get value for given key first looking on own data and then recursively in parent nodes upwards.
    • addData

      public void addData(String key, Object value)
    • getPath

      public String getPath()
      Returns:
      absolute path of this page
    • getPathElements

      public List<String> getPathElements()
    • resolveRelativePath

      public List<String> resolveRelativePath(List<String> relativePath)
      Will resolve a given path which is relative to this page into an absolute one that can be resolved from the DataTree for target page.
    • addAllData

      public void addAllData(Map<String,Object> data)