org.modeshape.jcr.xml

## Class NodeImportXmlHandler.ImportElement

- java.lang.Object
- - org.modeshape.jcr.xml.NodeImportXmlHandler.ImportElement

- Enclosing class:
    NodeImportXmlHandler

      public class NodeImportXmlHandler.ImportElement
      extends Object

  Element entries represent in-memory representations of the xml elements (either nodes or properties) encountered between a `NodeImportXmlHandler.startElement(String, String, String, Attributes)` and a `NodeImportXmlHandler.endElement(String, String, String)` event.

- - ### Property Summary

    Properties
    Type | Property and Description
    --- | ---
    `protected boolean` | `looksLike` Returns whether this element entry looks (at this point) like a property element: either it has no properties or has just one `NodeImportXmlHandler.propertyTypeAttribute` type attribute.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NodeImportXmlHandler.ImportElement(NodeImportXmlHandler.ImportElement parent)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addProperty(String propertyName, String propertyValue, PropertyType jcrPropertyType)`
    `List<String>` | `getMixins()` Returns the list of mixins of the import element, which should translate to the mixins of a jcr node.
    `String` | `getName()` Returns the name of the import element, which should translate to the name of a jcr node.
    `Path` | `getPath()` Returns the path of this import element, which translates to the path of the jcr node.
    `Multimap<String,String>` | `getProperties()` Returns the imported element's properties.
    `PropertyType` | `getPropertyType(String propertyName)` Returns the JCR property type of the property with the given name.
    `String` | `getType()` Returns the name of the import element, which should translate to the type of a jcr node.
    `protected boolean` | `looksLikeProperty()` Returns whether this element entry looks (at this point) like a property element: either it has no properties or has just one `NodeImportXmlHandler.propertyTypeAttribute` type attribute.
    `protected void` | `setName(String name)`
    `protected void` | `setPropertyOnParent(String value)`
    `protected void` | `setType(String type)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Property Detail

    - #### looksLike

      Returns whether this element entry looks (at this point) like a property element: either it has no properties or has just one `NodeImportXmlHandler.propertyTypeAttribute` type attribute.
      Returns:
        true if this looks like a property element, or false otherwise

  - ### Constructor Detail

    - #### NodeImportXmlHandler.ImportElement

          protected NodeImportXmlHandler.ImportElement(NodeImportXmlHandler.ImportElement parent)

  - ### Method Detail

    - #### looksLikeProperty

          protected final boolean looksLikeProperty()

      Returns whether this element entry looks (at this point) like a property element: either it has no properties or has just one `NodeImportXmlHandler.propertyTypeAttribute` type attribute.
      Returns:
        true if this looks like a property element, or false otherwise

    - #### setName

          protected void setName(String name)

    - #### setType

          protected void setType(String type)

    - #### addProperty

          protected void addProperty(String propertyName,
                         String propertyValue,
                         PropertyType jcrPropertyType)

    - #### setPropertyOnParent

          protected void setPropertyOnParent(String value)

    - #### getName

          public String getName()

      Returns the name of the import element, which should translate to the name of a jcr node.
      Returns:
        a non-null `String`

    - #### getType

          public String getType()

      Returns the name of the import element, which should translate to the type of a jcr node.
      Returns:
        a non-null `String`

    - #### getMixins

          public List<String> getMixins()

      Returns the list of mixins of the import element, which should translate to the mixins of a jcr node.
      Returns:
        a non-null `List`

    - #### getProperties

          public Multimap<String,String> getProperties()

      Returns the imported element's properties.
      Returns:
        a non-null `Multimap`

    - #### getPropertyType

          public PropertyType getPropertyType(String propertyName)

      Returns the JCR property type of the property with the given name.
      Parameters:
        `propertyName` - a `String` the name of a property; never null
      Returns:
        either a `PropertyType` representing the JCR type of the property or `null` if the no property with the given name was parsed.

    - #### getPath

          public Path getPath()

      Returns the path of this import element, which translates to the path of the jcr node.
      Returns:
        a non-null `Path`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.