本文整理汇总了Java中com.thoughtworks.xstream.io.xml.QNameMap类的典型用法代码示例。如果您正苦于以下问题:Java QNameMap类的具体用法?Java QNameMap怎么用?Java QNameMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QNameMap类属于com.thoughtworks.xstream.io.xml包,在下文中一共展示了QNameMap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
public HierarchicalStreamWriter createWriter(OutputStream paramOutputStream)
{
try
{
if (this.useSerializeAsArray)
{
JettisonStaxWriter localJettisonStaxWriter = new JettisonStaxWriter(new QNameMap(), this.mof.createXMLStreamWriter(paramOutputStream), getNameCoder(), this.convention);
return localJettisonStaxWriter;
}
StaxWriter localStaxWriter = new StaxWriter(new QNameMap(), this.mof.createXMLStreamWriter(paramOutputStream), getNameCoder());
return localStaxWriter;
}
catch (XMLStreamException localXMLStreamException)
{
throw new StreamException(localXMLStreamException);
}
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:18,代码来源:JettisonMappedXmlDriver.java
示例2: beforeMarshal
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
@Override
public void beforeMarshal(Object o, QNameMap qmap) {
if (o instanceof DMNModelInstrumentedBase) {
DMNModelInstrumentedBase base = (DMNModelInstrumentedBase) o;
String ddPrefix = base.getPrefixForNamespaceURI(DMNDiagram.DMNV11_DD).orElse("dd");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DD, "DMNDiagram", ddPrefix), "DMNDiagram");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DD, "DMNShape", ddPrefix), "DMNShape");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DD, "DMNFontStyle", ddPrefix), "DMNFontStyle");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DD, "BorderSize", ddPrefix), "BorderSize");
String dcPrefix = base.getPrefixForNamespaceURI(DMNDiagram.DMNV11_DC).orElse("dc");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DC, "Bounds", dcPrefix), "Bounds");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DC, "BgColor", dcPrefix), "BgColor");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DC, "BorderColor", dcPrefix), "BorderColor");
qmap.registerMapping(new QName(DMNDiagram.DMNV11_DC, "FontColor", dcPrefix), "FontColor");
}
}
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:19,代码来源:DDExtensionsRegister.java
示例3: JettisonStaxWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
/**
* @since 1.4
*/
public JettisonStaxWriter(
final QNameMap qnameMap, final XMLStreamWriter out, final boolean writeEnclosingDocument,
final boolean namespaceRepairingMode, final NameCoder nameCoder, final MappedNamespaceConvention convention)
throws XMLStreamException {
super(qnameMap, out, writeEnclosingDocument, namespaceRepairingMode, nameCoder);
this.convention = convention;
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:JettisonStaxWriter.java
示例4: createReader
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
@Override
public HierarchicalStreamReader createReader(final Reader reader) {
try {
return new StaxReader(new QNameMap(), mif.createXMLStreamReader(reader), getNameCoder());
} catch (final XMLStreamException e) {
throw new StreamException(e);
}
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:JettisonMappedXmlDriver.java
示例5: createWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
@Override
public HierarchicalStreamWriter createWriter(final Writer writer) {
try {
if (useSerializeAsArray) {
return new JettisonStaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer), getNameCoder(),
convention);
} else {
return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(writer), getNameCoder());
}
} catch (final XMLStreamException e) {
throw new StreamException(e);
}
}
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:JettisonMappedXmlDriver.java
示例6: marshalXmlStreamWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
@Override
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
try {
doMarshal(graph, new StaxWriter(new QNameMap(), streamWriter, this.nameCoder), null);
}
catch (XMLStreamException ex) {
throw convertXStreamException(ex, true);
}
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:10,代码来源:XStreamMarshaller.java
示例7: createHierarchicalStreamWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
protected HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange, Object body, OutputStream stream) throws XMLStreamException {
if (isPrettyPrint()) {
try {
// the json spec. expects UTF-8 as the default encoding
return new JsonWriter(new OutputStreamWriter(stream, "UTF-8"));
} catch (UnsupportedEncodingException uee) {
throw new XMLStreamException(uee);
}
}
return new StaxWriter(new QNameMap(), mof.createXMLStreamWriter(stream));
}
开发者ID:HydAu,项目名称:Camel,代码行数:13,代码来源:JsonDataFormat.java
示例8: createHierarchicalStreamWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
protected HierarchicalStreamWriter createHierarchicalStreamWriter(Exchange exchange, Object body, OutputStream stream) throws XMLStreamException {
updateCharactorEncodingInfo(exchange);
if (getXstreamDriver() != null) {
return getXstreamDriver().createWriter(stream);
}
XMLStreamWriter xmlWriter = getStaxConverter().createXMLStreamWriter(stream, exchange);
return new StaxWriter(new QNameMap(), xmlWriter);
}
开发者ID:HydAu,项目名称:Camel,代码行数:9,代码来源:XStreamDataFormat.java
示例9: createHierarchicalStreamReader
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
protected HierarchicalStreamReader createHierarchicalStreamReader(Exchange exchange, InputStream stream) throws XMLStreamException {
updateCharactorEncodingInfo(exchange);
if (getXstreamDriver() != null) {
return getXstreamDriver().createReader(stream);
}
XMLStreamReader xmlReader = getStaxConverter().createXMLStreamReader(stream, exchange);
return new StaxReader(new QNameMap(), xmlReader);
}
开发者ID:HydAu,项目名称:Camel,代码行数:9,代码来源:XStreamDataFormat.java
示例10: createInstance
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
/**
* Returns a QNameMap which maps the namespace:name couplets on
* to object types for the OAI PMH Schema.
*
* @return a map containing qnames from the oai-pmh schema
* namespace.
*/
@Override
public final QNameMap createInstance() {
QNameMap qNameMap = new QNameMap();
qNameMap.setDefaultNamespace("http://rs.tdwg.org/UBIF/2006/");
qNameMap.registerMapping(new QName("http://rs.tdwg.org/UBIF/2006/", "TaxonName"),
TaxonName.class);
return qNameMap;
}
开发者ID:RBGKew,项目名称:eMonocot,代码行数:16,代码来源:QNameMapFactory.java
示例11: createDriver
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
protected HierarchicalStreamDriver createDriver() {
// careful, called from inside base class constructor
qnameMap = new QNameMap();
StaxDriver driver = new BEAStaxDriver(qnameMap);
driver.setRepairingNamespace(false);
return driver;
}
开发者ID:x-stream,项目名称:xstream,代码行数:8,代码来源:QNameMappedConcreteClassesTest.java
示例12: createReader
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
public HierarchicalStreamReader createReader(File paramFile)
{
FileInputStream localFileInputStream = null;
try
{
localFileInputStream = new FileInputStream(paramFile);
StaxReader localStaxReader = new StaxReader(new QNameMap(), this.mif.createXMLStreamReader(paramFile.toURI().toASCIIString(), localFileInputStream), getNameCoder());
try
{
localFileInputStream.close();
}
catch (IOException localIOException2)
{
}
return localStaxReader;
}
catch (XMLStreamException localXMLStreamException)
{
throw new StreamException(localXMLStreamException);
}
catch (IOException localIOException1)
{
throw new StreamException(localIOException1);
}
finally
{
if (localFileInputStream != null);
try
{
localFileInputStream.close();
}
catch (IOException localIOException3)
{
}
}
}
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:37,代码来源:JettisonMappedXmlDriver.java
示例13: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), SourceHoldings.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(SourceHoldings.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:SourceHoldingOlemlRecordProcessor.java
示例14: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), Instance.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(InstanceCollection.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:InstanceOlemlRecordProcessor.java
示例15: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), OleHoldings.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(OleHoldings.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:HoldingOlemlRecordProcessor.java
示例16: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), Item.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(Item.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:ItemOlemlRecordProcessor.java
示例17: getExstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getExstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), EInstance.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(org.kuali.ole.docstore.model.xmlpojo.work.einstance.oleml.InstanceCollection.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:WorkInstanceOlemlRecordProcessor.java
示例18: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), EHoldings.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(EHoldings.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:WorkEHoldingOlemlRecordProcessor.java
示例19: getXstream
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
private static XStream getXstream() {
QNameMap nsm = new QNameMap();
nsm.registerMapping(new QName("uri", "ole"), EInstance.class);
StaxDriver d = new StaxDriver(nsm);
XStream xStream = new XStream(d);
xStream.autodetectAnnotations(true);
xStream.processAnnotations(InstanceCollection.class);
return xStream;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:WorkEInstanceOlemlRecordProcessor.java
示例20: marshalXmlStreamWriter
import com.thoughtworks.xstream.io.xml.QNameMap; //导入依赖的package包/类
@Override
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException {
try {
marshal(graph, new StaxWriter(new QNameMap(), streamWriter));
}
catch (XMLStreamException ex) {
throw convertXStreamException(ex, true);
}
}
开发者ID:deathspeeder,项目名称:class-guard,代码行数:10,代码来源:XStreamMarshaller.java
注:本文中的com.thoughtworks.xstream.io.xml.QNameMap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论