コード例 #1
0
 public void setFinal(final DerivationMethod derivation, final boolean enabled) {
   assertNotLocked();
   PreCondition.assertArgumentNotNull(derivation, "derivation");
   PreCondition.assertTrue(
       derivation.isExtension() || derivation.isRestriction(),
       "derivation (" + derivation + ") must be extension or restriction for a complex type");
   if (enabled) {
     m_final.add(derivation);
   } else {
     m_final.remove(derivation);
   }
 }
コード例 #2
0
 public boolean subtype(final PrimeType rhs) {
   PreCondition.assertArgumentNotNull(rhs, "type");
   switch (rhs.getKind()) {
     case CHOICE:
       {
         final PrimeChoiceType choiceType = (PrimeChoiceType) rhs;
         return subtype(choiceType.getLHS()) || subtype(choiceType.getRHS());
       }
       // case ANY_TYPE:
       // case COMPLEX:
       // {
       // final ComplexType complexType = (ComplexType)rhs;
       // return SchemaSupport.subtype(this, complexType);
       // }
     case ELEMENT:
       {
         @SuppressWarnings("unused")
         final ElementNodeType element = (ElementNodeType) rhs;
         return false;
       }
     default:
       {
         return false;
       }
   }
 }
コード例 #3
0
 protected N parseEventReader(XMLEventReader reader, String systemId)
     throws IOException, XdmMarshalException {
   // this is probably working now.
   PreCondition.assertNotNull(reader, "reader");
   builder.reset();
   XmlEventVisitor visitor = new XmlEventVisitor(reader, builder);
   if (systemId != null) visitor.setSystemId(systemId);
   visitor.parse();
   return builder.getNode();
 }
コード例 #4
0
 public ComplexTypeImpl(
     final QName name,
     final boolean isNative,
     final boolean isAnonymous,
     final ScopeExtent scope,
     final Type baseType,
     final DerivationMethod derivation,
     final Map<QName, AttributeUse> attributeUses,
     final ContentType contentType,
     final Set<DerivationMethod> block,
     final AtomicType atoms) {
   super(PreCondition.assertArgumentNotNull(name, "name"), isAnonymous, scope, derivation);
   this.isNative = isNative;
   this.m_atoms = PreCondition.assertArgumentNotNull(atoms, "atoms");
   m_baseType = baseType; // PreCondition.assertArgumentNotNull(baseType, "baseType");
   m_contentType = PreCondition.assertArgumentNotNull(contentType, "contentType");
   m_block = PreCondition.assertArgumentNotNull(block, "block");
   m_blockUnmodifiable = Collections.unmodifiableSet(m_block);
   m_attributeUses = PreCondition.assertArgumentNotNull(attributeUses, "attributeUses");
   m_attributeWildcard = computeAttributeWildcard(baseType, derivation);
 }
コード例 #5
0
 public N parse(Reader characterStream, String systemId) throws IOException, XdmMarshalException {
   PreCondition.assertNotNull(characterStream, "characterStream");
   try {
     XMLEventReader eventReader;
     if (systemId == null) {
       eventReader = ipf.createXMLEventReader(characterStream);
     } else {
       eventReader = ipf.createXMLEventReader(systemId.toString(), characterStream);
     }
     return parseEventReader(eventReader, systemId);
   } catch (XMLStreamException xse) {
     throw new XdmMarshalException(xse);
   }
 }
コード例 #6
0
ファイル: Item.java プロジェクト: TIBCOSoftware/genxdm
 public AtomItem(A atom) {
   this.atom = PreCondition.assertNotNull(atom, "atom");
 }
コード例 #7
0
ファイル: Item.java プロジェクト: TIBCOSoftware/genxdm
 public NodeItem(N node) {
   this.node = PreCondition.assertNotNull(node, "node");
 }
コード例 #8
0
 public DefaultDocumentHandler(final FragmentBuilder<N> builder, final Model<N> model) {
   super(PreCondition.assertNotNull(model, "model"));
   this.builder = PreCondition.assertNotNull(builder, "builder");
   ipf = XMLInputFactory.newInstance();
   initIPF();
 }
コード例 #9
0
 public DefaultDocumentHandler(ProcessingContext<N> context) {
   this(PreCondition.assertNotNull(context, "context").newFragmentBuilder(), context.getModel());
 }
コード例 #10
0
 XmlNodeMutableContext(XmlNodeContext context) {
   this.context = PreCondition.assertNotNull(context, "context");
 }
コード例 #11
0
 public XMLIdentityConstraint(final QName name, final XMLScope global) {
   super(global);
   this.name = PreCondition.assertArgumentNotNull(name);
 }
コード例 #12
0
 public void setContentType(final ContentType contentType) {
   assertNotLocked();
   m_contentType = PreCondition.assertArgumentNotNull(contentType, "name");
 }
コード例 #13
0
 public boolean isFinal(final DerivationMethod derivation) {
   PreCondition.assertArgumentNotNull(derivation, "derivation");
   return m_final.contains(derivation);
 }
コード例 #14
0
 public ValidationItemIterator(final ValidationItem pendingItem) {
   m_pendingItem = PreCondition.assertArgumentNotNull(pendingItem);
 }
コード例 #15
0
 public XMLIdentityConstraint(
     final QName name, final XMLScope global, final SrcFrozenLocation location) {
   super(global, location);
   this.name = PreCondition.assertArgumentNotNull(name);
 }
コード例 #16
0
 public AtomicUrTypeImpl(final String W3C_XML_SCHEMA_NS_URI, final SimpleUrType baseType) {
   this.m_name = new QName(W3C_XML_SCHEMA_NS_URI, "anyAtomicType");
   this.m_baseType = PreCondition.assertArgumentNotNull(baseType, "baseType");
 }
コード例 #17
0
ファイル: XmlDuration.java プロジェクト: TIBCOSoftware/genxdm
 public XmlDuration(final int months, final BigDecimal seconds) {
   this.months = months;
   this.seconds = PreCondition.assertArgumentNotNull(seconds, "seconds");
 }