Class SyntaxLabels


public class SyntaxLabels extends Object
Factory for default policies for syntax labels to and from nodes. For label to node (parsing) we use a scalable hashing scheme (MD5 of a seed and the label)

For node to label (pretty labels output), we use a unique tracking scheme. Fully scalable writers use different polices and don't have short, pretty bNode labels.

These should be used pairs:

     createNodeToLabel , createLabelToNode
     createNodeToLabelRT , createLabelToNodeRT
     createNodeToLabelAsGiven , createLabelToNodeAsGiven
"AsGiven" assumes that the label is valid syntax for the usage, no checking.
"RT" encodes the label into characters 0-9,A-Z.
See Also:
  • Constructor Details

    • SyntaxLabels

      public SyntaxLabels()
  • Method Details

    • createNodeToLabel

      public static NodeToLabel createNodeToLabel()
      Default setup - scope by document, relabel BNodes ids to short forms
    • createLabelToNode

      public static LabelToNode createLabelToNode()
      Default setup - scope by document, relabel BNodes ids to short forms
    • createNodeToLabelRT

      public static NodeToLabel createNodeToLabelRT()
      Round-trip setup
    • createLabelToNodeRT

      public static LabelToNode createLabelToNodeRT()
      Round-trip setup
    • createNodeToLabelAsGiven

      public static NodeToLabel createNodeToLabelAsGiven()
      Raw string label setup
    • createLabelToNodeAsGiven

      public static LabelToNode createLabelToNodeAsGiven()
      Raw string label setup