Class ReasonerDescriptor

  • Direct Known Subclasses:
    AbstractChainedReasoner.DerivedReasonerDescriptor, Descriptor

    public class ReasonerDescriptor
    extends java.lang.Object
    Represents descriptive information about a reasoner. This class is intended to be subclassed in order to provide information about specific licensing mechanisms.
    Author:
    Holger Eichelberger
    • Field Detail

      • downloadSource

        private java.net.URL downloadSource
      • name

        private java.lang.String name
      • version

        private java.lang.String version
      • license

        private java.lang.String license
      • licenseRestriction

        private java.lang.String licenseRestriction
    • Constructor Detail

      • ReasonerDescriptor

        public ReasonerDescriptor​(java.lang.String name,
                                  java.lang.String version,
                                  java.lang.String license,
                                  java.lang.String licenseRestriction,
                                  java.net.URL downloadSource)
        Creates a new reasoner descriptor.
        Parameters:
        name - the name of the reasoner
        version - a version description of the integrated reasoner (may be null)
        license - the license (may be null)
        licenseRestriction - a restriction of the license to be displayed, e.g. "valid until March 2020" (may be null)
        downloadSource - the source for downloading a licensed version (may be null if the implementation is complete)
    • Method Detail

      • addCapability

        protected void addCapability​(IReasonerCapability capability)
        Adds a capability.
        Parameters:
        capability - the capability to add (null is ignored)
      • addCapabilities

        protected void addCapabilities​(java.util.Collection<IReasonerCapability> capabilities)
        Adds a collection of capabilities.
        Parameters:
        capabilities - the capabilities to be added (null is ignored)
      • getDownloadSource

        public java.net.URL getDownloadSource()
        Returns the source for downloading a licensed version.
        Returns:
        the source (may be null), this may point to a file, an Eclipse update site or just a web site describing how to obtain the implementation
      • getName

        public java.lang.String getName()
        Returns the name of the reasoner.
        Returns:
        the name of the reasoner
      • getVersion

        public java.lang.String getVersion()
        Returns a textual form of the currently integrated version.
        Returns:
        the version (may be null)
      • getLicense

        public java.lang.String getLicense()
        Returns a textual form of the license of the reasoner.
        Returns:
        the license as text (may be empty or null if there is none)
      • getLicenseRestriction

        public java.lang.String getLicenseRestriction()
        Returns a license restriction in textual form, e.g. "valid until March 2020".
        Returns:
        the license restriction (or null if there is none)
      • isReadyForUse

        public boolean isReadyForUse()
        Returns whether this reasoner is licensed and valid so that it may be used.
        Returns:
        true if it is licensed and ready for use, true if it is not ready, e.g., due to license restriction and a version shall be obtained via getDownloadSource()
      • providesAffectedVariables

        public boolean providesAffectedVariables()
        Returns whether the reasoner provides information about the affected variables via ReasoningResult.getAffectedVariable(int).
        Returns:
        true if the reasoner provides this information, false else
      • hasCapability

        public boolean hasCapability​(IReasonerCapability capability)
        Returns whether the described reasoner has the given capability.
        Parameters:
        capability - the capability to search for (null is ignored)
        Returns:
        the capability
      • getCapabilityCount

        public int getCapabilityCount()
        Returns the number of provided capabilities.
        Returns:
        the number of provided capabilities
      • getCapabilities

        public IReasonerCapability[] getCapabilities()
        Returns the supported capabilities.
        Returns:
        the supported capabilities