@Override public <C> ContentHandle<C> newHandle(Class<C> type) { ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new JAXBHandle<C>(factoryContext) : null; return handle; } }
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new XMLEventReaderHandle() : null; return handle; } };
@Override public Document getRelevanceInfo() { DOMHandle handle = getRelevanceInfo(new DOMHandle()); return (handle == null) ? null : handle.get(); } @Override
public static HandleFactoryRegistry registerDefaults(HandleFactoryRegistry registry) { registry.register(BytesHandle.newFactory()); registry.register(DOMHandle.newFactory()); registry.register(FileHandle.newFactory()); registry.register(InputSourceHandle.newFactory()); registry.register(InputStreamHandle.newFactory()); registry.register(ReaderHandle.newFactory()); registry.register(SourceHandle.newFactory()); registry.register(StringHandle.newFactory()); registry.register(XMLEventReaderHandle.newFactory()); registry.register(XMLStreamReaderHandle.newFactory()); return registry; }
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new StringHandle() : null; return handle; } };
/** * Locally adds the collections to the current collections * for the document. * @param collections the document collections * @return the document metadata handle */ public DocumentMetadataHandle withCollections(String... collections) { getCollections().addAll(collections); return this; }
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new InputStreamHandle() : null; return handle; } };
/** * Locally adds the property name and value to the current * properties for the document. * @param name the namespaced QName identifying the property * @param value the value of the property * @return the document metadata handle */ public DocumentMetadataHandle withProperty(QName name, Object value) { getProperties().put(name, value); return this; } /**
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new InputSourceHandle() : null; return handle; } };
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new ReaderHandle() : null; return handle; } };
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new XMLStreamReaderHandle() : null; return handle; } };
@Override public <C> ContentHandle<C> newHandle(Class<C> type) { @SuppressWarnings("unchecked") ContentHandle<C> handle = isHandled(type) ? (ContentHandle<C>) new SourceHandle() : null; return handle; } };
/** * Zero-argument constructor. */ public XMLEventReaderHandle() { super(); super.setFormat(Format.XML); setResendable(false); } /**
/** * Zero-argument constructor. */ public XMLStreamReaderHandle() { super(); super.setFormat(Format.XML); setResendable(false); } /**
/** * Zero-argument constructor. */ public DOMHandle() { super(); super.setFormat(Format.XML); setResendable(true); } /**
/** * Zero-argument constructor. */ public InputSourceHandle() { super(); super.setFormat(Format.XML); setResendable(false); } /**
/** * Zero-argument constructor. */ public DocumentMetadataHandle() { super(); super.setFormat(Format.XML); setResendable(true); }
/** * Zero-argument constructor. */ public SourceHandle() { super(); super.setFormat(Format.XML); setResendable(false); } /**
/** * Locally adds the property name and value to the current * properties for the document. * @param name the simple string name identifying the property * @param value the value of the property * @return the document metadata handle */ public DocumentMetadataHandle withProperty(String name, Object value) { getProperties().put(name, value); return this; }