Community articlegetInfoEx method
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Description

This method retrieves information about a particular node. If you do not want information about a particular property, set it to null.

Method

public void getInfoEx(
   StringHolder theType,
   StringHolder theLiteral,
   StringHolder theFormula,
   StringHolder theIdentifier,
   String theCharSet
) throws UWIException;


Parameters

Table 1. Method parameters
ExpressionTypeDescription
theTypeStringHolderA StringHolder that will store the type of the FormNodeP.
If the type is empty or does not exist, the string is set to null.
theLiteralStringHolderA StringHolder that will store the literal of the FormNodeP.
If the literal is empty or does not exist, the string is set to null.
theFormulaStringHolderA StringHolder that will store the formula of the FormNodeP.
If the formula is empty or does not exist, the string is set to null.
theIdentifierStringHolderA StringHolder that will store the identifier of the FormNodeP.
If the identifier is empty or does not exist, the string is set to null.
theCharSetStringThe character set you want to use to view the results. Use null or Unicode for Unicode. Use Symbol for Symbol.


Returns

Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.

Notes

If you are getting information about a node that is not in the XFDL namespace, getInfoEx can return values that include namespace prefixes as follows:
  • Any item node in a non-XFDL namespace will return a Type that includes a namespace prefix. For example, myNamespace:Field1.
  • Any option node in a non-XFDL namespace will return an Identifier that includes a namespace prefix. For example, myNamespace:value.

Example

In the following example, dereferenceEx is used to locate a specific node. getInfoEx is then used to get the four values from that node. The four values are then printed out.
private static void checkAgeFieldNode(FormNodeP theForm) throws Exception
{
  FormNodeP tempNode;
  StringHolder theType = new StringHolder( );
  StringHolder theLiteral = new StringHolder( );
  StringHolder theFormula = new StringHolder( );
  StringHolder theIdentifier = new StringHolder( );
 
  if ((tempNode = theForm.dereferenceEx(null, "PAGE1.AGEFIELD", 0,
         FormNodeP.UFL_ITEM_REFERENCE, null)) == null)
  {
     throw new UWIException("Could not locate AGEFIELD node.");
  }
 
  tempNode.getInfoEx(theType, theLiteral, theFormula, theIdentifier, null);
 
  /* Print out the information. */
  System.out.println("Type: " + theType.value);
  System.out.println("Literal: " + theLiteral.value);
  System.out.println("Formula: " + theFormula.value);
  System.out.println("Identifier: " + theIdentifier.value);
}


Parent topic:
FormNodeP class