com.sun.xml.internal.rngom.nc.SimpleNameClass Java Examples

The following examples show how to use com.sun.xml.internal.rngom.nc.SimpleNameClass. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AttributePattern.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #2
Source File: AttributePattern.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #3
Source File: AttributePattern.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #4
Source File: AttributePattern.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #5
Source File: AttributePattern.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #6
Source File: AttributePattern.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #7
Source File: AttributePattern.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #8
Source File: AttributePattern.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
void checkRestrictions(int context, DuplicateAttributeDetector dad, Alphabet alpha)
  throws RestrictionViolationException {
  switch (context) {
  case START_CONTEXT:
    throw new RestrictionViolationException("start_contains_attribute");
  case ELEMENT_CONTEXT:
    if (nameClass.isOpen())
      throw new RestrictionViolationException("open_name_class_not_repeated");
    break;
  case ELEMENT_REPEAT_GROUP_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_group_contains_attribute");
  case ELEMENT_REPEAT_INTERLEAVE_CONTEXT:
    throw new RestrictionViolationException("one_or_more_contains_interleave_contains_attribute");
  case LIST_CONTEXT:
    throw new RestrictionViolationException("list_contains_attribute");
  case ATTRIBUTE_CONTEXT:
    throw new RestrictionViolationException("attribute_contains_attribute");
  case DATA_EXCEPT_CONTEXT:
    throw new RestrictionViolationException("data_except_contains_attribute");
  }
  if (!dad.addAttribute(nameClass)) {
    if (nameClass instanceof SimpleNameClass)
      throw new RestrictionViolationException("duplicate_attribute_detail", ((SimpleNameClass)nameClass).name);
    else
      throw new RestrictionViolationException("duplicate_attribute");
  }
  try {
    p.checkRestrictions(ATTRIBUTE_CONTEXT, null, null);
  }
  catch (RestrictionViolationException e) {
    e.maybeSetLocator(loc);
    throw e;
  }
}
 
Example #9
Source File: AbstractExtendedComplexTypeBuilder.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #10
Source File: AbstractExtendedComplexTypeBuilder.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #11
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #12
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #13
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #14
Source File: AbstractExtendedComplexTypeBuilder.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #15
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}
 
Example #16
Source File: AbstractExtendedComplexTypeBuilder.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Gets a {@link SimpleNameClass} from the name of a {@link XSDeclaration}.
 */
private NameClass getNameClass(XSDeclaration decl) {
    return new SimpleNameClass(new QName(decl.getTargetNamespace(), decl.getName()));
}