All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cdc.applic.consistency.impl.ReferenceImpl Maven / Gradle / Ivy

The newest version!
package cdc.applic.consistency.impl;

import java.io.PrintStream;

import cdc.applic.dictionaries.Dictionary;
import cdc.applic.expressions.Expression;

/**
 * {@link Reference} implementation.
 *
 * @author Damien Carbonne
 */
public class ReferenceImpl extends NodeImpl implements Reference {
    private final String targetId;

    protected ReferenceImpl(String id,
                            String label,
                            Dictionary dictionary,
                            Expression applicability,
                            String targetId) {
        super(id, label, dictionary, applicability);
        this.targetId = targetId;
    }

    @Override
    public String getTargetId() {
        return targetId;
    }

    @Override
    public void print(PrintStream out,
                      int level) {
        indent(out, level);
        out.println("Ref '" + getId() + "' '" + getLabel() + "' '" + getDictionary().getName() + "' " + getApplicability() + " '"
                + getTargetId() + "'");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy