cincamipd/src/main/java/org/ciedayap/pabmm/pd/Synthesizer.java
private void processProject() throws SynthesizerException
    {
        if(this.project==null) return;
        
        InformationNeed in=project.getInfneed();
        if(in==null)
        {
            throw new SynthesizerException("There is not an information need defined");
        }
        
        if(in.getSpecifiedEC()==null)
        {
            throw new SynthesizerException("There is not an Entity Category defined");
        }
                
        Attributes atts=in.getSpecifiedEC().getDescribedBy();
        if(atts==null || atts.getCharacteristics()==null || atts.getCharacteristics().isEmpty())
            throw new SynthesizerException("There are not attributes");
        
                
        Context ctx=project.getInfneed().getCharacterizedBy();
        if(ctx==null || ctx.getDescribedBy()==null || ctx.getDescribedBy().getContextProperties()==null ||
                ctx.getDescribedBy().getContextProperties().isEmpty())
        {
            throw new SynthesizerException("There is not a context defined");
        }
                
        //Entity Category
        for(Attribute att:atts.getCharacteristics())
        {
            System.out.println("Att: "+att.getName()+" W: "+att.getWeight());
            for(Metric met:att.getQuantifiedBy().getRelated())
            {
                if(StringUtils.isEmpty(att.getID()) || StringUtils.isEmpty(met.getIDmetric()))
                {
                    this.cleaner();
                    throw new SynthesizerException("Invalid Project Definition. Attribute ID: "+att.getID()+
                            " Metric ID: "+met.getIDmetric());
                }
                
                attMetrics.put(met.getIDmetric(), met);
            }
        }
        
        //Context Properties
        for(ContextProperty cp:ctx.getDescribedBy().getContextProperties())
        {
          for(Metric met:cp.getQuantifiedBy().getRelated())
          {
                if(StringUtils.isEmpty(cp.getID()) || StringUtils.isEmpty(met.getIDmetric()))
                {
                    this.cleaner();
                    throw new SynthesizerException("Invalid Project Definition. Context Property ID: "+cp.getID()+
                            " Metric ID: "+met.getIDmetric());
                }

                ctxMetrics.put(met.getIDmetric(), met);
            }              
        }
    }
/**
     * It processes the project definition discriminating contextual and attribute metric definitions
     * into two hashmap to make easy the verification-
     * @throws SynthesizerException It is raised when some abnormal situation is detected in the project definition.
     */
It processes the project definition discriminating contextual and attribute metric definitions
into two hashmap to make easy the verification
@throws SynthesizerException It is raised when some abnormal situation is detected in the project definition.
It processes the project definition discriminating contextual and attribute metric definitions into two hashmap to make easy the verification @throws SynthesizerException It is raised when some abnormal situation is detected in the project definition .
private void processProject() throws SynthesizerException
    {
        if(this.project==null) return;
        InformationNeed in=project.getInfneed();
        if(in==null)
        {
            throw new SynthesizerException("There is not an information need defined");
        }
        if(in.getSpecifiedEC()==null)
        {
            throw new SynthesizerException("There is not an Entity Category defined");
        }
        Attributes atts=in.getSpecifiedEC().getDescribedBy();
        if(atts==null || atts.getCharacteristics()==null || atts.getCharacteristics().isEmpty())
            throw new SynthesizerException("There are not attributes");
        Context ctx=project.getInfneed().getCharacterizedBy();
        if(ctx==null || ctx.getDescribedBy()==null || ctx.getDescribedBy().getContextProperties()==null ||
                ctx.getDescribedBy().getContextProperties().isEmpty())
        {
            throw new SynthesizerException("There is not a context defined");
        }
        for(Attribute att:atts.getCharacteristics())
        {
            System.out.println("Att: "+att.getName()+" W: "+att.getWeight());
            for(Metric met:att.getQuantifiedBy().getRelated())
            {
                if(StringUtils.isEmpty(att.getID()) || StringUtils.isEmpty(met.getIDmetric()))
                {
                    this.cleaner();
                    throw new SynthesizerException("Invalid Project Definition. Attribute ID: "+att.getID()+
                            " Metric ID: "+met.getIDmetric());
                }
                attMetrics.put(met.getIDmetric(), met);
            }
        }
        for(ContextProperty cp:ctx.getDescribedBy().getContextProperties())
        {
          for(Metric met:cp.getQuantifiedBy().getRelated())
          {
                if(StringUtils.isEmpty(cp.getID()) || StringUtils.isEmpty(met.getIDmetric()))
                {
                    this.cleaner();
                    throw new SynthesizerException("Invalid Project Definition. Context Property ID: "+cp.getID()+
                            " Metric ID: "+met.getIDmetric());
                }
                ctxMetrics.put(met.getIDmetric(), met);
            }              
        }
    }
private void processProject ( ) throws SynthesizerException { if ( this . project == null ) return ; InformationNeed in = project . getInfneed ( ) ; if ( in == null ) { throw new SynthesizerException ( "There is not an information need defined" ) ; } if ( in . getSpecifiedEC ( ) == null ) { throw new SynthesizerException ( "There is not an Entity Category defined" ) ; } Attributes atts = in . getSpecifiedEC ( ) . getDescribedBy ( ) ; if ( atts == null || atts . getCharacteristics ( ) == null || atts . getCharacteristics ( ) . isEmpty ( ) ) throw new SynthesizerException ( "There are not attributes" ) ; Context ctx = project . getInfneed ( ) . getCharacterizedBy ( ) ; if ( ctx == null || ctx . getDescribedBy ( ) == null || ctx . getDescribedBy ( ) . getContextProperties ( ) == null || ctx . getDescribedBy ( ) . getContextProperties ( ) . isEmpty ( ) ) { throw new SynthesizerException ( "There is not a context defined" ) ; } for ( Attribute att : atts . getCharacteristics ( ) ) { System . out . println ( "Att: " + att . getName ( ) + " W: " + att . getWeight ( ) ) ; for ( Metric met : att . getQuantifiedBy ( ) . getRelated ( ) ) { if ( StringUtils . isEmpty ( att . getID ( ) ) || StringUtils . isEmpty ( met . getIDmetric ( ) ) ) { this . cleaner ( ) ; throw new SynthesizerException ( "Invalid Project Definition. Attribute ID: " + att . getID ( ) + " Metric ID: " + met . getIDmetric ( ) ) ; } attMetrics . put ( met . getIDmetric ( ) , met ) ; } } for ( ContextProperty cp : ctx . getDescribedBy ( ) . getContextProperties ( ) ) { for ( Metric met : cp . getQuantifiedBy ( ) . getRelated ( ) ) { if ( StringUtils . isEmpty ( cp . getID ( ) ) || StringUtils . isEmpty ( met . getIDmetric ( ) ) ) { this . cleaner ( ) ; throw new SynthesizerException ( "Invalid Project Definition. Context Property ID: " + cp . getID ( ) + " Metric ID: " + met . getIDmetric ( ) ) ; } ctxMetrics . put ( met . getIDmetric ( ) , met ) ; } } }
It processes the project definition discriminating contextual and attribute metric definitions
 into two hashmap to make easy the verification
 @throws SynthesizerException It is raised when some abnormal situation is detected in the project definition.
It processes the project definition discriminating contextual and attribute metric definitions into two hashmap to make easy the verification @throws SynthesizerException It is raised when some abnormal situation is detected in the project definition .
//Entity Category //Context Properties