Tabnine Logo
ODLparser.addField
Code IndexAdd Tabnine to your IDE (free)

How to use
addField
method
in
ucar.nc2.iosp.hdf4.ODLparser

Best Java code snippets using ucar.nc2.iosp.hdf4.ODLparser.addField (Showing top 3 results out of 315)

origin: Unidata/thredds

public Element parseFromString(String text) throws IOException {
 if (showRaw) System.out.println("Raw ODL=\n"+text);
 
 Element rootElem = new Element("odl");
 doc = new Document(rootElem);
 Element current = rootElem;
 StringTokenizer lineFinder = new StringTokenizer(text, "\t\n\r\f");
 while (lineFinder.hasMoreTokens()) {
  String line = lineFinder.nextToken();
  if (line == null) continue;
  if (line.startsWith("GROUP")) {
   current = startGroup(current, line);
  } else if (line.startsWith("OBJECT")) {
   current = startObject(current, line);
  } else if (line.startsWith("END_OBJECT")) {
   endObject( current, line);
   current = current.getParentElement();
   if (current == null) throw new IllegalStateException();
  } else if (line.startsWith("END_GROUP")) {
   endGroup( current, line);
   current = current.getParentElement();
   if (current == null) throw new IllegalStateException();
  } else {
   addField( current, line);
  }
 }
 if (show) showDoc(new PrintWriter( new OutputStreamWriter(System.out, CDM.utf8Charset)));
 return rootElem;
}
origin: edu.ucar/cdm

public Element parseFromString(String text) throws IOException {
 if (showRaw) System.out.println("Raw ODL=\n"+text);
 
 Element rootElem = new Element("odl");
 doc = new Document(rootElem);
 Element current = rootElem;
 StringTokenizer lineFinder = new StringTokenizer(text, "\t\n\r\f");
 while (lineFinder.hasMoreTokens()) {
  String line = lineFinder.nextToken();
  if (line == null) continue;
  if (line.startsWith("GROUP")) {
   current = startGroup(current, line);
  } else if (line.startsWith("OBJECT")) {
   current = startObject(current, line);
  } else if (line.startsWith("END_OBJECT")) {
   endObject( current, line);
   current = current.getParentElement();
   if (current == null) throw new IllegalStateException();
  } else if (line.startsWith("END_GROUP")) {
   endGroup( current, line);
   current = current.getParentElement();
   if (current == null) throw new IllegalStateException();
  } else {
   addField( current, line);
  }
 }
 if (show) showDoc(new PrintWriter( new OutputStreamWriter(System.out)));
 return rootElem;
}
origin: edu.ucar/netcdf

public Element parseFromString(String text) throws IOException {
 if (showRaw) System.out.println("Raw ODL=\n"+text);
 
 Element rootElem = new Element("odl");
 doc = new Document(rootElem);
 Element current = rootElem;
 StringTokenizer lineFinder = new StringTokenizer(text, "\t\n\r\f");
 while (lineFinder.hasMoreTokens()) {
  String line = lineFinder.nextToken();
  if (line.startsWith("GROUP")) {
   current = startGroup(current, line);
  } else if (line.startsWith("OBJECT")) {
   current = startObject(current, line);
  } else if (line.startsWith("END_OBJECT")) {
   endObject( current, line);
   current = current.getParentElement();
  } else if (line.startsWith("END_GROUP")) {
   endGroup( current, line);
   current = current.getParentElement();
  } else {
   addField( current, line);
  }
 }
 if (show) showDoc(System.out);
 return rootElem;
}
ucar.nc2.iosp.hdf4ODLparseraddField

Popular methods of ODLparser

  • <init>
  • parseFromString
  • endGroup
  • endObject
  • parseFile
  • parseValueCollection
  • showDoc
  • startGroup
  • startObject
  • stripQuotes

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Join (org.hibernate.mapping)
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now