gpt4 book ai didi

org.deegree.commons.xml.stax.XMLStreamReaderWrapper.getEventType()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 05:03:05 25 4
gpt4 key购买 nike

本文整理了Java中org.deegree.commons.xml.stax.XMLStreamReaderWrapper.getEventType()方法的一些代码示例,展示了XMLStreamReaderWrapper.getEventType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLStreamReaderWrapper.getEventType()方法的具体详情如下:
包路径:org.deegree.commons.xml.stax.XMLStreamReaderWrapper
类名称:XMLStreamReaderWrapper
方法名:getEventType

XMLStreamReaderWrapper.getEventType介绍

暂无

代码示例

代码示例来源:origin: deegree/deegree3

/**
 * Creates printable (debug) information about the event that the cursor of the given <code>XMLStreamReader</code>
 * currently points at.
 * 
 * @return printable information
 */
public final String getCurrentEventInfo() {
  String s = getEventTypeString( getEventType() );
  if ( getEventType() == START_ELEMENT || getEventType() == END_ELEMENT ) {
    s += ": " + getName();
  }
  Location location = getLocation();
  s += " at line " + location.getLineNumber() + ", column " + location.getColumnNumber() + " (character offset "
     + getLocation().getCharacterOffset() + ")";
  return s;
}

代码示例来源:origin: deegree/deegree3

private Feature readFeatureArray()
            throws XMLParsingException, XMLStreamException, UnknownCRSException {
  Feature feature = null;
  if ( xmlStream.getEventType() == START_ELEMENT ) {
    feature = featureReader.parseFeature( xmlStream, activeCRS );
  }
  if ( xmlStream.next() == END_ELEMENT ) {
    LOG.debug( "End of feature array property encountered." );
    featureArrayMode = false;
    propOccurences++;
  }
  return feature;
}

代码示例来源:origin: deegree/deegree3

public Feature read()
            throws IOException {
  Feature feature = null;
  try {
    while ( feature == null && xmlStream.getEventType() != END_ELEMENT ) {
      if ( featureArrayMode ) {
        feature = readFeatureArray();
      } else {
        feature = readProperty();
      }
    }
  } catch ( Exception e ) {
    e.printStackTrace();
    throw new IOException( e.getMessage(), e );
  }
  return feature;
}

代码示例来源:origin: deegree/deegree3

@Override
public void require( int type, String namespaceURI, String localName )
            throws XMLStreamException {
  if ( getEventType() != type ) {
    String msg = "Expected event type " + type + ", but found " + getCurrentEventInfo();
    throw new XMLParsingException( this, msg );
  }
  if ( type == START_ELEMENT || type == END_ELEMENT ) {
    if ( !getName().equals( new QName( namespaceURI, localName ) ) ) {
      String msg = "Expected {" + namespaceURI + "}" + localName + ", but found: " + getCurrentEventInfo();
      throw new XMLParsingException( this, msg );
    }
  }
}

代码示例来源:origin: deegree/deegree3

/**
 * Not piped to wrapped reader, because AXIOM provided reader (withoutCaching) behaves strange here.
 */
@Override
public String getElementText()
            throws XMLStreamException {
  if ( getEventType() != XMLStreamConstants.START_ELEMENT ) {
    throw new XMLStreamException( "parser must be on START_ELEMENT to read next text", getLocation() );
  }
  int eventType = next();
  StringBuilder content = new StringBuilder();
  while ( eventType != XMLStreamConstants.END_ELEMENT ) {
    if ( eventType == XMLStreamConstants.CHARACTERS || eventType == XMLStreamConstants.CDATA
       || eventType == XMLStreamConstants.SPACE || eventType == XMLStreamConstants.ENTITY_REFERENCE ) {
      content.append( getText() );
    } else if ( eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
          || eventType == XMLStreamConstants.COMMENT ) {
      // skipping
    } else if ( eventType == XMLStreamConstants.END_DOCUMENT ) {
      throw new XMLStreamException( "unexpected end of document when reading element text content",
                     getLocation() );
    } else if ( eventType == XMLStreamConstants.START_ELEMENT ) {
      throw new XMLStreamException( "element text content may not contain START_ELEMENT", getLocation() );
    } else {
      throw new XMLStreamException( "Unexpected event type " + eventType, getLocation() );
    }
    eventType = next();
  }
  return content.toString();
}

代码示例来源:origin: deegree/deegree3

