Tabnine Logo
XMLSchemaReader.switchSource
Code IndexAdd Tabnine to your IDE (free)

How to use
switchSource
method
in
com.sun.msv.reader.xmlschema.XMLSchemaReader

Best Java code snippets using com.sun.msv.reader.xmlschema.XMLSchemaReader.switchSource (Showing top 20 results out of 315)

origin: apache/cxf

public void switchSource(Source source, State newState) {
  String url = source.getSystemId();
  if (url != null && sysIds.contains(url)) {
    return;
  }
  super.switchSource(source, newState);
}
origin: org.apache.cxf/cxf-core

public void switchSource(Source source, State newState) {
  String url = source.getSystemId();
  if (url != null && sysIds.contains(url)) {
    return;
  }
  super.switchSource(source, newState);
}
origin: org.apache.cxf/cxf-wstx-msv-validation

public void switchSource(Source source, State newState) {
  String url = source.getSystemId();
  if (url != null && sysIds.contains(url)) {
    return;
  }
  super.switchSource(source, newState);
}

origin: kohsuke/msv

/**
 * Parse a schema supplied by a javax.xml.transform Source.
 * @param source
 */
public void parse(Source source) {
  reader.switchSource(source,
      new RootIncludedSchemaState(
        reader.sfactory.schemaHead(null)) );
}

origin: com.sun.xml.bind/jaxb-extra-osgi

/**
 * Parse a schema supplied by a javax.xml.transform Source.
 * @param source
 */
public void parse(Source source) {
  reader.switchSource(source,
      new RootIncludedSchemaState(
        reader.sfactory.schemaHead(null)) );
}

origin: com.sun.xml.bind/jaxb-extra-osgi

/**
 * Parses an additional schema.
 * 
 * The caller can call this method many times to parse
 * multiple schemas.
 * 
 * If possible, the caller should set the system Id to the InputSource.
 */
public void parse( InputSource is ) {
  reader.switchSource( is,
    new RootIncludedSchemaState(
      reader.sfactory.schemaHead(null)) );
}

origin: msv/msv

/**
 * Parses an additional schema.
 * 
 * The caller can call this method many times to parse
 * multiple schemas.
 * 
 * If possible, the caller should set the system Id to the InputSource.
 */
public void parse( InputSource is ) {
  
  reader.switchSource( is,
    new RootIncludedSchemaState(
      reader.sfactory.schemaHead(null)) );
}

origin: com.sun.xml.bind/jaxb1-impl

/**
 * Parses an additional schema.
 * 
 * The caller can call this method many times to parse
 * multiple schemas.
 * 
 * If possible, the caller should set the system Id to the InputSource.
 */
public void parse( InputSource is ) {
  
  reader.switchSource( is,
    new RootIncludedSchemaState(
      reader.sfactory.schemaHead(null)) );
}

origin: kohsuke/msv

/**
 * Parses an additional schema.
 * 
 * The caller can call this method many times to parse
 * multiple schemas.
 * 
 * If possible, the caller should set the system Id to the InputSource.
 */
public void parse( InputSource is ) {
  reader.switchSource( is,
    new RootIncludedSchemaState(
      reader.sfactory.schemaHead(null)) );
}

