Class SNodeOperations


  • public class SNodeOperations
    extends Object
    • Constructor Detail

      • SNodeOperations

        public SNodeOperations()
    • Method Detail

      • isAncestor

        @Deprecated
        public static boolean isAncestor​(SNode ancestor,
                                         SNode node)
        Deprecated.
        use .ancestors.contains() in smodel language
      • getChildren

        @Deprecated
        public static List<SNode> getChildren​(SNode node,
                                              boolean includeAttributes)
        Deprecated.
        there is no full equivalent to this, use SNode.getChildren or node/../.children operations if possible
      • getChildRoles

        @Deprecated
        public static Set<String> getChildRoles​(SNode n)
        Deprecated.
        rewrite to SContainmentLink, don't use by-name roles, use SNode methods
        todo rewrite the code using this
      • getReferences

        @Deprecated
        public static List<SReference> getReferences​(SNode n)
        Deprecated.
        use SNode.getReferences
        todo rewrite the code using this
      • getChildren

        @Deprecated
        public static List<SNode> getChildren​(SNode n)
        Deprecated.
        use SNode.getChildren
        todo rewrite the code using this
      • getReferenceRoles

        @Deprecated
        public static Set<String> getReferenceRoles​(SNode n)
        Deprecated.
        use either SNode.getReference.select(it->it.role) or SNode.getConcept.getReferenceLinks depending on what you want to get
        todo rewrite the code using this
      • isRoot

        @Deprecated
        public static boolean isRoot​(SNode n)
        Deprecated.
        SNode.getParent!=null mostly (if done in "user" code which operates with nodes inside models)
        todo rewrite the code using this
      • getDebugText

        @Deprecated
        public static String getDebugText​(SNode node)
        Deprecated.
        use SNode.getName, SNode.getModel or whatever info you really need.
        this is an utility method common to all nodes but needed only for our debug purposes, so we don't put it into SNode
      • getChildRoles

        @Deprecated
        public static Set<SContainmentLink> getChildRoles​(SNode n,
                                                          boolean includeAttributeRoles)
        Deprecated.
        use either SNode.getChildren.select(it->it.role) or SNode.getConcept.getContainmentLinks depending on what you want to get
      • getChild

        @Deprecated
        public static SNode getChild​(SNode node,
                                     String role)
        Deprecated.
        rewrite using SContainmentLink, don't use by-string roles
      • getResolveInfo

        @Deprecated
        public static String getResolveInfo​(SNode n)
        Deprecated.
        use SNodeUtil.getResolveInfo (note it does not return name in case of !isInstanceOf(IResolveInfo))
        This will be replaced by getting resolve info from a reference in a context containing it
      • copyProperties

        @Deprecated
        public static void copyProperties​(SNode from,
                                          SNode to)
        Deprecated.
        use node/../.copy or copy manually
      • copyUserObjects

        @Deprecated
        public static void copyUserObjects​(SNode from,
                                           SNode to)
        Deprecated.
        don't use user objects, store them separately
      • getTargetNodeSilently

        @Deprecated
        public static SNode getTargetNodeSilently​(SReference ref)
        Deprecated.
        not supposed to be used not in MPS core. Use ref.getTargetNode
      • isModelDisposed

        @Deprecated
        public static boolean isModelDisposed​(SModel model)
        Deprecated.
        use model.getRepository!=null. AP: I tried and it is not the same. Why?
      • nodesCount

        @Deprecated
        public static int nodesCount​(SModel model)
        Deprecated.
        inline
      • isRegistered

        @Deprecated
        public static boolean isRegistered​(SModel model)
        Deprecated.
        use model.getRepository!=null
      • isGeneratable

        @Deprecated
        public static boolean isGeneratable​(SModel model)
        Deprecated.
        not supposed to be used outside of MPS core, inline if you use it