private Points parseControlPoints( XMLStreamReaderWrapper xmlStream, ICRS crs )
            throws XMLStreamException {
  List<Point> controlPoints = null;
  if ( xmlStream.getEventType() == XMLStreamConstants.START_ELEMENT ) {
    String name = xmlStream.getLocalName();
    if ( "coordinates".equals( name ) ) {
      controlPoints = parseCoordinates( xmlStream, crs );
      xmlStream.nextTag();
    } else {
      controlPoints = new LinkedList<Point>();
      do {
        name = xmlStream.getLocalName();
        if ( "coord".equals( name ) ) {
          double[] coords = parseCoordType( xmlStream );
          // anonymous point (no registering necessary)
          controlPoints.add( geomFac.createPoint( null, coords, crs ) );
        } else {
          break;
        }
      } while ( xmlStream.nextTag() == XMLStreamConstants.START_ELEMENT );
    }
  }
  return geomFac.createPoints( controlPoints );
}

代码示例来源:origin: deegree/deegree3

/**
 * Starts the validation.
 * 
 * @throws XMLStreamException
 * @throws UnknownCRSException
 */
public void validateGeometries()
            throws XMLStreamException, UnknownCRSException {
  while ( xmlStream.getEventType() != END_DOCUMENT ) {
    if ( xmlStream.isStartElement() ) {
      if ( gmlStream.isGeometryElement() ) {
        validateGeometryElement();
      }
    }
    xmlStream.next();
  }
}

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == XMLStreamConstants.START_ELEMENT ) {
  String name = xmlStream.getLocalName();
  if ( "coordinates".equals( name ) ) {

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == XMLStreamConstants.START_ELEMENT ) {
  String name = xmlStream.getLocalName();
  if ( "coordinates".equals( name ) ) {

代码示例来源:origin: deegree/deegree3

while ( xmlStream.getEventType() == START_ELEMENT ) {

代码示例来源:origin: deegree/deegree3

while ( xmlStream.getEventType() == START_ELEMENT ) {
  QName propName = xmlStream.getName();
  LOG.debug( "- property '" + propName + "'" );

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == START_ELEMENT ) {
  if ( xmlStream.getLocalName().equals( "exterior" ) ) {
    exteriorSurface = parseSurfaceProperty( xmlStream, crs );
while ( xmlStream.getEventType() == START_ELEMENT ) {
  if ( xmlStream.getLocalName().equals( "interior" ) ) {
    interiorSurfaces.add( parseSurfaceProperty( xmlStream, crs ) );

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() != START_ELEMENT || !gmlNs.equals( xmlStream.getNamespaceURI() ) ) {
  String msg = "Surface requires a patches, trianglePatches or polygonPatches child element.";
  throw new XMLParsingException( xmlStream, msg );

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == START_ELEMENT ) {
  String name = xmlStream.getLocalName();
  if ( "coordinates".equals( name ) ) {

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == START_ELEMENT ) {
  String localName = xmlStream.getName().getLocalPart();
  if ( "startAngle".equals( localName ) ) {
if ( xmlStream.getEventType() == START_ELEMENT ) {
  String localName = xmlStream.getName().getLocalPart();
  if ( "endAngle".equals( localName ) ) {

代码示例来源:origin: deegree/deegree3

if ( xmlStream.getEventType() == START_ELEMENT ) {
  String localName = xmlStream.getName().getLocalPart();
  if ( "startAngle".equals( localName ) ) {
if ( xmlStream.getEventType() == START_ELEMENT ) {
  String localName = xmlStream.getName().getLocalPart();
  if ( "endAngle".equals( localName ) ) {

代码示例来源:origin: deegree/deegree3

List<Ring> interiorRings = new LinkedList<Ring>();
if ( xmlStream.getEventType() == START_ELEMENT ) {
  if ( xmlStream.getLocalName().equals( "outerBoundaryIs" ) ) {
    if ( xmlStream.nextTag() != START_ELEMENT ) {
while ( xmlStream.getEventType() == START_ELEMENT ) {
  if ( xmlStream.getLocalName().equals( "innerBoundaryIs" ) ) {
    if ( xmlStream.nextTag() != START_ELEMENT ) {

代码示例来源:origin: deegree/deegree3

xmlStream.require( START_ELEMENT, gmlNs, "refDirection" );
int refDirectionOutDimension = -1;
while ( xmlStream.getEventType() == START_ELEMENT ) {
  String localName = xmlStream.getName().getLocalPart();
  if ( "refDirection".equals( localName ) ) {

代码示例来源:origin: deegree/deegree3

private Feature readProperty()
            throws XMLParsingException, XMLStreamException, UnknownCRSException {
  Feature feature = null;
  int event = xmlStream.getEventType();
  if ( event == START_ELEMENT ) {
    QName propName = xmlStream.getName();

代码示例来源:origin: deegree/deegree3

while ( xmlStream.getEventType() == START_ELEMENT ) {
  if ( xmlStream.getLocalName().equals( "interior" ) ) {
    if ( xmlStream.nextTag() != START_ELEMENT ) {

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com