Class XsdSchemaRepository

  • All Implemented Interfaces:
    com.consol.citrus.common.InitializingPhase, com.consol.citrus.common.Named

    public class XsdSchemaRepository
    extends Object
    implements com.consol.citrus.common.Named, com.consol.citrus.common.InitializingPhase
    Schema repository holding a set of XML schema resources known in the test scope.
    Author:
    Christoph Deppisch
    • Constructor Detail

      • XsdSchemaRepository

        public XsdSchemaRepository()
    • Method Detail

      • canValidate

        public boolean canValidate​(Document doc)
        Find the matching schema for document using given schema mapping strategy.
        Parameters:
        doc - the document instance to validate.
        Returns:
        boolean flag marking matching schema instance found
      • initialize

        public void initialize()
        Specified by:
        initialize in interface com.consol.citrus.common.InitializingPhase
      • getSchemas

        public List<org.springframework.xml.xsd.XsdSchema> getSchemas()
        Get the list of known schemas.
        Returns:
        the schemaSources
      • setSchemas

        public void setSchemas​(List<org.springframework.xml.xsd.XsdSchema> schemas)
        Set the list of known schemas.
        Parameters:
        schemas - the schemas to set
      • setSchemaMappingStrategy

        public void setSchemaMappingStrategy​(XsdSchemaMappingStrategy schemaMappingStrategy)
        Set the schema mapping strategy.
        Parameters:
        schemaMappingStrategy - the schemaMappingStrategy to set
      • getSchemaMappingStrategy

        public XsdSchemaMappingStrategy getSchemaMappingStrategy()
        Gets the schema mapping strategy.
        Returns:
        The current XsdSchemaMappingStrategy
      • setName

        public void setName​(String name)
        Specified by:
        setName in interface com.consol.citrus.common.Named
      • getName

        public String getName()
        Gets the name.
        Returns:
        the name the name to get.
      • getLocations

        public List<String> getLocations()
        Gets the locations.
        Returns:
        the locations the locations to get.
      • setLocations

        public void setLocations​(List<String> locations)
        Sets the locations.
        Parameters:
        locations - the locations to set