public CompactLink copy(String newId) { CompactLink newLink = null; if (this instanceof CompactObjectPropertyLink) newLink = new CompactObjectPropertyLink(newId, ((CompactObjectPropertyLink)this).getObjectPropertyType()); else if (this instanceof CompactSubClassLink) newLink = new CompactSubClassLink(newId); else logger.error("cannot instanciate a link from the type: " + this.getType().toString()); return newLink; } }
else if (link instanceof CompactObjectPropertyLink && ((CompactObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.Direct) w = ModelingParams.PROPERTY_DIRECT_WEIGHT; else if (link instanceof ObjectPropertyLink && ((ObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.Indirect) w = ModelingParams.PROPERTY_INDIRECT_WEIGHT; else if (link instanceof CompactObjectPropertyLink && ((CompactObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.Indirect) w = ModelingParams.PROPERTY_INDIRECT_WEIGHT; else if (link instanceof ObjectPropertyLink && ((ObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithOnlyDomain) w = ModelingParams.PROPERTY_WITH_ONLY_DOMAIN_WEIGHT; else if (link instanceof CompactObjectPropertyLink && ((CompactObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithOnlyDomain) w = ModelingParams.PROPERTY_WITH_ONLY_DOMAIN_WEIGHT; else if (link instanceof ObjectPropertyLink && ((ObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithOnlyRange) w = ModelingParams.PROPERTY_WITH_ONLY_RANGE_WEIGHT; else if (link instanceof CompactObjectPropertyLink && ((CompactObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithOnlyRange) w = ModelingParams.PROPERTY_WITH_ONLY_RANGE_WEIGHT; else if (link instanceof ObjectPropertyLink && ((ObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithoutDomainAndRange) w = ModelingParams.PROPERTY_WITHOUT_DOMAIN_RANGE_WEIGHT; else if (link instanceof CompactObjectPropertyLink && ((CompactObjectPropertyLink)link).getObjectPropertyType() == ObjectPropertyType.WithoutDomainAndRange) w = ModelingParams.PROPERTY_WITHOUT_DOMAIN_RANGE_WEIGHT; else if (link instanceof SubClassLink)
writer.name("type").value(link.getType().toString()); if (link instanceof CompactObjectPropertyLink) writer.name("objectPropertyType").value( ((CompactObjectPropertyLink)link).getObjectPropertyType().toString()); else if (link instanceof LabeledLink) { LabeledLink l = (LabeledLink)link;
LinkType.ObjectPropertyLink, ((CompactObjectPropertyLink) link).getObjectPropertyType());