Class Project


  • public class Project
    extends java.lang.Object
    A class representing the contents of a project.xml file.
    • Constructor Summary

      Constructors 
      Constructor Description
      Project()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addPostProcess​(java.lang.String name, PostProcess postProcess)
      Add a post-processing step
      void addProperty​(UserProperty property)
      Add a project property.
      void addSource​(java.lang.String name, Source source)
      Add a Source object
      java.util.Map<java.lang.String,​PostProcess> getPostProcesses()
      Return a Map from post-process name to PostProcess objects
      java.util.List<UserProperty> getProperties()
      Return a list of UserProperty objects for the Project.
      java.util.List<java.lang.String> getSourceLocations()
      Get a list of directories to search for sources, specified by 'source.location.
      java.util.Map<java.lang.String,​Source> getSources()
      Return a Map from source name to Source
      java.lang.String getType()
      Return the type of this project
      void setType​(java.lang.String type)
      Set the type of this project.
      void validate​(java.io.File projectXml)
      Validate contents of a project.xml file once it has been unmarshalled.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Project

        public Project()
    • Method Detail

      • addSource

        public void addSource​(java.lang.String name,
                              Source source)
        Add a Source object
        Parameters:
        name - the name
        source - the Source
      • addProperty

        public void addProperty​(UserProperty property)
        Add a project property.
        Parameters:
        property - the property
      • addPostProcess

        public void addPostProcess​(java.lang.String name,
                                   PostProcess postProcess)
        Add a post-processing step
        Parameters:
        name - the name
        postProcess - the PostProcess
      • getSources

        public java.util.Map<java.lang.String,​Source> getSources()
        Return a Map from source name to Source
        Returns:
        the Sources
      • getProperties

        public java.util.List<UserProperty> getProperties()
        Return a list of UserProperty objects for the Project.
        Returns:
        the properties
      • getPostProcesses

        public java.util.Map<java.lang.String,​PostProcess> getPostProcesses()
        Return a Map from post-process name to PostProcess objects
        Returns:
        the PostProcess objects
      • setType

        public void setType​(java.lang.String type)
        Set the type of this project.
        Parameters:
        type - the new type
      • getType

        public java.lang.String getType()
        Return the type of this project
        Returns:
        the type
      • validate

        public void validate​(java.io.File projectXml)
        Validate contents of a project.xml file once it has been unmarshalled. This will check a) that 'source.location' properties point to valid locations (IF SET) b) that all sources lists can be found in 'source.location' directories If source.location is NOT set, no validation done.
        Parameters:
        projectXml - project.xml file, location used to resolve relative source.location paths
      • getSourceLocations

        public java.util.List<java.lang.String> getSourceLocations()
        Get a list of directories to search for sources, specified by 'source.location. properties.
        Returns:
        a list of source locations