com.sun.xml.xsom.XSWildcard Java Examples

The following examples show how to use com.sun.xml.xsom.XSWildcard. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SchemaWriter.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
private void wildcard( String tagName, XSWildcard wc, String extraAtts ) {
	final String proessContents;
	switch(wc.getMode()) {
	case XSWildcard.LAX:
		proessContents = " processContents='lax'";break;
	case XSWildcard.STRTICT:
		proessContents = "";break;
	case XSWildcard.SKIP:
		proessContents = " processContents='skip'";break;
	default:
		throw new AssertionError();
	}

	println(MessageFormat.format("<{0}{1}{2}{3}/>",tagName, proessContents, wc.apply(WILDCARD_NS), extraAtts));
}
 
Example #2
Source File: SchemaWriter.java    From citygml4j with Apache License 2.0 5 votes vote down vote up
private void dumpComplexTypeAttribute( XSComplexType type ) {
	Iterator<?> itr;

	itr = type.iterateAttGroups();
	while(itr.hasNext())
		dumpRef( (XSAttGroupDecl)itr.next() );

	itr = type.iterateDeclaredAttributeUses();
	while(itr.hasNext())
		attributeUse( (XSAttributeUse)itr.next() );

	XSWildcard awc = type.getAttributeWildcard();
	if(awc!=null)
		wildcard("anyAttribute",awc,"");
}
 
Example #3
Source File: SchemaTreeTraverser.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * Creates node for wild card with additional attributes.
 *
 * @param wc        Wild card.
 * @param extraAtts Additional attributes.
 */
private void wildcard(XSWildcard wc, String extraAtts) {
    // TODO
    SchemaTreeNode newNode = new SchemaTreeNode(MessageFormat.format(
            "Any ", new Object[]{extraAtts}), wc.getLocator());
    currNode.add(newNode);
}
 
Example #4
Source File: ComplexTypeImpl.java    From jolie with GNU Lesser General Public License v2.1 5 votes vote down vote up
public XSWildcard getAttributeWildcard() {
    WildcardImpl complete = localAttWildcard;
    
    Iterator<XSAttGroupDecl> itr = iterateAttGroups();
    while( itr.hasNext() ) {
        WildcardImpl w = (WildcardImpl)(itr.next().getAttributeWildcard());
        
        if(w==null)     continue;
        
        if(complete==null)
            complete = w;
        else
            // TODO: the spec says it's intersection,
            // but I think it has to be union.
            complete = complete.union(ownerDocument,w);
    }
    
    if( getDerivationMethod()==RESTRICTION )    return complete;
    
    WildcardImpl base=null;
    XSType baseType = getBaseType();
    if(baseType.asComplexType()!=null)
        base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard();
    
    if(complete==null)  return base;
    if(base==null)      return complete;
    
    return complete.union(ownerDocument,base);
}
 
Example #5
Source File: JumbuneSchemaWriter.java    From jumbune with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void dumpComplexTypeAttribute( XSComplexType type ) {
    Iterator<?> itr;

    itr = type.iterateAttGroups();
    while(itr.hasNext())
        dumpRef( (XSAttGroupDecl)itr.next() );

    itr = type.iterateDeclaredAttributeUses();
    while(itr.hasNext())
        attributeUse( (XSAttributeUse)itr.next() );

    XSWildcard awc = type.getAttributeWildcard();
    if(awc!=null)
        wildcard("anyAttribute",awc,"");
}
 
Example #6
Source File: JumbuneSchemaWriter.java    From jumbune with GNU Lesser General Public License v3.0 5 votes vote down vote up
private void wildcard( String tagName, XSWildcard wc, String extraAtts ) {
    final String proessContents;
    switch(wc.getMode()) {
    case XSWildcard.LAX:
        proessContents = " processContents='lax'";break;
    case XSWildcard.STRTICT:
        proessContents = "";break;
    case XSWildcard.SKIP:
        proessContents = " processContents='skip'";break;
    default:
        throw new AssertionError();
    }

    println(MessageFormat.format("<{0}{1}{2}{3}/>",tagName, proessContents, wc.apply(WILDCARD_NS), extraAtts));
}
 
