Tabnine Logo
org.geotools.xml
Code IndexAdd Tabnine to your IDE (free)

How to use org.geotools.xml

Best Java code snippets using org.geotools.xml (Showing top 20 results out of 315)

origin: stackoverflow.com

 var mid_parser = new Parser();
Parser.apply(mid_parser, mid_patterns);
origin: stackoverflow.com

 private Route directions(final GeoPoint start, final GeoPoint dest) {
  Parser parser;
  //https://developers.google.com/maps/documentation/directions/#JSON <- get api
  String jsonURL = "http://maps.googleapis.com/maps/api/directions/json?";
  final StringBuffer sBuf = new StringBuffer(jsonURL);
  sBuf.append("origin=");
  sBuf.append(start.getLatitudeE6()/1E6);
  sBuf.append(',');
  sBuf.append(start.getLongitudeE6()/1E6);
  sBuf.append("&destination=");
  sBuf.append(dest.getLatitudeE6()/1E6);
  sBuf.append(',');
  sBuf.append(dest.getLongitudeE6()/1E6);
  sBuf.append("&sensor=true&mode=driving");
  parser = new GoogleParser(sBuf.toString());
  Route r =  parser.parse();
  return r;
}
origin: geotools/geotools

/**
 * Returns an instance of the targetNamespace if it can be found ... null otherwise.
 * targetNamespaces which can be found are either hard-coded namespaces
 * (SchemaFactory.properties), have already been parsed or were registered.
 *
 * @param targetNamespace
 * @see #registerSchema(Strin,Schema)
 */
public static synchronized Schema getInstance(URI targetNamespace) {
  return getInstance().getRealInstance(targetNamespace);
}
origin: geotools/geotools

/**
 * calls getInstance(URI,Level) with Level.WARNING
 *
 * @param desiredDocument
 * @param hints May be null.
 * @return Object
 * @throws SAXException
 * @see DocumentFactory#getInstance(URI, Map, Level)
 */
public static Object getInstance(URI desiredDocument, Map<String, Object> hints)
    throws SAXException {
  return getInstance(desiredDocument, hints, Level.WARNING);
}
origin: geotools/geotools

/**
 * Registers a Schema instance with the factory. A clone is NOT created within this method. The
 * Schema passed in is associated with the specified targetNamespace. The Schema is not tested
 * to ensure the intended targetNamespace (schema.getTargetNamespace()) is equal to
 * targetNamespace. The ramifications is that you may hack wildly within the repository, but we
 * aware you may have some 'undocumented features' as a result (odd Schemas being returned).
 *
 * @param targetNamespace
 * @param schema
 */
public static void registerSchema(URI targetNamespace, Schema schema) {
  getInstance().registerRealSchema(targetNamespace, schema);
}
origin: geotools/geotools

protected void init(Map<String, Object> hints) {
  if (hints == null) {
    hints = new HashMap<String, Object>();
  }
  this.hints = hints;
  setEntityResolver(XMLHandlerHints.toEntityResolver(hints));
}
/**
origin: geotools/geotools

private XSISAXHandler parseSchema(InputStream is1, Level level) throws SAXException {
  setParser();
  XSISAXHandler contentHandler = getSAXHandler(null);
  XSISAXHandler.setLogLevel(level);
  try {
    parser.parse(is1, contentHandler);
  } catch (IOException e) {
    throw new SAXException(e);
  }
  return contentHandler;
}
origin: geotools/geotools

/**
 * Returns an instance of the desired class. There is no provision for: a) same instances each
 * call b) different instances each call c) this factory being thread safe
 *
 * @param targetNamespace
 * @param desiredSchema URI the uri of which you want a schema instance.
 * @return Schema an instance of the desired schema.
 * @throws SAXException
 */
public static Schema getInstance(URI targetNamespace, URI desiredSchema) throws SAXException {
  return getInstance(targetNamespace, desiredSchema, Level.WARNING);
}
origin: geotools/geotools

