[DOCU-247] Node type reference Created: 20/Jan/12  Updated: 03/Nov/15

Status: Closed
Project: Documentation
Component/s: content
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Antti Hietala Assignee: Ruth Stocks
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

Write a reference to node types. Node types and their prefixes are defined in the class info.magnolia.cms.core.MgnlNodeType which replaces the deprecated info.magnolia.cms.core.itemType class.

Tasks:

  • Write brief intro to node types and link to Jackrabbit Node Types document.
  • List/table of node type prefixes (nt:, mix:, mgnl:, jcr:) and node types defined in Magnolia (contentNode, nodeData etc.).
  • Write an example JCR query and the same query but limit the results by item type (node type). Show how the second is a more targeted way to get the nodes you want.


 Comments   
Comment by Ruth Stocks [ 11/May/12 ]

New page at http://docuauthor.magnolia-cms.com/reference/node-types.html.
Notes:

  • Added a link to the Query tools section on the - http://docuauthor.magnolia-cms.com/administration/tools.html page.
  • I’d appreciate developer input on how custom_nodetypes.xml relates to this article. I’m not sure what it does. The file is at /apache-tomcat-6.0.32/webapps/magnoliaAuthor/repositories/magnolia/repository/nodetypes/custom_nodetypes.xml.
Comment by Magnolia International [ 21/May/12 ]

Few comments from me

  • "Each node in a Jackrabbit workspace tree" -> "Each node in a JCR workspace" (this isn't specific to JackRabbit, and we shouldn't give the impression that we rely specifically on JackRabbit)
  • Not sure why we mention Jackrabbit JcrConstants - and from the linked javadoc, these constants DO have a prefix
  • "Magnolia node types are registered by the MgnlNodeType class" - nitpicking on the verb: this class doesn't do anything, it's just a bunch of constants (i.e could be useful in code)

List of node types:

  • it would be useful to have a short description of their uses - and as such we might decide to document only the most relevant ones, and ensure that in-code documentation is available for all the others. For JCR spec types, link to relevant documentation.

Queries:

  • XPath will still be supported by JackRabbit, probably as long as Adobe sponsors/needs it. That doesn't mean it's the case for other repositories, so I'd encourage users avoiding it.
  • It would be useful to
    • Explain what the "item type" is (it's not what you query upon, but it's a Magnolia-specific feature which coerces the returned nodes to the first ascendant of that type)
    • Show how to execute a query in Java code (and "item type" is also very important there, esp. when not mentioned, as, as far as I can remember, it defaults to a mgnl: type that might not be what you'd expect by default - the type which up to 4.4 was used for pages, so that would be unexpected if doing a query against the data module for example - that behavior, and the API, might have changed with 4.5)
Generated at Mon Feb 12 01:07:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.