src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/SimpleTypeBuilder.java
Print this page
*** 37,49 ****
--- 37,51 ----
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import javax.activation.MimeTypeParseException;
+ import javax.xml.bind.DatatypeConverter;
import com.sun.codemodel.internal.JJavaName;
import com.sun.codemodel.internal.util.JavadocEscapeWriter;
+ import com.sun.xml.internal.bind.v2.WellKnownNamespace;
import com.sun.tools.internal.xjc.ErrorReceiver;
import com.sun.tools.internal.xjc.model.CBuiltinLeafInfo;
import com.sun.tools.internal.xjc.model.CClassInfo;
import com.sun.tools.internal.xjc.model.CClassInfoParent;
import com.sun.tools.internal.xjc.model.CClassRef;
*** 60,73 ****
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIEnumMember;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.EnumMemberMode;
import com.sun.tools.internal.xjc.util.MimeTypeRange;
! import com.sun.xml.internal.bind.DatatypeConverterImpl;
! import com.sun.xml.internal.bind.v2.WellKnownNamespace;
import static com.sun.xml.internal.bind.v2.WellKnownNamespace.XML_MIME_URI;
! import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapter;
import com.sun.xml.internal.xsom.XSAttributeDecl;
import com.sun.xml.internal.xsom.XSComplexType;
import com.sun.xml.internal.xsom.XSComponent;
import com.sun.xml.internal.xsom.XSElementDecl;
import com.sun.xml.internal.xsom.XSFacet;
--- 62,75 ----
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIEnumMember;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIProperty;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo;
import com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.EnumMemberMode;
import com.sun.tools.internal.xjc.util.MimeTypeRange;
!
import static com.sun.xml.internal.bind.v2.WellKnownNamespace.XML_MIME_URI;
!
! import com.sun.xml.internal.bind.v2.runtime.SwaRefAdapterMarker;
import com.sun.xml.internal.xsom.XSAttributeDecl;
import com.sun.xml.internal.xsom.XSComplexType;
import com.sun.xml.internal.xsom.XSComponent;
import com.sun.xml.internal.xsom.XSElementDecl;
import com.sun.xml.internal.xsom.XSFacet;
*** 391,401 ****
// also check for swaRef
if(type.getTargetNamespace().equals(WellKnownNamespace.SWA_URI)) {
String name = type.getName();
if(name!=null && name.equals("swaRef"))
! return CBuiltinLeafInfo.STRING.makeAdapted(SwaRefAdapter.class,false);
}
// see if this type should be mapped to a type-safe enumeration by default.
// if so, built a EnumXDucer from it and return it.
--- 393,403 ----
// also check for swaRef
if(type.getTargetNamespace().equals(WellKnownNamespace.SWA_URI)) {
String name = type.getName();
if(name!=null && name.equals("swaRef"))
! return CBuiltinLeafInfo.STRING.makeAdapted(SwaRefAdapterMarker.class,false);
}
// see if this type should be mapped to a type-safe enumeration by default.
// if so, built a EnumXDucer from it and return it.
*** 666,676 ****
// look at the one attached to the facet object
mem = builder.getBindInfo(facet).get(BIEnumMember.class);
if (mem!=null) {
name = mem.name;
! if (mdoc != null) {
mdoc = mem.javadoc;
}
}
if(name==null) {
--- 668,678 ----
// look at the one attached to the facet object
mem = builder.getBindInfo(facet).get(BIEnumMember.class);
if (mem!=null) {
name = mem.name;
! if (mdoc == null) {
mdoc = mem.javadoc;
}
}
if(name==null) {
*** 844,854 ****
private BigInteger readFacet(String facetName,int offset) {
XSFacet me = initiatingType.getFacet(facetName);
if(me==null)
return null;
! BigInteger bi = DatatypeConverterImpl._parseInteger(me.getValue().value);
if(offset!=0)
bi = bi.add(BigInteger.valueOf(offset));
return bi;
}
--- 846,856 ----
private BigInteger readFacet(String facetName,int offset) {
XSFacet me = initiatingType.getFacet(facetName);
if(me==null)
return null;
! BigInteger bi = DatatypeConverter.parseInteger(me.getValue().value);
if(offset!=0)
bi = bi.add(BigInteger.valueOf(offset));
return bi;
}