Example #7
Source File: MetaPlugin.java    From jaxb2-rich-contract-plugin with MIT License 4 votes vote down vote up
@Override
public QName wildcard(final XSWildcard wc) {
	return new QName("", "*");
}
 
Example #8
Source File: Axis.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public Iterator<XSWildcard> complexType(XSComplexType type) {
    return singleton(type.getAttributeWildcard());
}
 
Example #9
Source File: Axis.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public Iterator<XSWildcard> attGroupDecl(XSAttGroupDecl decl) {
    return singleton(decl.getAttributeWildcard());
}
 
Example #10
Source File: DefaultFunctionImpl.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
public T wildcard(XSWildcard wc) {
	return defaultValue(wc);
}
 
Example #11
Source File: FindXSElementDeclVisitor.java    From jaxb2-basics with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
}
 
Example #12
Source File: SimpleTypeVisitor.java    From hyperjaxb3 with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
	todo("Wildcard.");
}
 
Example #13
Source File: SimpleTypeAnalyzer.java    From hyperjaxb3 with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public T wildcard(XSWildcard arg0) {
	return null;
}
 
Example #14
Source File: JumbuneSchemaWriter.java    From jumbune with GNU Lesser General Public License v3.0 4 votes vote down vote up
public void wildcard( XSWildcard wc ) {
    wildcard("any",wc,"");
}
 
Example #15
Source File: SchemaWriter.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
private void wildcard( XSWildcard wc, String extraAtts ) {
    // TODO
    println(MessageFormat.format("<any/>", new Object[]{extraAtts}));
}
 
Example #16
Source File: MetaPlugin.java    From jaxb2-rich-contract-plugin with MIT License 4 votes vote down vote up
@Override
public QName wildcard(final XSWildcard wc) {
	return new QName("", "*");
}
 
Example #17
Source File: MetaPlugin.java    From jaxb2-rich-contract-plugin with MIT License 4 votes vote down vote up
@Override
public Boolean wildcard(final XSWildcard wc) {
	return false;
}
 
Example #18
Source File: MultiplicityCounterNG.java    From jsonix-schema-compiler with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public Multiplicity wildcard(XSWildcard wc) {
	return ONE;
}
 
Example #19
Source File: CollectEnumerationValuesVisitor.java    From jsonix-schema-compiler with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
	// todo("Wildcard.");
}
 
Example #20
Source File: CollectSimpleTypeNamesVisitor.java    From jsonix-schema-compiler with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
	// todo("Wildcard.");
}
 
Example #21
Source File: SchemaWalker.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
}
 
Example #22
Source File: SchemaWriter.java    From citygml4j with Apache License 2.0 4 votes vote down vote up
public void wildcard( XSWildcard wc ) {
	wildcard("any",wc,"");
}
 
Example #23
Source File: XmlFormBuilder.java    From dynaform with Artistic License 2.0 4 votes vote down vote up
public XmlForm wildcard(XSWildcard wc) {
  if (log.isDebugEnabled())
    log.debug("Wildcard: " + wc);

  return null;
}
 
Example #24
Source File: AbstractAxisImpl.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public Iterator<T> wildcard(XSWildcard wc) {
    return empty();
}
 
Example #25
Source File: SchemaWriter.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void wildcard( XSWildcard wc ) {
    wildcard(wc,"");
}
 
Example #26
Source File: SchemaTreeTraverser.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public void wildcard(XSWildcard wc) {
    wildcard(wc, "");
}
 
Example #27
Source File: ComponentNameFunction.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * @see com.sun.xml.xsom.visitor.XSTermFunction#wildcard(XSWildcard)
 */
public String wildcard(XSWildcard wc) {
    // unnamed component
    return nameGetter.wildcard( wc );
}
 
Example #28
Source File: NameGetter.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public String wildcard(XSWildcard wc) {
    return localize("wildcard");
}
 
Example #29
Source File: XSFunctionFilter.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
public T wildcard(XSWildcard wc) {
    return core.wildcard(wc);
}
 
Example #30
Source File: XSFinder.java    From jolie with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * @see com.sun.xml.xsom.visitor.XSTermFunction#wildcard(com.sun.xml.xsom.XSWildcard)
 */
public Boolean wildcard(XSWildcard wc) {
    return Boolean.FALSE;
}