Class IdMLConnector

    • Constructor Detail

      • IdMLConnector

        public IdMLConnector()
        Constructor. Initializes the connector to work in CallReply mode.
    • Method Detail

      • initialize

        public void initialize​(java.lang.Object obj)
                        throws java.lang.Exception
        Initialize the connector. The connector may be passed a parameter of any kind by the user. It is up to the connector to determine whether this object can be used or not. The parameter is typically provided by a user script. When an AssemblyLine initializes it's Connectors, they are passed a ConnectorMode object.
        Specified by:
        initialize in interface ConnectorInterface
        Overrides:
        initialize in class Connector
        Parameters:
        obj - User provided parameter
        Throws:
        java.lang.Exception - if the initialization of this connector fails.
      • queryReply

        public Entry queryReply​(Entry aEntry)
                         throws java.lang.Exception
        Adds the CI/Relationship to the IdML book. The Connector first checks if any of its primary parameters are not overridden.
        Specified by:
        queryReply in interface ConnectorInterface
        Overrides:
        queryReply in class Connector
        Parameters:
        aEntry - the work entry passed to the Connector.
        Returns:
        an Entry object that can contain the id of the CI/Relationship registered by the Connector.
        Throws:
        java.lang.Exception - if a problem occurs.
      • querySchema

        public java.lang.Object querySchema​(java.lang.Object input)
                                     throws java.lang.Exception
        This method displays the attributes supported by a chosen CI/Relationship. For a source of this meta-data it uses either a local jar file or meta-data calls to an IT registry (depending on its configuration).
        Specified by:
        querySchema in interface ConnectorInterface
        Overrides:
        querySchema in class Connector
        Parameters:
        input - entry object
        Returns:
        null, since this Components has itself populated the Schemas.
        Throws:
        java.lang.Exception - if a problem occurs.
        See Also:
        Entry, Vector
      • getVersion

        public java.lang.String getVersion()
        Version information.
        Specified by:
        getVersion in interface VersionInfoInterface
        Returns:
        version information
      • getJdbcUrl

        public java.lang.String getJdbcUrl()
        This method returns the JDBC Url used by the Connector.
        Returns:
        a JDBC Url.
      • getJdbcDriver

        public java.lang.String getJdbcDriver()
        This method returns the JDBC Driver used by the Connector.
        Returns:
        a JDBC Driver.
      • getDbUsername

        public java.lang.String getDbUsername()
        This method returns the username for connecting to the IT registry used by the Connector.
        Returns:
        a database username.
      • checkDbConnection

        public java.lang.String checkDbConnection()
        Checks if with the currently configured IT registry properties, a connection to the IT registry can be established.
        Returns:
        if the connection was established successfully null is returned, otherwise the method returns a String containing the exception's text.
      • getCdmVersion

        public java.lang.String getCdmVersion()
                                       throws java.lang.Exception
        Returns the version of the CDM that this Connector is using. depending on its configuration this can be either the version of CDM that IT registry is using or the version of the CDM meta-data stored in the locally used jar file.
        Returns:
        the CDM version, with format '<version>.<release>.<modifier>'.
        Throws:
        java.lang.Exception - if a problem occurs.
      • getTypes

        public java.util.Map<java.lang.String,​java.lang.Object> getTypes()
                                                                        throws java.lang.Exception
        Returns the types of CIs/Relationships available for this Connector. Depending on its Configuration we can get the names of all supported CIs, or of all Relationships.
        Returns:
        a List with all CI/Relationship types.
        Throws:
        java.lang.Exception - if a problem occurs.
      • resetBook

        public java.lang.String resetBook()
                                   throws java.io.IOException
        Returns the current contents of the in-memory IdML book and emties the buffer.
        Returns:
        the current contents of the in-memory book.
        Throws:
        java.io.IOException - if a problem occurs.