public Object convert(Object source, Class target) throws Exception {
  if (String.class.equals(target)) {
    return convertToString(source);
  }
  return convertFromString((String) source, target);
}
origin: geotools/geotools

/** Default constructor. */
protected SchemaFactory() {
  super();
  initResolver();
}
origin: geotools/geotools

/** @see org.geotools.xml.XMLElementHandler#getValue() */
public Object getValue() throws SAXException {
  return (xeh == null) ? null : xeh.getValue();
}
origin: geotools/geotools

protected XSISAXHandler getSAXHandler(URI uri) {
  return new XSISAXHandler(uri);
}
origin: geotools/geotools

private Schema merge(Schema s1, Schema s2) throws SAXException {
  return new MergedSchema(s1, s2);
}
origin: geotools/geotools

/**
 * Used to set the logger level for all XMLSAXHandlers
 *
 * @param l
 */
public static void setLogLevel(Level l) {
  level = l;
  logger.setLevel(l);
  XMLElementHandler.setLogLevel(l);
}
origin: geotools/geotools

/**
 * Sets the logging level for all the XSISAXHandlers.
 *
 * @param l
 */
public static void setLogLevel(Level l) {
  logger.setLevel(l);
  XSIElementHandler.setLogLevel(l);
}
origin: stackoverflow.com

List<ParseResult> results = parser.parse(fileExtension, sourceCode);
for(ParseResult result : results){
  String type = result.getStyleKeys().get(0);
origin: stackoverflow.com

 import com.joestelmach.natty.*;

List<Date> dates =new Parser().parse("Start date 11/30/2013 , end date Friday, Sept. 7, 2013").get(0).getDates();
    System.out.println(dates.get(0));
    System.out.println(dates.get(1));

//output:
//Sat Nov 30 11:14:30 BDT 2013
//Sat Sep 07 11:14:30 BDT 2013
origin: geotools/geotools

public static synchronized Schema getInstance(URI targetNamespace, InputStream is1, Level level)
    throws SAXException {
  return getInstance().getRealInstance(targetNamespace, is1, level);
}
origin: geotools/geotools

public static Schema getInstance(URI targetNamespace, InputStream is1) throws SAXException {
  return getInstance(targetNamespace, is1, Level.WARNING);
}
origin: geotools/geotools

/**
 * Returns an instance of the desired class. There is no provision for: a) same instances each
 * call b) different instances each call c) this factory being thread safe
 *
 * @param targetNamespace The targetNamespace to search for.
 * @param desiredSchema URI the uri of which you want a schema instance.
 * @param level Level
 * @return Schema an instance of the desired schema.
 * @throws SAXException When something goes wrong
 */
public static synchronized Schema getInstance(
    URI targetNamespace, URI desiredSchema, Level level) throws SAXException {
  return getInstance().getRealInstance(targetNamespace, desiredSchema, level);
}
org.geotools.xml

Most used classes

  • Parser
    Main interface to the geotools xml parser. SCHEMA RESOLUTION See org.geotools.xml.Configuration jav
  • Node
    Represents a value in the parse tree. A node has a corresponds to a particular instance component of
  • Encoder
    Encodes objects as xml based on a schema. The function of the encoder is to traverse a tree of objec
  • Configuration
    Responsible for configuring a parser runtime environment. Implementations have the following respons
  • TransformerBase
    TransformerBase provides support for writing Object->XML encoders. The basic pattern for useage is t
  • Schemas,
  • InstanceComponent,
  • ElementInstance,
  • SchemaIndex,
  • AbstractComplexBinding,
  • XSD,
  • AbstractComplexEMFBinding,
  • ComplexEMFBinding,
  • ParserHandler,
  • SimpleContentComplexEMFBinding,
  • DatatypeConverterImpl,
  • SchemaResolver,
  • SLDParser,
  • AbstractSimpleBinding
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