/** * Creates a {@link Transducer} given a reference. * * Used to implement {@link RuntimeNonElementRef#getTransducer()}. * Shouldn't be called from anywhere else. * * TODO: this is not the proper place for this class to be in. */ public static Transducer createTransducer(RuntimeNonElementRef ref) { Transducer t = ref.getTarget().getTransducer(); RuntimePropertyInfo src = ref.getSource(); ID id = src.id(); if(id==ID.IDREF) return RuntimeBuiltinLeafInfoImpl.STRING; if(id==ID.ID) t = new IDTransducerImpl(t); MimeType emt = src.getExpectedMimeType(); if(emt!=null) t = new MimeTypedTransducer(t,emt); if(src.inlineBinaryData()) t = new InlineBinaryTransducer(t); if(src.getSchemaType()!=null) { if (src.getSchemaType().equals(createXSSimpleType())) { return RuntimeBuiltinLeafInfoImpl.STRING; } t = new SchemaTypeTransducer(t,src.getSchemaType()); } return t; }
/** * Creates a {@link Transducer} given a reference. * * Used to implement {@link RuntimeNonElementRef#getTransducer()}. * Shouldn't be called from anywhere else. * * TODO: this is not the proper place for this class to be in. */ public static Transducer createTransducer(RuntimeNonElementRef ref) { Transducer t = ref.getTarget().getTransducer(); RuntimePropertyInfo src = ref.getSource(); ID id = src.id(); if(id==ID.IDREF) return RuntimeBuiltinLeafInfoImpl.STRING; if(id==ID.ID) t = new IDTransducerImpl(t); MimeType emt = src.getExpectedMimeType(); if(emt!=null) t = new MimeTypedTransducer(t,emt); if(src.inlineBinaryData()) t = new InlineBinaryTransducer(t); if(src.getSchemaType()!=null) { if (src.getSchemaType().equals(createXSSimpleType())) { return RuntimeBuiltinLeafInfoImpl.STRING; } t = new SchemaTypeTransducer(t,src.getSchemaType()); } return t; }
/** * Creates a {@link Transducer} given a reference. * * Used to implement {@link RuntimeNonElementRef#getTransducer()}. * Shouldn't be called from anywhere else. * * TODO: this is not the proper place for this class to be in. */ public static Transducer createTransducer(RuntimeNonElementRef ref) { Transducer t = ref.getTarget().getTransducer(); RuntimePropertyInfo src = ref.getSource(); ID id = src.id(); if(id==ID.IDREF) return RuntimeBuiltinLeafInfoImpl.STRING; if(id==ID.ID) t = new IDTransducerImpl(t); MimeType emt = src.getExpectedMimeType(); if(emt!=null) t = new MimeTypedTransducer(t,emt); if(src.inlineBinaryData()) t = new InlineBinaryTransducer(t); if(src.getSchemaType()!=null) { if (src.getSchemaType().equals(createXSSimpleType())) { return RuntimeBuiltinLeafInfoImpl.STRING; } t = new SchemaTypeTransducer(t,src.getSchemaType()); } return t; }
/** * Creates a {@link Transducer} given a reference. * * Used to implement {@link RuntimeNonElementRef#getTransducer()}. * Shouldn't be called from anywhere else. * * TODO: this is not the proper place for this class to be in. */ public static Transducer createTransducer(RuntimeNonElementRef ref) { Transducer t = ref.getTarget().getTransducer(); RuntimePropertyInfo src = ref.getSource(); ID id = src.id(); if(id==ID.IDREF) return RuntimeBuiltinLeafInfoImpl.STRING; if(id==ID.ID) t = new IDTransducerImpl(t); MimeType emt = src.getExpectedMimeType(); if(emt!=null) t = new MimeTypedTransducer(t,emt); if(src.inlineBinaryData()) t = new InlineBinaryTransducer(t); if(src.getSchemaType()!=null) { if (src.getSchemaType().equals(createXSSimpleType())) { return RuntimeBuiltinLeafInfoImpl.STRING; } t = new SchemaTypeTransducer(t,src.getSchemaType()); } return t; }