origin: com.sun.xml.bind/jaxb-extra-osgi

  protected void startSelf() {
    final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
    super.startSelf();
    try {
      reader.switchSource( this,
        new RootIncludedSchemaState(
          reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
    } catch( AbortException e ) {
      // recover by ignoring the error
    }
  }
}
origin: kohsuke/msv

  protected void startSelf() {
    final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
    super.startSelf();
    try {
      reader.switchSource( this,
        new RootIncludedSchemaState(
          reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
    } catch( AbortException e ) {
      // recover by ignoring the error
    }
  }
}
origin: msv/msv

  protected void startSelf() {
    final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
    super.startSelf();
    try {
      reader.switchSource( this,
        new RootIncludedSchemaState(
          reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
    } catch( AbortException e ) {
      // recover by ignoring the error
    }
  }
}
origin: com.sun.xml.bind/jaxb1-impl

protected void startSelf() {
  final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
  super.startSelf();

  try {// parse included grammar first.
    reader.switchSource( this,
      new RootIncludedSchemaState(
        reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
  } catch( AbortException e ) {
    // recover by ignoring the error
  }
  
  // disable duplicate definition check.
  prevDuplicateCheck = reader.doDuplicateDefinitionCheck;
}

origin: com.sun.xml.bind/jaxb1-impl

  protected void startSelf() {
    final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
    super.startSelf();
    try {
      reader.switchSource( this,
        new RootIncludedSchemaState(
          reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
    } catch( AbortException e ) {
      // recover by ignoring the error
    }
  }
}
origin: msv/msv

protected void startSelf() {
  final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
  super.startSelf();

  try {// parse included grammar first.
    reader.switchSource( this,
      new RootIncludedSchemaState(
        reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
  } catch( AbortException e ) {
    // recover by ignoring the error
  }
  
  // disable duplicate definition check.
  prevDuplicateCheck = reader.doDuplicateDefinitionCheck;
}

origin: com.sun.xml.bind/jaxb-extra-osgi

protected void startSelf() {
  final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
  super.startSelf();

  try {// parse included grammar first.
    reader.switchSource( this,
      new RootIncludedSchemaState(
        reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
  } catch( AbortException e ) {
    // recover by ignoring the error
  }
  
  // disable duplicate definition check.
  prevDuplicateCheck = reader.doDuplicateDefinitionCheck;
}

origin: kohsuke/msv

protected void startSelf() {
  final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
  super.startSelf();

  try {// parse included grammar first.
    reader.switchSource( this,
      new RootIncludedSchemaState(
        reader.sfactory.schemaIncluded(this,reader.currentSchema.targetNamespace) ) );
  } catch( AbortException e ) {
    // recover by ignoring the error
  }
  
  // disable duplicate definition check.
  prevDuplicateCheck = reader.doDuplicateDefinitionCheck;
}

origin: com.sun.xml.bind/jaxb1-impl

protected void switchSource( State sourceState, State newRootState ) throws AbortException {
  final String schemaLocation = sourceState.getStartTag().getAttribute("schemaLocation");
  if(schemaLocation==null) {
    // schemaLocation attribute is required.
    reportError( ERR_MISSING_ATTRIBUTE, sourceState.getStartTag().qName, "schemaLocation" );
    // recover by ignoring this element
  }
  else
    // parse specified file
    switchSource( sourceState, schemaLocation, newRootState );
}
origin: msv/msv

protected void switchSource( State sourceState, State newRootState ) throws AbortException {
  final String schemaLocation = sourceState.getStartTag().getAttribute("schemaLocation");
  if(schemaLocation==null) {
    // schemaLocation attribute is required.
    reportError( ERR_MISSING_ATTRIBUTE, sourceState.getStartTag().qName, "schemaLocation" );
    // recover by ignoring this element
  }
  else
    // parse specified file
    switchSource( sourceState, schemaLocation, newRootState );
}
origin: com.sun.xml.bind/jaxb1-impl

  protected void startSelf() {
    super.startSelf();
    final XMLSchemaReader reader = (XMLSchemaReader)this.reader;
    
    // TODO: @schemaLocation is optional.
    String namespace = startTag.getAttribute("namespace");
    if( namespace==null )   namespace="";
    
    if( namespace.equals(reader.currentSchema.targetNamespace) ) {
      reader.reportError( XMLSchemaReader.ERR_IMPORTING_SAME_NAMESPACE );
      return;
    }
    
    if( reader.isSchemaDefined( reader.getOrCreateSchema(namespace) ) )
      // this grammar is already defined.
      // so ignore it.
      return;
        
    try {
      reader.switchSource( this,
        new RootIncludedSchemaState(reader.sfactory.schemaHead(namespace)) );
    } catch( AbortException e ) {
      // recover by ignoring the error
    }
  }
}
com.sun.msv.reader.xmlschemaXMLSchemaReaderswitchSource

Popular methods of XMLSchemaReader

  • parse
    loads XML Schema
  • <init>
  • getXmlSchemaForXmlSchema
  • _processOccurs
  • addBackPatchJob
  • createAttributeState
    creates a state object that parses "attribute","attributeGroup ref", and "anyAttribute".
  • createFacetState
  • createModelGroupState
    creates a state object that parses "all"/"group ref"/"choice" and "sequence".
  • createParserFactory
  • detectUndefinedOnes
  • getCurrentState
  • getDeclaredLocationOf
  • getCurrentState,
  • getDeclaredLocationOf,
  • getOrCreateSchema,
  • getResult,
  • getType,
  • isSchemaDefined,
  • isSchemaNamespace,
  • isSubstitutable,
  • markSchemaAsDefined

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • findViewById (Activity)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 12 Jupyter Notebook extensions
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