Class NodeContext

  • All Implemented Interfaces:
    ImportNode

    public class NodeContext
    extends ElementContext
    implements ImportNode
    Maintains state about the currently imported node.
    Author:
    David Caruana
    • Constructor Detail

      • NodeContext

        public NodeContext​(QName elementName,
                           ParentContext parentContext,
                           TypeDefinition typeDef)
        Construct
        Parameters:
        elementName - QName
        parentContext - ParentContext
        typeDef - TypeDefinition
    • Method Detail

      • isReference

        public boolean isReference()
        Specified by:
        isReference in interface ImportNode
        Returns:
        is this a node reference
      • setReference

        public void setReference​(boolean isReference)
        Parameters:
        isReference - true => this is a node reference
      • setTypeDefinition

        public void setTypeDefinition​(TypeDefinition typeDef)
        Set Type Definition
        Parameters:
        typeDef - TypeDefinition
      • setNodeRef

        public void setNodeRef​(NodeRef nodeRef)
        Parameters:
        nodeRef - the node ref
      • getUUID

        public String getUUID()
        Specified by:
        getUUID in interface ImportNode
        Returns:
        node uuid to create node with
      • setUUID

        public void setUUID​(String uuid)
        Parameters:
        uuid - uuid
      • getImportId

        public String getImportId()
      • setImportId

        public void setImportId​(String importId)
        Parameters:
        importId - import scoped id
      • setChildName

        public void setChildName​(String childName)
        Parameters:
        childName - the child name
      • setInheritPermissions

        public void setInheritPermissions​(boolean inherit)
      • getInheritPermissions

        public boolean getInheritPermissions()
        Specified by:
        getInheritPermissions in interface ImportNode
        Returns:
        true => node inherits permissions from parent
      • addPropertyCollection

        public void addPropertyCollection​(QName property)
        Adds a collection property to the node
        Parameters:
        property - QName
      • addProperty

        public void addProperty​(QName property,
                                Serializable value)
        Adds a property to the node
        Parameters:
        property - the property name
        value - the property value
      • addDatatype

        public void addDatatype​(QName property,
                                DataTypeDefinition datatype)
        Adds a property datatype to the node
        Parameters:
        property - property name
        datatype - property datatype
      • addAspect

        public void addAspect​(AspectDefinition aspect)
        Adds an aspect to the node
        Parameters:
        aspect - the aspect
      • addAccessControlEntry

        public void addAccessControlEntry​(AccessStatus accessStatus,
                                          String authority,
                                          String permission)
        Adds an Access Control Entry
        Parameters:
        accessStatus - AccessStatus
        authority - String
        permission - String
      • determineDefinition

        public Object determineDefinition​(QName defName)
        Determine the type of definition (aspect, property, association) from the specified name
        Parameters:
        defName - QName
        Returns:
        the dictionary definition
      • determineAspect

        public AspectDefinition determineAspect​(QName defName)
        Determine if name referes to an aspect
        Parameters:
        defName - QName
        Returns:
        AspectDefinition
      • determineProperty

        public PropertyDefinition determineProperty​(QName defName)
        Determine if name refers to a property
        Parameters:
        defName - QName
        Returns:
        PropertyDefinition
      • determineAssociation

        public AssociationDefinition determineAssociation​(QName defName)
        Determine if name referes to an association
        Parameters:
        defName - QName
        Returns:
        AssociationDefinition