/**
 * 
 */
package com.github.podd.utils;

import org.openrdf.model.URI;
import org.semanticweb.owlapi.model.IRI;

/**
 * Encapsulates the basic label and description metadata about an object into a single object.
 * 
 * This class must only ever be used to present precompiled sets of results to users. In other
 * cases, lists of {@link InferredOWLOntologyID}, {@link IRI} or {@link URI} are the correct way to
 * process information.
 * 
 * @author Peter Ansell p_ansell@yahoo.com
 */
public class PoddObjectLabelImpl implements PoddObjectLabel
{
    private InferredOWLOntologyID ontologyID;
    
    private URI objectID;
    
    private String label;
    
    private String description;
    
    /**
     * Creates a label object without a description, and without an object, meaning that the label
     * applies to the ontology itself.
     * 
     * @param ontologyID
     *            The base artifact that this label is applied to.
     * @param label
     *            The label for this ontology.
     */
    public PoddObjectLabelImpl(final InferredOWLOntologyID ontologyID, final String label)
    {
        this.ontologyID = ontologyID;
        this.label = label;
    }
    
    /**
     * Creates a label object without a description, and without an object, meaning that the label
     * applies to the ontology itself.
     * 
     * @param ontologyID
     *            The base artifact that this label is applied to.
     * @param label
     *            The label for this ontology.
     */
    public PoddObjectLabelImpl(final InferredOWLOntologyID ontologyID, final String label, final String description)
    {
        this(ontologyID, label);
        this.description = description;
    }
    
    /**
     * Creates a label object without a description
     * 
     * @param parent
     *            The base artifact that this label is applied to.
     * @param object
     *            The object inside of the given artifact that this label is for.
     * @param label
     *            The label for this object.
     */
    public PoddObjectLabelImpl(final InferredOWLOntologyID ontologyID, final URI object, final String label)
    {
        this(ontologyID, label);
        this.objectID = object;
    }
    
    /**
     * Creates a label object with a description
     * 
     * @param parent
     *            The base artifact that this label is applied to.
     * @param object
     *            The object inside of the given artifact that this label is for.
     * @param label
     *            The label for this object.
     * @param description
     *            The description for this object.
     */
    public PoddObjectLabelImpl(final InferredOWLOntologyID parent, final URI object, final String label,
            final String description)
    {
        this(parent, object, label);
        this.description = description;
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see com.github.podd.utils.PoddObjectLabel#getDescription()
     */
    @Override
    public String getDescription()
    {
        return this.description;
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see com.github.podd.utils.PoddObjectLabel#getLabel()
     */
    @Override
    public String getLabel()
    {
        return this.label;
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see com.github.podd.utils.PoddObjectLabel#getObjectID()
     */
    @Override
    public URI getObjectURI()
    {
        return this.objectID;
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see com.github.podd.utils.PoddObjectLabel#getParentArtifactID()
     */
    @Override
    public InferredOWLOntologyID getOntologyID()
    {
        return this.ontologyID;
    }
}

@@ -3707,10 +3707,382 @@
 ;%0A    %7D%0A
+    %0A    @Override%0A    public String toString()%0A    %7B%0A        StringBuilder b = new StringBuilder(%22%5B%22);%0A        b.append(%22 objectURI=%22);%0A        b.append(this.objectID.stringValue());%0A        b.append(%22 label=%22);%0A        b.append(this.label);%0A        b.append(%22 description=%22);%0A        b.append(this.description);%0A        b.append(%22%5D%22);%0A        return b.toString();%0A    %7D%0A
 %7D%0A

add a toString() method implementation