Package com.orchestranetworks.addon.dqid.common

Provides common classes that are used by other classes such as exceptions and enumerations.

Some important classes used for indicators:

FrequencyType

        public Set<FrequencyType> getPossibleComputationFrequencies()
        {
                // supports both the on-demand and the real-time computations
                Set<FrequencyType> frequencyTypes = new HashSet<FrequencyType>();
                frequencyTypes.add(FrequencyType.ON_DEMAND);
                frequencyTypes.add(FrequencyType.REAL_TIME);
                return frequencyTypes;
        }
        

DECSubType

        public DECSubType getDECSubType()
        {
                return FieldDECSubType.DATE; // this indicator can only be configured and executed on fields with the Date type
        }
        

WatchdogInformation and PeriodicityType

        public WatchdogInformation getWatchdogInformation()
        {
                // return null if the indicator doesn't have any periodicities or thresholds
                WatchdogInformation information = new WatchdogInformation();
                Set<PeriodicityType> possiblePeriodicities = new HashSet<PeriodicityType>();
                possiblePeriodicities.add(PeriodicityType.DAILY);
                possiblePeriodicities.add(PeriodicityType.WEEKLY);
                possiblePeriodicities.add(PeriodicityType.MONTHLY);
                possiblePeriodicities.add(PeriodicityType.QUATERLY);
                possiblePeriodicities.add(PeriodicityType.SEMESTER);
                possiblePeriodicities.add(PeriodicityType.YEARLY);
                possiblePeriodicities.add(PeriodicityType.ANY); // all times are included in execution
                possiblePeriodicities.add(PeriodicityType.TOLERANCE); // TOLERANCE or 'None' means using the configured time range
                information.setPossiblePeriodicityOfControl(Collections.unmodifiableSet(possiblePeriodicities));
                return information;
        }
        

SchemaTypeNameExtension

        private static List<ParameterDefinition> getOutputParametersDefinition()
        {
                List<ParameterDefinition> outputs = new ArrayList<ParameterDefinition>();

                ParameterDefinition lifetimeOuput = new ParameterDefinition(
                        "lifetime",
                        SchemaTypeNameExtension.INTERVAL,
                        UserMessage.createInfo("lifetime"),
                        UserMessage.createInfo("lifetime"));
                outputs.add(lifetimeOuput);

                return outputs;
        }
        

Please refer to package com.orchestranetworks.addon.dqid for a complete example of indicator definition and implementation.