Class JingEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    @UriEndpoint(firstVersion="1.1.0",
                 scheme="jing",
                 title="Jing",
                 syntax="jing:resourceUri",
                 producerOnly=true,
                 category=VALIDATION)
    public class JingEndpoint
    extends org.apache.camel.support.DefaultEndpoint
    Validate XML against a RelaxNG schema (XML Syntax or Compact Syntax) using Jing library.
    • Field Summary

      • Fields inherited from class org.apache.camel.support.service.BaseService

        BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
    • Constructor Summary

      Constructors 
      Constructor Description
      JingEndpoint​(String endpointUri, org.apache.camel.Component component)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)  
      org.apache.camel.Producer createProducer()  
      protected void doInit()  
      protected void doStart()  
      InputSource getInputSource()  
      String getResourceUri()  
      com.thaiopensource.validate.Schema getSchema()  
      com.thaiopensource.relaxng.SchemaFactory getSchemaFactory()  
      boolean isCompactSyntax()  
      void setCompactSyntax​(boolean compactSyntax)
      Whether to validate using RelaxNG compact syntax or not.
      void setInputSource​(InputSource inputSource)  
      void setResourceUri​(String resourceUri)
      URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the schema to validate against.
      void setSchema​(com.thaiopensource.validate.Schema schema)  
      void setSchemaFactory​(com.thaiopensource.relaxng.SchemaFactory schemaFactory)  
      • Methods inherited from class org.apache.camel.support.DefaultEndpoint

        configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
      • Methods inherited from class org.apache.camel.support.service.BaseService

        build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from interface org.apache.camel.Endpoint

        getEndpointBaseUri, isSingletonProducer
      • Methods inherited from interface org.apache.camel.Service

        build, close, init, start, stop
      • Methods inherited from interface org.apache.camel.ShutdownableService

        shutdown
      • Methods inherited from interface org.apache.camel.StatefulService

        getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
      • Methods inherited from interface org.apache.camel.SuspendableService

        isSuspended, resume, suspend
    • Constructor Detail

      • JingEndpoint

        public JingEndpoint​(String endpointUri,
                            org.apache.camel.Component component)
    • Method Detail

      • createProducer

        public org.apache.camel.Producer createProducer()
                                                 throws Exception
        Throws:
        Exception
      • createConsumer

        public org.apache.camel.Consumer createConsumer​(org.apache.camel.Processor processor)
                                                 throws Exception
        Throws:
        Exception
      • getResourceUri

        public String getResourceUri()
      • setResourceUri

        public void setResourceUri​(String resourceUri)
        URL to a local resource on the classpath or a full URL to a remote resource or resource on the file system which contains the schema to validate against.
      • isCompactSyntax

        public boolean isCompactSyntax()
      • setCompactSyntax

        public void setCompactSyntax​(boolean compactSyntax)
        Whether to validate using RelaxNG compact syntax or not.

        By default this is false for using RelaxNG XML Syntax (rng) And true is for using RelaxNG Compact Syntax (rnc)

      • getSchema

        public com.thaiopensource.validate.Schema getSchema()
      • setSchema

        public void setSchema​(com.thaiopensource.validate.Schema schema)
      • getSchemaFactory

        public com.thaiopensource.relaxng.SchemaFactory getSchemaFactory()
      • setSchemaFactory

        public void setSchemaFactory​(com.thaiopensource.relaxng.SchemaFactory schemaFactory)
      • setInputSource

        public void setInputSource​(InputSource inputSource)
      • doInit

        protected void doInit()
                       throws Exception
        Overrides:
        doInit in class org.apache.camel.support.DefaultEndpoint
        Throws:
        Exception
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.apache.camel.support.DefaultEndpoint
        Throws:
        Exception