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

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

Best Java code snippets using ucar.nc2.iosp.hdf4.ODLparser.startObject (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.hdf4ODLparserstartObject

Popular methods of ODLparser

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JFrame (javax.swing)
  • Join (org.hibernate.mapping)
  • Top plugins for WebStorm
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