X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.structural2%2Fsrc%2Forg%2Fsimantics%2Fstructural2%2Fscl%2FStructuralConfiguration.java;h=e3d4efdf8c03338f866a8b2f8bd8bba366b791ff;hb=27cae6bcf184f7e27822886f5a7320f771913b71;hp=3d3daab05832f3e9b7258e98ab767a93038d6061;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralConfiguration.java b/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralConfiguration.java index 3d3daab05..e3d4efdf8 100644 --- a/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralConfiguration.java +++ b/bundles/org.simantics.structural2/src/org/simantics/structural2/scl/StructuralConfiguration.java @@ -1,43 +1,43 @@ -package org.simantics.structural2.scl; - -import org.simantics.db.Resource; - - -/** - * Represents a structural configuration. - * Has exactly two subclasses {@link StructuralComponent} and {@link StructuralComposite}. - * - * @author Hannu Niemistö - */ -public abstract class StructuralConfiguration { - /* - * Prevents extending this class outside of this package. - */ - public StructuralConfiguration() { - } - - /** - * Returns underlying resource of the configuration. - * It can be used to obtain information about the configuration - * that is not accessible using StructuralComponent or - * StructuralComposite. For procedural configurations - * this method may return {@code null} or a resource - * that represents a template of the configuration. - */ - public abstract Resource getResource(); - - /** - * If the configuration is a root composite of a component - * type, there are two possible resources that could be - * reasonably returned in getResource(). New getResource() - * returns the resource that is linked with IsDefinedBy from - * the component type and getInstanceResource() returns the - * instance of the component type. In all other cases this - * method returns the same resource as getResource(). - */ - public Resource getInstanceResource() { - return getResource(); - } - - public abstract StructuralComponent getContext(); -} +package org.simantics.structural2.scl; + +import org.simantics.db.Resource; + + +/** + * Represents a structural configuration. + * Has exactly two subclasses {@link StructuralComponent} and {@link StructuralComposite}. + * + * @author Hannu Niemistö + */ +public abstract class StructuralConfiguration { + /* + * Prevents extending this class outside of this package. + */ + public StructuralConfiguration() { + } + + /** + * Returns underlying resource of the configuration. + * It can be used to obtain information about the configuration + * that is not accessible using StructuralComponent or + * StructuralComposite. For procedural configurations + * this method may return {@code null} or a resource + * that represents a template of the configuration. + */ + public abstract Resource getResource(); + + /** + * If the configuration is a root composite of a component + * type, there are two possible resources that could be + * reasonably returned in getResource(). New getResource() + * returns the resource that is linked with IsDefinedBy from + * the component type and getInstanceResource() returns the + * instance of the component type. In all other cases this + * method returns the same resource as getResource(). + */ + public Resource getInstanceResource() { + return getResource(); + } + + public abstract StructuralComponent getContext(); +}